Debian Codegraph @

code/game/g_killspree.h

raw
1 /*
2 ===========================================================================
3 Copyright (C) 2009 Karl Kuglin
4
5 This file is part of the Open Arena source code.
6
7 Open 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 Open 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 Open 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 //definitions
24 // I'd say 32 sprees is a lot!!!
25 #define MAX_KSPREE 32
26 #define MAX_DSPREE 32
27 #define MAX_MULTIKILLS 32
28
29 #define CENTER_PRINT 1
30 #define CHAT 2
31
32 //Used to pass parameter to calculate the upper-most level of
33 // the spree/multikill arrays.
34 #define LARGEST_KILLSPREE 1
35 #define LARGEST_DEATHSPREE 2
36 #define LARGEST_MULTIKILL 3
37
38 typedef struct killspree
39 {
40 int spreeLevel;
41 int streakCount; //Added programatically based off SpreeDivisor.
42 char spreeMsg[ MAX_STRING_CHARS ];
43 char sound2Play[ MAX_STRING_CHARS ];
44 int position;
45 } killspree_t;
46
47
48 typedef struct deathspree
49 {
50 int spreeLevel;
51 int streakCount; //Added programatically based off SpreeDivisor.
52 char spreeMsg[ MAX_STRING_CHARS ];
53 char sound2Play[ MAX_STRING_CHARS ];
54 int position;
55 } deathspree_t;
56
57 typedef struct multikill
58 {
59 char killMsg[ MAX_STRING_CHARS ];
60 char sound2Play[ MAX_STRING_CHARS ];
61 int kills;
62 } multikill_t;
63
64 //function declarations
65 qboolean G_ReadAltKillSettings( gentity_t *ent, int skiparg );
66 void G_RunStreakLogic( gentity_t *attacker, gentity_t *victim );
67 void G_CheckForSpree( gentity_t *ent, int streak2Test, qboolean checkKillSpree );
68 void G_checkForMultiKill( gentity_t *ent );
69 void G_ConfigClientExcellent( qboolean levelStart );
70