Author: sveinung
Date: Sun Mar  1 13:59:19 2015
New Revision: 28341

URL: http://svn.gna.org/viewcvs/freeciv?rev=28341&view=rev
Log:
Have the unit orders packet validation code check that the target extra is 
specified when an activity requires it.

See patch #5872

Modified:
    branches/S2_6/server/unithand.c

Modified: branches/S2_6/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=28341&r1=28340&r2=28341&view=diff
==============================================================================
--- branches/S2_6/server/unithand.c     (original)
+++ branches/S2_6/server/unithand.c     Sun Mar  1 13:59:19 2015
@@ -2922,6 +2922,13 @@
       case ACTIVITY_UNKNOWN:
         return;
       }
+
+      if (activity_requires_target(packet->activity[i])
+          && packet->target[i] == EXTRA_NONE) {
+        /* The orders system can't do server side target assignment. */
+        return;
+      }
+
       break;
     case ORDER_FULL_MP:
     case ORDER_BUILD_CITY:


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to