summaryrefslogtreecommitdiff
path: root/src/game/g_weapon.c
diff options
context:
space:
mode:
authorMichael Levin <risujin@fastmail.fm>2009-10-03 11:29:22 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:02 +0000
commit685e9535db65b8117a93afd68b93ce1521a6ec28 (patch)
tree379a6571720a38230181bc082caaabc921d31772 /src/game/g_weapon.c
parent7fed4f2d94817bb4c6d0a3bff665a5cae0ce8ff3 (diff)
* Lucifer cannon projectile a little bigger with charge
* Sitting on a booster won't make it blink the warning bolt (SS_BOOSTEDWARNING), also made the warning fade * Lucifer Cannon repeat rates fixed * G_Damage() wont deal damage to dead entities * Maybe fixed the buildable killed with shotgun won't show dying anim bug * Attacked hives won't attack back when the OM is dead * The monstrous hive bounding boxes shrunk to something reasonable * Tesla Generator muzzle offset to the ball part, now fires over turrets * HUDs can make vertical charge bars * Human charge bar no longer overlaps scanner * "There are no spawns remaining" Changes to trample attack: * No longer deals locational damage (wtf?) * Charge "holding" restored * Hit repeat rate limited to 50 ms Changes to health cross icons: * Inspired by Techhead, made new icons (sorry, yours didn't look so good in game :-\ ) * Icons fade from one to another * Switched SS_HEALING_2X and SS_HEALING_ACTIVE meaning for Humans -- glows when on medi station, special icon for medkit * Poisoned icon for humans (Techhead's idea)
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r--src/game/g_weapon.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index c78e6ec6..a74848f4 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -77,8 +77,6 @@ void G_ForceWeaponChange( gentity_t *ent, weapon_t weapon )
// force this here to prevent flamer effect from continuing
ps->generic1 = WPM_NOTFIRING;
-
- ps->weapon = ent->client->ps.persistant[ PERS_NEWWEAPON ];
}
/*
@@ -1355,23 +1353,26 @@ void G_ChargeAttack( gentity_t *ent, gentity_t *victim )
vec3_t forward, normal;
if( ent->client->ps.stats[ STAT_MISC ] <= 0 ||
- !( ent->client->ps.stats[ STAT_STATE ] & SS_CHARGING ) )
+ !( ent->client->ps.stats[ STAT_STATE ] & SS_CHARGING ) ||
+ ent->client->ps.weaponTime )
return;
VectorSubtract( victim->s.origin, ent->s.origin, forward );
VectorNormalize( forward );
VectorNegate( forward, normal );
-
+
if( !victim->takedamage )
return;
WideBloodSpurt( ent, victim, NULL );
damage = LEVEL4_TRAMPLE_DMG * ent->client->ps.stats[ STAT_MISC ] /
- LEVEL4_TRAMPLE_CHARGE_MAX;
+ LEVEL4_TRAMPLE_DURATION;
G_Damage( victim, ent, ent, forward, victim->s.origin, damage,
- 0, MOD_LEVEL4_TRAMPLE );
+ DAMAGE_NO_LOCDAMAGE, MOD_LEVEL4_TRAMPLE );
+
+ ent->client->ps.weaponTime += LEVEL4_TRAMPLE_REPEAT;
if( !victim->client )
ent->client->ps.stats[ STAT_MISC ] = 0;
@@ -1539,6 +1540,10 @@ void FireWeapon( gentity_t *ent )
// Hive muzzle point is on the tip
if( ent->s.eType == ET_BUILDABLE && ent->s.modelindex == BA_A_HIVE )
VectorMA( muzzle, ent->r.maxs[ 2 ], ent->s.origin2, muzzle );
+
+ // Tesla generator muzzle point is offset too
+ if( ent->s.eType == ET_BUILDABLE && ent->s.modelindex == BA_H_TESLAGEN )
+ VectorMA( muzzle, 28.0f, ent->s.origin2, muzzle );
}
// fire the specific weapon