forked from ShakaUVM/CustomTF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMEGATF.QC
61 lines (50 loc) · 1.46 KB
/
MEGATF.QC
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
/*=======================================================//
// MegaTF.QC - CustomTF 3.2.OfN - 21/1/2004 - //
// by Sergio Fumaña Grunwaldt - OfteN [cp] //
=========================================================//
Code related to MegaTF mimetized behaviours is here.
With the exception of map entities, that have their own
file: 'mtfents.qc'
=========================================================*/
#define MEGATF_DEFAULT_MODE #MEGATF_MAPENTS | #MEGATF_SIGHTS
//==============================================================
// Conditionally precaches needed stuff for current megatf mode
void () MegaTF_Precaches =
{
/* WK Get rid of this, it's unused
if (megatf & #MEGATF_STEPS)
{
precache_sound("player/step1l.wav");
precache_sound("player/step1r.wav");
precache_sound("player/step2l.wav");
precache_sound("player/step2r.wav");
}
*/
if (megatf & #MEGATF_SIGHTS)
{
precache_model2("progs/colsight.spr");
}
else // Standard sights
precache_model2("progs/sight.spr");
/*if (megatf & #MEGATF_DROPS)
{
}*/
};
//==============================================================
// Updates MegaTF flags global
void () GetMegaTFflags =
{
local string st;
st = infokey(world,"megatf");
if (st == "")
megatf = #MEGATF_DEFAULT_MODE;
else
megatf = stof(st);
};
//===============================================================
// Called only at map startup, initializes megatf stuff
void() InitMegaTF =
{
GetMegaTFflags();
MegaTF_Precaches();
};