Added m_TicksAlive to entities, allows projectiles to hit their creators
This commit is contained in:
@@ -146,9 +146,11 @@ public:
|
||||
(a_Entity->GetUniqueID() == m_Projectile->GetCreatorUniqueID()) // Do not check whoever shot the projectile
|
||||
)
|
||||
{
|
||||
// TODO: Don't check creator only for the first 5 ticks
|
||||
// so that arrows stuck in ground and dug up can hurt the player
|
||||
return false;
|
||||
// Don't check creator only for the first 5 ticks so that projectiles can collide with the creator
|
||||
if (m_Projectile->GetTicksAlive() <= 5)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
cBoundingBox EntBox(a_Entity->GetPosition(), a_Entity->GetWidth() / 2, a_Entity->GetHeight());
|
||||
|
||||
Reference in New Issue
Block a user