Random heading for new created units (Didn't work during map setup, no graphics are loaded yet).
This commit is contained in:
parent
dcfd2f8618
commit
995a776050
1 changed files with 3 additions and 1 deletions
|
@ -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 ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue