Made patrol working
This commit is contained in:
parent
4d5f216d8d
commit
fd7b1d06cd
2 changed files with 10 additions and 6 deletions
src/action
|
@ -57,18 +57,22 @@ global void HandleActionPatrol(Unit* unit)
|
|||
if( DoActionMove(unit)<0 ) { // reached end-point or stop
|
||||
|
||||
#ifdef NEW_ORDERS
|
||||
Order order;
|
||||
//Order order;
|
||||
int tmp;
|
||||
|
||||
unit->Orders[0].Action=UnitActionPatrol;
|
||||
|
||||
//
|
||||
// Swap the points.
|
||||
//
|
||||
order=unit->Orders[0];
|
||||
|
||||
DebugLevel0Fn("FIXME: patrol not written\n");
|
||||
|
||||
//order=unit->Orders[0];
|
||||
tmp=(int)unit->Orders[0].Arg1;
|
||||
unit->Orders[0].Arg1=(void*)((unit->Orders[0].X<<16)|unit->Orders[0].Y);
|
||||
unit->Orders[0].X=tmp>>16;
|
||||
unit->Orders[0].Y=tmp&0xFFFF;
|
||||
ResetPath(unit->Orders[0]);
|
||||
|
||||
NewResetPath(unit);
|
||||
#else
|
||||
unit->Command.Action=UnitActionPatrol;
|
||||
|
||||
|
|
|
@ -720,7 +720,7 @@ global void CommandPatrolUnit(Unit* unit,int x,int y,int flush)
|
|||
order->Type=NULL;
|
||||
DebugCheck( unit->X&~0xFFFF || unit->Y&~0xFFFF );
|
||||
// BUG-ALERT: encode source into arg1 as two 16 bit values!
|
||||
order->Arg1=(void*)(unit->X<<16|unit->Y);
|
||||
order->Arg1=(void*)((unit->X<<16)|unit->Y);
|
||||
}
|
||||
#else
|
||||
Command* command;
|
||||
|
|
Loading…
Add table
Reference in a new issue