Author: sveinung
Date: Sun Mar  1 13:58:37 2015
New Revision: 28338

URL: http://svn.gna.org/viewcvs/freeciv?rev=28338&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:
    trunk/server/unithand.c

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=28338&r1=28337&r2=28338&view=diff
==============================================================================
--- trunk/server/unithand.c     (original)
+++ trunk/server/unithand.c     Sun Mar  1 13:58:37 2015
@@ -2968,6 +2968,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