From d59394471972b499b3e932ee8a02e2d18fe03df7 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 19 Mar 2010 21:35:01 +0100 Subject: [PATCH] NIX: turn into a mutator --- balance.cfg | 24 ++++++++++++------------ balance25.cfg | 24 ++++++++++++------------ balanceNexrun.cfg | 24 ++++++++++++------------ balanceSamual.cfg | 24 ++++++++++++------------ defaultXonotic.cfg | 10 +++++----- qcsrc/common/mapinfo.qc | 2 +- qcsrc/server/cl_client.qc | 2 ++ qcsrc/server/mutators/mutator_nix.qc | 2 +- serverbench.cfg | 6 +++--- 9 files changed, 60 insertions(+), 58 deletions(-) diff --git a/balance.cfg b/balance.cfg index 73ecd16ab1..37a36e8d9d 100644 --- a/balance.cfg +++ b/balance.cfg @@ -61,18 +61,18 @@ set g_lms_start_ammo_nails 150 set g_lms_start_ammo_rockets 50 set g_lms_start_ammo_cells 50 set g_lms_start_ammo_fuel 0 -set g_balance_nixnex_roundtime 25 -set g_balance_nixnex_incrtime 1.6 -set g_balance_nixnex_ammo_shells 15 -set g_balance_nixnex_ammo_nails 45 -set g_balance_nixnex_ammo_rockets 15 -set g_balance_nixnex_ammo_cells 15 -set g_balance_nixnex_ammo_fuel 0 -set g_balance_nixnex_ammoincr_shells 2 -set g_balance_nixnex_ammoincr_nails 6 -set g_balance_nixnex_ammoincr_rockets 2 -set g_balance_nixnex_ammoincr_cells 2 -set g_balance_nixnex_ammoincr_fuel 2 +set g_balance_nix_roundtime 25 +set g_balance_nix_incrtime 1.6 +set g_balance_nix_ammo_shells 15 +set g_balance_nix_ammo_nails 45 +set g_balance_nix_ammo_rockets 15 +set g_balance_nix_ammo_cells 15 +set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammoincr_shells 2 +set g_balance_nix_ammoincr_nails 6 +set g_balance_nix_ammoincr_rockets 2 +set g_balance_nix_ammoincr_cells 2 +set g_balance_nix_ammoincr_fuel 2 // }}} // {{{ pickup items diff --git a/balance25.cfg b/balance25.cfg index 9cee6d5765..c13ec4487c 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -60,18 +60,18 @@ set g_lms_start_ammo_nails 150 set g_lms_start_ammo_rockets 50 set g_lms_start_ammo_cells 50 set g_lms_start_ammo_fuel 0 -set g_balance_nixnex_roundtime 25 -set g_balance_nixnex_incrtime 1.6 -set g_balance_nixnex_ammo_shells 15 -set g_balance_nixnex_ammo_nails 45 -set g_balance_nixnex_ammo_rockets 15 -set g_balance_nixnex_ammo_cells 15 -set g_balance_nixnex_ammo_fuel 0 -set g_balance_nixnex_ammoincr_shells 2 -set g_balance_nixnex_ammoincr_nails 6 -set g_balance_nixnex_ammoincr_rockets 2 -set g_balance_nixnex_ammoincr_cells 2 -set g_balance_nixnex_ammoincr_fuel 2 +set g_balance_nix_roundtime 25 +set g_balance_nix_incrtime 1.6 +set g_balance_nix_ammo_shells 15 +set g_balance_nix_ammo_nails 45 +set g_balance_nix_ammo_rockets 15 +set g_balance_nix_ammo_cells 15 +set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammoincr_shells 2 +set g_balance_nix_ammoincr_nails 6 +set g_balance_nix_ammoincr_rockets 2 +set g_balance_nix_ammoincr_cells 2 +set g_balance_nix_ammoincr_fuel 2 // }}} // {{{ pickup items diff --git a/balanceNexrun.cfg b/balanceNexrun.cfg index 52e34634cc..a23e9b462c 100644 --- a/balanceNexrun.cfg +++ b/balanceNexrun.cfg @@ -60,18 +60,18 @@ set g_lms_start_ammo_nails 210 set g_lms_start_ammo_rockets 150 set g_lms_start_ammo_cells 150 set g_lms_start_ammo_fuel 0 -set g_balance_nixnex_roundtime 25 -set g_balance_nixnex_incrtime 1.6 -set g_balance_nixnex_ammo_shells 15 -set g_balance_nixnex_ammo_nails 45 -set g_balance_nixnex_ammo_rockets 15 -set g_balance_nixnex_ammo_cells 15 -set g_balance_nixnex_ammo_fuel 0 -set g_balance_nixnex_ammoincr_shells 2 -set g_balance_nixnex_ammoincr_nails 6 -set g_balance_nixnex_ammoincr_rockets 2 -set g_balance_nixnex_ammoincr_cells 2 -set g_balance_nixnex_ammoincr_fuel 2 +set g_balance_nix_roundtime 25 +set g_balance_nix_incrtime 1.6 +set g_balance_nix_ammo_shells 15 +set g_balance_nix_ammo_nails 45 +set g_balance_nix_ammo_rockets 15 +set g_balance_nix_ammo_cells 15 +set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammoincr_shells 2 +set g_balance_nix_ammoincr_nails 6 +set g_balance_nix_ammoincr_rockets 2 +set g_balance_nix_ammoincr_cells 2 +set g_balance_nix_ammoincr_fuel 2 // }}} // {{{ pickup items diff --git a/balanceSamual.cfg b/balanceSamual.cfg index 747a9db1f0..19f7896188 100644 --- a/balanceSamual.cfg +++ b/balanceSamual.cfg @@ -61,18 +61,18 @@ set g_lms_start_ammo_nails 150 set g_lms_start_ammo_rockets 50 set g_lms_start_ammo_cells 50 set g_lms_start_ammo_fuel 0 -set g_balance_nixnex_roundtime 25 -set g_balance_nixnex_incrtime 1.6 -set g_balance_nixnex_ammo_shells 15 -set g_balance_nixnex_ammo_nails 45 -set g_balance_nixnex_ammo_rockets 15 -set g_balance_nixnex_ammo_cells 15 -set g_balance_nixnex_ammo_fuel 0 -set g_balance_nixnex_ammoincr_shells 2 -set g_balance_nixnex_ammoincr_nails 6 -set g_balance_nixnex_ammoincr_rockets 2 -set g_balance_nixnex_ammoincr_cells 2 -set g_balance_nixnex_ammoincr_fuel 2 +set g_balance_nix_roundtime 25 +set g_balance_nix_incrtime 1.6 +set g_balance_nix_ammo_shells 15 +set g_balance_nix_ammo_nails 45 +set g_balance_nix_ammo_rockets 15 +set g_balance_nix_ammo_cells 15 +set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammoincr_shells 2 +set g_balance_nix_ammoincr_nails 6 +set g_balance_nix_ammoincr_rockets 2 +set g_balance_nix_ammoincr_cells 2 +set g_balance_nix_ammoincr_fuel 2 // }}} // {{{ pickup items diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index fb2800a02f..d8c11a2683 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1065,12 +1065,12 @@ bind F2 vno alias spec "cmd spectate" bind F3 spec -// NixNex (No-Items x Xonotic) - at each time, everyone uses the same weapon, +// NIX (No Items Xonotic) - at each time, everyone uses the same weapon, // and in regular intervals, this weapon is cycled -set g_nixnex 0 "No Items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon, and so on" -set g_nixnex_with_laser 0 "always carry the laser as an additional weapon in NixNex" -set g_nixnex_with_healtharmor 0 "when 1, health and armor still show up in NixNex" -set g_nixnex_with_powerups 0 "when 1, powerups still show up in NixNex" +set g_nix 0 "No Items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon, and so on" +set g_nix_with_laser 0 "always carry the laser as an additional weapon in NIX" +set g_nix_with_healtharmor 0 "when 1, health and armor still show up in NIX" +set g_nix_with_powerups 0 "when 1, powerups still show up in NIX" // score log set sv_logscores_console 0 "print scores to server console" diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index ae07214e73..003377e8c3 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -894,7 +894,7 @@ float MapInfo_CurrentFeatures() { float req; req = 0; - if(!(cvar("g_lms") || cvar("g_minstagib") || cvar("g_nixnex") || cvar("g_weaponarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball"))) + if(!(cvar("g_lms") || cvar("g_minstagib") || cvar("g_nix") || cvar("g_weaponarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball"))) req |= MAPINFO_FEATURE_WEAPONS; return req; } diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index f7be50277e..c97e53460e 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2490,6 +2490,8 @@ void PlayerPreThink (void) return; #endif + MUTATOR_CALLHOOK(PlayerPreThink); + if(self.classname == "player") { // if(self.netname == "Wazat") // bprint(self.classname, "\n"); diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator_nix.qc index a855cb7179..b328e6de86 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator_nix.qc @@ -186,7 +186,7 @@ MUTATOR_HOOKFUNCTION(nix_OnEntityPreSpawn) MUTATOR_HOOKFUNCTION(nix_PlayerPreThink) { if(!intermission_running) - if(self.deadflag != DEAD_NO) + if(self.deadflag == DEAD_NO) if(self.classname == "player") NIX_GiveCurrentWeapon(); return 0; diff --git a/serverbench.cfg b/serverbench.cfg index c1e9f70b86..50352aaae8 100644 --- a/serverbench.cfg +++ b/serverbench.cfg @@ -15,9 +15,9 @@ skill 100 fraglimit_override 0 timelimit_override 3 sv_eventlog 1 -g_nixnex 1 -g_nixnex_with_laser 1 -g_balance_nixnex_roundtime 3 +g_nix 1 +g_nix_with_laser 1 +g_balance_nix_roundtime 3 map downer // time darkplaces/xonotic-dedicated +exec serverbench.cfg | grep ^: > serverbench.log -- 2.39.2