From 5742c91c341cad780377e3144d0f82302170626f Mon Sep 17 00:00:00 2001 From: avirox Date: Thu, 12 Jan 2006 14:18:25 +0000 Subject: [PATCH] - Tesla no longer crashes game while attacking (changed MSG_BROADCAST to "2") - Super strength now actually has an effect - TEMP: Railgun does insane amount of damage for headshot git-svn-id: svn://svn.icculus.org/nexuiz/trunk@812 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- TeamNexuiz/game/gamec/tfcombat.c | 4 ++-- TeamNexuiz/game/gamec/tftesla.c | 8 ++++---- TeamNexuiz/game/gamec/w_common.c | 8 +++++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/TeamNexuiz/game/gamec/tfcombat.c b/TeamNexuiz/game/gamec/tfcombat.c index 8dcb0ed4d..1b22a5b13 100644 --- a/TeamNexuiz/game/gamec/tfcombat.c +++ b/TeamNexuiz/game/gamec/tfcombat.c @@ -164,7 +164,7 @@ void (entity targ, entity inflictor, entity attacker, float damage) T_Damage = } if ((attacker.classname == "player")) { - if ((attacker.super_damage_finished > time)) + if ((attacker.strength_finished > time)) { damage = (damage * 4); } @@ -344,7 +344,7 @@ void (entity targ, entity inflictor, entity attacker, float damage, float T_flag if ((attacker.classname == "player")) { damage = (damage * 0.9); - if ((attacker.super_damage_finished > time)) + if ((attacker.strength_finished > time)) { damage = (damage * 4); } diff --git a/TeamNexuiz/game/gamec/tftesla.c b/TeamNexuiz/game/gamec/tftesla.c index 394bd7068..cf4542e5b 100644 --- a/TeamNexuiz/game/gamec/tftesla.c +++ b/TeamNexuiz/game/gamec/tftesla.c @@ -269,8 +269,8 @@ void () Tesla_Die = /* ThrowGib ("progs/tgib1.mdl", -70); // use other explosion method? ThrowGib ("progs/tgib2.mdl", -70); ThrowGib ("progs/tgib3.mdl", -70);*/ - WriteByte (MSG_BROADCAST, 23); - WriteByte (MSG_BROADCAST, 3); + WriteByte (2, 23); + WriteByte (2, 3); WriteCoord (4, self.origin_x); WriteCoord (4, self.origin_y); WriteCoord (4, self.origin_z); @@ -345,8 +345,8 @@ float () Tesla_Fire = } self.effects = (self.effects | 8); deathmsg = 51; - WriteByte (MSG_BROADCAST, 23); - WriteByte (MSG_BROADCAST, 6); + WriteByte (2, 23); + WriteByte (2, 6); WriteEntity (4, self); WriteCoord (4, self.origin_x); WriteCoord (4, self.origin_y); diff --git a/TeamNexuiz/game/gamec/w_common.c b/TeamNexuiz/game/gamec/w_common.c index fd53f7ed9..5108cf7cd 100644 --- a/TeamNexuiz/game/gamec/w_common.c +++ b/TeamNexuiz/game/gamec/w_common.c @@ -467,6 +467,8 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float deathtype x = vlen ((g - h)); f = ((normalize (f) * x) + trace_endpos); zdif = (f_z - trace_ent.origin_z); +// bprint(ftos(zdif)); +// bprint("\n"); deathmsg = 18; trace_ent.head_shot_vector = '0 0 0'; if (zdif < 0) @@ -511,7 +513,11 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float deathtype { trace_ent.head_shot_vector = (trace_ent.origin - self.origin); deathmsg = 29; - bdamage = floor(bdamage * 3.5); +// bdamage = floor(bdamage * 3.5); + if (zdif > 31) + bdamage = floor(bdamage * 15.5); + else + bdamage = floor(bdamage * 2.5); // T_Damage (trace_ent, self, self, (self.heat * dam_mult)); sound (self, 0, "speech/excelent.wav", 1, 0); // if ((trace_ent.health > 0)) -- 2.39.2