From cde46f12e50330f69aef18053199dcc56dced4db Mon Sep 17 00:00:00 2001 From: kadaverjack Date: Sat, 8 Apr 2006 01:39:15 +0000 Subject: [PATCH] - fixed sv_maxspeed bug crazy.flash reported - runes have a height now, so they don't stick into the floor anymore - runes are reset when they drop into trigger_hurt git-svn-id: svn://svn.icculus.org/nexuiz/trunk@1247 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/gamec/cl_physics.c | 13 ++++++------ data/qcsrc/server/gamec/g_triggers.c | 8 +++++-- data/qcsrc/server/gamec/runematch.c | 31 ++++++++++++++-------------- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/data/qcsrc/server/gamec/cl_physics.c b/data/qcsrc/server/gamec/cl_physics.c index da5541b39..b541ab7b2 100644 --- a/data/qcsrc/server/gamec/cl_physics.c +++ b/data/qcsrc/server/gamec/cl_physics.c @@ -14,7 +14,7 @@ void Nixnex_GiveCurrentWeapon(); void SV_PlayerPhysics() { local vector wishvel, wishdir, v; - local float wishspeed, f, maxspd_mod, spd, maxairspd, airaccel, swapspd_mod; + local float wishspeed, f, maxspd_mod, spd, maxairspd, airaccel, swampspd_mod; string temps; Nixnex_GiveCurrentWeapon(); @@ -68,17 +68,16 @@ void SV_PlayerPhysics() if(cvar("g_minstagib") && (self.items & IT_INVINCIBLE)) { - maxspd_mod = maxspd_mod * cvar("g_balance_rune_speed_moverate"); + maxspd_mod = cvar("g_balance_rune_speed_moverate"); } - swapspd_mod = 1; - if(self.in_swamp != 0) { - swapspd_mod = self.swamp_slowdown; //cvar("g_balance_swamp_moverate"); + swampspd_mod = 1; + if(self.in_swamp) { + swampspd_mod = self.swamp_slowdown; //cvar("g_balance_swamp_moverate"); } - spd = sv_maxspeed * maxspd_mod; - spd = sv_maxspeed * swapspd_mod; + spd = sv_maxspeed * maxspd_mod * swampspd_mod; if(self.speed != spd) { diff --git a/data/qcsrc/server/gamec/g_triggers.c b/data/qcsrc/server/gamec/g_triggers.c index cfe5ef39e..3bd9531ec 100644 --- a/data/qcsrc/server/gamec/g_triggers.c +++ b/data/qcsrc/server/gamec/g_triggers.c @@ -345,8 +345,12 @@ void() trigger_counter = void() hurt_touch = { if (!other.owner) - if (other.items & IT_KEY1 || other.items & IT_KEY2) - other.pain_finished = time + 2; + { + if (other.items & IT_KEY1 || other.items & IT_KEY2) // reset flag + other.pain_finished = time + 2; + else if (other.classname == "rune") // reset runes + other.nextthink = time + 1; + } if (other.takedamage) if (other.triggerhurttime < time) diff --git a/data/qcsrc/server/gamec/runematch.c b/data/qcsrc/server/gamec/runematch.c index ccda2dd37..f2d14571a 100644 --- a/data/qcsrc/server/gamec/runematch.c +++ b/data/qcsrc/server/gamec/runematch.c @@ -1,19 +1,19 @@ -float RUNE_FIRST = 1; +float RUNE_FIRST = 1; float RUNE_STRENGTH = 1; float RUNE_DEFENSE = 2; -float RUNE_REGEN = 4; -float RUNE_SPEED = 8; +float RUNE_REGEN = 4; +float RUNE_SPEED = 8; float RUNE_VAMPIRE = 16; -float RUNE_LAST = 16; +float RUNE_LAST = 16; -float CURSE_FIRST = 8192; -float CURSE_WEAK = 8192; +float CURSE_FIRST = 8192; +float CURSE_WEAK = 8192; float CURSE_VULNER = 16384; -float CURSE_VENOM = 32768; -float CURSE_SLOW = 65536; +float CURSE_VENOM = 32768; +float CURSE_SLOW = 65536; float CURSE_EMPATHY = 131072; -float CURSE_LAST = 131072; +float CURSE_LAST = 131072; /* rune ideas: @@ -35,6 +35,8 @@ void runematch_spawn_point() { if(!cvar("g_runematch")) remove(self); + + setorigin(self, find_floor(self.origin) + '0 0 35'); } string RuneName(float r) @@ -96,15 +98,13 @@ float count_rune_spawnpoints() float num; entity e; num = 0; - do + e = findchain(classname, "runematch_spawn_point"); + while(e) { - e = find(e, classname, "runematch_spawn_point"); - if(!e) - break; num = num + 1; + e = e.chain; - }while(e); - + } return num; } @@ -579,6 +579,7 @@ void spawn_runes() e.flags = FL_ITEM; setmodel(e, "models/runematch/rune.mdl"); setorigin(e, spot.origin); + setsize(e, '0 0 -35', '0 0 0'); e.enemy = spawn(); e.enemy.enemy = e; -- 2.39.2