mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-06-28 04:35:36 +00:00
Optimizations
This solves an FPS problem when 10 or more entities take damage
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user