From cfc02ad25ca805263f973533e58c7fa99196b7ef Mon Sep 17 00:00:00 2001 From: vermeulenl Date: Fri, 3 Dec 2004 22:38:07 +0000 Subject: [PATCH] Added back some of LordHavocs changes git-svn-id: svn://svn.icculus.org/nexuiz/trunk@238 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/gamec/cl_impulse.c | 2 +- qcsrc/gamec/cl_physics.c | 2 +- qcsrc/gamec/cl_player.c | 10 +-- qcsrc/gamec/defs.h | 34 +++++---- qcsrc/gamec/g_damage.c | 2 +- qcsrc/gamec/g_violence.c | 4 +- qcsrc/gamec/t_jumppads.c | 3 + qcsrc/gamec/w_common.c | 129 +++++++++++++++++++++++++-------- qcsrc/gamec/w_electro.c | 18 ++--- qcsrc/gamec/w_hagar.c | 7 +- qcsrc/gamec/w_laser.c | 2 +- qcsrc/gamec/w_nex.c | 28 +------ qcsrc/gamec/w_rocketlauncher.c | 4 +- qcsrc/gamec/w_shotgun.c | 2 +- qcsrc/gamec/w_uzi.c | 6 +- 15 files changed, 150 insertions(+), 103 deletions(-) diff --git a/qcsrc/gamec/cl_impulse.c b/qcsrc/gamec/cl_impulse.c index d567a3e9b..d824b4b85 100644 --- a/qcsrc/gamec/cl_impulse.c +++ b/qcsrc/gamec/cl_impulse.c @@ -16,7 +16,7 @@ void DummyThink(void) PlayerPostThink(); } -void PlayerDamage (vector hitloc, float damage, entity inflictor, entity attacker, float deathtype); +void PlayerDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force); void CreateDummy (vector org, float type) { entity oldself; diff --git a/qcsrc/gamec/cl_physics.c b/qcsrc/gamec/cl_physics.c index f50a8799d..fd8081733 100644 --- a/qcsrc/gamec/cl_physics.c +++ b/qcsrc/gamec/cl_physics.c @@ -184,7 +184,7 @@ void SV_PlayerPhysics() } } else if (!(game & GAME_NO_AIR_CONTROL)) - wishspeed = wishspeed * 0.25; + sv_accelerate = sv_accelerate * 0.1; //if (wishspeed > 50) // wishspeed = 50; diff --git a/qcsrc/gamec/cl_player.c b/qcsrc/gamec/cl_player.c index 489bee02b..3d8d7c106 100644 --- a/qcsrc/gamec/cl_player.c +++ b/qcsrc/gamec/cl_player.c @@ -134,10 +134,10 @@ void SpawnThrownWeapon (vector org, float w) self = oldself; } -void PlayerCorpseDamage (vector hitloc, float damage, entity inflictor, entity attacker, float deathtype) +void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { local float take, save; - te_blood (hitloc, '0 0 20', damage); + te_blood (hitloc, force, damage); // damage resistance (ignore most of the damage from a bullet or similar) damage = max(damage - 5, 1); save = bound(0, damage * 0.6, self.armorvalue); @@ -168,14 +168,14 @@ void PlayerCorpseDamage (vector hitloc, float damage, entity inflictor, entity a } } -void PlayerDamage (vector hitloc, float damage, entity inflictor, entity attacker, float deathtype) +void PlayerDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { local float take, save; if (attacker == self) if (game & GAME_NO_SELF_DAMAGE) return; - te_blood (hitloc, '0 0 20', damage); + te_blood (hitloc, force, damage); if (self.pain_finished < time) //Don't switch pain sequences like crazy { if (random() > 0.5) @@ -237,7 +237,7 @@ void PlayerDamage (vector hitloc, float damage, entity inflictor, entity attacke // set damage function to corpse damage self.event_damage = PlayerCorpseDamage; // call the corpse damage function just in case it wants to gib - self.event_damage(hitloc, 0, inflictor, attacker, deathtype); + self.event_damage(inflictor, attacker, 0, deathtype, hitloc, force); // set up to fade out later SUB_SetFade (self, time + 12 + random () * 4); // Sajt - added this, but I'm not sure the powerups are even implemented? This might act strange because diff --git a/qcsrc/gamec/defs.h b/qcsrc/gamec/defs.h index 03dc57c01..8bc7868c1 100644 --- a/qcsrc/gamec/defs.h +++ b/qcsrc/gamec/defs.h @@ -3,31 +3,31 @@ entity activator; string string_null; -entity casing; +//entity casing; entity dest; // Fields -.void(vector hitloc, float damage, entity inflictor, entity attacker, float deathtype) event_damage; +.void(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) event_damage; -.string wad; -.string map; +//.string wad; +//.string map; -.float worldtype; +//.float worldtype; .float delay; .float wait; .float lip; -.float light_lev; +//.float light_lev; .float speed; -.float style; -.float skill; +//.float style; +//.float skill; .string killtarget; .vector pos1, pos2; .vector mangle; -.float jump_flag; // storing velocity_z for falling damage +//.float jump_flag; // storing velocity_z for falling damage .float attack_finished; .float pain_finished //Added by Supajoe .float pain_frame //" @@ -48,7 +48,7 @@ entity dest; .vector destvec; // for rain .float cnt; // for rain .float count; -.float cnt2; +//.float cnt2; .float death_time; .float dead_time; @@ -60,19 +60,23 @@ entity dest; .float norespawn; .float respawntime; -.float chasecam; +//.float chasecam; .float electrocount; -.float crylinkcount; +//.float crylinkcount; .float damageforcescale; -.float gravity; +//.float gravity; .float dmg; -.vector angleoffset; // for incorrectly player models - +.vector angleoffset; // for incorrectly exported player models + +// for railgun damage (hitting multiple enemies) +.float railgunhit; +.float railgunhitsolidbackup; +.vector railgunhitloc; // definistions for weaponsystem diff --git a/qcsrc/gamec/g_damage.c b/qcsrc/gamec/g_damage.c index 04d4d2122..5063c50c6 100644 --- a/qcsrc/gamec/g_damage.c +++ b/qcsrc/gamec/g_damage.c @@ -58,7 +58,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float } // apply damage if (self.event_damage) - self.event_damage (hitloc, damage, inflictor, attacker, deathtype); + self.event_damage (inflictor, attacker, damage, deathtype, hitloc, force); self = oldself; } diff --git a/qcsrc/gamec/g_violence.c b/qcsrc/gamec/g_violence.c index e05f36ef2..8cf036d83 100644 --- a/qcsrc/gamec/g_violence.c +++ b/qcsrc/gamec/g_violence.c @@ -1,5 +1,5 @@ -void GibDamage (vector hitloc, float damage, entity inflictor, entity attacker, float deathtype) +void GibDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { te_blood (self.origin + '0 0 1', '0 0 30', damage); self.health = self.health - damage; @@ -34,7 +34,7 @@ void TossGib (entity gib, string mdlname, vector org, vector v) gib.damageforcescale = 3.5; gib.event_damage = GibDamage; - gib.velocity = v + randomvec() * 150; + gib.velocity = v + randomvec() * 250; gib.avelocity = randomvec() * 300; SUB_SetFade (gib, time + 12 + random () * 4); diff --git a/qcsrc/gamec/t_jumppads.c b/qcsrc/gamec/t_jumppads.c index ef4012ddf..b71234956 100644 --- a/qcsrc/gamec/t_jumppads.c +++ b/qcsrc/gamec/t_jumppads.c @@ -31,6 +31,9 @@ void() trigger_push_touch = other.velocity = self.movedir; other.flags = other.flags - (other.flags & FL_ONGROUND); + if (other.classname == "missile") + other.angles = vectoangles (other.velocity); + if (self.spawnflags & PUSH_ONCE) { self.touch = SUB_Null; diff --git a/qcsrc/gamec/w_common.c b/qcsrc/gamec/w_common.c index 308179370..2cbe8c14b 100644 --- a/qcsrc/gamec/w_common.c +++ b/qcsrc/gamec/w_common.c @@ -392,53 +392,127 @@ void FireRailgunBullet (vector src, float bdamage, vector dir, float spread, flo } */ -void FireRailgunBullet (vector start, vector end, float damage, float dtype) +void FireRailgunBullet (vector start, vector end, float bdamage, float deathtype) { - vector dir; + local vector hitloc, dir, force; + local entity ent; + //local entity explosion; - dir = normalize (end - start); - traceline_hitcorpse (self, start, end, FALSE, self); + force = normalize(end - start) * (bdamage * 0.1); + + // find how far the beam can go until it hits a wall + traceline (start, end, TRUE, self); + // go a little bit into the wall because we need to hit this wall later + end = trace_endpos + normalize(end - start); + // beam effect WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); WriteByte (MSG_BROADCAST, 76); WriteCoord (MSG_BROADCAST, start_x); WriteCoord (MSG_BROADCAST, start_y); WriteCoord (MSG_BROADCAST, start_z); - WriteCoord (MSG_BROADCAST, trace_endpos_x); - WriteCoord (MSG_BROADCAST, trace_endpos_y); - WriteCoord (MSG_BROADCAST, trace_endpos_z); + WriteCoord (MSG_BROADCAST, end_x); + WriteCoord (MSG_BROADCAST, end_y); + WriteCoord (MSG_BROADCAST, end_z); WriteCoord (MSG_BROADCAST, 0); WriteCoord (MSG_BROADCAST, 0); WriteCoord (MSG_BROADCAST, 0); - if ((trace_fraction != 1.0) && (trace_ent != self) && (pointcontents (trace_endpos) != CONTENT_SKY)) + // flash and burn the wall + te_plasmaburn (trace_endpos); + + // flame effect at impact + dir = trace_plane_normal * 100; + WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); + WriteByte (MSG_BROADCAST, TE_FLAMEJET); + WriteCoord (MSG_BROADCAST, trace_endpos_x); + WriteCoord (MSG_BROADCAST, trace_endpos_y); + WriteCoord (MSG_BROADCAST, trace_endpos_z); + WriteCoord (MSG_BROADCAST, dir_x); + WriteCoord (MSG_BROADCAST, dir_y); + WriteCoord (MSG_BROADCAST, dir_z); + WriteByte (MSG_BROADCAST, 255); + + // play a sound + PointSound (trace_endpos, "weapons/neximpact.wav", 1, ATTN_NORM); + + + // trace multiple times until we hit a wall, each obstacle will be made + // non-solid so we can hit the next, while doing this we spawn effects and + // note down which entities were hit so we can damage them later + while (1) { - if (trace_ent.classname == "case") - { - Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * damage); - } - else if (trace_ent.classname == "player" || trace_ent.classname == "corpse" || trace_ent.classname == "gib") - { - te_blood (trace_endpos, dir * damage * 16, damage); - Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * damage); - } + traceline_hitcorpse (self, start, end, FALSE, self); + + // if it is world we can't hurt it so stop now + if (trace_ent == world || trace_fraction == 1) + break; + + // make the entity non-solid so we can hit the next one + trace_ent.railgunhit = TRUE; + trace_ent.railgunhitloc = trace_endpos; + trace_ent.railgunhitsolidbackup = trace_ent.solid; + + // stop if this is a wall + if (trace_ent.solid == SOLID_BSP) + break; + + // make the entity non-solid + trace_ent.solid = SOLID_NOT; + } + + // find all the entities the railgun hit and restore their solid state + ent = findfloat(world, railgunhit, TRUE); + while (ent) + { + // restore their solid type + ent.solid = ent.railgunhitsolidbackup; + ent = findfloat(ent, railgunhit, TRUE); + } + + // spawn a temporary explosion entity for RadiusDamage calls + //explosion = spawn(); + + // find all the entities the railgun hit and hurt them + ent = findfloat(world, railgunhit, TRUE); + while (ent) + { + // get the details we need to call the damage function + hitloc = ent.railgunhitloc; + ent.railgunhitloc = '0 0 0'; + ent.railgunhitsolidbackup = SOLID_NOT; + ent.railgunhit = FALSE; + + // apply the damage + if (ent.takedamage || ent.classname == "case") + Damage (ent, self, self, bdamage, deathtype, hitloc, force); + + // create a small explosion to throw gibs around (if applicable) + //setorigin (explosion, hitloc); + //RadiusDamage (explosion, self, 10, 0, 50, world, 300, deathtype); + + // advance to the next entity + ent = findfloat(ent, railgunhit, TRUE); } + + // we're done with the explosion entity, remove it + //remove(explosion); } -void fireBullet (vector dir, float spread, float damage, float dtype) +void fireBullet (vector start, vector dir, float spread, float damage, float dtype) { - vector org; + vector end; float r; // use traceline_hitcorpse to make sure it can hit gibs and corpses too - org = self.origin + self.view_ofs; - traceline_hitcorpse (self, org, org + v_forward * 4096 + v_right * crandom () * spread + v_up * crandom () * spread, FALSE, self); + end = start + (dir + randomvec() * spread) * 1048576; + traceline_hitcorpse (self, start, end, FALSE, self); // FIXME - causes excessive 'tinking'. Hopefully remove "tink1.wav" from the ricochets with csqc - if ((trace_fraction != 1.0) && (trace_ent != self) && (pointcontents (trace_endpos) != CONTENT_SKY)) + if ((trace_fraction != 1.0) && (pointcontents (trace_endpos) != CONTENT_SKY)) { - if (trace_ent == world) + if (trace_ent.solid == SOLID_BSP) { pointcontents (self.origin); te_gunshot (trace_endpos); @@ -450,16 +524,9 @@ void fireBullet (vector dir, float spread, float damage, float dtype) else if (r < 0.30) sound (self, CHAN_IMPACT, "weapons/ric3.wav", 1, ATTN_NORM); } - else if (trace_ent.classname == "case") - { - Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * damage); - } else if (trace_ent.classname == "player" || trace_ent.classname == "corpse" || trace_ent.classname == "gib") - { - te_blood (trace_endpos, dir * damage * 16, damage); - Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * damage); sound (trace_ent, CHAN_IMPACT, "misc/enemyimpact.wav", 1, ATTN_NORM); - } + Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * damage); } } diff --git a/qcsrc/gamec/w_electro.c b/qcsrc/gamec/w_electro.c index 5d69c79d3..c31154d7d 100644 --- a/qcsrc/gamec/w_electro.c +++ b/qcsrc/gamec/w_electro.c @@ -67,7 +67,7 @@ void() W_Electro_Attack proj.effects = 1; vector org; - org = self.origin + self.view_ofs + v_forward * 18 + v_right * 7 + v_up * -9; + org = self.origin + self.view_ofs + v_forward * 15 + v_right * 7 + v_up * -9; te_smallflash(org); @@ -83,11 +83,11 @@ void() W_Electro_Attack setmodel (proj, "models/elaser.mdl"); setsize (proj, '0 0 0', '0 0 0'); if (postion == 0) - setorigin (proj, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -14); + setorigin (proj, self.origin + self.view_ofs + v_forward * 15 + v_right * 5 + v_up * -14); if (postion == 1) - setorigin (proj, self.origin + self.view_ofs + v_forward * 18 + v_right * 10 + v_up * -12); + setorigin (proj, self.origin + self.view_ofs + v_forward * 15 + v_right * 10 + v_up * -12); if (postion == 2) - setorigin (proj, self.origin + self.view_ofs + v_forward * 18 + v_right * 15 + v_up * -14); + setorigin (proj, self.origin + self.view_ofs + v_forward * 15 + v_right * 15 + v_up * -14); proj.velocity = v_forward * 9999; proj.touch = W_Electro_Touch; @@ -157,7 +157,7 @@ void W_Plasma_Touch (void) sound (self, CHAN_BODY, "weapons/grenade_bounce.wav", 1, ATTN_NORM); } -void W_Plasma_Damage (vector hitloc, float damage, entity inflictor, entity attacker, float deathtype) +void W_Plasma_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { self.health = self.health - damage; if (self.health <= 0) @@ -184,7 +184,7 @@ void() W_Electro_Attack2 Plasma.solid = SOLID_BBOX; vector org; - org = self.origin + self.view_ofs + v_forward * 18 + v_right * 7 + v_up * -9; + org = self.origin + self.view_ofs + v_forward * 15 + v_right * 7 + v_up * -9; te_smallflash(org); Plasma.takedamage = DAMAGE_YES; @@ -196,11 +196,11 @@ void() W_Electro_Attack2 setsize (Plasma, '-6 -6 -3', '6 6 3'); if (postion == 0) - setorigin (Plasma, self.origin + self.view_ofs + v_forward * 18 + v_right * 0 + v_up * -14); + setorigin (Plasma, self.origin + self.view_ofs + v_forward * 15 + v_right * 5 + v_up * -14); if (postion == 1) - setorigin (Plasma, self.origin + self.view_ofs + v_forward * 18 + v_right * 10 + v_up * -12); + setorigin (Plasma, self.origin + self.view_ofs + v_forward * 15 + v_right * 10 + v_up * -12); if (postion == 2) - setorigin (Plasma, self.origin + self.view_ofs + v_forward * 18 + v_right * 20 + v_up * -14); + setorigin (Plasma, self.origin + self.view_ofs + v_forward * 15 + v_right * 15 + v_up * -14); Plasma.velocity = v_forward * 900 + v_up * 200; Plasma.angles = vectoangles (Plasma.velocity); diff --git a/qcsrc/gamec/w_hagar.c b/qcsrc/gamec/w_hagar.c index c214177f7..c08a256c8 100644 --- a/qcsrc/gamec/w_hagar.c +++ b/qcsrc/gamec/w_hagar.c @@ -54,7 +54,7 @@ void W_Hagar_Touch (void) W_Hagar_Explode (); } -void W_Hagar_Damage (vector hitloc, float damage, entity inflictor, entity attacker, float deathtype) +void W_Hagar_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { self.health = self.health - damage; if (self.health <= 0) @@ -82,13 +82,12 @@ void W_Hagar_Attack (void) setmodel (missile, "models/hagarmissile.mdl"); setsize (missile, '0 0 0', '0 0 0'); - setorigin (missile, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -12); + setorigin (missile, self.origin + self.view_ofs + v_forward * 15 + v_right * 5 + v_up * -12); missile.velocity = v_forward * 2000; missile.velocity = missile.velocity + v_right * ( crandom() * 70 ); missile.velocity = missile.velocity + v_up * ( crandom() * 30 ); missile.angles = vectoangles (missile.velocity); - setorigin (missile, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -12); missile.touch = W_Hagar_Touch; missile.think = W_Hagar_Explode; @@ -121,7 +120,7 @@ void W_Hagar_Attack2 (void) setmodel (missile, "models/hagarmissile.mdl"); setsize (missile, '-6 -6 -3', '6 6 3'); - setorigin (missile, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -12); + setorigin (missile, self.origin + self.view_ofs + v_forward * 15 + v_right * 5 + v_up * -12); missile.velocity = v_forward * 1400 + v_up * 100; missile.angles = vectoangles (missile.velocity); diff --git a/qcsrc/gamec/w_laser.c b/qcsrc/gamec/w_laser.c index a72c8574f..4e6bb4377 100644 --- a/qcsrc/gamec/w_laser.c +++ b/qcsrc/gamec/w_laser.c @@ -88,7 +88,7 @@ void W_Laser_Attack2 (void) setmodel (missile, "models/laser.mdl"); setsize (missile, '0 0 0', '0 0 0'); - setorigin (missile, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -12); + setorigin (missile, self.origin + self.view_ofs + v_forward * 15 + v_right * 5 + v_up * -12); missile.velocity = v_forward * 1000; missile.velocity = missile.velocity + v_right * ( crandom() * 45 ); diff --git a/qcsrc/gamec/w_nex.c b/qcsrc/gamec/w_nex.c index 67fa6f225..cb5e3ecd0 100644 --- a/qcsrc/gamec/w_nex.c +++ b/qcsrc/gamec/w_nex.c @@ -44,33 +44,7 @@ void W_Nex_Attack (void) org = self.origin + self.view_ofs + v_forward * 18 + v_right * 8 + v_up * -5; te_smallflash(org); - if (game & GAME_INSTAGIB) - FireRailgunBullet (org, self.origin + self.view_ofs + v_forward * 4096, 800, IT_NEX); - else - FireRailgunBullet (org, self.origin + self.view_ofs + v_forward * 4096, 100, IT_NEX); - - te_plasmaburn (trace_endpos); - - if (trace_fraction < 1.0) - { - dir = trace_plane_normal * 100; - WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); - WriteByte (MSG_BROADCAST, TE_FLAMEJET); - WriteCoord (MSG_BROADCAST, trace_endpos_x); - WriteCoord (MSG_BROADCAST, trace_endpos_y); - WriteCoord (MSG_BROADCAST, trace_endpos_z); - WriteCoord (MSG_BROADCAST, dir_x); - WriteCoord (MSG_BROADCAST, dir_y); - WriteCoord (MSG_BROADCAST, dir_z); - WriteByte (MSG_BROADCAST, 255); - - explosion = spawn (); - setorigin (explosion, trace_endpos); - RadiusDamage (explosion, self, 10, 0, 50, world, 300, IT_ROCKET_LAUNCHER); - remove (explosion); - - PointSound (trace_endpos, "weapons/neximpact.wav", 1, ATTN_NORM); - } + FireRailgunBullet (org, self.origin + self.view_ofs + v_forward * 4096, 800, IT_NEX); self.attack_finished = time + 1; diff --git a/qcsrc/gamec/w_rocketlauncher.c b/qcsrc/gamec/w_rocketlauncher.c index 0538a2748..cb233f05f 100644 --- a/qcsrc/gamec/w_rocketlauncher.c +++ b/qcsrc/gamec/w_rocketlauncher.c @@ -64,7 +64,7 @@ void W_Rocket_Touch (void) W_Rocket_Explode (world); } -void W_Rocket_Damage (vector hitloc, float damage, entity inflictor, entity attacker, float deathtype) +void W_Rocket_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { self.health = self.health - damage; if (self.health <= 0) @@ -92,7 +92,7 @@ void W_Rocket_Attack (void) setmodel (missile, "models/rocketmissile.mdl"); setsize (missile, '0 0 0', '0 0 0'); - org = self.origin + self.view_ofs + v_forward * 20 + v_right * 4 + v_up * -15; + org = self.origin + self.view_ofs + v_forward * 15 + v_right * 4 + v_up * -15; setorigin (missile, org); missile.velocity = v_forward * 850; diff --git a/qcsrc/gamec/w_shotgun.c b/qcsrc/gamec/w_shotgun.c index bac8f3dbe..009ac3c8c 100644 --- a/qcsrc/gamec/w_shotgun.c +++ b/qcsrc/gamec/w_shotgun.c @@ -41,7 +41,7 @@ void W_Shotgun_Attack (void) bullets = 10; for (sc = bullets; sc > 0; sc = sc - 1) - fireBullet (v_forward, 150, 5, IT_SHOTGUN); + fireBullet (self.origin + self.view_ofs, v_forward, 0.05, 8, IT_SHOTGUN); self.ammo_shells = self.ammo_shells - 1; self.attack_finished = time + 0.7; diff --git a/qcsrc/gamec/w_uzi.c b/qcsrc/gamec/w_uzi.c index 671c2a5e7..e1d3b1d27 100644 --- a/qcsrc/gamec/w_uzi.c +++ b/qcsrc/gamec/w_uzi.c @@ -36,7 +36,7 @@ void W_Uzi_Attack (void) makevectors(self.v_angle); sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", 1, ATTN_NORM); - fireBullet (v_forward, 100, 5, IT_UZI); + fireBullet (self.origin + self.view_ofs, v_forward, 0.025, 4, IT_UZI); self.punchangle_x = random () - 0.5; self.punchangle_y = random () - 0.5; @@ -46,7 +46,7 @@ void W_Uzi_Attack (void) self.ammo_nails = self.ammo_nails - 1; vector org; // casing code - org = self.origin + self.view_ofs + (v_right * 6) - (v_up * 1) + (v_forward * 20); + org = self.origin + self.view_ofs + (v_right * 6) - (v_up * 1) + (v_forward * 15); SpawnCasing (org, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 + 10) * v_up), 2, v_forward,'0 250 0', 100, 2); //W_Smoke(org, v_forward, 12); } @@ -56,7 +56,7 @@ void W_Uzi_Attack2 (void) makevectors(self.v_angle); sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", 1, ATTN_NORM); - fireBullet (v_forward, 0, 10, IT_UZI); + fireBullet (self.origin + self.view_ofs, v_forward, 1, 4, IT_UZI); self.attack_finished = time + 0.16; self.ammo_nails = self.ammo_nails - 1; -- 2.39.2