summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2004-10-16 15:14:30 +0000
committerTim Angus <tim@ngus.net>2004-10-16 15:14:30 +0000
commit7ccb349bbdaedd979fb67db17eef757915c8d74a (patch)
tree2573d3678e3e1ca67e2a68ba02411ec3d0e93036
parent97143eb45a8a29904b97ae8251d8d1d349ebd5c7 (diff)
* Bug fixes to the bug fixes to alien frag sharing
-rw-r--r--src/game/bg_misc.c1
-rw-r--r--src/game/g_combat.c12
2 files changed, 8 insertions, 5 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 446ff176..f39f1ec0 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -4880,7 +4880,6 @@ int BG_GetValueOfHuman( playerState_t *ps )
}
portion = worth / (float)HUMAN_MAXED;
- Com_Printf( "portion: %f, worth: %d\n", portion, worth );
if( portion < 0.01f )
portion = 0.01f;
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index bf2e479d..13a5739e 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -252,8 +252,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
if( totalDamage > 0.0f )
{
- if( self->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS &&
- player->client && player->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ if( self->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
{
//nice simple happy bouncy human land
float classValue = BG_FindValueOfClass( self->client->ps.stats[ STAT_PCLASS ] );
@@ -262,6 +261,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
{
player = g_entities + i;
+ if( player->client && player->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ continue;
+
if( !self->credits[ i ] )
continue;
@@ -270,8 +272,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
(int)( classValue * ( self->credits[ i ] / totalDamage ) ) );
}
}
- else if( self->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS &&
- player->client && player->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ else if( self->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
{
//horribly complex nasty alien land
float humanValue = BG_GetValueOfHuman( self->client->ps );
@@ -282,6 +283,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
{
player = g_entities + i;
+ if( player->client && player->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ continue;
+
//this client did no damage
if( !self->credits[ i ] )
continue;