1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Reduced number of accesses to CGObjectInstance::subID

This commit is contained in:
Ivan Savenko
2023-10-24 17:11:25 +03:00
parent 455d8d4738
commit 03e1169781
27 changed files with 135 additions and 97 deletions

View File

@@ -95,7 +95,7 @@ void CGDwelling::initObj(CRandomGenerator & rand)
case Obj::CREATURE_GENERATOR1:
case Obj::CREATURE_GENERATOR4:
{
VLC->objtypeh->getHandlerFor(ID, subID)->configureObject(this, rand);
getObjectHandler()->configureObject(this, rand);
if (getOwner() != PlayerColor::NEUTRAL)
cb->gameState()->players[getOwner()].dwellings.emplace_back(this);