order_cmd.c
changeset 2685 00111d5ca47f
parent 2645 964bd8fe3ce2
child 2690 2f810b43cb7f
--- a/order_cmd.c	Tue Nov 22 15:55:38 2005 +0000
+++ b/order_cmd.c	Tue Nov 22 19:33:29 2005 +0000
@@ -1129,13 +1129,13 @@
 
 static void Load_ORDR(void)
 {
-	if (_sl_full_version <= 0x501) {
-		/* Version older than 0x502 did not have a ->next pointer. Convert them
+	if (CheckSavegameVersionOldStyle(5, 2)) {
+		/* Version older than 5.2 did not have a ->next pointer. Convert them
 		    (in the old days, the orderlist was 5000 items big) */
 		uint len = SlGetFieldLength();
 		uint i;
 
-		if (_sl_version < 5) {
+		if (CheckSavegameVersion(5)) {
 			/* Pre-version 5 had an other layout for orders
 			    (uint16 instead of uint32) */
 			uint16 orders[5000];
@@ -1151,7 +1151,7 @@
 
 				AssignOrder(GetOrder(i), UnpackVersion4Order(orders[i]));
 			}
-		} else if (_sl_full_version <= 0x501) {
+		} else if (CheckSavegameVersionOldStyle(5, 2)) {
 			uint32 orders[5000];
 
 			len /= sizeof(uint32);