Page 1 of 1

No Breath Bar Near Water's surface

Posted: 05 Nov 2018, 23:43
by PoodleSandwich

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?

screenshot179.png (689.9 KiB) Viewed 1095 times

Re: No Breath Bar Near Water's surface

Posted: 20 Nov 2018, 22:33
by Thunderforge
Feel free to file an issue requesting support for this.

Re: No Breath Bar Near Water's surface

Posted: 21 Nov 2018, 06:26
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.