mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-23 15:48:21 +00:00
Things without a death animation will now disappear when killed.
Also removed some debug info and added some checks for passability in pathfinding to avoid long searches when the source or destination is impassable. This was SVN commit r4495.
This commit is contained in:
@@ -385,12 +385,17 @@ bool CEntity::Kill( JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(arg
|
||||
|
||||
g_EntityManager.SetDeath(true);
|
||||
|
||||
|
||||
if( m_actor )
|
||||
if( m_actor && m_actor->GetRandomAnimation( "death" ) != m_actor->GetRandomAnimation( "idle" ) )
|
||||
{
|
||||
m_actor->SetEntitySelection( "death" );
|
||||
m_actor->SetRandomAnimation( "death", true );
|
||||
}
|
||||
else
|
||||
{
|
||||
g_UnitMan.RemoveUnit( m_actor );
|
||||
delete( m_actor );
|
||||
m_actor = NULL;
|
||||
}
|
||||
|
||||
return( true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user