summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Schwarz <lakitu7@gmail.com>2010-08-04 00:17:05 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:41 +0000
commit8c8d1963c3850f89196a8a0ae6c0a802d19837cf (patch)
tree8a1daf758230b498f0b8e2b6f5b5865aaa1c90d7
parent121ef72645f53e5df9400ecf40b92784abac9f38 (diff)
* Cancel ghost buildables upon selling weapons to prevent minor bugs when people switch weapons more quickly than pmove can keep up with
-rw-r--r--src/game/g_cmds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 2a3edfd9..01bb8c71 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -2046,6 +2046,8 @@ void Cmd_Sell_f( gentity_t *ent )
}
ent->client->ps.stats[ STAT_WEAPON ] = WP_NONE;
+ // Cancel ghost buildables
+ ent->client->ps.stats[ STAT_BUILDABLE ] = BA_NONE;
//add to funds
G_AddCreditToClient( ent->client, (short)BG_Weapon( weapon )->price, qfalse );