summaryrefslogtreecommitdiff
path: root/src/game/g_weapon.c
diff options
context:
space:
mode:
authorRoman Tetelman <kevlarman@gmail.com>2009-10-03 12:19:06 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:51 +0000
commit931e88a788c5214bcbb24827bd5574c97abe99cb (patch)
treeeae25cfa362b8ebb26a738255aae552883c0decd /src/game/g_weapon.c
parentc89095f6d62ae7f35f3b0cad8c5c672860f84802 (diff)
* shut up annoying noise when aiming ckit on build timer at damaged buildables
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r--src/game/g_weapon.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 489181aa..8bf63fdd 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -796,7 +796,8 @@ void CheckCkitRepair( gentity_t *ent )
gentity_t *traceEnt;
int bHealth;
- if( ent->client->ps.weaponTime )
+ if( ent->client->ps.weaponTime > 0 ||
+ ent->client->ps.stats[ STAT_MISC ] > 0 )
return;
// Construction kit repair
@@ -810,12 +811,6 @@ void CheckCkitRepair( gentity_t *ent )
if( tr.fraction < 1.0f && traceEnt->spawned && traceEnt->health > 0 &&
traceEnt->s.eType == ET_BUILDABLE && traceEnt->buildableTeam == TEAM_HUMANS )
{
- if( ent->client->ps.stats[ STAT_MISC ] > 0 )
- {
- G_AddEvent( ent, EV_BUILD_DELAY, ent->client->ps.clientNum );
- return;
- }
-
bHealth = BG_Buildable( traceEnt->s.modelindex )->health;
if( traceEnt->health < bHealth )
{