Entities now bail out of ticks if destroyed (#3363)
This commit is contained in:
@@ -180,6 +180,11 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest)
|
||||
void cArrowEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
super::Tick(a_Dt, a_Chunk);
|
||||
if (!IsTicking())
|
||||
{
|
||||
// The base class tick destroyed us
|
||||
return;
|
||||
}
|
||||
m_Timer += a_Dt;
|
||||
|
||||
if (m_bIsCollected)
|
||||
|
||||
Reference in New Issue
Block a user