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:
Matei
2006-10-06 05:38:57 +00:00
parent 500483ef2c
commit 0df95f3e8f
4 changed files with 21 additions and 8 deletions
+7 -2
View File
@@ -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 );
}