Closed stohrendorf closed 2 years ago
I played the first 3 levels. These are the things I noticed about enemy behaviour with this branch.
fly movements ended up penetrating the floor
and fly up from the floor
. (Edit: To fix this, the AI must be disabled when bats die, and the gravity simulation with fly speed limitation must be done manually.)-1024
and their default step limit of 256
, see gameflows/tr1/object_infos.py
, so this is a bug as the AI should have calculated a box path from the lower end of the steps. Which also means the wolf on the slanted sector should be able to just jump down from it. This means that somewhere the drop/step limit checks aren't applied properly.One more terrifying thought... I seriously hope the box floor/ceiling heights aren't negated, too. But if I remember correctly, when I once exported the level geometry to OBJ, the boxes looked fine and matched the level geometry, but I'm not sure whether I negated the heights without questioning it enough.
Unfortunately I can't tell from the code. My guess would be that if the floor/ceiling heights were negated then these changes would have made all enemies behave very strangely which isn't happening.
I'm happy with everything, except for the wolves getting stuck. Do you want to address that in a seperate PR, possibly in the future or deal with it here?
if it's to be addressed in the future i'm happy to approve these changes.
I found the issue with the pathfinder, it's just another case of "reverse thinking".
@serishema I did my best to understand why the AI goes crazy sometimes, and it seems the
step
anddrop
limits and their checks are negated. I tried to fix these things and make the original AI code a bit more readable. I'm not feeling really confident about these changes, they might make things even worse. It would be nice if you could take a look at this and mark any WTFs or ask for clarification when there's anything that's confusing. I will add comments or further refactor the code to hopefully clean things up.