Finally decided to tackle this
oft-requested feature. It's a bit more polished and extensive than Ryan's patch in the linked thread (thanks for the reference though), most notably also including a "range" multiplier for the Y axis and proper savegame support.
This patch adds the following actor properties to the Weapon class:
- Weapon.BobStyle -- The type of bobbing to use. Default is "Normal." Other types described below.
- Weapon.BobSpeed -- Bobbing speed multiplier. Affects how quickly the bobbing motion occurs. Default is 1.0.
- Weapon.BobRangeX -- Range multiplier for horizontal bobbing.
- Weapon.BobRangeY -- Same as the above, only for vertical bobbing.
Weapon.BobStyle can be any of
"Normal",
"Inverse",
"Alpha",
"InverseAlpha",
"Smooth", or
"InverseSmooth". "Alpha" is Doom 0.4/0.5 Alpha's linear bobbing style, "Smooth" is (naturally) a smoother version of the standard bobbing style, and the Inverse types are "vertically-flipped" versions of each. Each style is distinct -- for example, though both "Inverse" and "Alpha" bob in a similar fashion, Inverse's pattern is upside-down-U-shaped while Alpha bobs linearly, like an upside-down V.
The other properties are implemented as fixed point multipliers since they either have meaningless default values as integers (speed) or are influenced by CVARs in a way that prevents integral values from being feasible (range).
Finally, here's a zip with the patch and an example wad that replaces some of the default weapons with ones that show off a variety of different bobbing types & properties:
xa-bob.zip
- Extended bobbing patch + example wad.
- (2.33 KiB) Downloaded 551 times