-
Notifications
You must be signed in to change notification settings - Fork 3
/
world.qc
293 lines (287 loc) · 9.54 KB
/
world.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
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
void() InitBodyQue;
void() precache_cbot_models;
void() main =
{
dprint("main function\n");
precache_file("progs.dat");
precache_file("gfx.wad");
precache_file("quake.rc");
precache_file("default.cfg");
precache_file("end1.bin");
precache_file2("end2.bin");
precache_file("demo1.dem");
precache_file("demo2.dem");
precache_file("demo3.dem");
precache_file("gfx/palette.lmp");
precache_file("gfx/colormap.lmp");
precache_file2("gfx/pop.lmp");
precache_file("gfx/complete.lmp");
precache_file("gfx/inter.lmp");
precache_file("gfx/ranking.lmp");
precache_file("gfx/vidmodes.lmp");
precache_file("gfx/finale.lmp");
precache_file("gfx/conback.lmp");
precache_file("gfx/qplaque.lmp");
precache_file("gfx/menudot1.lmp");
precache_file("gfx/menudot2.lmp");
precache_file("gfx/menudot3.lmp");
precache_file("gfx/menudot4.lmp");
precache_file("gfx/menudot5.lmp");
precache_file("gfx/menudot6.lmp");
precache_file("gfx/menuplyr.lmp");
precache_file("gfx/bigbox.lmp");
precache_file("gfx/dim_modm.lmp");
precache_file("gfx/dim_drct.lmp");
precache_file("gfx/dim_ipx.lmp");
precache_file("gfx/dim_tcp.lmp");
precache_file("gfx/dim_mult.lmp");
precache_file("gfx/mainmenu.lmp");
precache_file("gfx/box_tl.lmp");
precache_file("gfx/box_tm.lmp");
precache_file("gfx/box_tr.lmp");
precache_file("gfx/box_ml.lmp");
precache_file("gfx/box_mm.lmp");
precache_file("gfx/box_mm2.lmp");
precache_file("gfx/box_mr.lmp");
precache_file("gfx/box_bl.lmp");
precache_file("gfx/box_bm.lmp");
precache_file("gfx/box_br.lmp");
precache_file("gfx/sp_menu.lmp");
precache_file("gfx/ttl_sgl.lmp");
precache_file("gfx/ttl_main.lmp");
precache_file("gfx/ttl_cstm.lmp");
precache_file("gfx/mp_menu.lmp");
precache_file("gfx/netmen1.lmp");
precache_file("gfx/netmen2.lmp");
precache_file("gfx/netmen3.lmp");
precache_file("gfx/netmen4.lmp");
precache_file("gfx/netmen5.lmp");
precache_file("gfx/sell.lmp");
precache_file("gfx/help0.lmp");
precache_file("gfx/help1.lmp");
precache_file("gfx/help2.lmp");
precache_file("gfx/help3.lmp");
precache_file("gfx/help4.lmp");
precache_file("gfx/help5.lmp");
precache_file("gfx/pause.lmp");
precache_file("gfx/loading.lmp");
precache_file("gfx/p_option.lmp");
precache_file("gfx/p_load.lmp");
precache_file("gfx/p_save.lmp");
precache_file("gfx/p_multi.lmp");
precache_sound("misc/menu1.wav");
precache_sound("misc/menu2.wav");
precache_sound("misc/menu3.wav");
precache_file("maps/start.bsp");
precache_file("maps/e1m1.bsp");
precache_file("maps/e1m2.bsp");
precache_file("maps/e1m3.bsp");
precache_file("maps/e1m4.bsp");
precache_file("maps/e1m5.bsp");
precache_file("maps/e1m6.bsp");
precache_file("maps/e1m7.bsp");
precache_file("maps/e1m8.bsp");
precache_file2("gfx/pop.lmp");
precache_file2("maps/e2m1.bsp");
precache_file2("maps/e2m2.bsp");
precache_file2("maps/e2m3.bsp");
precache_file2("maps/e2m4.bsp");
precache_file2("maps/e2m5.bsp");
precache_file2("maps/e2m6.bsp");
precache_file2("maps/e2m7.bsp");
precache_file2("maps/e3m1.bsp");
precache_file2("maps/e3m2.bsp");
precache_file2("maps/e3m3.bsp");
precache_file2("maps/e3m4.bsp");
precache_file2("maps/e3m5.bsp");
precache_file2("maps/e3m6.bsp");
precache_file2("maps/e3m7.bsp");
precache_file2("maps/e4m1.bsp");
precache_file2("maps/e4m2.bsp");
precache_file2("maps/e4m3.bsp");
precache_file2("maps/e4m4.bsp");
precache_file2("maps/e4m5.bsp");
precache_file2("maps/e4m6.bsp");
precache_file2("maps/e4m7.bsp");
precache_file2("maps/e4m8.bsp");
precache_file2("maps/end.bsp");
precache_file2("maps/dm1.bsp");
precache_file2("maps/dm2.bsp");
precache_file2("maps/dm3.bsp");
precache_file2("maps/dm4.bsp");
precache_file2("maps/dm5.bsp");
precache_file2("maps/dm6.bsp");
};
void() worldspawn =
{
lastspawn = world;
InitBodyQue();
if (self.model == "maps/e1m8.bsp")
{
cvar_set("sv_gravity", "100");
}
else
{
cvar_set("sv_gravity", "800");
}
W_Precache();
precache_sound("demon/dland2.wav");
precache_sound("misc/h2ohit1.wav");
precache_sound("items/itembk2.wav");
precache_sound("player/plyrjmp8.wav");
precache_sound("player/land.wav");
precache_sound("player/land2.wav");
precache_sound("player/drown1.wav");
precache_sound("player/drown2.wav");
precache_sound("player/gasp1.wav");
precache_sound("player/gasp2.wav");
precache_sound("player/h2odeath.wav");
precache_sound("misc/talk.wav");
precache_sound("misc/talk1.wav");
precache_sound("misc/talk2.wav");
precache_sound("misc/talk3.wav");
precache_sound("player/teledth1.wav");
precache_sound("misc/r_tele1.wav");
precache_sound("weapons/lock4.wav");
precache_sound("weapons/pkup.wav");
precache_sound("items/damage3.wav");
precache_sound("misc/power.wav");
precache_sound("player/gib.wav");
precache_sound("player/udeath.wav");
precache_sound("player/tornoff2.wav");
precache_sound("damage/pain1.wav");
precache_sound("damage/pain2.wav");
precache_sound("damage/pain3.wav");
precache_sound("damage/pain4.wav");
precache_sound("damage/pain5.wav");
precache_sound("damage/pain6.wav");
precache_sound("damage/pain7.wav");
precache_sound("damage/pain8.wav");
precache_sound("damage/pain9.wav");
precache_sound("damage/pain10.wav");
precache_sound("damage/death1.wav");
precache_sound("damage/death2.wav");
precache_sound("damage/death3.wav");
precache_sound("damage/death4.wav");
precache_sound("damage/death5.wav");
precache_sound("damage/death6.wav");
precache_sound("damage/fall1.wav");
precache_sound("damage/fall2.wav");
precache_sound("damage/scuba.wav");
precache_sound("utils/pickup.wav");
precache_sound("player/h2ojump.wav");
precache_sound("player/slimbrn2.wav");
precache_sound("player/inh2o.wav");
precache_sound("player/inlava.wav");
precache_sound("misc/outwater.wav");
precache_sound("misc/water1.wav");
precache_sound("misc/water2.wav");
precache_sound("ambience/subaqua.wav");
precache_sound("misc/null.wav");
precache_sound("misc/glass1.wav");
precache_model("progs/bdrop.mdl");
precache_model("progs/sight.mdl");
Util_Precache();
precache_cbot_models();
precache_sound("ambience/siren.wav");
precache_sound("misc/basekey.wav");
precache_model("progs/b_s_key.mdl");
precache_model("progs/b_g_key.mdl");
precache_model("progs/comet.mdl");
precache_model("progs/torpedo.mdl");
precache_model("progs/rocket.mdl");
precache_model("progs/shelcase.mdl");
precache_model("progs/bshell1.mdl");
precache_model("progs/bulcase.mdl");
precache_model("progs/mortshel.mdl");
precache_model("progs/celshel.mdl");
precache_model("progs/chute.mdl");
precache_model("progs/player.mdl");
precache_model("progs/d_hover.mdl");
precache_model("progs/d_scuba.mdl");
precache_model("progs/d_bag.mdl");
precache_model("progs/h_player.mdl");
precache_model("progs/gib1.mdl");
precache_model("progs/gib2.mdl");
precache_model("progs/gib3.mdl");
precache_model("progs/null.spr");
precache_model("progs/s_punish.spr");
precache_model("progs/s_smoke.spr");
precache_model("progs/s_bubble.spr");
precache_model("progs/s_flame1.spr");
precache_model("progs/s_flame2.spr");
precache_model("progs/s_explod.spr");
precache_model("progs/d_explod.spr");
precache_model("progs/s_spark.spr");
precache_model("progs/s_plas.spr");
precache_model("progs/s_expshl.spr");
precache_model("progs/s_splash.spr");
precache_model("progs/shroom.spr");
precache_model("progs/w_uzi.mdl");
precache_model("progs/w_44.mdl");
precache_model("progs/w_shot.mdl");
precache_model("progs/w_shot2.mdl");
precache_model("progs/w_morter.mdl");
precache_model("progs/w_rocket.mdl");
precache_model("progs/w_punish.mdl");
precache_model("progs/w_mini.mdl");
precache_model("progs/missile.mdl");
precache_model("progs/morter.mdl");
precache_model("progs/spike.mdl");
precache_model("progs/s_spike.mdl");
precache_model("progs/backpack.mdl");
precache_model("progs/zom_gib.mdl");
precache_model("maps/b_shell0.bsp");
precache_model("maps/b_nail0.bsp");
precache_model("maps/b_rock0.bsp");
precache_model("maps/b_batt0.bsp");
lightstyle(MSG_BROADCAST, "m");
lightstyle(WEAPON_SHOTGUN, "mmnmmommommnonmmonqnmmo");
lightstyle(WEAPON_ROCKET, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba");
lightstyle(AS_MELEE, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
lightstyle(WEAPON_SPIKES, "mamamamamama");
lightstyle(SVC_SETVIEWPORT, "jklmnopqrstuvwxyzyxwvutsrqponmlkj");
lightstyle(TE_LIGHTNING2, "nmonqnmomnmomomno");
lightstyle(TE_WIZSPIKE, "mmmaaaabcdefgmmmmaaaammmaamm");
lightstyle(WEAPON_BIG, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa");
lightstyle(TE_LIGHTNING3, "aaaaaaaazzzzzzzz");
lightstyle(SVC_SETVIEWANGLES, "mmamammmmammamamaaamammma");
lightstyle(TE_TELEPORT, "abcdefghijklmnopqrrqponmlkjihgfedcba");
lightstyle(63, "a");
};
void() StartFrame =
{
teamplay = cvar("teamplay");
skill = cvar("skill");
framecount = framecount + WEAPON_SHOTGUN;
};
void() bodyque =
{
};
void() InitBodyQue =
{
local entity e;
bodyque_head = spawn();
bodyque_head.classname = "bodyque";
bodyque_head.owner = spawn();
bodyque_head.owner.classname = "bodyque";
bodyque_head.owner.owner = spawn();
bodyque_head.owner.owner.classname = "bodyque";
bodyque_head.owner.owner.owner = spawn();
bodyque_head.owner.owner.owner.classname = "bodyque";
bodyque_head.owner.owner.owner.owner = bodyque_head;
};
void(entity ent) CopyToBodyQue =
{
bodyque_head.angles = ent.angles;
bodyque_head.model = ent.model;
bodyque_head.modelindex = ent.modelindex;
bodyque_head.frame = ent.frame;
bodyque_head.colormap = ent.colormap;
bodyque_head.movetype = ent.movetype;
bodyque_head.velocity = ent.velocity;
bodyque_head.flags = MSG_BROADCAST;
setorigin(bodyque_head, ent.origin);
setsize(bodyque_head, ent.mins, ent.maxs);
bodyque_head = bodyque_head.owner;
};