diff options
author | Michael Levin <risujin@fastmail.fm> | 2009-10-03 11:16:30 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:14:48 +0000 |
commit | c24c98e51210879202c4c275831afb72b4eb69ff (patch) | |
tree | cb8913bd348cfb9f1920bbf920bc3a0e189a909c /src/game/g_weapon.c | |
parent | fd3de48aeee45b7e45f97aa75cea335382fa04f1 (diff) |
* Acid tube animation fixed (used to include part of dying animation!)
* Acid tube splash damage (from exploding) separated from attack damage, new variable added to tremulous.h to control that and the animation
* Class X not allowed at stage # fixed to show the right stage number
* Whether or not the mass driver will shoot through objects can be toggled from tremulous.h, don't forget to save g_weapons.c or 'make clean' to get the change compiled!
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r-- | src/game/g_weapon.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index f5dd0a4d..7217bb1b 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -437,6 +437,8 @@ MASS DRIVER ====================================================================== */ +#ifdef MDRIVER_SHOOT_THROUGH + void massDriverFire( gentity_t *ent ) { trace_t tr; @@ -492,6 +494,51 @@ void massDriverFire( gentity_t *ent ) G_UnlaggedOff( ); } +#else + +void massDriverFire( gentity_t *ent ) +{ + trace_t tr; + vec3_t end; + gentity_t *tent; + gentity_t *traceEnt; + + VectorMA( muzzle, 8192 * 16, forward, end ); + + G_UnlaggedOn( muzzle, 8192 * 16 ); + trap_Trace( &tr, muzzle, NULL, NULL, end, ent->s.number, MASK_SHOT ); + G_UnlaggedOff( ); + + if( tr.surfaceFlags & SURF_NOIMPACT ) + return; + + traceEnt = &g_entities[ tr.entityNum ]; + + // snap the endpos to integers, but nudged towards the line + SnapVectorTowards( tr.endpos, muzzle ); + + // send impact + if( traceEnt->takedamage && traceEnt->client ) + { + BloodSpurt( ent, traceEnt, &tr ); + } + else + { + tent = G_TempEntity( tr.endpos, EV_MISSILE_MISS ); + tent->s.eventParm = DirToByte( tr.plane.normal ); + tent->s.weapon = ent->s.weapon; + tent->s.generic1 = ent->s.generic1; //weaponMode + } + + if( traceEnt->takedamage ) + { + G_Damage( traceEnt, ent, ent, forward, tr.endpos, + MDRIVER_DMG, 0, MOD_MDRIVER ); + } +} + +#endif + /* ====================================================================== |