summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_main.c6
-rw-r--r--src/game/g_combat.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index 67acb55f..a60fe0b4 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -177,7 +177,7 @@ vmCvar_t cg_drawTeamOverlay;
vmCvar_t cg_teamOverlayUserinfo;
vmCvar_t cg_drawFriend;
vmCvar_t cg_teamChatsOnly;
-vmCvar_t cg_printDuplicate;
+vmCvar_t cg_noPrintDuplicate;
vmCvar_t cg_noVoiceChats;
vmCvar_t cg_noVoiceText;
vmCvar_t cg_hudFiles;
@@ -320,7 +320,7 @@ static cvarTable_t cvarTable[ ] =
{ &cg_stats, "cg_stats", "0", 0 },
{ &cg_drawFriend, "cg_drawFriend", "1", CVAR_ARCHIVE },
{ &cg_teamChatsOnly, "cg_teamChatsOnly", "0", CVAR_ARCHIVE },
- { &cg_printDuplicate, "cg_printDuplicate", "0", CVAR_ARCHIVE },
+ { &cg_noPrintDuplicate, "cg_noPrintDuplicate", "0", CVAR_ARCHIVE },
{ &cg_noVoiceChats, "cg_noVoiceChats", "0", CVAR_ARCHIVE },
{ &cg_noVoiceText, "cg_noVoiceText", "0", CVAR_ARCHIVE },
{ &cg_drawSurfNormal, "cg_drawSurfNormal", "0", CVAR_CHEAT },
@@ -574,7 +574,7 @@ void CG_AddNotifyText( void )
textLen = strlen( cg.consoleText );
// Ignore console messages that were just printed
- if( !cg_printDuplicate.integer && textLen >= bufferLen &&
+ if( cg_noPrintDuplicate.integer && textLen >= bufferLen &&
!strcmp( cg.consoleText + textLen - bufferLen, buffer ) )
return;
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 74feaa2c..3e86661e 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -156,6 +156,14 @@ float G_RewardAttackers( gentity_t *self )
else if( self->s.eType == ET_BUILDABLE )
{
value = BG_FindValueOfBuildable( self->s.modelindex );
+
+ // only give partial credits for a buildable not yet completed
+ if( !self->spawned )
+ {
+ value *= (float)( level.time - self->buildTime ) /
+ BG_FindBuildTimeForBuildable( self->s.modelindex );
+ }
+
team = self->biteam;
}
else