Skip to content

Conversation

@BSzili
Copy link
Contributor

@BSzili BSzili commented Jun 13, 2025

I noticed that bats can randomly get stuck mid air circling forever or until the corpse timer removes them. This happens because the tinfo.zoneIndex global is not updated for dead enemies, which is fine in most cases when there's no movement, but bats have gravity set. If there is an enemy with a different zoneIndex that's updated before the dead bat this condition will fail and the bat will never hit the ground:
https://github.com/XProger/OpenLara/blob/master/src/fixed/enemy.h#L548
I moved the health check a bit further down in updateTargetInfo which adds a bit of extra overhead, but it shouldn't have a significant impact if HIDE_CORPSES is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant