OpenGothic icon indicating copy to clipboard operation
OpenGothic copied to clipboard

Mobs have difficulties to enter water

Open Dehela opened this issue 3 years ago • 7 comments

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.

Dehela avatar Sep 16 '22 06:09 Dehela

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

Try avatar Sep 25 '22 15:09 Try

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.

Dehela avatar Sep 25 '22 16:09 Dehela

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

Try avatar Sep 25 '22 20:09 Try

  • [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

Try avatar Feb 11 '23 13:02 Try

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.

Try avatar Jul 10 '23 21:07 Try

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.

thokkat avatar Jul 11 '23 20:07 thokkat

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)

Try avatar Jul 11 '23 20:07 Try