Author: sveinung
Date: Fri Jan 30 16:17:47 2015
New Revision: 27908

URL: http://svn.gna.org/viewcvs/freeciv?rev=27908&view=rev
Log:
Server: Be explicit about what activities a unit order packet can contain.

List each activity that will cause an order to be discarded explicitly in
stead of discarding it in a default clause.

See patch #5766

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=27908&r1=27907&r2=27908&view=diff
==============================================================================
--- branches/S2_6/server/unithand.c     (original)
+++ branches/S2_6/server/unithand.c     Fri Jan 30 16:17:47 2015
@@ -2882,8 +2882,26 @@
           return;
         }
         break;
-      default:
-       return;
+      /* Not supported yet. */
+      case ACTIVITY_PILLAGE:
+      case ACTIVITY_FALLOUT:
+      case ACTIVITY_FORTIFYING:
+      case ACTIVITY_CONVERT:
+      case ACTIVITY_EXPLORE:
+      case ACTIVITY_GOTO:
+      case ACTIVITY_IDLE:
+      /* Allowing this to be set from the client would be cheating. */
+      case ACTIVITY_FORTIFIED:
+      /* Compatiblity, used in savegames. */
+      case ACTIVITY_OLD_ROAD:
+      case ACTIVITY_OLD_RAILROAD:
+      case ACTIVITY_FORTRESS:
+      case ACTIVITY_AIRBASE:
+      /* Unused. */
+      case ACTIVITY_PATROL_UNUSED:
+      case ACTIVITY_LAST:
+      case ACTIVITY_UNKNOWN:
+        return;
       }
       break;
     case ORDER_FULL_MP:


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

Reply via email to