Author: sveinung Date: Tue Mar 3 13:06:32 2015 New Revision: 28378 URL: http://svn.gna.org/viewcvs/freeciv?rev=28378&view=rev Log: Allow the orders system to tell a unit to go to and fortify.
See patch #5881 Modified: branches/S2_6/server/unithand.c branches/S2_6/server/unittools.c Modified: branches/S2_6/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=28378&r1=28377&r2=28378&view=diff ============================================================================== --- branches/S2_6/server/unithand.c (original) +++ branches/S2_6/server/unithand.c Tue Mar 3 13:06:32 2015 @@ -2891,6 +2891,7 @@ case ACTIVITY_TRANSFORM: /* Simple activities. */ break; + case ACTIVITY_FORTIFYING: case ACTIVITY_SENTRY: if (i != length - 1) { /* Only allowed as the last order. */ @@ -2908,7 +2909,6 @@ } break; /* Not supported yet. */ - case ACTIVITY_FORTIFYING: case ACTIVITY_CONVERT: case ACTIVITY_EXPLORE: case ACTIVITY_IDLE: Modified: branches/S2_6/server/unittools.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unittools.c?rev=28378&r1=28377&r2=28378&view=diff ============================================================================== --- branches/S2_6/server/unittools.c (original) +++ branches/S2_6/server/unittools.c Tue Mar 3 13:06:32 2015 @@ -3815,7 +3815,9 @@ case ORDER_ACTIVITY: activity = order.activity; { - struct extra_type *pextra = extra_by_number(order.target); + struct extra_type *pextra = (order.target == EXTRA_NONE ? + NULL : + extra_by_number(order.target)); if (can_unit_do_activity_targeted(punit, activity, pextra)) { punit->done_moving = TRUE; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits