Random heading for new created units (Didn't work during map setup, no graphics are loaded yet).

This commit is contained in:
johns 2002-06-17 21:37:40 +00:00
parent dcfd2f8618
commit 995a776050

View file

@ -292,8 +292,10 @@ global void InitUnit (Unit *unit, UnitType *type)
}
}
if( !type->Building ) {
if( !type->Building && type->Sprite
&& VideoGraphicFrames(type->Sprite)>5 ) {
unit->Direction=(MyRand()>>8)&0xFF; // random heading
UnitUpdateHeading(unit);
}
if( type->CanCastSpell ) {