summaryrefslogtreecommitdiff
path: root/src/game/g_active.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_active.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_active.c')
-rw-r--r--src/game/g_active.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 9faa2c33..e30f8bf4 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -663,7 +663,7 @@ void ClientTimerActions( gentity_t *ent, int msec )
}
if( ent->client->pers.teamSelection == PTE_HUMANS &&
- ( client->ps.stats[ STAT_STATE ] & SS_HEALING_ACTIVE ) )
+ ( client->ps.stats[ STAT_STATE ] & SS_HEALING_2X ) )
{
int remainingStartupTime = MEDKIT_STARTUP_TIME - ( level.time - client->lastMedKitTime );
@@ -677,7 +677,7 @@ void ClientTimerActions( gentity_t *ent, int msec )
ent->health++;
}
else
- ent->client->ps.stats[ STAT_STATE ] &= ~SS_HEALING_ACTIVE;
+ ent->client->ps.stats[ STAT_STATE ] &= ~SS_HEALING_2X;
}
else
{
@@ -696,7 +696,7 @@ void ClientTimerActions( gentity_t *ent, int msec )
}
}
else
- ent->client->ps.stats[ STAT_STATE ] &= ~SS_HEALING_ACTIVE;
+ ent->client->ps.stats[ STAT_STATE ] &= ~SS_HEALING_2X;
}
}
}
@@ -1409,9 +1409,15 @@ void ClientThink_real( gentity_t *ent )
client->lastSlowTime + ABUILDER_BLOB_TIME < level.time )
client->ps.stats[ STAT_STATE ] &= ~SS_SLOWLOCKED;
- if( ( client->ps.stats[ STAT_STATE ] & SS_BOOSTED ) &&
- level.time - client->boostedTime >= BOOST_TIME )
- client->ps.stats[ STAT_STATE ] &= ~SS_BOOSTED;
+ // Update boosted state flags
+ client->ps.stats[ STAT_STATE ] &= ~SS_BOOSTEDWARNING;
+ if( client->ps.stats[ STAT_STATE ] & SS_BOOSTED )
+ {
+ if( level.time - client->boostedTime >= BOOST_TIME )
+ client->ps.stats[ STAT_STATE ] &= ~SS_BOOSTED;
+ else if( level.time - client->boostedTime >= BOOST_WARN_TIME )
+ client->ps.stats[ STAT_STATE ] |= SS_BOOSTEDWARNING;
+ }
// Check if poison cloud has worn off
if( ( client->ps.eFlags & EF_POISONCLOUDED ) &&
@@ -1429,7 +1435,7 @@ void ClientThink_real( gentity_t *ent )
BG_UpgradeIsActive( UP_MEDKIT, client->ps.stats ) )
{
//if currently using a medkit or have no need for a medkit now
- if( client->ps.stats[ STAT_STATE ] & SS_HEALING_ACTIVE ||
+ if( client->ps.stats[ STAT_STATE ] & SS_HEALING_2X ||
( client->ps.stats[ STAT_HEALTH ] == client->ps.stats[ STAT_MAX_HEALTH ] &&
!( client->ps.stats[ STAT_STATE ] & SS_POISONED ) ) )
{
@@ -1444,7 +1450,7 @@ void ClientThink_real( gentity_t *ent )
client->ps.stats[ STAT_STATE ] &= ~SS_POISONED;
client->poisonImmunityTime = level.time + MEDKIT_POISON_IMMUNITY_TIME;
- client->ps.stats[ STAT_STATE ] |= SS_HEALING_ACTIVE;
+ client->ps.stats[ STAT_STATE ] |= SS_HEALING_2X;
client->lastMedKitTime = level.time;
client->medKitHealthToRestore =
client->ps.stats[ STAT_MAX_HEALTH ] - client->ps.stats[ STAT_HEALTH ];