Mobs have difficulties to enter water
Might be related to #312. I didn't test how common it is but seem to happen with Lurkers on the lake with twin waterfalls near Erol house (Oran farm), be it the one on tiny ground spot in the middle (with one of Greg gold stashes) or a few ones on the ground towards Dead Harpy tavern . When they try to enter water, it seems they are pushed back to ground even where it's quite flat. They are capable of entering water but not without troubles.
Also, might be related or not, one of Bloodfly there which was flying mostly above water, had difficulties to leave water area when I tried to aggro it, it would instead just fly around (and attack if I come close enough to water where it would be able to reach me). Might be a random accident but thought it's worth to mention.
Tested today with sheep: Original, if you play as sheep, entering water will result into soft-lock In OpenGothic - same result
Reason: it's likely due to absence of swim/walk-in-water animation sets. Snapper seems to work fine atm Humans do default to their standing pose, if they lose interest at chasing player
Hm, not sure I follow it. Is it so that the original game is missing a number of animations, and those cases are not properly handled there (sort of undefined behavior), sometimes skipping them, sometimes soft-locking, sometimes something else? If yes (and even if no), could it be fixed in some way in OpenGothic?
One thing to note about #322, part of the issue is that in original game, iirc, that NPC is supposed to return to his post in the warehouse but it doesn't happen, resulting in water standing issue. So, in a sense, that particular case might be better to investigate separately.
If yes (and even if no), could it be fixed in some way in OpenGothic?
Yes, we can define our-own behavior in that case. Make sheep drown instantly is one of the options. Another is to emit collision event, similar to wall-collision.
So, in a sense, that particular case might be better to investigate separately.
For me it would be easier to implement fix in a single ticket
- [x] Bloodfly there which was flying mostly above water, had difficulties to leave water area when I tried to aggro it, it would instead just fly around
- [x] (Sheep) absence of swim/walk-in-water animation sets. - water line will act as invisible wall
- [ ] Lurkers on the lake. Lurker, when start swimming has net-negative move offset in animation
- [ ] Guard can stand on water surface. Still sets to default pose, but not on top of water
From https://github.com/Try/OpenGothic/pull/482
I spawned npc with marvin insert command. For example insert pc_mage_nw in khorinis harbor. If taken over with o swimming animation is played and after going back to player standing pose is triggered again. Other npc like insert Pal_202_Albrecht have swimming animation.
Looks like the canSeeNpc checks in waypoint finding prevent the return to daily routine waypoint and eventually AI_PlayAni(self,"T_STAND_2_HGUARD") is triggered in ZS_Stand_Guarding.d. Removing the checks makes them swim to the shore. In vanilla npc swim back too, so there seems to be no such range check.
Is there a reason to check for canSeeNpc? Removing would also partially fix non-moving meatbugs and npc's that bring player to other camps in G1. Mordrag has 1000 senses range but at some spots distance is greater to next waypoint.
Is there a reason to check for canSeeNpc?
Yes, otherwise wp-search can will find geometrically closest point, without concerning the walls (and other move blockers)