diff options
author | enneract <trem.redman@gmail.com> | 2014-12-06 23:35:11 +0100 |
---|---|---|
committer | enneract <trem.redman@gmail.com> | 2014-12-06 23:35:11 +0100 |
commit | 05fc0ccd95f486c79e1b073f80245c6cd0179e62 (patch) | |
tree | bdcbb5e32992291580982b2afd10f9e63cae2640 /src/game/g_buildable.c | |
parent | 58903527dbf5fc7d8035ac2349174fe5f58ba2ac (diff) | |
parent | 1a59a05174d3ed6e6b75b8d9e2b5b074ebf41b38 (diff) |
Merge branch 'master' of https://github.com/mtiusane/new-edge into bp-on-hud
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 841038f..d132890 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -398,30 +398,20 @@ Note: 'pos' can be NULL, in this case return the overall BP of the team. int G_GetBuildPoints( const vec3_t pos, team_t team ) { int value = 0; - - if( !G_Overmind( ) && team == TEAM_ALIENS ) - { - return 0; - } - else if( team == TEAM_ALIENS ) - { + switch(team) { + case TEAM_ALIENS: + if ( !G_Overmind( ) ) return 0; value = level.alienBuildPoints; - } - else if( !G_Reactor( ) && team == TEAM_HUMANS ) - { - return 0; - } - else if( team == TEAM_HUMANS ) - { + break; + case TEAM_HUMANS: + if ( !G_Reactor( ) ) return 0; value = level.humanBuildPoints; - } - else - return 0; - - if( ( value > 0 ) && ( G_TimeTilSuddenDeath( ) <= 0 ) ) + break; + default: return 0; - else - return value; + } + if( ( value > 0 ) && ( G_TimeTilSuddenDeath( ) <= 0 ) ) return 0; + return value; } /* |