Trooper Dan, on 25 March 2018 - 01:39 PM, said:
I want to increase Duke's weapon sway speed, to match his very fast running speed. I would still like it to be tied to his velocity, but I would like the weapon sway speed to be about doubled. Unfortunately, manipulating the relevant structs (most notably player.weapon_sway) doesn't seem to do anything. It would seem that the game is hardcoded to update the weapon sway based on the player's velocity values, and while the structs aren't technically read only, writing to them is useless because they just get updated again by the hard coding before they can have any visual effect. In addition to the weapon_sway struct, I also tried manipulating certain constantly updated gamevars such as weaponx_offset in EVENT_DRAWWEAPON. That doesn't seem to do anything either, I presume because those vars aren't actually used in the hardcoded weapon display, they simply point to the underlying structs that do the work.
So, it looks like I have to negate all of the hardcoded weapon drawing and use something like the CON emulation of it that Hendricks266 supplied a while back. Then, with all of the weapon drawing under scripting control, I could replace the hardcoded weapon sway with my own. That's more work than I wanted to do, but I guess I could do it. Am I on the right track, or is there an easier way?
Unfortunately you are correct if you want more nuance. However since it's just contained in a single script it's pretty easy to get set up, You can probably be up and running in 10ish minutes.
I will note though that modifying http://wiki.eduke32....iki/Weapon_sway and http://wiki.eduke32.com/wiki/Gun_pos SHOULD be set-able.
Edit: Sorry for lots of editing, concentrating on too many other things.

Help
Duke4.net
DNF #1
Duke 3D #1


