]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
More work on config
authorSamual Lenks <samual@xonotic.org>
Mon, 1 Jul 2013 00:28:57 +0000 (20:28 -0400)
committerSamual Lenks <samual@xonotic.org>
Mon, 1 Jul 2013 00:28:57 +0000 (20:28 -0400)
balanceXonotic.cfg
qcsrc/common/weapons/config.qh
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_fireball.qc
qcsrc/common/weapons/w_hook.qc
qcsrc/common/weapons/w_machinegun.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_porto.qc
qcsrc/common/weapons/w_rifle.qc

index 1645a62bcff3e80cd3ea2d1c0649575cfdc52536..7bbe29d6ec6b978a271e87aa6d4b111c6d34be1f 100644 (file)
@@ -4,7 +4,7 @@ g_mod_balance Xonotic
 set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
 set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
 set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
-set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_mortar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
 set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
 set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
 set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
@@ -374,51 +374,51 @@ set g_balance_uzi_reload_ammo 60 //default: 30
 set g_balance_uzi_reload_time 2
 // }}}
 // {{{ mortar
-set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 50
-set g_balance_grenadelauncher_primary_edgedamage 25
-set g_balance_grenadelauncher_primary_force 250
-set g_balance_grenadelauncher_primary_radius 120
-set g_balance_grenadelauncher_primary_speed 1900
-set g_balance_grenadelauncher_primary_speed_up 225
-set g_balance_grenadelauncher_primary_speed_z 0
-set g_balance_grenadelauncher_primary_spread 0
-set g_balance_grenadelauncher_primary_lifetime 5
-set g_balance_grenadelauncher_primary_lifetime2 1
-set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.3
-set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_primary_health 15
-set g_balance_grenadelauncher_primary_damageforcescale 0
-set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
+set g_balance_mortar_primary_type 0
+set g_balance_mortar_primary_damage 50
+set g_balance_mortar_primary_edgedamage 25
+set g_balance_mortar_primary_force 250
+set g_balance_mortar_primary_radius 120
+set g_balance_mortar_primary_speed 1900
+set g_balance_mortar_primary_speed_up 225
+set g_balance_mortar_primary_speed_z 0
+set g_balance_mortar_primary_spread 0
+set g_balance_mortar_primary_lifetime 5
+set g_balance_mortar_primary_lifetime2 1
+set g_balance_mortar_primary_refire 0.8
+set g_balance_mortar_primary_animtime 0.3
+set g_balance_mortar_primary_ammo 2
+set g_balance_mortar_primary_health 15
+set g_balance_mortar_primary_damageforcescale 0
+set g_balance_mortar_primary_remote_minbouncecnt 0
 
-set g_balance_grenadelauncher_secondary_type 1
-set g_balance_grenadelauncher_secondary_damage 60
-set g_balance_grenadelauncher_secondary_edgedamage 30
-set g_balance_grenadelauncher_secondary_force 250
-set g_balance_grenadelauncher_secondary_radius 120
-set g_balance_grenadelauncher_secondary_speed 1400
-set g_balance_grenadelauncher_secondary_speed_up 150
-set g_balance_grenadelauncher_secondary_speed_z 0
-set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 5
-set g_balance_grenadelauncher_secondary_lifetime_bounce 0.5
-set g_balance_grenadelauncher_secondary_lifetime_stick 0
-set g_balance_grenadelauncher_secondary_refire 0.7
-set g_balance_grenadelauncher_secondary_animtime 0.3
-set g_balance_grenadelauncher_secondary_ammo 2
-set g_balance_grenadelauncher_secondary_health 30
-set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+set g_balance_mortar_secondary_type 1
+set g_balance_mortar_secondary_damage 60
+set g_balance_mortar_secondary_edgedamage 30
+set g_balance_mortar_secondary_force 250
+set g_balance_mortar_secondary_radius 120
+set g_balance_mortar_secondary_speed 1400
+set g_balance_mortar_secondary_speed_up 150
+set g_balance_mortar_secondary_speed_z 0
+set g_balance_mortar_secondary_spread 0
+set g_balance_mortar_secondary_lifetime 5
+set g_balance_mortar_secondary_lifetime_bounce 0.5
+set g_balance_mortar_secondary_lifetime_stick 0
+set g_balance_mortar_secondary_refire 0.7
+set g_balance_mortar_secondary_animtime 0.3
+set g_balance_mortar_secondary_ammo 2
+set g_balance_mortar_secondary_health 30
+set g_balance_mortar_secondary_damageforcescale 4
+set g_balance_mortar_secondary_remote_detonateprimary 0
 
-set g_balance_grenadelauncher_bouncefactor 0.5
-set g_balance_grenadelauncher_bouncestop 0.075
+set g_balance_mortar_bouncefactor 0.5
+set g_balance_mortar_bouncestop 0.075
 
-set g_balance_grenadelauncher_switchdelay_drop 0.2
-set g_balance_grenadelauncher_switchdelay_raise 0.2
+set g_balance_mortar_switchdelay_drop 0.2
+set g_balance_mortar_switchdelay_raise 0.2
 
-set g_balance_grenadelauncher_reload_ammo 0 //default: 12
-set g_balance_grenadelauncher_reload_time 2
+set g_balance_mortar_reload_ammo 0 //default: 12
+set g_balance_mortar_reload_time 2
 // }}}
 // {{{ electro
 set g_balance_electro_lightning 0
@@ -671,7 +671,7 @@ set g_balance_devastator_lifetime 10
 set g_balance_devastator_refire 1.1
 set g_balance_devastator_animtime 0.4
 set g_balance_devastator_ammo 4
-set g_balance_devastator_health 30 // 30 // 5 hitpoints above maximum laser value -- this way lasers can't blow it up, but grenadelauncher still can most the time.
+set g_balance_devastator_health 30 // 30 // 5 hitpoints above maximum laser value -- this way lasers can't blow it up, but mortar still can most the time.
 set g_balance_devastator_damageforcescale 1 // low damage force scale so that it can still be affected by other hits, but not so much that it does a 90 degree turn
 set g_balance_devastator_detonatedelay 0.02 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
 set g_balance_devastator_guiderate 90 // max degrees per second
index 3945ead2397e8523dd553dd332bd4c836d9a1de3..b2dd89f390122fbde61d4b1d49688770c6e731fe 100644 (file)
@@ -11,7 +11,6 @@ float WEP_CONFIG_COUNT;
 string wep_config_queue[MAX_WEP_CONFIG];
 
 #define WEP_CONFIG_QUEUE(a) { \
-       print(sprintf("foobar: %g: %s\n", WEP_CONFIG_COUNT, a)); \
        wep_config_queue[WEP_CONFIG_COUNT] = a; \
        ++WEP_CONFIG_COUNT; }
 
@@ -49,7 +48,8 @@ string wep_config_queue[MAX_WEP_CONFIG];
                        #name, \
                        autocvar_g_balance_##weapon##_##name)) } \
        #endif
-       
+
+// WEAPONTODO: remove prop
 #define WEP_CONFIG_WRITE_PROPS(weapon,prop,name) \
        { WEP_CONFIG_QUEUE(sprintf("set g_balance_%s_%s %g\n", \
                        #weapon, \
index c947cf905526603ab499217d437dc19fcc1c49c0..4bee14be9178ff14430a9eaafb6a4151f0d6fae9 100644 (file)
@@ -35,6 +35,7 @@ REGISTER_WEAPON(
        WEP_ADD_CVAR(weapon, MO_NONE, speed) \
        WEP_ADD_CVAR(weapon, MO_NONE, speedaccel) \
        WEP_ADD_CVAR(weapon, MO_NONE, speedstart) \
+       WEP_ADD_CVAR(weapon, MO_NONE, foobarsdfsd) \
        WEP_ADD_PROP(weapon, reloading_ammo, reload_ammo) \
        WEP_ADD_PROP(weapon, reloading_time, reload_time) \
        WEP_ADD_PROP(weapon, switchdelay_raise, switchdelay_raise) \
index 72a597712542b224cd669d6d4d2458f2fdd5991b..f2a558fc295f2b197bbe109efda8f7c0310938f0 100644 (file)
@@ -414,6 +414,15 @@ float w_fireball(float req)
                {
                        return TRUE; // fireball has infinite ammo
                }
+               case WR_CONFIG:
+               {
+                       #define WEP_ADD_CVAR(weapon,mode,name) WEP_CONFIG_WRITE_CVARS(weapon,mode,name)
+                       #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,prop,name)
+                       FIREBALL_SETTINGS(fireball)
+                       #undef WEP_ADD_CVAR
+                       #undef WEP_ADD_PROP
+                       return TRUE;
+               }
                case WR_RESETPLAYER:
                {
                        self.fireball_primarytime = time;
index cca5aa1ad837bbf41fb7b9473dd6d648205eeb76..6d4c39fee903a130525e6843b185be8e28be733b 100644 (file)
@@ -311,6 +311,15 @@ float w_hook(float req)
                {
                        return self.ammo_cells >= WEP_CVAR_SEC(hook, ammo);
                }
+               case WR_CONFIG:
+               {
+                       #define WEP_ADD_CVAR(weapon,mode,name) WEP_CONFIG_WRITE_CVARS(weapon,mode,name)
+                       #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,prop,name)
+                       HOOK_SETTINGS(hook)
+                       #undef WEP_ADD_CVAR
+                       #undef WEP_ADD_PROP
+                       return TRUE;
+               }
                case WR_RESETPLAYER:
                {
                        self.hook_refire = time;
index 93eee7df1dc75e50dbd396bde2deca0c0f766330..cc12a99ced8ae4e0aa0637f50e9499db683db2b7 100644 (file)
@@ -349,6 +349,15 @@ float w_uzi(float req)
                        }
                        return ammo_amount;
                }
+               case WR_CONFIG:
+               {
+                       #define WEP_ADD_CVAR(weapon,mode,name) WEP_CONFIG_WRITE_CVARS(weapon,mode,name)
+                       #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,prop,name)
+                       UZI_SETTINGS(uzi)
+                       #undef WEP_ADD_CVAR
+                       #undef WEP_ADD_PROP
+                       return TRUE;
+               }
                case WR_RELOAD:
                {
                        W_Reload(min(max(WEP_CVAR(uzi, sustained_ammo), WEP_CVAR(uzi, first_ammo)), WEP_CVAR(uzi, burst_ammo)), autocvar_g_balance_uzi_reload_ammo, autocvar_g_balance_uzi_reload_time, "weapons/reload.wav");
index a2fd7e8c7f7eb91829e81243405246c1e350ba00..931d599dcd3d4085eacce63c8053146d7bf359da 100644 (file)
@@ -563,6 +563,15 @@ float w_minelayer(float req)
                        else
                                return FALSE;
                }
+               case WR_CONFIG:
+               {
+                       #define WEP_ADD_CVAR(weapon,mode,name) WEP_CONFIG_WRITE_CVARS(weapon,mode,name)
+                       #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,prop,name)
+                       MINELAYER_SETTINGS(minelayer)
+                       #undef WEP_ADD_CVAR
+                       #undef WEP_ADD_PROP
+                       return TRUE;
+               }
                case WR_RESETPLAYER:
                {
                        self.minelayer_mines = 0;
index a6164362cc65b0bdd0138c7375fe5944e5a97362..a0eb6cc0ee377fd670beb86f400314c9d1f1a655 100644 (file)
@@ -297,6 +297,15 @@ float w_porto(float req)
                                        
                        return TRUE;
                }
+               case WR_CONFIG:
+               {
+                       #define WEP_ADD_CVAR(weapon,mode,name) WEP_CONFIG_WRITE_CVARS(weapon,mode,name)
+                       #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,prop,name)
+                       PORTO_SETTINGS(porto)
+                       #undef WEP_ADD_CVAR
+                       #undef WEP_ADD_PROP
+                       return TRUE;
+               }
                case WR_THINK:
                {
                        if(WEP_CVAR(porto, secondary))
index f2b67ffc2f5bc6ce9908d65b7cb495841fc222ed..a7c7e262e94031106ee4b53965a820128f68a372 100644 (file)
@@ -230,6 +230,15 @@ float w_rifle(float req)
                        ammo_amount += self.(weapon_load[WEP_RIFLE]) >= WEP_CVAR_SEC(rifle, ammo);
                        return ammo_amount;
                }
+               case WR_CONFIG:
+               {
+                       #define WEP_ADD_CVAR(weapon,mode,name) WEP_CONFIG_WRITE_CVARS(weapon,mode,name)
+                       #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,prop,name)
+                       RIFLE_SETTINGS(rifle)
+                       #undef WEP_ADD_CVAR
+                       #undef WEP_ADD_PROP
+                       return TRUE;
+               }
                case WR_RESETPLAYER:
                {
                        self.rifle_accumulator = time - WEP_CVAR(rifle, bursttime);