diff --git a/Source/debug.cpp b/Source/debug.cpp index 4dbae2b53dc..8f28bb4d963 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -1471,6 +1471,9 @@ void ValidateData() assert(monfiledata[MOFILE_SNAKE].moAnimFrameLen[MA_ATTACK] == 1); // required by MI_Rhino assert(monfiledata[MOFILE_MAGMA].moAnimFrameLen[MA_SPECIAL] == 1); // required by MonDoRSpAttack #ifdef DEBUG_DATA + // players + for (i = 0; i < NUM_CLASSES; i++) + assert(PlrGFXAnimLens[i][PA_WALK] == PlrGFXAnimLens[PC_WARRIOR][PA_WALK]); // required by StartWalk // towners for (i = 0; i < STORE_TOWNERS; i++) { //const int(*gl)[2] = &GossipList[i]; diff --git a/Source/player.cpp b/Source/player.cpp index bd246a0098a..b3026db622a 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -1304,12 +1304,9 @@ static bool StartWalk(int pnum) return false; } -#if DEBUG_MODE - for (i = 0; i < NUM_CLASSES; i++) - assert(PlrGFXAnimLens[i][PA_WALK] == PlrGFXAnimLens[PC_WARRIOR][PA_WALK]); -#endif static_assert(TILE_WIDTH / TILE_HEIGHT == 2, "StartWalk relies on fix width/height ratio of the floor-tile."); static_assert(PLR_WALK_SHIFT == MON_WALK_SHIFT, "To reuse MWVel in StartWalk, PLR_WALK_SHIFT must be equal to MON_WALK_SHIFT."); + // assert(PlrGFXAnimLens[plr._pClass][PA_WALK] == PlrGFXAnimLens[PC_WARRIOR][PA_WALK]); assert(PlrGFXAnimLens[PC_WARRIOR][PA_WALK] <= lengthof(MWVel)); assert(PlrGFXAnimLens[PC_WARRIOR][PA_WALK] == 8); // StartWalk relies on fix walk-animation length to calculate the x/y velocity mwi = MWVel[PlrGFXAnimLens[PC_WARRIOR][PA_WALK] - (plr._pIWalkSpeed == 0 ? 0 : (1 + plr._pIWalkSpeed)) - 1];