summaryrefslogtreecommitdiff
path: root/src/game/g_combat.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2002-09-03 01:57:18 +0000
committerTim Angus <tim@ngus.net>2002-09-03 01:57:18 +0000
commit01aee82bd49575f16b5701cf842f04e6b1ba7b3d (patch)
treec306eed20c91cce6221a115a173f9b6cf68da393 /src/game/g_combat.c
parentbb5d52f699a403e22584aa18946a091f345662e8 (diff)
* Large purge of legacy Q3A code
* Removed Q3A team system * Removed "gametype" stuff * Removed items * Refactored buildable physics * Other general cleanups
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r--src/game/g_combat.c102
1 files changed, 8 insertions, 94 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index e440ae32..0745b517 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -30,18 +30,17 @@ AddScore
Adds score to both the client and his team
============
*/
-void AddScore( gentity_t *ent, int score ) {
- if ( !ent->client ) {
+void AddScore( gentity_t *ent, int score )
+{
+ if( !ent->client )
return;
- }
+
// no scoring during pre-match warmup
- if ( level.warmupTime ) {
+ if( level.warmupTime )
return;
- }
- ent->client->ps.persistant[PERS_SCORE] += score;
- if (g_gametype.integer == GT_TEAM)
- level.teamScores[ ent->client->ps.persistant[PERS_TEAM] ] += score;
- CalculateRanks();
+
+ ent->client->ps.persistant[ PERS_SCORE ] += score;
+ CalculateRanks( );
}
/*
@@ -173,91 +172,6 @@ char *modNames[] = {
"MOD_DSPAWN"
};
-
-/*
-==================
-CheckAlmostCapture
-==================
-*/
-void CheckAlmostCapture( gentity_t *self, gentity_t *attacker ) {
- gentity_t *ent;
- vec3_t dir;
- char *classname;
-
- // if this player was carrying a flag
- /*if ( self->client->ps.powerups[PW_REDFLAG] ||
- self->client->ps.powerups[PW_BLUEFLAG] ||
- self->client->ps.powerups[PW_NEUTRALFLAG] ) {
- // get the goal flag this player should have been going for
- if ( g_gametype.integer == GT_CTF ) {
- if ( self->client->sess.sessionTeam == TEAM_ALIENS ) {
- classname = "team_CTF_blueflag";
- }
- else {
- classname = "team_CTF_redflag";
- }
- }
- else {
- if ( self->client->sess.sessionTeam == TEAM_ALIENS ) {
- classname = "team_CTF_redflag";
- }
- else {
- classname = "team_CTF_blueflag";
- }
- }
- ent = NULL;
- do
- {
- ent = G_Find(ent, FOFS(classname), classname);
- } while (ent && (ent->flags & FL_DROPPED_ITEM));
- // if we found the destination flag and it's not picked up
- if (ent && !(ent->r.svFlags & SVF_NOCLIENT) ) {
- // if the player was *very* close
- VectorSubtract( self->client->ps.origin, ent->s.origin, dir );
- if ( VectorLength(dir) < 200 ) {
- self->client->ps.persistant[PERS_PLAYEREVENTS] ^= PLAYEREVENT_HOLYSHIT;
- if ( attacker->client ) {
- attacker->client->ps.persistant[PERS_PLAYEREVENTS] ^= PLAYEREVENT_HOLYSHIT;
- }
- }
- }
- }*/
-}
-
-/*
-==================
-CheckAlmostScored
-==================
-*/
-void CheckAlmostScored( gentity_t *self, gentity_t *attacker ) {
- /*gentity_t *ent;
- vec3_t dir;
- char *classname;
-
- // if the player was carrying cubes
- if ( self->client->ps.generic1 ) {
- if ( self->client->sess.sessionTeam == TEAM_ALIENS ) {
- classname = "team_redobelisk";
- }
- else {
- classname = "team_blueobelisk";
- }
- ent = G_Find(NULL, FOFS(classname), classname);
- // if we found the destination obelisk
- if ( ent ) {
- // if the player was *very* close
- VectorSubtract( self->client->ps.origin, ent->s.origin, dir );
- if ( VectorLength(dir) < 200 ) {
- self->client->ps.persistant[PERS_PLAYEREVENTS] ^= PLAYEREVENT_HOLYSHIT;
- if ( attacker->client ) {
- attacker->client->ps.persistant[PERS_PLAYEREVENTS] ^= PLAYEREVENT_HOLYSHIT;
- }
- }
- }
- }*/
-}
-
-
/*
==================
player_die