From 899c8bb46cd255f821b1ffd09c668d730f5da8c9 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Tue, 25 Sep 2007 19:52:36 +0000 Subject: * Remove B_REMOVED_TOGGLEBIT, use ps->misc per player instead * Fix last spawn and uniqueness tests for marked deconstruction * Fix buildable collision tests for non-marked deconstruction * New g_markDeconstruct settings to guard against abuse + 0 off + 1 on, no replacements allowed + 2 on, replacements allowed of same type + 3 on, any replacements allowed * Unlink then relink all buildables when doing build tests * Fixes to tutorial text for marked deconstruction * Remove unused "weaponswitch" client command --- src/game/g_active.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/game/g_active.c') diff --git a/src/game/g_active.c b/src/game/g_active.c index ce60daff..17f66352 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -513,6 +513,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) gclient_t *client; usercmd_t *ucmd; int aForward, aRight; + int i; ucmd = &ent->client->pers.cmd; @@ -675,6 +676,20 @@ void ClientTimerActions( gentity_t *ent, int msec ) client->ps.stats[ STAT_BUILDABLE ] |= SB_VALID_TOGGLEBIT; else client->ps.stats[ STAT_BUILDABLE ] &= ~SB_VALID_TOGGLEBIT; + + // Let the client know which buildables will be removed by building + for( i = 0; i < MAX_MISC; i++ ) + { + if( i < level.numBuildablesForRemoval ) + client->ps.misc[ i ] = level.markedBuildables[ i ]->s.number; + else + client->ps.misc[ i ] = 0; + } + } + else + { + for( i = 0; i < MAX_MISC; i++ ) + client->ps.misc[ i ] = 0; } //update build timer -- cgit