summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c14
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: