diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_drawtools.c | 2 | ||||
-rw-r--r-- | src/game/bg_misc.c | 31 | ||||
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | src/game/g_client.c | 1 | ||||
-rw-r--r-- | src/game/g_cmds.c | 8 | ||||
-rw-r--r-- | src/game/g_combat.c | 50 | ||||
-rw-r--r-- | src/game/g_team.c | 4 |
7 files changed, 2 insertions, 97 deletions
diff --git a/src/cgame/cg_drawtools.c b/src/cgame/cg_drawtools.c index 391b287d..16e90a11 100644 --- a/src/cgame/cg_drawtools.c +++ b/src/cgame/cg_drawtools.c @@ -501,7 +501,7 @@ CG_ColorForHealth void CG_ColorForHealth( vec4_t hcolor ) { CG_GetColorForHealth( cg.snap->ps.stats[STAT_HEALTH], - cg.snap->ps.stats[STAT_ARMOR], hcolor ); + 0, hcolor ); } // bk001205 - code below duplicated in q3_ui/ui-atoms.c diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 5acdbb01..c6a46353 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -1293,7 +1293,6 @@ classAttributes_t bg_classList[ ] = 12, 12, //int viewheight, crouchviewheight; 50, //int health; 5, //int regenRate; - 0, //int armor; SCA_TAKESFALLDAMAGE|SCA_FOVWARPS, //int abilities; 95.0f, //float buildDist; 80, //int fov; @@ -1321,7 +1320,6 @@ classAttributes_t bg_classList[ ] = 0, 0, //int viewheight, crouchviewheight; 75, //int health; 5, //int regenRate; - 10, //int armor; SCA_CANJUMP|SCA_FOVWARPS|SCA_WALLCLIMBER, //int abilities; 95.0f, //float buildDist; 110, //int fov; @@ -1349,7 +1347,6 @@ classAttributes_t bg_classList[ ] = 0, 0, //int viewheight, crouchviewheight; 25, //int health; 5, //int regenRate; - 0, //int armor; SCA_WALLCLIMBER|SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS|SCA_ALIENSENSE, //int abilities; 0.0f, //float buildDist; 140, //int fov; @@ -1377,7 +1374,6 @@ classAttributes_t bg_classList[ ] = 6, 6, //int viewheight, crouchviewheight; 50, //int health; 5, //int regenRate; - 5, //int armor; SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; 0.0f, //float buildDist; 120, //int fov; @@ -1405,7 +1401,6 @@ classAttributes_t bg_classList[ ] = 6, 6, //int viewheight, crouchviewheight; 50, //int health; 5, //int regenRate; - 5, //int armor; SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; 0.0f, //float buildDist; 120, //int fov; @@ -1433,7 +1428,6 @@ classAttributes_t bg_classList[ ] = 6, 6, //int viewheight, crouchviewheight; 50, //int health; 5, //int regenRate; - 10, //int armor; SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; 0.0f, //float buildDist; 120, //int fov; @@ -1461,7 +1455,6 @@ classAttributes_t bg_classList[ ] = 6, 6, //int viewheight, crouchviewheight; 50, //int health; 5, //int regenRate; - 10, //int armor; SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; 0.0f, //float buildDist; 120, //int fov; @@ -1489,7 +1482,6 @@ classAttributes_t bg_classList[ ] = 4, 4, //int viewheight, crouchviewheight; 100, //int health; 5, //int regenRate; - 20, //int armor; SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; 0.0f, //float buildDist; 130, //int fov; @@ -1517,7 +1509,6 @@ classAttributes_t bg_classList[ ] = 4, 4, //int viewheight, crouchviewheight; 100, //int health; 5, //int regenRate; - 20, //int armor; SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; 0.0f, //float buildDist; 130, //int fov; @@ -1545,7 +1536,6 @@ classAttributes_t bg_classList[ ] = 4, 4, //int viewheight, crouchviewheight; 100, //int health; 5, //int regenRate; - 30, //int armor; SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; 0.0f, //float buildDist; 130, //int fov; @@ -1573,7 +1563,6 @@ classAttributes_t bg_classList[ ] = 26, 12, //int viewheight, crouchviewheight; 100, //int health; 0, //int regenRate; - 0, //int armor; SCA_TAKESFALLDAMAGE|SCA_CANJUMP, //int abilities; 110.0f, //float buildDist; 90, //int fov; @@ -1846,26 +1835,6 @@ int BG_FindRegenRateForClass( int pclass ) /* ============== -BG_FindArmorForClass -============== -*/ -int BG_FindArmorForClass( int pclass ) -{ - int i; - - for( i = 0; i < bg_numPclasses; i++ ) - { - if( bg_classList[ i ].classNum == pclass ) - { - return bg_classList[ i ].armor; - } - } - - return 0; -} - -/* -============== BG_FindFovForClass ============== */ diff --git a/src/game/bg_public.h b/src/game/bg_public.h index ed0f0328..7e8483de 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -220,7 +220,6 @@ typedef enum { STAT_ACTIVEITEMS, STAT_WEAPONS, // 16 bit fields STAT_WEAPONS2, //TA: another 16 bits to push the max weapon count up - STAT_ARMOR, STAT_MAX_HEALTH, // health / armor limit, changable by handicap STAT_PCLASS, //TA: player class (for aliens AND humans) STAT_PTEAM, //TA: player team @@ -867,7 +866,6 @@ typedef struct int health; int regenRate; - int armor; int abilities; @@ -1055,7 +1053,6 @@ void BG_FindBBoxForClass( int pclass, vec3_t mins, vec3_t maxs, vec3_t cmax void BG_FindViewheightForClass( int pclass, int *viewheight, int *cViewheight ); int BG_FindHealthForClass( int pclass ); int BG_FindRegenRateForClass( int pclass ); -int BG_FindArmorForClass( int pclass ); int BG_FindFovForClass( int pclass ); float BG_FindBobForClass( int pclass ); float BG_FindSpeedForClass( int pclass ); diff --git a/src/game/g_client.c b/src/game/g_client.c index 942aba66..8642a06c 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1434,7 +1434,6 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn ) BG_FindBBoxForClass( ent->client->pers.pclass, ent->r.mins, ent->r.maxs, NULL, NULL, NULL ); client->pers.maxHealth = client->ps.stats[ STAT_MAX_HEALTH ] = BG_FindHealthForClass( ent->client->pers.pclass ); - client->ps.stats[ STAT_ARMOR ] = BG_FindArmorForClass( ent->client->pers.pclass ); // clear entity values switch( ent->client->pers.pclass ) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 5e65240a..66e0f16a 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -246,14 +246,6 @@ void Cmd_Give_f (gentity_t *ent) return; } - if (give_all || Q_stricmp(name, "armor") == 0) - { - ent->client->ps.stats[STAT_ARMOR] = 200; - - if (!give_all) - return; - } - if( give_all || Q_stricmp( name, "funds" ) == 0 ) { ent->client->ps.persistant[ PERS_CREDIT ] += 123; diff --git a/src/game/g_combat.c b/src/game/g_combat.c index f4bae54b..e440ae32 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -468,43 +468,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int /* ================ -CheckArmor -================ -*/ -int CheckArmor( gentity_t *ent, int damage, int dflags ) -{ - gclient_t *client; - int save; - int count; - - if (!damage) - return 0; - - client = ent->client; - - if (!client) - return 0; - - if (dflags & DAMAGE_NO_ARMOR) - return 0; - - // armor - count = client->ps.stats[STAT_ARMOR]; - save = ceil( damage * ARMOR_PROTECTION ); - if (save >= count) - save = count; - - if (!save) - return 0; - - client->ps.stats[STAT_ARMOR] -= save; - - return save; -} - - -/* -================ RaySphereIntersections ================ */ @@ -1101,19 +1064,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, take = damage; save = 0; - // save some from armor -/* asave = CheckArmor (targ, take, dflags); - take -= asave;*/ - //TA: armour is the chance of deflecting an attack (out of 100) -/* if( targ->client && targ->client->ps.stats[ STAT_ARMOR ] > 0 ) - { - //TA: this whole thing is probably a bad idea. Worth a try I guess. - float chance = (float)targ->client->ps.stats[ STAT_ARMOR ] / 100.0f; - - if( crandom( ) > chance ) - take *= chance; - }*/ - if( g_debugDamage.integer ) { G_Printf( "%i: client:%i health:%i damage:%i armor:%i\n", level.time, targ->s.number, diff --git a/src/game/g_team.c b/src/game/g_team.c index d8eb900e..82277726 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -907,7 +907,7 @@ void TeamplayInfoMessage( gentity_t *ent ) { int i, j; gentity_t *player; int cnt; - int h, a; + int h, a = 0; int clients[TEAM_MAXOVERLAY]; if ( ! ent->client->pers.teamInfo ) @@ -937,9 +937,7 @@ void TeamplayInfoMessage( gentity_t *ent ) { ent->client->sess.sessionTeam ) { h = player->client->ps.stats[STAT_HEALTH]; - a = player->client->ps.stats[STAT_ARMOR]; if (h < 0) h = 0; - if (a < 0) a = 0; Com_sprintf (entry, sizeof(entry), " %i %i %i %i %i %i", |