diff --git a/src/action/action_board.cpp b/src/action/action_board.cpp index 82cd33462..8729d24ef 100644 --- a/src/action/action_board.cpp +++ b/src/action/action_board.cpp @@ -181,9 +181,11 @@ global void HandleActionBoard(Unit* unit) if( i==-1 ) { if( ++unit->SubAction==200 ) { unit->Command.Action=UnitActionStill; +#ifdef NEW_UNIT if( unit->Command.Data.Move.Goal ) { --unit->Command.Data.Move.Goal->Refs; } +#endif unit->SubAction=0; } } else { diff --git a/src/action/action_harvest.cpp b/src/action/action_harvest.cpp index c09b96756..dbf083db8 100644 --- a/src/action/action_harvest.cpp +++ b/src/action/action_harvest.cpp @@ -250,6 +250,7 @@ local int ReturnWithWood(Unit* unit) // Target is dead, stop harvest // if( destu ) { +#ifdef NEW_UNIT if( destu->Destroyed ) { DebugLevel0(__FUNCTION__": destroyed unit\n"); if( !--destu->Refs ) { @@ -270,9 +271,12 @@ local int ReturnWithWood(Unit* unit) unit->Command.Data.Move.Goal=NoUnitP; --destu->Refs; } +#else // FIXME: stored target not used! +#endif + x=unit->Command.Data.Move.DX; y=unit->Command.Data.Move.DY; destu=WoodDepositOnMap(x,y);