mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
fix(pets): tamed pandas and crabs leave their spawn groups
The live server scripts (l_fv_panda_server.lua, l_crab_server.lua, in the client's res/scripts) take a tamed pet out of the groups it was spawned into: the panda leaves "pandas" and "panda<tamer>", the crab "crab<tamer>". The panda spawner counts "pandas" (at most five) and "panda<player>" (one per player), so tamed pandas used to keep counting against both. Entity gets RemoveFromGroup for it. The dig and object pet scripts keep their TODO: their live server scripts are not shipped with the client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1935,6 +1935,10 @@ void Entity::AddToGroup(const std::string& group) {
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::RemoveFromGroup(const std::string& group) {
|
||||
std::erase(m_Groups, group);
|
||||
}
|
||||
|
||||
void Entity::RetroactiveVaultSize() const {
|
||||
auto* const inventoryComponent = GetComponent<InventoryComponent>();
|
||||
if (!inventoryComponent) return;
|
||||
|
||||
Reference in New Issue
Block a user