diff --git a/Source/monster.cpp b/Source/monster.cpp index bf58ff7bb..94eed8176 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -396,14 +396,18 @@ void __cdecl InitLevelMonsters() MissileFileFlag = 0; for ( i = 0; i < MAX_LVLMTYPES; i++ ) + { Monsters[i].mPlaceFlags = 0; + } ClrAllMonsters(); nummonsters = 0; totalmonsters = MAXMONSTERS; for ( i = 0; i < MAXMONSTERS; i++ ) + { monstactive[i] = i; + } uniquetrans = 0; } @@ -422,7 +426,8 @@ int __fastcall AddMonsterType(int type, int placeflag) if ( !done ) { - i = nummtypes++; + i = nummtypes; + nummtypes++; Monsters[i].mtype = type; monstimgtot += monsterdata[type].mType; InitMonsterGFX(i); diff --git a/structs.h b/structs.h index eadcbe8bf..81779311d 100644 --- a/structs.h +++ b/structs.h @@ -495,6 +495,7 @@ struct AnimStruct // note: wrong names struct CMonster { unsigned char mtype; + // TODO: Add enum for place flags unsigned char mPlaceFlags; AnimStruct Anims[6]; TSnd *Snds[8];