-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Mod Weapon Vars" #691
base: main
Are you sure you want to change the base?
Conversation
while im not able to "review" this because i dont know anything in c++ or such at all i just want to say that his would be an excelent addition, the mod limit is big but still something that can happen. and having the evars modifyable directly via script enables alot more then the current need of switching mods on stuff. |
create an alternative to weapon mods by allowing overrides of any numeric eWeaponVar.
- reformat some error messages - add support for boolean values - expand WeaponVarType enum - set weaponVars length to the correct length - rename functions - replace hook for random func with hooks to Cl_CalcWeaponMods and Sv_CalcWeaponMods
we will be doing a script PR instead, as it is easier
PR finally works with prediction - gonna try cleaning up code tomorrow. Unfortunately, i cannot figure out proper naming for the hooked functions - im just going off of frequency of calls :[ Please help if you can. |
i think thats what it is? makes the most sense to me also format fix
Also, do we want to support strings/assets/vectors? |
If it's not that bad, yeah would be nice. Vectors probably the most useful |
also change some comments
- the rare crash would happen when the given weaponVars pointer was not from a weapon, and the location before it was not meant to be read
isbadreadptr sucks actually
Uh, for some reason format check is failing now @EladNLG :c |
Need to change hook, currently fucks up stuff (causes weird MGL-related crash, probably fucked up params?) |
What?
Creates an alternative to weapon mods by allowing overrides of any numeric eWeaponVar through script.
Example
ScriptWeaponVars_SetInt(weapon, eWeaponVar.ammo_clip_size, 50)
Why?
WIP. Relies on
Required before merging
AddMod
) (Script PR not existing yet)Optional
- [ ] Auto-sync server changes to client through a remote function- [ ] Add "predicted" versions of functions, that do not transmit to clientDecided against autotransmitting changes for a few reasons:
[Screenshots/Examples TBD]