diff options
author | Roman Tetelman <kevlarman@gmail.com> | 2009-10-03 12:21:20 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:53 +0000 |
commit | 098ef510fd03d0d7264f0348ff2c4ac7c39e5a73 (patch) | |
tree | 58f3801bdbd146421566fa231bf01873cb393bbc /src/game/g_buildable.c | |
parent | a377106a6f71ecdfb8e80c012524bbb25ac6fa89 (diff) |
* release build points from structures killed by deconstructed eggs instantly
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 587a04c9..5580bd88 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2387,7 +2387,21 @@ G_QueueBuildPoints */ void G_QueueBuildPoints( gentity_t *self ) { + gentity_t *killer = NULL; + G_Printf( "G_QueueBuildPoints( %s )\n", BG_TeamName( self->buildableTeam ) ); + + if( self->killedBy != ENTITYNUM_NONE ) + killer = &g_entities[ self->killedBy ]; + + if( killer && killer->client && + killer->client->ps.stats[ STAT_TEAM ] == self->buildableTeam ) + { + // Don't take away build points if killed by a teammate + // This mostly happens due to MOD_NOCREEP + return; + } + switch( self->buildableTeam ) { default: |