diff --git a/JA2.opt b/JA2.opt
index a37e8d81..46bf2212 100644
Binary files a/JA2.opt and b/JA2.opt differ
diff --git a/JA2.plg b/JA2.plg
index 2dbe4381..a4baabf7 100644
--- a/JA2.plg
+++ b/JA2.plg
@@ -6,7 +6,7 @@
--------------------Configuration: TileEngine - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP213.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP74.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/TileEngine.pch" /YX"TileEngine All.h" /Fo"Release/" /Fd"Release/" /FD /O2b2 /c
"C:\JA2\Build\TileEngine\Ambient Control.cpp"
@@ -46,8 +46,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP213.tmp" with conten
"C:\JA2\Build\TileEngine\worldman.cpp"
"C:\JA2\Build\TileEngine\XML_ExplosionData.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP213.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP214.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP74.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP75.tmp" with contents
[
/nologo /out:"Release\TileEngine.lib"
".\Release\Ambient Control.obj"
@@ -87,7 +87,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP214.tmp" with conten
.\Release\worldman.obj
.\Release\XML_ExplosionData.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP214.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP75.tmp"
Output Window
Compiling...
Ambient Control.cpp
@@ -132,7 +132,7 @@ Creating library...
--------------------Configuration: Standard Gaming Platform - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP215.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP76.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\\" /I "..\TileEngine" /I "..\Tactical" /I "..\Utils" /I "..\strategic" /I ".\\" /D "NO_ZLIB" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR".\Release/" /Fp".\Release/Standard Gaming Platform.pch" /YX"JA2 SGP ALL.H" /Fo".\Release/" /Fd".\Release/" /FD /c
"C:\JA2\Build\Standard Gaming Platform\Button Sound Control.cpp"
@@ -172,14 +172,14 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP215.tmp" with conten
"C:\JA2\Build\Standard Gaming Platform\vsurface.cpp"
"C:\JA2\Build\Standard Gaming Platform\WinFont.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP215.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP216.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP76.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP77.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\\" /I "..\TileEngine" /I "..\Tactical" /I "..\Utils" /I "..\strategic" /I ".\\" /D "NO_ZLIB" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /D "_DEBUG" /FR".\Release/" /Fp".\Release/Standard Gaming Platform.pch" /YX"JA2 SGP ALL.H" /Fo".\Release/" /Fd".\Release/" /FD /c
"C:\JA2\Build\Standard Gaming Platform\DEBUG.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP216.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP217.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP77.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP78.tmp" with contents
[
/nologo /out:".\Release\Standard Gaming Platform.lib"
".\Release\Button Sound Control.obj"
@@ -221,7 +221,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP217.tmp" with conten
".\Release\WinFont.obj"
".\ddraw.lib"
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP217.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP78.tmp"
Output Window
Compiling...
Button Sound Control.cpp
@@ -275,7 +275,7 @@ Creating library...
--------------------Configuration: Tactical - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP218.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP79.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /FR"Release/" /Fp"Release/Tactical.pch" /YX"Tactical All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Tactical\Air Raid.cpp"
@@ -372,14 +372,14 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP218.tmp" with conten
"C:\JA2\Build\Tactical\XML_Sounds.cpp"
"C:\JA2\Build\Tactical\XML_TonyInventory.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP218.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP219.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP79.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7A.tmp" with contents
[
/nologo /MT /W3 /GX /Od /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /FR"Release/" /Fp"Release/Tactical.pch" /YX"Tactical All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Tactical\LOS.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP219.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21A.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7A.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7B.tmp" with contents
[
/nologo /out:"Release\Tactical.lib"
".\Release\Air Raid.obj"
@@ -477,7 +477,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21A.tmp" with conten
.\Release\XML_Sounds.obj
.\Release\XML_TonyInventory.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21A.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7B.tmp"
Output Window
Compiling...
Air Raid.cpp
@@ -586,7 +586,7 @@ Creating library...
--------------------Configuration: Utils - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21B.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7C.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/Utils.pch" /YX"Utils All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Utils\_DutchText.cpp"
@@ -629,8 +629,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21B.tmp" with conten
"C:\JA2\Build\Utils\XML_Strings.cpp"
"C:\JA2\Build\Utils\XML_Strings2.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21B.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21C.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7C.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7D.tmp" with contents
[
/nologo /out:"Release\Utils.lib"
.\Release\_DutchText.obj
@@ -673,7 +673,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21C.tmp" with conten
.\Release\XML_Strings.obj
.\Release\XML_Strings2.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21C.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7D.tmp"
Output Window
Compiling...
_DutchText.cpp
@@ -732,7 +732,7 @@ Creating library...
--------------------Configuration: TacticalAI - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21D.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7E.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/TacticalAI.pch" /YX"AI All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\TacticalAI\AIList.cpp"
@@ -750,8 +750,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21D.tmp" with conten
"C:\JA2\Build\TacticalAI\QuestDebug.cpp"
"C:\JA2\Build\TacticalAI\Realtime.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21D.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21E.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7E.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7F.tmp" with contents
[
/nologo /out:"Release\TacticalAI.lib"
.\Release\AIList.obj
@@ -769,7 +769,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21E.tmp" with conten
.\Release\QuestDebug.obj
.\Release\Realtime.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21E.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7F.tmp"
Output Window
Compiling...
AIList.cpp
@@ -792,7 +792,7 @@ Creating library...
--------------------Configuration: Editor - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21F.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP80.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /Ob2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/Editor.pch" /YX"Editor All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Editor\Cursor Modes.cpp"
@@ -820,8 +820,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21F.tmp" with conten
"C:\JA2\Build\Editor\smooth.cpp"
"C:\JA2\Build\Editor\Smoothing Utils.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21F.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP220.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP80.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP81.tmp" with contents
[
/nologo /out:"Release\Editor.lib"
".\Release\Cursor Modes.obj"
@@ -849,7 +849,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP220.tmp" with conten
.\Release\smooth.obj
".\Release\Smoothing Utils.obj"
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP220.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP81.tmp"
Output Window
Compiling...
Cursor Modes.cpp
@@ -881,7 +881,7 @@ Creating library...
--------------------Configuration: Laptop - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP221.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP82.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/Laptop.pch" /YX"Laptop All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Laptop\aim.cpp"
@@ -942,8 +942,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP221.tmp" with conten
"C:\JA2\Build\Laptop\sirtech.cpp"
"C:\JA2\Build\Laptop\Store Inventory.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP221.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP222.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP82.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP83.tmp" with contents
[
/nologo /out:"Release\Laptop.lib"
.\Release\aim.obj
@@ -1004,7 +1004,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP222.tmp" with conten
.\Release\sirtech.obj
".\Release\Store Inventory.obj"
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP222.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP83.tmp"
Output Window
Compiling...
aim.cpp
@@ -1070,7 +1070,7 @@ Creating library...
--------------------Configuration: Strategic - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP223.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP84.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\Laptop" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/Strategic.pch" /YX"Strategic All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Strategic\AI Viewer.cpp"
@@ -1117,8 +1117,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP223.tmp" with conten
"C:\JA2\Build\Strategic\strategicmap.cpp"
"C:\JA2\Build\Strategic\Town Militia.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP223.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP224.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP84.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP85.tmp" with contents
[
/nologo /out:"Release\Strategic.lib"
".\Release\AI Viewer.obj"
@@ -1165,7 +1165,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP224.tmp" with conten
.\Release\strategicmap.obj
".\Release\Town Militia.obj"
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP224.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP85.tmp"
Output Window
Compiling...
AI Viewer.cpp
@@ -1218,7 +1218,7 @@ Creating library...
Command Lines
Creating command line "rc.exe /l 0x409 /fo"Release/ja2.res" /i "Res" /i ".\Res" /d "NDEBUG" "C:\JA2\Build\Res\ja2.rc""
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP225.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP86.tmp" with contents
[
/nologo /G5 /MT /W3 /GX /Zi /O2 /Ob2 /I ".\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/JA2.pch" /YX"JA2 All.h" /Fo"Release/" /Fd"Release/" /FD /O2b2 /c
"C:\JA2\Build\Utils\_Ja25GermanText.cpp"
@@ -1245,8 +1245,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP225.tmp" with conten
"C:\JA2\Build\SCREENS.cpp"
"C:\JA2\Build\Sys Globals.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP225.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP226.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP86.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP87.tmp" with contents
[
libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib smackw32.lib mss32.lib /nologo /subsystem:windows /profile /map:"Release/ja2_cvs.map" /machine:I386 /out:"..\ja2_cvs.exe"
.\Release\_Ja25GermanText.obj
@@ -1283,7 +1283,7 @@ libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advap
.\Laptop\Release\Laptop.lib
.\Strategic\Release\Strategic.lib
]
-Creating command line "link.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP226.tmp"
+Creating command line "link.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP87.tmp"
Output Window
Compiling resources...
Compiling...
diff --git a/Strategic/MilitiaSquads.cpp b/Strategic/MilitiaSquads.cpp
index 260ea5b2..e462ef9e 100644
--- a/Strategic/MilitiaSquads.cpp
+++ b/Strategic/MilitiaSquads.cpp
@@ -441,6 +441,9 @@ void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY )
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] );
UINT8 uiMilitiaCount;
+
+ // If we don't want roaming militia
+ // We shouldn't be here.
if( !gGameExternalOptions.gfAllowMilitiaGroups )
return;
@@ -456,137 +459,87 @@ void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY )
if( !uiMilitiaCount )return;
-
- //new squad
-
- if( GetTownIdForSector( sMapX, sMapY ) != BLANK_SECTOR )
+ // Kaiden: Moved Create Militia code into CreateMilitiaSquads
+ // Removed the code from here and added the procedure call
+ // If it's time, and this is a city sector create a new group.
+ // But only if we're not training our own.
+ if( (!gGameExternalOptions.gfmusttrainroaming) && ( GetTownIdForSector( sMapX, sMapY ) != BLANK_SECTOR ) )
{
if( GetWorldHour() % gGameExternalOptions.guiCreateEachNHours )return;
-
- GenerateDirectionInfos( sMapX, sMapY, &uiDirNumber, pMoveDir, FALSE, FALSE, FALSE );
-
- if(uiDirNumber)// && Random(100) < CHANCE_TO_GENERATE_A_SQUAD)
- {
- for( x = 1; x < uiDirNumber ; ++x )pMoveDir[x][1] += pMoveDir[x-1][1];
-
- iRandomRes = Random( pMoveDir[ uiDirNumber - 1 ][1] );
-
- for( x = 0; x < uiDirNumber; ++x)
- if( iRandomRes < pMoveDir[x][1] )
- {
- iRandomRes = x;
- break;
- }
-
- // shouldn't be!
- if(iRandomRes >= uiDirNumber)iRandomRes = 0;
-
- //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%ld,%ld:Dir count %ld, Rand %ld. Go to %ld,%ld", sMapX, sMapY, uiDirNumber, iRandomRes, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ));
-
-
- // Kaiden: Roaming Militia Training:
- // If we're training roaming militia,
- // We'll get our new squad elsewhere.
- if(!gGameExternalOptions.gfmusttrainroaming)
- {
- GenerateMilitiaSquad( sMapX, sMapY, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) );
- AddToBlockMoveList( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) );
-
- if( NumEnemiesInSector( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) ) && CountAllMilitiaInSector( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) ) )
- {
- /* GROUP* pEnemyGroup = GetGroup( GetEnemyGroupIdInSector( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) ) );
-
- if(pEnemyGroup && pEnemyGroup->ubGroupID)
- {
- //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Attacking from %ld,%ld to %ld,%ld - enemy's group id %ld", sMapX, sMapY, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0], pEnemyGroup->ubGroupID ));
- //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Arrival 1, Arrival 2");
-
- pEnemyGroup->ubPrevX = sMapX;
- pEnemyGroup->ubPrevY = sMapY;
-
- pEnemyGroup->ubNextX = SECTORX( pMoveDir[ iRandomRes ][0] );
- pEnemyGroup->ubNextY = SECTORY( pMoveDir[ iRandomRes ][0] );
- */
- gfMSBattle = TRUE;
- // GroupArrivedAtSector( pEnemyGroup->ubGroupID , TRUE, FALSE );
-
- EnterAutoResolveMode( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) );
- // }
- }
- }
- }
- else return;
+ CreateMilitiaSquads( sMapX, sMapY );
}
+
// moving squad, if it is not a SAM site
- else if(!IsThisSectorASAMSector( sMapX, sMapY, 0 ))
+ if( ( GetTownIdForSector( sMapX, sMapY ) == BLANK_SECTOR ) && (!IsThisSectorASAMSector( sMapX, sMapY, 0 )) )
+ {
if( !PlayerMercsInSector_MSE( (UINT8)sMapX, (UINT8)sMapY, FALSE ) ) // and there's no player's mercs in the sector
- {
- if( GetWorldHour() % 2 )return;
-
- GenerateDirectionInfos( sMapX, sMapY, &uiDirNumber, pMoveDir, FALSE, FALSE, FALSE );
-
- if( uiDirNumber )
{
- for( x = 1; x < uiDirNumber ; ++x )pMoveDir[x][1] += pMoveDir[x-1][1];
- // ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%ld,%ld", x, pMoveDir[x][1]);
-
- iRandom = Random( pMoveDir[ uiDirNumber - 1 ][1] +
- ( uiMilitiaCount >= gGameExternalOptions.guiMinMilitiaSquadSize ? CHANCE_TO_MOVE_A_SQUAD : CHANCE_TO_MOVE_AN_UNFULL_SQUAD ) );
+ if( GetWorldHour() % 2 )return;
- //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Roll %ld", iRandomRes);
+ GenerateDirectionInfos( sMapX, sMapY, &uiDirNumber, pMoveDir, FALSE, FALSE, FALSE );
- iRandomRes = 256;
-
- for( x = 0; x < uiDirNumber; ++x)
- if( iRandom < pMoveDir[x][1] )
- {
- iRandomRes = x;
- break;
- }
-
- // "Decided" to stay here
- if(iRandomRes >= uiDirNumber)
- return;
-
- //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%ld,%ld:Dir count %ld, Rand %ld. Go to %ld,%ld. Have %ld militia men", sMapX, sMapY, uiDirNumber, iRandomRes, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ), uiMilitiaCount);
-
- MoveMilitiaSquad( sMapX, sMapY, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ), FALSE );
- AddToBlockMoveList( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) );
-
- if ( gWorldSectorX == SECTORX( pMoveDir[ iRandomRes ][0] ) &&
- gWorldSectorY == SECTORY( pMoveDir[ iRandomRes ][0] ) &&
- !gbWorldSectorZ )
+ if( uiDirNumber )
{
- gfStrategicMilitiaChangesMade = TRUE;
- ResetMilitia();
- }
+ for( x = 1; x < uiDirNumber ; ++x )pMoveDir[x][1] += pMoveDir[x-1][1];
+ // ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%ld,%ld", x, pMoveDir[x][1]);
+
+ iRandom = Random( pMoveDir[ uiDirNumber - 1 ][1] +
+ ( uiMilitiaCount >= gGameExternalOptions.guiMinMilitiaSquadSize ? CHANCE_TO_MOVE_A_SQUAD : CHANCE_TO_MOVE_AN_UNFULL_SQUAD ) );
- if( NumEnemiesInSector( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) ) )
- {
-/* GROUP* pEnemyGroup = GetGroup( GetEnemyGroupIdInSector( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) ) );
+ //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Roll %ld", iRandomRes);
+
+ iRandomRes = 256;
+
+ for( x = 0; x < uiDirNumber; ++x)
+ if( iRandom < pMoveDir[x][1] )
+ {
+ iRandomRes = x;
+ break;
+ }
- if(pEnemyGroup && pEnemyGroup->ubGroupID)
- {
- //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Attacking from %ld,%ld to %ld,%ld - enemy's group id %ld", sMapX, sMapY, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0], pEnemyGroup->ubGroupID ));
- //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Arrival 1, Arrival 2");
+ // "Decided" to stay here
+ if(iRandomRes >= uiDirNumber)
+ return;
- pEnemyGroup->ubPrevX = sMapX;
- pEnemyGroup->ubPrevY = sMapY;
+ //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%ld,%ld:Dir count %ld, Rand %ld. Go to %ld,%ld. Have %ld militia men", sMapX, sMapY, uiDirNumber, iRandomRes, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ), uiMilitiaCount);
- pEnemyGroup->ubNextX = SECTORX( pMoveDir[ iRandomRes ][0] );
- pEnemyGroup->ubNextY = SECTORY( pMoveDir[ iRandomRes ][0] );
-*/
- gfMSBattle = TRUE;
-
- // GroupArrivedAtSector( pEnemyGroup->ubGroupID , TRUE, FALSE );
- EnterAutoResolveMode( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) );
-// }
+ MoveMilitiaSquad( sMapX, sMapY, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ), FALSE );
+ AddToBlockMoveList( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) );
+
+ if ( gWorldSectorX == SECTORX( pMoveDir[ iRandomRes ][0] ) &&
+ gWorldSectorY == SECTORY( pMoveDir[ iRandomRes ][0] ) &&
+ !gbWorldSectorZ )
+ {
+ gfStrategicMilitiaChangesMade = TRUE;
+ ResetMilitia();
+ }
+
+ if( NumEnemiesInSector( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) ) )
+ {
+ /* GROUP* pEnemyGroup = GetGroup( GetEnemyGroupIdInSector( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) ) );
+
+ if(pEnemyGroup && pEnemyGroup->ubGroupID)
+ {
+ //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Attacking from %ld,%ld to %ld,%ld - enemy's group id %ld", sMapX, sMapY, SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0], pEnemyGroup->ubGroupID ));
+ //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Arrival 1, Arrival 2");
+
+ pEnemyGroup->ubPrevX = sMapX;
+ pEnemyGroup->ubPrevY = sMapY;
+
+ pEnemyGroup->ubNextX = SECTORX( pMoveDir[ iRandomRes ][0] );
+ pEnemyGroup->ubNextY = SECTORY( pMoveDir[ iRandomRes ][0] );
+ */
+ gfMSBattle = TRUE;
+
+ // GroupArrivedAtSector( pEnemyGroup->ubGroupID , TRUE, FALSE );
+ EnterAutoResolveMode( SECTORX( pMoveDir[ iRandomRes ][0] ), SECTORY( pMoveDir[ iRandomRes ][0] ) );
+ // }
+ }
}
+ else return;
}
- else return;
}
-
}
// Kaiden: Roaming Militia Training:
@@ -602,6 +555,13 @@ void CreateMilitiaSquads(INT16 sMapX, INT16 sMapY )
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] );
UINT8 uiMilitiaCount;
+
+ // If we're not allowing roaming groups,
+ // then we're not creating them either.
+ // Remove this if you want to create them
+ // for some other reason. But you also have to
+ // remove the same line in UpdateMilitiaSquads
+ // Or the ones you create won't move.
if( !gGameExternalOptions.gfAllowMilitiaGroups )
return;
@@ -617,10 +577,8 @@ void CreateMilitiaSquads(INT16 sMapX, INT16 sMapY )
if( !uiMilitiaCount )return;
- // new squad
+ // Create new Militia Squad
- if(gGameExternalOptions.gfmusttrainroaming)
- {
if( GetTownIdForSector( sMapX, sMapY ) != BLANK_SECTOR )
{
GenerateDirectionInfos( sMapX, sMapY, &uiDirNumber, pMoveDir, FALSE, FALSE, FALSE );
@@ -671,8 +629,6 @@ void CreateMilitiaSquads(INT16 sMapX, INT16 sMapY )
}
else return;
}
- }
-
return;
}
diff --git a/Strategic/MilitiaSquads.h b/Strategic/MilitiaSquads.h
index 297fef6e..fb8f13cf 100644
--- a/Strategic/MilitiaSquads.h
+++ b/Strategic/MilitiaSquads.h
@@ -11,7 +11,10 @@
extern UINT8 gpAttackDirs[5][4];
extern UINT8 guiDirNumber;
+// Updates movement orders for militia squads
void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY );
+// Kaiden: creates militia squad in an adjacent sector
+// to the coordinates you pass to it.
void CreateMilitiaSquads(INT16 sMapX, INT16 sMapY );
void MilitiaHelpFromAdjacentSectors( INT16 sMapX, INT16 sMapY );
diff --git a/Strategic/Town Militia.cpp b/Strategic/Town Militia.cpp
index ef522bac..2bce5004 100644
--- a/Strategic/Town Militia.cpp
+++ b/Strategic/Town Militia.cpp
@@ -667,7 +667,8 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
// if ( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) )
// And we're not training mobile militia from a SAM Site
- if (( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier )) && (IsThisSectorASAMSector(sSectorX,sSectorY,0 )))
+ if ( (( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier )) && (IsThisSectorASAMSector(sSectorX,sSectorY,0 )))
+ || (( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier )) && (!gGameExternalOptions.gfmusttrainroaming)) )
{
// we're full!!! go home!
bTownId = GetTownIdForSector( sSectorX, sSectorY );
@@ -686,7 +687,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
return;
}
- else
+/* else
{
if (( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier )) && (!gGameExternalOptions.gfmusttrainroaming))
{
@@ -707,7 +708,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
return;
}
- }
+ }*/