No Breath Bar Near Water's surface

Feedback on past, current, and future development.
Post Reply
User avatar
PoodleSandwich
Posts: 8
Joined: 05 Nov 2018, 23:22

No Breath Bar Near Water's surface

Post by PoodleSandwich »

Hi!

In Vanilla engine and as it is currently in OpenMW, you can totally submerge your head just below the surface of water while swimming or treading water but no breath bar will pop up meaning you could stay there forever, in 3rd person this is especially jarring as it always appears as though your character will soon drown.

I was wondering if this is something that you guys would consider correcting as a bug fix?

If not is there a line of code that refers to these things that you might be able to point me to so that I could make a mod for it post 1.0, or a function that could/will be added to the scripting language that could be used to fix this?

Thanks.
screenshot179.png
screenshot179.png (689.9 KiB) Viewed 2865 times
User avatar
Thunderforge
Posts: 503
Joined: 06 Jun 2017, 05:57

Re: No Breath Bar Near Water's surface

Post by Thunderforge »

Feel free to file an issue requesting support for this.
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: No Breath Bar Near Water's surface

Post by akortunov »

Take a look at apps/openmw/mwworld/worldimp.cpp. There is an isSubmerged() function which checks if an actor is underwater.
It checks if given percent of actor's collision box is underwater (there is a fSwimHeightScale GMST for that, which is 0.9 by default).
So actor with 90% of his collision box submerged to water considered as underwater. Note: currently NPC's collision boxes do not consider race height.
Post Reply