mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-03 17:27:47 +00:00
stop ticking status if dead
This commit is contained in:
parent
249194630c
commit
0a4bd0dee4
1 changed files with 8 additions and 5 deletions
|
@ -355,13 +355,16 @@ bool Sapphire::Entity::Chara::checkAction()
|
|||
|
||||
void Sapphire::Entity::Chara::update( uint64_t tickCount )
|
||||
{
|
||||
updateStatusEffects();
|
||||
|
||||
if( std::difftime( static_cast< time_t >( tickCount ), m_lastTickTime ) > 3000 )
|
||||
if( isAlive() )
|
||||
{
|
||||
onTick();
|
||||
updateStatusEffects();
|
||||
|
||||
m_lastTickTime = static_cast< time_t >( tickCount );
|
||||
if( std::difftime( static_cast< time_t >( tickCount ), m_lastTickTime ) > 3000 )
|
||||
{
|
||||
onTick();
|
||||
|
||||
m_lastTickTime = static_cast< time_t >( tickCount );
|
||||
}
|
||||
}
|
||||
|
||||
m_lastUpdate = static_cast< time_t >( tickCount );
|
||||
|
|
Loading…
Add table
Reference in a new issue