So, I have a hub map. One hub with three sub-maps. I start in the hub(map02), go into map05, kill enemies there, then return to the hub map02, then go into map03...and realize, that enemies are completely ignoring me. Funny is that when I start in hub and go directly to map03, the enemies work as expected. But when I go first to any other map, enemies on other following maps are in some weird dormant like state. Then walk around, but not wake up upon hearing or seeing player. The only way to make them react is to punch them or make any toher slight damage. After damage they wake up and start attacking/chasing player.
And another thing, even more weird, this bug happens completely randomly. Sometimes it dont appear at all, sometimes every second start of the game, sometimes every start of the game.
I jnow that this ehaviour bug is hard to explain and even test, when the bug appears randomly. I'll post link to the wad later.
But if anyone encountered something like this, I would love to know how it was solved.
edit: Small update. I think I solved it by moving the A_ALertMonsters() from weapon's fire action into death state of weapon's projectile. Since Most of my weapons are projectile ones, it seems like better approach, than when I put it into fire actions. But still, I'm wondering what's the correct place to put A_AlertMonsters()...