Debian Codegraph @

code/game/g_team.h

raw
1 /*
2 ===========================================================================
3 Copyright (C) 1999-2005 Id Software, Inc.
4
5 This file is part of Quake III Arena source code.
6
7 Quake III Arena source code is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the License,
10 or (at your option) any later version.
11
12 Quake III Arena source code is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Quake III Arena source code; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 ===========================================================================
21 */
22 //
23
24 #ifdef MISSIONPACK
25
26 #define CTF_CAPTURE_BONUS 100 // what you get for capture
27 #define CTF_TEAM_BONUS 25 // what your team gets for capture
28 #define CTF_RECOVERY_BONUS 10 // what you get for recovery
29 #define CTF_FLAG_BONUS 10 // what you get for picking up enemy flag
30 #define CTF_FRAG_CARRIER_BONUS 20 // what you get for fragging enemy flag carrier
31 #define CTF_FLAG_RETURN_TIME 40000 // seconds until auto return
32
33 #define CTF_CARRIER_DANGER_PROTECT_BONUS 5 // bonus for fraggin someone who has recently hurt your flag carrier
34 #define CTF_CARRIER_PROTECT_BONUS 2 // bonus for fraggin someone while either you or your target are near your flag carrier
35 #define CTF_FLAG_DEFENSE_BONUS 10 // bonus for fraggin someone while either you or your target are near your flag
36 #define CTF_RETURN_FLAG_ASSIST_BONUS 10 // awarded for returning a flag that causes a capture to happen almost immediately
37 #define CTF_FRAG_CARRIER_ASSIST_BONUS 10 // award for fragging a flag carrier if a capture happens almost immediately
38
39 #else
40
41 #define CTF_CAPTURE_BONUS 5 // what you get for capture
42 #define CTF_TEAM_BONUS 0 // what your team gets for capture
43 #define CTF_RECOVERY_BONUS 1 // what you get for recovery
44 #define CTF_FLAG_BONUS 0 // what you get for picking up enemy flag
45 #define CTF_FRAG_CARRIER_BONUS 2 // what you get for fragging enemy flag carrier
46 #define CTF_FLAG_RETURN_TIME 40000 // seconds until auto return
47
48 #define CTF_CARRIER_DANGER_PROTECT_BONUS 2 // bonus for fraggin someone who has recently hurt your flag carrier
49 #define CTF_CARRIER_PROTECT_BONUS 1 // bonus for fraggin someone while either you or your target are near your flag carrier
50 #define CTF_FLAG_DEFENSE_BONUS 1 // bonus for fraggin someone while either you or your target are near your flag
51 #define CTF_RETURN_FLAG_ASSIST_BONUS 1 // awarded for returning a flag that causes a capture to happen almost immediately
52 #define CTF_FRAG_CARRIER_ASSIST_BONUS 2 // award for fragging a flag carrier if a capture happens almost immediately
53
54 #endif
55
56 #ifdef MISSIONPACK
57
58 //For Double Domination:
59 #define DD_POINT_DEFENCE_BONUS 10 //Score for fragging someone while either you or target are near a Domination Point
60 #define DD_POINT_DEFENCE_CLOSE_BONUS 25 //Score for fragging someone while either you or target are near a Domination Point and have almost scored
61 //Following is added togehter:
62 #define DD_POINT_CAPTURE 5 //Score for taking a point
63 #define DD_POINT_CAPTURE_BREAK 10 //If the enemy was dominating
64 #define DD_POINT_CAPTURE_CLOSE 15 //Extra score if the enemy was about to score
65 #define DD_AT_POINT_AT_CAPTURE 30 //You was close to a point as capture succeded.
66
67 #else
68
69 //For Double Domination:
70 #define DD_POINT_DEFENCE_BONUS 1 //Score for fragging someone while either you or target are near a Domination Point
71 #define DD_POINT_DEFENCE_CLOSE_BONUS 2 //Score for fragging someone while either you or target are near a Domination Point and have almost scored
72 //Following is added togehter:
73 #define DD_POINT_CAPTURE 1 //Score for taking a point
74 #define DD_POINT_CAPTURE_BREAK 1 //If the enemy was dominating
75 #define DD_POINT_CAPTURE_CLOSE 1 //Extra score if the enemy was about to score
76 #define DD_AT_POINT_AT_CAPTURE 1 //You was close to a point as capture succeded.
77
78 #endif
79
80 #define DD_CLOSE 3 //How many seconds to score is close
81
82 #define CTF_TARGET_PROTECT_RADIUS 1000 // the radius around an object being defended where a target will be worth extra frags
83 #define CTF_ATTACKER_PROTECT_RADIUS 1000 // the radius around an object being defended where an attacker will get extra frags when making kills
84
85 #define CTF_CARRIER_DANGER_PROTECT_TIMEOUT 8000
86 #define CTF_FRAG_CARRIER_ASSIST_TIMEOUT 10000
87 #define CTF_RETURN_FLAG_ASSIST_TIMEOUT 10000
88
89 #define CTF_GRAPPLE_SPEED 750 // speed of grapple in flight
90 #define CTF_GRAPPLE_PULL_SPEED 750 // speed player is pulled at
91
92 #define OVERLOAD_ATTACK_BASE_SOUND_TIME 20000
93
94 // Prototypes
95
96 int OtherTeam(int team);
97 const char *TeamName(int team);
98 const char *OtherTeamName(int team);
99 const char *TeamColorString(int team);
100 void AddTeamScore(vec3_t origin, int team, int score);
101
102 void Team_DroppedFlagThink(gentity_t *ent);
103 void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker);
104 void Team_CheckHurtCarrier(gentity_t *targ, gentity_t *attacker);
105 void Team_InitGame(void);
106 void Team_ReturnFlag(int team);
107 void Team_FreeEntity(gentity_t *ent);
108 gentity_t *SelectCTFSpawnPoint ( team_t team, int teamstate, vec3_t origin, vec3_t angles );
109 //For Double_D
110 gentity_t *SelectDoubleDominationSpawnPoint ( team_t, vec3_t origin, vec3_t angles );
111 //For Standard D
112 void Team_Dom_SpawnPoints( void );
113 gentity_t *Team_GetLocation(gentity_t *ent);
114 qboolean Team_GetLocationMsg(gentity_t *ent, char *loc, int loclen);
115 void TeamplayInfoMessage( gentity_t *ent );
116 void CheckTeamStatus(void);
117
118 int Pickup_Team( gentity_t *ent, gentity_t *other );
119
120 //Double Domination:
121 int Team_SpawnDoubleDominationPoints ( void );
122 int Team_RemoveDoubleDominationPoints ( void );
123 void Team_DD_bonusAtPoints(int team);
124
125 //Added to make gcc happy (and because I use it in main)
126 void Team_ForceGesture(int team);