ZDoom / gzdoom

GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
http://zdoom.org
GNU General Public License v3.0
2.47k stars 540 forks source link

Added FloatBobFactor to actor properties #2694

Closed jekyllgrim closed 5 days ago

jekyllgrim commented 1 month ago

This adds a new actor property: FloatBobFactor (default 1.0). This will function as a multiplier for level.time in AActor::GetBobOffset, which will finally allow to control not only the range of float bobbing (which is determined by FloatBobStrength) but also the frequency of bobbing.

Note, I also added an error that will appear if the value is 0 or lower. I can remove it, since technically it shouldn't break anything, but using 0 or negative seems pointless (unless I'm missing something), so it seemed warranted to me.

P.S. Initially considered calling it "FloatBobSpeed", but due to how it's used, it's clearly a factor, so FloatBobFactor seems more fitting.