diff --git a/game.h b/game.h index 9372929..0d5ef6a 100755 --- a/game.h +++ b/game.h @@ -2849,6 +2849,14 @@ void SFG_updateLevel() if (state == SFG_MONSTER_STATE_DYING) { + monster->stateType = + (monster->stateType & 0xf0) | SFG_MONSTER_STATE_DEAD; + } + else if (monster->health == 0) + { + monster->stateType = (monster->stateType & SFG_MONSTER_MASK_TYPE) | + SFG_MONSTER_STATE_DYING; + if (SFG_MR_TYPE(*monster) == SFG_LEVEL_ELEMENT_MONSTER_ENDER) { SFG_currentLevel.bossCount--; @@ -2862,14 +2870,6 @@ void SFG_updateLevel() } } - monster->stateType = - (monster->stateType & 0xf0) | SFG_MONSTER_STATE_DEAD; - } - else if (monster->health == 0) - { - monster->stateType = (monster->stateType & SFG_MONSTER_MASK_TYPE) | - SFG_MONSTER_STATE_DYING; - SFG_processEvent(SFG_EVENT_MONSTER_DIES,SFG_MR_TYPE(*monster)); if (SFG_MR_TYPE(*monster) == SFG_LEVEL_ELEMENT_MONSTER_EXPLODER) diff --git a/main_sdl.c b/main_sdl.c index ebcccaa..2b8f2c0 100644 --- a/main_sdl.c +++ b/main_sdl.c @@ -26,11 +26,11 @@ // #define SFG_START_LEVEL 1 // #define SFG_QUICK_WIN 1 - #define SFG_IMMORTAL 1 +// #define SFG_IMMORTAL 1 // #define SFG_ALL_LEVELS 1 // #define SFG_UNLOCK_DOOR 1 // #define SFG_REVEAL_MAP 1 - #define SFG_INFINITE_AMMO 1 +// #define SFG_INFINITE_AMMO 1 // #define SFG_TIME_MULTIPLIER 512 // #define SFG_CPU_LOAD(percent) printf("CPU load: %d%\n",percent); // #define GAME_LQ