5dd0b319995ca60bbb6bc0d09295dd7574d7bb0e
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_rocketlauncher.qc
1 #ifdef REGISTER_WEAPON
2 REGISTER_WEAPON(ROCKET_LAUNCHER, w_rlauncher, IT_ROCKETS, 9, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_HIGH, "rl", "rocketlauncher", "Rocket Launcher");
3 #else
4 #ifdef SVQC
5 .float rl_release;
6 .float rl_detonate_later;
7
8 void W_Rocket_Unregister()
9 {
10         if(self.owner && self.owner.lastrocket == self)
11         {
12                 self.owner.lastrocket = world;
13                 // self.owner.rl_release = 1;
14         }
15 }
16
17 void W_Rocket_Explode (void)
18 {
19         W_Rocket_Unregister();
20
21         if(other.takedamage == DAMAGE_AIM)
22                 if(other.classname == "player")
23                         if(IsDifferentTeam(self.owner, other))
24                                 if(IsFlying(other))
25                                         AnnounceTo(self.owner, "airshot");
26
27         self.event_damage = SUB_Null;
28         self.takedamage = DAMAGE_NO;
29         RadiusDamage (self, self.owner, cvar("g_balance_rocketlauncher_damage"), cvar("g_balance_rocketlauncher_edgedamage"), cvar("g_balance_rocketlauncher_radius"), world, cvar("g_balance_rocketlauncher_force"), self.projectiledeathtype, other);
30
31         if (self.owner.weapon == WEP_ROCKET_LAUNCHER)
32         {
33                 if(self.owner.ammo_rockets < cvar("g_balance_rocketlauncher_ammo"))
34                 {
35                         self.owner.cnt = WEP_ROCKET_LAUNCHER;
36                         ATTACK_FINISHED(self.owner) = time;
37                         self.owner.switchweapon = w_getbestweapon(self.owner);
38                 }
39                 if(g_laserguided_missile)
40                         ATTACK_FINISHED(self.owner) = time + cvar("g_balance_rocketlauncher_refire") * W_WeaponRateFactor();
41         }
42         remove (self);
43 }
44
45 entity FindLaserTarget(entity e, float dist_variance, float dot_variance)
46 {
47         entity head, selected;
48         vector dir;
49         float dist, maxdist,// bestdist,
50                 dot,// bestdot,
51                 points, bestpoints;
52         //bestdist = 9999;
53         //bestdot = -2;
54         bestpoints = 0;
55         maxdist = 800;
56         selected = world;
57
58         makevectors(e.angles);
59
60         head = find(world, classname, "laser_target");
61         while(head)
62         {
63                 points = 0;
64                 dir = normalize(head.origin - self.origin);
65                 dot = dir * v_forward;
66                 dist = vlen(head.origin - self.origin);
67                 if(dist > maxdist)
68                         dist = maxdist;
69
70                 // gain points for being in front
71                 points = points + ((dot+1)*0.5) * 500
72                         * (1 + crandom()*dot_variance);
73                 // gain points for being close away
74                 points = points + (1 - dist/maxdist) * 1000
75                         * (1 + crandom()*dot_variance);
76
77                 traceline(e.origin, head.origin, TRUE, self);
78                 if(trace_fraction < 1)
79                 {
80                         points = 0;
81                 }
82
83                 if(points > bestpoints)//random() > 0.5)//
84                 {
85                         bestpoints = points;
86                         selected = head;
87                 }
88
89                 head = find(head, classname, "laser_target");
90         }
91
92         //bprint(selected.owner.netname);
93         //bprint("\n");
94         return selected;
95 }
96
97 void W_Rocket_RemoteExplode()
98 {
99         if(self.owner.deadflag == DEAD_NO)
100         if(self.owner.lastrocket)
101         {
102                 if((self.spawnshieldtime >= 0)
103                         ? (time >= self.spawnshieldtime) // timer
104                         : (vlen(NearestPointOnBox(self.owner, self.origin) - self.origin) > cvar("g_balance_rocketlauncher_radius")) // safety device
105                 )
106                 {
107                         other = world;
108                         self.projectiledeathtype |= HITTYPE_BOUNCE;
109                         W_Rocket_Explode ();
110                 }
111                 else
112                 {
113                 }
114         }
115 }
116
117 vector rocket_steerto(vector thisdir, vector goaldir, float maxturn_cos)
118 {
119         if(thisdir * goaldir > maxturn_cos)
120                 return goaldir;
121         float f, m2;
122         vector v;
123         // solve:
124         //   g = normalize(thisdir + goaldir * X)
125         //   thisdir * g = maxturn
126         //
127         //   gg = thisdir + goaldir * X
128         //   (thisdir * gg)^2 = maxturn^2 * (gg * gg)
129         //
130         //   (1 + (thisdir * goaldir) * X)^2 = maxturn^2 * (1 + X*X + 2 * X * thisdir * goaldir)
131         f = thisdir * goaldir;
132         //   (1 + f * X)^2 = maxturn^2 * (1 + X*X + 2 * X * f)
133         //   0 = (m^2 - f^2) * x^2 + (2 * f * (m^2 - 1)) * x + (m^2 - 1)
134         m2 = maxturn_cos * maxturn_cos;
135         v = solve_quadratic(m2 - f * f, 2 * f * (m2 - 1), m2 - 1);
136         return normalize(thisdir + goaldir * v_y); // the larger solution!
137 }
138
139 void W_Rocket_Think (void)
140 {
141         entity e;
142         vector desireddir, olddir, newdir, desiredorigin, goal;
143 #if 0
144         float cosminang, cosmaxang, cosang;
145 #endif
146         float turnrate, velspeed, f;
147         self.nextthink = time;
148         if (time > self.cnt)
149         {
150                 other = world;
151                 self.projectiledeathtype |= HITTYPE_BOUNCE;
152                 W_Rocket_Explode ();
153                 return;
154         }
155
156         if(g_laserguided_missile)
157         {
158                 // accelerate
159                 makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
160                 velspeed = cvar("g_balance_rocketlauncher_laserguided_speed") * g_weaponspeedfactor - (self.velocity * v_forward);
161                 if (velspeed > 0)
162                         self.velocity = self.velocity + v_forward * min(cvar("g_balance_rocketlauncher_laserguided_speedaccel") * frametime, velspeed);
163         }
164         else
165         {
166                 // accelerate
167                 makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
168                 velspeed = cvar("g_balance_rocketlauncher_speed") * g_weaponspeedfactor - (self.velocity * v_forward);
169                 if (velspeed > 0)
170                         self.velocity = self.velocity + v_forward * min(cvar("g_balance_rocketlauncher_speedaccel") * g_weaponspeedfactor * frametime, velspeed);
171         }
172
173         // laser guided, or remote detonation
174         if (self.owner.weapon == WEP_ROCKET_LAUNCHER)
175         {
176                 if(g_laserguided_missile)
177                 {
178                         if(self.rl_detonate_later)
179                                 W_Rocket_RemoteExplode();
180
181                         if(cvar("g_balance_rocketlauncher_laserguided_allow_steal"))
182                         {
183                                 if(self.owner.laser_on)
184                                 {
185                                         if(self.attack_finished_single < time)
186                                         {
187                                                 self.attack_finished_single = time + 0.2 + random()*0.3;
188                                                 self.enemy = FindLaserTarget(self, 0.7, 0.7);
189                                         }
190
191                                         if(!self.enemy)
192                                                 self.enemy = self.owner.weaponentity.lasertarget;
193                                 }
194                                 else self.enemy = world;
195                         }
196                         else // don't allow stealing: always target my owner's laser (if it exists)
197                                 self.enemy = self.owner.weaponentity.lasertarget;
198
199                         if(self.enemy != world)
200                         {
201                                 //bprint("Targeting ", self.enemy.owner.netname, "'s laser\n");
202                                 velspeed = vlen(self.velocity);
203                                 e = self.enemy;//self.owner.weaponentity.lasertarget;
204                                 turnrate = cvar("g_balance_rocketlauncher_laserguided_turnrate");//0.65;                                                // how fast to turn
205                                 desireddir = normalize(e.origin - self.origin);         // get direction from my position to the laser target
206                                 olddir = normalize(self.velocity);                                      // get my current direction
207                                 newdir = normalize(olddir + desireddir * turnrate);     // take the average of the 2 directions; not the best method but simple & easy
208                                 self.velocity = newdir * velspeed;                                      // make me fly in the new direction at my flight speed
209                                 self.angles = vectoangles(self.velocity);                       // turn model in the new flight direction
210
211                                 ATTACK_FINISHED(self.owner) = time + 0.2 * W_WeaponRateFactor();
212                         }
213                 }
214                 else
215                 {
216                         if(self == self.owner.lastrocket)
217                         if not(self.owner.rl_release)
218                         if not(self.BUTTON_ATCK2)
219                         if(cvar("g_balance_rocketlauncher_guiderate"))
220                         if(time > self.pushltime)
221                         if(self.owner.deadflag == DEAD_NO)
222                         {
223                                 f = cvar("g_balance_rocketlauncher_guideratedelay");
224                                 if(f)
225                                         f = bound(0, (time - self.pushltime) / f, 1);
226                                 else
227                                         f = 1;
228
229                                 velspeed = vlen(self.velocity);
230
231                                 makevectors(self.owner.v_angle);
232                                 desireddir = WarpZone_RefSys_TransformVelocity(self.owner, self, v_forward);
233                                 desiredorigin = WarpZone_RefSys_TransformOrigin(self.owner, self, self.owner.origin + self.owner.view_ofs);
234                                 olddir = normalize(self.velocity);
235
236 #if 0
237                                 // disabled this code because it doesn't do what I want it to do :P
238                                 cosminang = cos(cvar("g_balance_rocketlauncher_guidefadeangle") * DEG2RAD);
239                                 cosmaxang = cos(cvar("g_balance_rocketlauncher_guidemaxangle") * DEG2RAD);
240                                 cosang = desireddir * normalize(self.origin - desiredorigin);
241                                 if(cosminang == cosmaxang)
242                                         f *= (cosang >= cosminang);
243                                 else
244                                         f *= bound(0, (cosang - cosmaxang) / (cosminang - cosmaxang), 1);
245 #endif
246
247                                 // now it gets tricky... we want to move like some curve to approximate the target direction
248                                 // but we are limiting the rate at which we can turn!
249                                 goal = desiredorigin + ((self.origin - desiredorigin) * desireddir + cvar("g_balance_rocketlauncher_guidegoal")) * desireddir;
250                                 newdir = rocket_steerto(olddir, normalize(goal - self.origin), cos(cvar("g_balance_rocketlauncher_guiderate") * f * frametime * DEG2RAD));
251
252                                 self.velocity = newdir * velspeed;
253                                 self.angles = vectoangles(self.velocity);
254
255                                 if(!self.count)
256                                 {
257                                         pointparticles(particleeffectnum("rocket_guide"), self.origin, self.velocity, 1);
258                                         // TODO add a better sound here
259                                         sound (self.owner, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
260                                         self.count = 1;
261                                 }
262                         }
263
264                         if(self.rl_detonate_later)
265                                 W_Rocket_RemoteExplode();
266                 }
267         }
268
269         if(self.csqcprojectile_clientanimate == 0)
270                 UpdateCSQCProjectile(self);
271 }
272
273 void W_Rocket_Touch (void)
274 {
275         W_Rocket_Unregister();
276
277         PROJECTILE_TOUCH;
278         W_Rocket_Explode ();
279 }
280
281 void W_Rocket_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
282 {
283         if (self.health <= 0)
284                 return;
285         self.health = self.health - damage;
286         self.angles = vectoangles(self.velocity);
287         if (self.health <= 0)
288                 W_PrepareExplosionByDamage(attacker, W_Rocket_Explode);
289 }
290
291 void W_Rocket_Attack (void)
292 {
293         local entity missile;
294         local entity flash;
295
296         if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
297                 self.ammo_rockets = self.ammo_rockets - cvar("g_balance_rocketlauncher_ammo");
298
299         W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", cvar("g_balance_rocketlauncher_damage"));
300         pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
301
302         missile = WarpZone_RefSys_SpawnSameRefSys(self);
303         missile.owner = self;
304         self.lastrocket = missile;
305         if(cvar("g_balance_rocketlauncher_detonatedelay") >= 0)
306                 missile.spawnshieldtime = time + cvar("g_balance_rocketlauncher_detonatedelay");
307         else
308                 missile.spawnshieldtime = -1;
309         missile.pushltime = time + cvar("g_balance_rocketlauncher_guidedelay");
310         missile.classname = "rocket";
311         missile.bot_dodge = TRUE;
312         missile.bot_dodgerating = cvar("g_balance_rocketlauncher_damage") * 2; // * 2 because it can be detonated inflight which makes it even more dangerous
313
314         missile.takedamage = DAMAGE_YES;
315         missile.damageforcescale = cvar("g_balance_rocketlauncher_damageforcescale");
316         missile.health = cvar("g_balance_rocketlauncher_health");
317         missile.event_damage = W_Rocket_Damage;
318
319         missile.movetype = MOVETYPE_FLY;
320         PROJECTILE_MAKETRIGGER(missile);
321         missile.projectiledeathtype = WEP_ROCKET_LAUNCHER;
322         setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
323
324         setorigin (missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
325         if(g_laserguided_missile && self.laser_on)
326                 W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_laserguided_speedstart"), 0);
327         else
328                 W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_speedstart"), 0);
329         missile.angles = vectoangles (missile.velocity);
330
331         missile.touch = W_Rocket_Touch;
332         missile.think = W_Rocket_Think;
333         missile.nextthink = time;
334         missile.cnt = time + cvar("g_balance_rocketlauncher_lifetime");
335         missile.flags = FL_PROJECTILE;
336
337         CSQCProjectile(missile, cvar("g_balance_rocketlauncher_guiderate") == 0 && cvar("g_balance_rocketlauncher_speedaccel") == 0 && !g_laserguided_missile, PROJECTILE_ROCKET, FALSE); // because of fly sound
338
339         // muzzle flash for 1st person view
340         flash = spawn ();
341         setmodel (flash, "models/flash.md3"); // precision set below
342         SUB_SetFade (flash, time, 0.1);
343         flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
344         W_AttachToShotorg(flash, '5 0 0');
345
346         // common properties
347 }
348
349 void spawnfunc_weapon_rocketlauncher (void); // defined in t_items.qc
350
351 float w_rlauncher(float req)
352 {
353         entity rock;
354         float rockfound;
355         if (req == WR_AIM)
356         {
357                 // aim and decide to fire if appropriate
358                 self.BUTTON_ATCK = bot_aim(cvar("g_balance_rocketlauncher_speed"), 0, cvar("g_balance_rocketlauncher_lifetime"), FALSE);
359                 if(skill >= 2) // skill 0 and 1 bots won't detonate rockets!
360                 {
361                         // decide whether to detonate rockets
362                         local entity missile, targetlist, targ;
363                         local float edgedamage, coredamage, edgeradius, recipricoledgeradius, d;
364                         local float selfdamage, teamdamage, enemydamage;
365                         edgedamage = cvar("g_balance_rocketlauncher_edgedamage");
366                         coredamage = cvar("g_balance_rocketlauncher_damage");
367                         edgeradius = cvar("g_balance_rocketlauncher_radius");
368                         recipricoledgeradius = 1 / edgeradius;
369                         selfdamage = 0;
370                         teamdamage = 0;
371                         enemydamage = 0;
372                         targetlist = findchainfloat(bot_attack, TRUE);
373                         missile = find(world, classname, "rocket");
374                         while (missile)
375                         {
376                                 if (missile.owner != self)
377                                 {
378                                         missile = find(missile, classname, "rocket");
379                                         continue;
380                                 }
381                                 targ = targetlist;
382                                 while (targ)
383                                 {
384                                         d = vlen(targ.origin + (targ.mins + targ.maxs) * 0.5 - missile.origin);
385                                         d = bound(0, edgedamage + (coredamage - edgedamage) * sqrt(1 - d * recipricoledgeradius), 10000);
386                                         // count potential damage according to type of target
387                                         if (targ == self)
388                                                 selfdamage = selfdamage + d;
389                                         else if (targ.team == self.team && teams_matter)
390                                                 teamdamage = teamdamage + d;
391                                         else if (bot_shouldattack(targ))
392                                                 enemydamage = enemydamage + d;
393                                         targ = targ.chain;
394                                 }
395                                 missile = find(missile, classname, "rocket");
396                         }
397                         local float desirabledamage;
398                         desirabledamage = enemydamage;
399                         if (teamplay != 1 && time > self.invincible_finished && time > self.spawnshieldtime)
400                                 desirabledamage = desirabledamage - selfdamage * cvar("g_balance_selfdamagepercent");
401                         if (self.team && teamplay != 1)
402                                 desirabledamage = desirabledamage - teamdamage;
403
404                         missile = find(world, classname, "rocket");
405                         while (missile)
406                         {
407                                 if (missile.owner != self)
408                                 {
409                                         missile = find(missile, classname, "rocket");
410                                         continue;
411                                 }
412                                 makevectors(missile.v_angle);
413                                 targ = targetlist;
414                                 if (skill > 9) // normal players only do this for the target they are tracking
415                                 {
416                                         targ = targetlist;
417                                         while (targ)
418                                         {
419                                                 if (
420                                                         (v_forward * normalize(missile.origin - targ.origin)< 0.1)
421                                                         && desirabledamage > 0.1*coredamage
422                                                 )self.BUTTON_ATCK2 = TRUE;
423                                                 targ = targ.chain;
424                                         }
425                                 }else{
426                                         local float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000);
427                                         //As the distance gets larger, a correct detonation gets near imposible
428                                         //Bots are assumed to use the rocket spawnfunc_light to see if the rocket gets near a player
429                                         if(v_forward * normalize(missile.origin - self.enemy.origin)< 0.1)
430                                                 if(self.enemy.classname == "player")
431                                                         if(desirabledamage >= 0.1*coredamage)
432                                                                 if(random()/distance*300 > frametime*bound(0,(10-skill)*0.2,1))
433                                                                         self.BUTTON_ATCK2 = TRUE;
434                                 //      dprint(ftos(random()/distance*300),">");dprint(ftos(frametime*bound(0,(10-skill)*0.2,1)),"\n");
435                                 }
436
437                                 missile = find(missile, classname, "rocket");
438                         }
439                         // if we would be doing at X percent of the core damage, detonate it
440                         // but don't fire a new shot at the same time!
441                         if (desirabledamage >= 0.75 * coredamage) //this should do group damage in rare fortunate events
442                                 self.BUTTON_ATCK2 = TRUE;
443                         if ((skill > 6.5) && (selfdamage > self.health))
444                                 self.BUTTON_ATCK2 = FALSE;
445                         //if(self.BUTTON_ATCK2 == TRUE)
446                         //      dprint(ftos(desirabledamage),"\n");
447                         if (self.BUTTON_ATCK2 == TRUE) self.BUTTON_ATCK = FALSE;
448                 }
449         }
450         else if (req == WR_THINK)
451         {
452                 if(g_laserguided_missile)
453                 {
454                         if (self.BUTTON_ATCK && self.rl_release)
455                         {
456                                 rockfound = 0;
457                                 for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.owner == self)
458                                 {
459                                         if(!rock.rl_detonate_later)
460                                         {
461                                                 rock.rl_detonate_later = TRUE;
462                                                 rockfound = 1;
463                                         }
464                                 }
465                                 if(rockfound)
466                                         sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
467                                 else
468                                 {
469                                         if (weapon_prepareattack(0, cvar("g_balance_rocketlauncher_refire")))
470                                         {
471                                                 W_Rocket_Attack();
472                                                 weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_rocketlauncher_animtime"), w_ready);
473                                         }
474                                 }
475                                 self.rl_release = 0;
476                         }
477                         if (!self.BUTTON_ATCK)
478                                 self.rl_release = 1;
479                         if (self.BUTTON_ATCK2)
480                         if(self.exteriorweaponentity.attack_finished_single < time)
481                         {
482                                 self.exteriorweaponentity.attack_finished_single = time + 0.4;
483                                 self.laser_on = !self.laser_on;
484                                 // UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
485                                 sound (self, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
486                         }
487                 }
488                 else
489                 {
490                         if (self.BUTTON_ATCK)
491                         {
492                                 if(self.rl_release || cvar("g_balance_rocketlauncher_guidestop"))
493                                 if(weapon_prepareattack(0, cvar("g_balance_rocketlauncher_refire")))
494                                 {
495                                         W_Rocket_Attack();
496                                         weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_rocketlauncher_animtime"), w_ready);
497                                         self.rl_release = 0;
498                                 }
499                         }
500                         else
501                                 self.rl_release = 1;
502
503                         if (self.BUTTON_ATCK2)
504                         {
505                                 rockfound = 0;
506                                 for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.owner == self)
507                                 {
508                                         if(!rock.rl_detonate_later)
509                                         {
510                                                 rock.rl_detonate_later = TRUE;
511                                                 rockfound = 1;
512                                         }
513                                 }
514                                 if(rockfound)
515                                         sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
516                         }
517                 }
518         }
519         else if (req == WR_PRECACHE)
520         {
521                 precache_model ("models/flash.md3");
522                 precache_model ("models/weapons/g_rl.md3");
523                 precache_model ("models/weapons/v_rl.md3");
524                 precache_model ("models/weapons/h_rl.iqm");
525                 precache_sound ("weapons/rocket_det.wav");
526                 precache_sound ("weapons/rocket_fire.wav");
527                 precache_sound ("weapons/rocket_mode.wav");
528                 if (g_laserguided_missile)
529                 {
530                         precache_model ("models/laser_dot.mdl"); // rocket launcher
531                 }
532         }
533         else if (req == WR_SETUP)
534         {
535                 weapon_setup(WEP_ROCKET_LAUNCHER);
536                 self.rl_release = 1;
537         }
538         else if (req == WR_CHECKAMMO1)
539         {
540                 // don't switch while guiding a missile
541                 if ((ATTACK_FINISHED(self) <= time || self.weapon != WEP_ROCKET_LAUNCHER)
542                         && self.ammo_rockets < cvar("g_balance_rocketlauncher_ammo"))
543                         return FALSE;
544         }
545         else if (req == WR_CHECKAMMO2)
546                 return FALSE;
547         else if (req == WR_SUICIDEMESSAGE)
548                 w_deathtypestring = "exploded";
549         else if (req == WR_KILLMESSAGE)
550         {
551                 if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
552                         w_deathtypestring = "got too close to #'s rocket";
553                 else if(w_deathtype & HITTYPE_SPLASH)
554                         w_deathtypestring = "almost dodged #'s rocket";
555                 else
556                         w_deathtypestring = "ate #'s rocket";
557         }
558         else if (req == WR_RESETPLAYER)
559         {
560                 self.rl_release = 0;
561         }
562         return TRUE;
563 };
564 #endif
565 #ifdef CSQC
566 float w_rlauncher(float req)
567 {
568         return TRUE;
569 }
570 #endif
571 #endif