Author: sveinung
Date: Fri Jan 30 16:15:40 2015
New Revision: 27907

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

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=27907&r1=27906&r2=27907&view=diff
==============================================================================
--- trunk/server/unithand.c     (original)
+++ trunk/server/unithand.c     Fri Jan 30 16:15:40 2015
@@ -2931,8 +2931,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