summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 11:39:26 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:12 +0000
commit7148805cd7831e3c33dd0965d9034ed5844e6464 (patch)
tree43bfe518a4ebafca25bd590afe41b6be6754e0cc /src
parenta13e8058f45894a05f3f9d086e42ed1b16b12694 (diff)
* cg_printDuplicate changed to cg_noPrintDuplicate (i.e.now defaults to 1.1 behaviour)
* only award partial credits for incomplete buildables
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