-
Notifications
You must be signed in to change notification settings - Fork 0
/
csdefs.c
218 lines (210 loc) · 4.51 KB
/
csdefs.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
vector DEFAULT_VIEWHEIGHT = '0 0 28';
vector VEC_DUCK_VIEW = '0 0 12';
vector VEC_DUCK_HULL_MIN = '-16 -16 -18';
vector VEC_DUCK_HULL_MAX = '16 16 18';
#define AUTOAIM_2DEGREES 0.0348994967025
#define AUTOAIM_5DEGREES 0.08715574274766
#define AUTOAIM_8DEGREES 0.1391731009601
#define AUTOAIM_10DEGREES 0.1736481776669
// func breakable
#define SF_BREAK_TRIGGER_ONLY 1 // may only be broken by trigger
#define SF_BREAK_TOUCH 2 // can be 'crashed through' by running player (plate glass)
#define SF_BREAK_PRESSURE 4 // can be broken by a player standing on it
#define SF_BREAK_CROWBAR 256 // instant break if hit with crowbar
// screen fade flags
enum
{
FFADE_IN = 0, // Just here so we don't pass 0 into the function
FFADE_OUT, // Fade out (not in)
FFADE_MODULATE, // Modulate (don't blend)
FFADE_STAYOUT // ignores the duration, stays faded out until new ScreenFade message received
};
float T_SIDE = 1;
float CT_SIDE = 2;
float m_iNumTerrorist,m_iNumCT;
.float menu_team_on;
.float ammo_45acp,uspclip,silencer,usp_fired;
.float ammo_glock,glockclip,autofire,glock_fired;
.float ammo_deagle,deagleclip,deagle_fired;
.float ammo_m3,m3clip,m3_fired;
.float ammo_ak47,ak47clip,ak47_fired;
.float ammo_awp,awpclip,scope,awp_fired;
.float ammo_galil,galilclip,galil_fired;
.float ammo_aug,augclip,aug_fired;
.float ammo_famas,famasclip,famasburst,famas_fired;
.float ammo_m4a1,m4a1clip,m4a1_fired,m4a1silencer;
.float ammo_p228,p228clip,p228_fired;
.float ammo_elite,eliteclip,elite_fired;
.float ammo_xm,xmclip,xm_fired;
.float ammo_mac10,mac10clip,mac10_fired;
.float ammo_mp5,mp5clip,mp5_fired;
typedef struct
{
float ammo;
float clip;
float fired;
} wep_t;
.float he_grenades;
.float attack_finished;
.float iSlot;
.float m_iMenu,m_iTeam;
enum
{
PRIMARY,
SECONDARY,
KNIFE,
GRENADES
};
enum
{
JOINED,
SHOWLTEXT,
READINGLTEXT,
SHOWTEAMSELECT,
PICKINGTEAM,
GETINTOGAME
};
enum
{
Menu_OFF,
Menu_ChooseTeam,
Menu_IGChooseTeam,
Menu_ChooseAppearance,
Menu_Buy
};
enum
{
UNASSIGNED,
TERRORIST,
CT,
SPECTATOR
};
enum
{
ASSAULTSUIT_PRICE = 1000,
FLASHBANG_PRICE = 200,
HEGRENADE_PRICE = 300,
SMOKEGRENADE_PRICE = 300,
KEVLAR_PRICE = 650,
HELMET_PRICE = 350,
NVG_PRICE = 1250,
DEFUSEKIT_PRICE = 200,
};
enum
{
AK47_PRICE = 2500,
AWP_PRICE = 4750,
DEAGLE_PRICE = 650,
G3SG1_PRICE = 5000,
SG550_PRICE = 4200,
GLOCK18_PRICE = 400,
M249_PRICE = 5750,
M3_PRICE = 1700,
M4A1_PRICE = 3100,
AUG_PRICE = 3500,
MP5NAVY_PRICE = 1500,
P228_PRICE = 600,
P90_PRICE = 2350,
UMP45_PRICE = 1700,
MAC10_PRICE = 1400,
SCOUT_PRICE = 2750,
SG552_PRICE = 3500,
TMP_PRICE = 1250,
USP_PRICE = 500,
ELITE_PRICE = 800,
FIVESEVEN_PRICE = 750,
XM1014_PRICE = 3000,
GALIL_PRICE = 2000,
FAMAS_PRICE = 2250,
SHIELDGUN_PRICE = 2200,
};
enum
{
matGlass = 0,
matWood,
matMetal,
matFlesh,
matCinderBlock,
matCeilingTile,
matComputer,
matUnbreakableGlass,
matRocks,
matNone,
matLastMaterial,
};
.float m_iJoiningState;
entity m_pIntroCamera;
.float m_fIntroCamTime;
//for flashbang
.float m_blindUntilTime;
.float m_blindStartTime;
.float m_blindHoldTime;
.float m_blindFadeTime;
.float m_blindAlpha;
.float m_flNextSecondaryAttack;
float MaxSpreadY,MaxSpreadX,SpreadX,SpreadY;
float LeftSpread;
/*
float IT_KNIFE = 1;
float IT_USP = 2;
float IT_GLOCK = 4;
float IT_DEAGLE = 8;
float IT_HEGRENADE = 16;
float IT_M3 = 32;
float IT_AK47 = 64;
float IT_AWP = 128;
float IT_GALIL = 256;
float IT_AUG = 512;
float IT_FAMAS = 1024;
float IT_M4A1 = 2048;
float IT_P228 = 4096;
float IT_ELITE = 8192;
float IT_XM = 16384;
float IT_XM = 16384;
*/
float IT_KNIFE = 1;
float IT_USP = 2;
float IT_GLOCK = 3;
float IT_DEAGLE = 4;
float IT_HEGRENADE = 5;
float IT_M3 = 6;
float IT_AK47 = 7;
float IT_AWP = 8;
float IT_GALIL = 9;
float IT_AUG = 10;
float IT_FAMAS = 11;
float IT_M4A1 = 12;
float IT_P228 = 13;
float IT_ELITE = 14;
float IT_XM = 15;
float IT_MAC10 = 16;
float IT_MP5 = 17;
.float state;
float RELOADING = 1;
float SILENCER = 2;
float ATTACK = 3;
//footsteps
string sound_step1;
string sound_step2;
string sound_step3;
string sound_step4;
float m_bMapHasBuyZone,buyTime;
.float m_bInBuyZone;
.float fov;
.float direction,wp;
float m_flNextDecalTime;
.float crosshair;
.float secondaryweapon,primaryweapon;
/*
-----------------------------------------
min
Returns the lesser of two (or more) numbers
-----------------------------------------
*/
float (float a, float b) mathlib_min =
{
if (a<b)
return a;
else
return b;
};