Removed an inconsistency between quickload and regular load

Turned on heap checking for debug builds.  *Could cause memory to run low if game runs for extended periods
Fixed assertion message for case where soldier groups try to cross impassible terrain
Fixed inventory memory leak


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1110 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-07-24 09:14:56 +00:00
parent 48527d4aa5
commit b559e8601d
4 changed files with 12 additions and 5 deletions
+3 -4
View File
@@ -232,15 +232,14 @@ BATTLESNDS_STRUCT gBattleSndsData[] =
// ----------------------------------------
Inventory::Inventory() {
OBJECTTYPE filler;
memset( &filler, 0, sizeof( OBJECTTYPE ) );
slotCnt = NUM_INV_SLOTS;
inv.reserve(slotCnt);
for (int idx=0; idx < slotCnt; ++idx) {
//OBJECTTYPE *filler = new OBJECTTYPE; // Use MEMALLOC?
OBJECTTYPE *filler = NULL;
filler = (OBJECTTYPE*)MemAlloc( sizeof( OBJECTTYPE ) );
memset( filler, 0, sizeof( OBJECTTYPE ) );
inv.push_back(*filler);
inv.push_back(filler);
}
clear();
Assert (inv.size() == slotCnt);