You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I want to nerf a weapon easily (#48) I have to #include gamecontext.h (includes NerfFactor) in every weapon.
Furthermore every weapon needs the same kind of modification which is bad practice when done in each file, it is not only hard to read but makes further modifications to the weapons in the future even harder.
Thus I want to outsource all relevant variables into one place.
I suggest to use more config vars (compiler macros, #96 ) and access them during runtime from gamecontext.cpp via console.cpp to make changes according the value of NerfFactor automatically. It would need a new config file, called config_weapons in src/engine/shared
There is another approach:
src/engine/server.cpp sets weapon configs already.
e.g. SetFireDelay, SetAmmoRegenTime
I could use the design of this architecture to modify other weapon parameters like scientist mine dmg.
It would need:
a new struct with all weapon parameters
getter and setter functions
no console access necessary
The text was updated successfully, but these errors were encountered:
Yes! I dont understand the rest of the issue, but i like this.
I am currently working on making a way to reset config vars automatically after a round. So we can have different kind of fun runs, defined by config vars. The more config vars we have the more we can do with them, the more fun rounds we can create.
If I want to nerf a weapon easily (#48) I have to #include gamecontext.h (includes NerfFactor) in every weapon.
Furthermore every weapon needs the same kind of modification which is bad practice when done in each file, it is not only hard to read but makes further modifications to the weapons in the future even harder.
Thus I want to outsource all relevant variables into one place.
I suggest to use more config vars (compiler macros, #96 ) and access them during runtime from gamecontext.cpp via console.cpp to make changes according the value of NerfFactor automatically. It would need a new config file, called config_weapons in src/engine/shared
There is another approach:
src/engine/server.cpp sets weapon configs already.
e.g. SetFireDelay, SetAmmoRegenTime
I could use the design of this architecture to modify other weapon parameters like scientist mine dmg.
It would need:
The text was updated successfully, but these errors were encountered: