From 485c46c4eccdc6c798ab9c0b5029e3fde3887ce5 Mon Sep 17 00:00:00 2001
From: joris <joris.dauphin@gmail.com>
Date: Fri, 17 Feb 2012 16:07:07 +0100
Subject: [PATCH] Fix pkg to be coherent with src. Fix typo in AStarDebug code.

Patch from cybermind.
---
 src/pathfinder/pathfinder.cpp |  2 +-
 src/tolua/network.pkg         | 15 ++++++++-------
 src/tolua/stratagus.pkg       |  2 +-
 src/tolua/unit.pkg            |  3 +++
 4 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/pathfinder/pathfinder.cpp b/src/pathfinder/pathfinder.cpp
index bbdfdf01f..495344071 100644
--- a/src/pathfinder/pathfinder.cpp
+++ b/src/pathfinder/pathfinder.cpp
@@ -336,7 +336,7 @@ int NextPathElement(CUnit &unit, short int *pxd, short int *pyd)
 		// If obstructing unit is moving, wait for a bit.
 		if (unit.CurrentOrder()->Data.Move.Fast) {
 			unit.CurrentOrder()->Data.Move.Fast--;
-			AstarDebugPrint("WAIT at %d\n" _C_ unit.Data.Move.Fast);
+			AstarDebugPrint("WAIT at %d\n" _C_ unit.CurrentOrder()->Data.Move.Fast);
 			result = PF_WAIT;
 		} else {
 			unit.CurrentOrder()->Data.Move.Fast = 10;
diff --git a/src/tolua/network.pkg b/src/tolua/network.pkg
index df3ae23c1..d1415b5de 100644
--- a/src/tolua/network.pkg
+++ b/src/tolua/network.pkg
@@ -16,15 +16,16 @@ void NetworkServerResyncClients(void);
 void NetworkDetachFromServer(void);
 
 class CServerSetup {
-	unsigned char ResourcesOption;
-	unsigned char UnitsOption;
-	unsigned char FogOfWar;
-	unsigned char RevealMap;
-	unsigned char GameTypeOption;
-	unsigned char Difficulty;
-	unsigned char MapRichness;
+	unsigned int ResourcesOption;
+	unsigned int UnitsOption;
+	unsigned int FogOfWar;
+	unsigned int RevealMap;
+	unsigned int GameTypeOption;
+	unsigned int Difficulty;
+	unsigned int MapRichness;
 	unsigned CompOpt[PlayerMax];
 	unsigned Ready[PlayerMax];
+	unsigned Race[PlayerMax];
 	unsigned long LastFrame[PlayerMax];
 };
 extern CServerSetup LocalSetupState;
diff --git a/src/tolua/stratagus.pkg b/src/tolua/stratagus.pkg
index 6ee0b0f0f..5e689314d 100644
--- a/src/tolua/stratagus.pkg
+++ b/src/tolua/stratagus.pkg
@@ -49,7 +49,7 @@ $]
 #define MaxResourceInfo MaxCosts + 2
 #define PlayerMax 16
 #define PlayerNumNeutral (PlayerMax - 1)
-#define UnitMax 2048
+#define UnitMax 65536
 
 #define NoButton 0
 #define LeftButton 2
diff --git a/src/tolua/unit.pkg b/src/tolua/unit.pkg
index ca04c157e..d00f0a39b 100644
--- a/src/tolua/unit.pkg
+++ b/src/tolua/unit.pkg
@@ -22,6 +22,9 @@ class CPreference
 	bool ShowSightRange;
 	bool ShowReactionRange;
 	bool ShowAttackRange;
+	bool ShowMessages;
+	bool BigScreen;
+
 	unsigned int ShowOrders;
 };