Optimizations

This solves an FPS problem when 10 or more entities take damage
This commit is contained in:
GabsPuNs
2026-05-28 22:22:22 -04:00
parent 338604d7c5
commit 8dececbf90
11 changed files with 230 additions and 480 deletions

View File

@@ -153,6 +153,7 @@ bool Zombie::hurt(DamageSource *source, float dmg)
{
if (Monster::hurt(source, dmg))
{
/*
shared_ptr<LivingEntity> target = getTarget();
if ( (target == nullptr) && getAttackTarget() != nullptr && getAttackTarget()->instanceof(eTYPE_LIVINGENTITY) ) target = dynamic_pointer_cast<LivingEntity>( getAttackTarget() );
if ( (target == nullptr) && source->getEntity() != nullptr && source->getEntity()->instanceof(eTYPE_LIVINGENTITY) ) target = dynamic_pointer_cast<LivingEntity>( source->getEntity() );
@@ -187,7 +188,7 @@ bool Zombie::hurt(DamageSource *source, float dmg)
}
}
}
*/
return true;
}