Xonotic
jumppads.qc
Go to the documentation of this file.
1 #include "jumppads.qh"
2 // TODO: split target_push and put it in the target folder
3 #ifdef SVQC
5 
6 void trigger_push_use(entity this, entity actor, entity trigger)
7 {
8  if(teamplay)
9  {
10  this.team = actor.team;
11  this.SendFlags |= SF_TRIGGER_UPDATE;
12  }
13 }
14 #endif
15 
16 REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_PUSH)
17 REGISTER_NET_LINKED(ENT_CLIENT_TARGET_PUSH)
18 
19 /*
20  trigger_push_calculatevelocity
21 
22  Arguments:
23  org - origin of the object which is to be pushed
24  tgt - target entity (can be either a point or a model entity; if it is
25  the latter, its midpoint is used)
26  ht - jump height, measured from the higher one of org and tgt's midpoint
27  pushed_entity - object that is to be pushed
28 
29  Returns: velocity for the jump
30  */
31 vector trigger_push_calculatevelocity(vector org, entity tgt, float ht, entity pushed_entity)
32 {
33  float grav, sdist, zdist, vs, vz, jumpheight;
34  vector sdir, torg;
35 
36  torg = tgt.origin + (tgt.mins + tgt.maxs) * 0.5;
37 
38  grav = PHYS_GRAVITY(NULL);
39  if(pushed_entity && pushed_entity.gravity)
40  grav *= pushed_entity.gravity;
41 
42  zdist = torg.z - org.z;
43  sdist = vlen(torg - org - zdist * '0 0 1');
44  sdir = normalize(torg - org - zdist * '0 0 1');
45 
46  // how high do we need to push the player?
47  jumpheight = fabs(ht);
48  if(zdist > 0)
49  jumpheight = jumpheight + zdist;
50 
51  /*
52  STOP.
53 
54  You will not understand the following equations anyway...
55  But here is what I did to get them.
56 
57  I used the functions
58 
59  s(t) = t * vs
60  z(t) = t * vz - 1/2 grav t^2
61 
62  and solved for:
63 
64  s(ti) = sdist
65  z(ti) = zdist
66  max(z, ti) = jumpheight
67 
68  From these three equations, you will find the three parameters vs, vz
69  and ti.
70  */
71 
72  // push him so high...
73  vz = sqrt(fabs(2 * grav * jumpheight)); // NOTE: sqrt(positive)!
74 
75  // we start with downwards velocity only if it's a downjump and the jump apex should be outside the jump!
76  if(ht < 0)
77  if(zdist < 0)
78  vz = -vz;
79 
80  vector solution;
81  solution = solve_quadratic(0.5 * grav, -vz, zdist); // equation "z(ti) = zdist"
82  // ALWAYS solvable because jumpheight >= zdist
83  if(!solution.z)
84  solution_y = solution.x; // just in case it is not solvable due to roundoff errors, assume two equal solutions at their center (this is mainly for the usual case with ht == 0)
85  if(zdist == 0)
86  solution_x = solution.y; // solution_x is 0 in this case, so don't use it, but rather use solution_y (which will be sqrt(0.5 * jumpheight / grav), actually)
87 
88  float flighttime;
89  if(zdist < 0)
90  {
91  // down-jump
92  if(ht < 0)
93  {
94  // almost straight line type
95  // jump apex is before the jump
96  // we must take the larger one
97  flighttime = solution.y;
98  }
99  else
100  {
101  // regular jump
102  // jump apex is during the jump
103  // we must take the larger one too
104  flighttime = solution.y;
105  }
106  }
107  else
108  {
109  // up-jump
110  if(ht < 0)
111  {
112  // almost straight line type
113  // jump apex is after the jump
114  // we must take the smaller one
115  flighttime = solution.x;
116  }
117  else
118  {
119  // regular jump
120  // jump apex is during the jump
121  // we must take the larger one
122  flighttime = solution.y;
123  }
124  }
125  vs = sdist / flighttime;
126 
127  // finally calculate the velocity
128  return sdir * vs + '0 0 1' * vz;
129 }
130 
131 bool jumppad_push(entity this, entity targ)
132 {
133  if (!isPushable(targ))
134  return false;
135 
136  vector org = targ.origin;
137 
138  if(STAT(Q3COMPAT))
139  {
140  org.z += targ.mins_z;
141  org.z += 1; // off by 1!
142  }
143 
144  if(this.enemy)
145  {
146  targ.velocity = trigger_push_calculatevelocity(org, this.enemy, this.height, targ);
147  }
148  else if(this.target && this.target != "")
149  {
150  entity e;
152  for(e = NULL; (e = find(e, targetname, this.target)); )
153  {
154  if(e.cnt)
155  RandomSelection_AddEnt(e, e.cnt, 1);
156  else
157  RandomSelection_AddEnt(e, 1, 1);
158  }
159  targ.velocity = trigger_push_calculatevelocity(org, RandomSelection_chosen_ent, this.height, targ);
160  }
161  else
162  {
163  targ.velocity = this.movedir;
164  }
165 
166  UNSET_ONGROUND(targ);
167 
168 #ifdef CSQC
169  if (targ.flags & FL_PROJECTILE)
170  {
171  targ.angles = vectoangles (targ.velocity);
172  switch(targ.move_movetype)
173  {
174  case MOVETYPE_FLY:
176  targ.gravity = 1;
177  break;
180  targ.gravity = 1;
181  break;
182  }
183  }
184 #endif
185 
186 #ifdef SVQC
187  if (IS_PLAYER(targ))
188  {
189  // reset tracking of oldvelocity for impact damage (sudden velocity changes)
190  targ.oldvelocity = targ.velocity;
191 
192  // prevent sound spam when a player hits the jumppad more than once
193  // or when a dead player gets stuck in the jumppad for some reason
194  if(this.pushltime < time && !(IS_DEAD(targ) && targ.velocity == '0 0 0'))
195  {
196  // flash when activated
197  Send_Effect(EFFECT_JUMPPAD, targ.origin, targ.velocity, 1);
198  _sound (targ, CH_TRIGGER, this.noise, VOL_BASE, ATTEN_NORM);
199  this.pushltime = time + 0.2;
200  }
201  if(IS_REAL_CLIENT(targ) || IS_BOT_CLIENT(targ))
202  {
203  bool found = false;
204  for(int i = 0; i < targ.jumppadcount && i < NUM_JUMPPADSUSED; ++i)
205  if(targ.(jumppadsused[i]) == this)
206  found = true;
207  if(!found)
208  {
209  targ.(jumppadsused[targ.jumppadcount % NUM_JUMPPADSUSED]) = this;
210  targ.jumppadcount = targ.jumppadcount + 1;
211  }
212 
213  if(IS_REAL_CLIENT(targ))
214  {
215  if(this.message)
216  centerprint(targ, this.message);
217  }
218  else
219  {
220  targ.lastteleporttime = time;
221  targ.lastteleport_origin = targ.origin;
222  }
223 
224  if (!IS_DEAD(targ))
226  }
227  else
228  targ.jumppadcount = 1;
229 
230  // reset tracking of who pushed you into a hazard (for kill credit)
231  targ.pushltime = 0;
232  targ.istypefrag = 0;
233  }
234 
235  if(this.enemy.target)
236  SUB_UseTargets(this.enemy, targ, this);
237 
238  if (targ.flags & FL_PROJECTILE)
239  {
240  targ.angles = vectoangles (targ.velocity);
241  targ.com_phys_gravity_factor = 1;
242  switch(targ.move_movetype)
243  {
244  case MOVETYPE_FLY:
246  targ.gravity = 1;
247  break;
250  targ.gravity = 1;
251  break;
252  }
253  UpdateCSQCProjectile(targ);
254  }
255 #endif
256 
257  return true;
258 }
259 
260 void trigger_push_touch(entity this, entity toucher)
261 {
262  if (this.active == ACTIVE_NOT)
263  return;
264 
265  if(this.team)
266  if(((this.spawnflags & INVERT_TEAMS) == 0) == (DIFF_TEAM(this, toucher)))
267  return;
268 
269  EXACTTRIGGER_TOUCH(this, toucher);
270 
271  noref bool success = jumppad_push(this, toucher);
272 
273 #ifdef SVQC
274  if (success && (this.spawnflags & PUSH_ONCE))
275  {
276  settouch(this, func_null);
277  setthink(this, SUB_Remove);
278  this.nextthink = time;
279  }
280 #endif
281 }
282 
283 #ifdef SVQC
284 void trigger_push_link(entity this);
285 void trigger_push_updatelink(entity this);
286 bool trigger_push_testorigin(entity tracetest_ent, entity targ, entity jp, vector org)
287 {
288  setorigin(tracetest_ent, org);
289  tracetoss(tracetest_ent, tracetest_ent);
290  if(trace_startsolid)
291  return false;
292 
293  if (!jp.height)
294  {
295  // since tracetoss starting from jumppad's origin often fails when target
296  // is very close to real destination, start it directly from target's
297  // origin instead
298  vector ofs = '0 0 0';
299  if (vdist(vec2(tracetest_ent.velocity), <, autocvar_sv_maxspeed))
300  ofs = stepheightvec;
301 
302  tracetest_ent.velocity.z = 0;
303  setorigin(tracetest_ent, targ.origin + ofs);
304  tracetoss(tracetest_ent, tracetest_ent);
305  if (trace_startsolid && ofs.z)
306  {
307  setorigin(tracetest_ent, targ.origin + ofs / 2);
308  tracetoss(tracetest_ent, tracetest_ent);
309  if (trace_startsolid && ofs.z)
310  {
311  setorigin(tracetest_ent, targ.origin);
312  tracetoss(tracetest_ent, tracetest_ent);
313  if (trace_startsolid)
314  return false;
315  }
316  }
317  }
318  tracebox(trace_endpos, tracetest_ent.mins, tracetest_ent.maxs, trace_endpos - eZ * 1500, true, tracetest_ent);
319  return true;
320 }
321 
322 bool trigger_push_testorigin_for_item(entity tracetest_ent, entity item, vector org)
323 {
324  setorigin(tracetest_ent, org);
325  tracetoss(tracetest_ent, tracetest_ent);
326 
327  if(trace_startsolid)
328  return false;
329  if (trace_ent == item)
330  return true;
331 
332  tracebox(trace_endpos, tracetest_ent.mins, tracetest_ent.maxs, trace_endpos - eZ * 1500, true, tracetest_ent);
333 
334  if (trace_ent == item)
335  return true;
336 
337  return false;
338 }
339 #endif
340 
341 #ifdef SVQC
342 vector trigger_push_get_start_point(entity this)
343 {
344  // calculate a typical start point for the jump
345  vector org = (this.absmin + this.absmax) * 0.5;
346  org.z = this.absmax.z - PL_MIN_CONST.z - 7;
347  return org;
348 }
349 
350 float trigger_push_get_push_time(entity this, vector endpos)
351 {
352  vector org = trigger_push_get_start_point(this);
353 
354  float grav = PHYS_GRAVITY(NULL);
355 
356  entity t = this.enemy;
357  if (t)
358  {
359  entity e = spawn();
360  setsize(e, PL_MIN_CONST, PL_MAX_CONST);
362  vector v = trigger_push_calculatevelocity(org, t, this.height, e);
363  vector v2 = trigger_push_calculatevelocity(endpos, t, this.height, e);
364  delete(e);
365  return (v.z + v2.z) / grav;
366  }
367  else if (!(this.target && this.target != ""))
368  {
369  if (!this.team)
370  {
371  vector v = this.movedir;
372 
373  float t = v.z / grav;
374  float jump_height = 1/2 * grav * (t ** 2);
375  float remaining_height = org.z + jump_height - endpos.z;
376  float v2_z = sqrt(2 * grav * remaining_height);
377 
378  return (v.z + v2_z) / grav;
379  }
380  }
381  return 0;
382 }
383 #endif
384 
388 {
389 #ifdef SVQC
390  vector org = trigger_push_get_start_point(this);
391 #endif
392 
393  if (this.target)
394  {
395  int n = 0;
396 #ifdef SVQC
397  vector vel = '0 0 0';
398 #endif
399  for(entity t = NULL; (t = find(t, targetname, this.target)); )
400  {
401  ++n;
402 #ifdef SVQC
403  if(t.move_movetype != MOVETYPE_NONE)
404  continue;
405 
406  // bots can't tell teamed jumppads from normal ones
407  if (this.team)
408  continue;
409 
410  entity e = spawn();
411  setsize(e, PL_MIN_CONST, PL_MAX_CONST);
413  e.velocity = trigger_push_calculatevelocity(org, t, this.height, e);
414 
415  vel = e.velocity;
416  vector best_target = '0 0 0';
417  vector best_org = '0 0 0';
418  vector best_vel = '0 0 0';
419  bool valid_best_target = false;
420  if (item)
421  {
422  if (!trigger_push_testorigin_for_item(e, item, org))
423  {
424  delete(e);
425  return false;
426  }
427  }
428  else
429  {
430  if (trigger_push_testorigin(e, t, this, org))
431  {
432  best_target = trace_endpos;
433  best_org = org;
434  best_vel = e.velocity;
435  valid_best_target = true;
436  }
437  }
438 
439  vector new_org;
440  vector dist = t.origin - org;
441  if (dist.x || dist.y) // if not perfectly vertical
442  {
443  // test trajectory with different starting points, sometimes the trajectory
444  // starting from the jumppad origin can't reach the real destination
445  // and destination waypoint ends up near the jumppad itself
446  vector flatdir = normalize(dist - eZ * dist.z);
447  vector ofs = flatdir * 0.5 * min(fabs(this.absmax.x - this.absmin.x), fabs(this.absmax.y - this.absmin.y));
448  new_org = org + ofs;
449 
450  LABEL(new_test)
451  e.velocity = trigger_push_calculatevelocity(new_org, t, this.height, e);
452  if (item)
453  {
454  if (!trigger_push_testorigin_for_item(e, item, new_org))
455  {
456  delete(e);
457  return false;
458  }
459  }
460  else
461  {
462  vel = e.velocity;
463  if (vdist(vec2(e.velocity), <, autocvar_sv_maxspeed))
464  e.velocity = autocvar_sv_maxspeed * flatdir;
465  if (trigger_push_testorigin(e, t, this, new_org) && (!valid_best_target || trace_endpos.z > best_target.z + 50))
466  {
467  best_target = trace_endpos;
468  best_org = new_org;
469  best_vel = vel;
470  valid_best_target = true;
471  }
472  }
473  if (ofs && new_org != org - ofs)
474  {
475  new_org = org - ofs;
476  goto new_test;
477  }
478  }
479 
480  if (item)
481  {
482  delete(e);
483  return true;
484  }
485 
486  if (valid_best_target)
487  {
488  if (!(boxesoverlap(this.absmin, this.absmax + eZ * 50, best_target + PL_MIN_CONST, best_target + PL_MAX_CONST)))
489  {
490  float velxy = vlen(vec2(best_vel));
491  float cost = vlen(vec2(t.origin - best_org)) / velxy;
492  if(velxy < autocvar_sv_maxspeed)
493  velxy = autocvar_sv_maxspeed;
494  cost += vlen(vec2(best_target - t.origin)) / velxy;
495  waypoint_spawnforteleporter(this, best_target, cost, e);
496  }
497  }
498  delete(e);
499 #endif
500  }
501 
502  if(item)
503  return false;
504 
505  if(!n)
506  {
507  // no dest!
508 #ifdef SVQC
509  objerror (this, "Jumppad with nonexistant target");
510 #endif
511  return false;
512  }
513  else if(n == 1)
514  {
515  // exactly one dest - bots love that
516  if (!this.team)
517  this.enemy = find(NULL, targetname, this.target);
518  else // bots can't tell teamed jumppads from normal ones
519  this.enemy = NULL;
520  }
521  else
522  {
523  // have to use random selection every single time
524  this.enemy = NULL;
525  }
526 
527  }
528 #ifdef SVQC
529  else
530  {
531  if (!this.team)
532  {
533  entity e = spawn();
534  setsize(e, PL_MIN_CONST, PL_MAX_CONST);
536  setorigin(e, org);
537  e.velocity = this.movedir;
538  tracetoss(e, e);
539  if (item)
540  {
541  bool r = (trace_ent == item);
542  delete(e);
543  return r;
544  }
545  if (!(boxesoverlap(this.absmin, this.absmax + eZ * 50, trace_endpos + PL_MIN_CONST, trace_endpos + PL_MAX_CONST)))
546  waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity), e);
547  delete(e);
548  }
549  else if (item)
550  return false;
551  }
552 
553  defer(this, 0.1, trigger_push_updatelink);
554 #endif
555  return true;
556 }
557 
559 {
560  trigger_push_test(this, NULL);
561 }
562 
563 #ifdef SVQC
564 float trigger_push_send(entity this, entity to, float sf)
565 {
566  WriteHeader(MSG_ENTITY, ENT_CLIENT_TRIGGER_PUSH);
567 
568  WriteByte(MSG_ENTITY, this.team);
569  WriteInt24_t(MSG_ENTITY, this.spawnflags);
570  WriteByte(MSG_ENTITY, this.active);
571  WriteCoord(MSG_ENTITY, this.height);
572 
573  trigger_common_write(this, true);
574 
575  return true;
576 }
577 
578 void trigger_push_updatelink(entity this)
579 {
580  this.SendFlags |= SF_TRIGGER_INIT;
581 }
582 
583 void trigger_push_link(entity this)
584 {
585  trigger_link(this, trigger_push_send);
586 }
587 
588 /*
589  * ENTITY PARAMETERS:
590  *
591  * target: target of jump
592  * height: the absolute value is the height of the highest point of the jump
593  * trajectory above the higher one of the player and the target.
594  * the sign indicates whether the highest point is INSIDE (positive)
595  * or OUTSIDE (negative) of the jump trajectory. General rule: use
596  * positive values for targets mounted on the floor, and use negative
597  * values to target a point on the ceiling.
598  * movedir: if target is not set, this * speed * 10 is the velocity to be reached.
599  */
600 spawnfunc(trigger_push)
601 {
602  SetMovedir(this);
603 
604  trigger_init(this);
605 
606  this.active = ACTIVE_ACTIVE;
607  this.use = trigger_push_use;
608  settouch(this, trigger_push_touch);
609 
610  // normal push setup
611  if (!this.speed)
612  this.speed = 1000;
613  this.movedir = this.movedir * this.speed * 10;
614 
615  if (!this.noise)
616  this.noise = "misc/jumppad.wav";
617  precache_sound (this.noise);
618 
619  trigger_push_link(this); // link it now
620 
621  IL_PUSH(g_jumppads, this);
622 
623  // this must be called to spawn the teleport waypoints for bots
624  InitializeEntity(this, trigger_push_findtarget, INITPRIO_FINDTARGET);
625 }
626 
627 
628 bool target_push_send(entity this, entity to, float sf)
629 {
630  WriteHeader(MSG_ENTITY, ENT_CLIENT_TARGET_PUSH);
631 
632  WriteByte(MSG_ENTITY, this.cnt);
633  WriteString(MSG_ENTITY, this.targetname);
634  WriteVector(MSG_ENTITY, this.origin);
635 
636  WriteAngleVector(MSG_ENTITY, this.angles);
637 
638  return true;
639 }
640 
641 void target_push_use(entity this, entity actor, entity trigger)
642 {
643  if(trigger.classname == "trigger_push" || trigger == this)
644  return; // WTF, why is this a thing
645 
646  jumppad_push(this, actor);
647 }
648 
649 void target_push_link(entity this)
650 {
652  Net_LinkEntity(this, false, 0, target_push_send);
653  //this.SendFlags |= 1; // update
654 }
655 
656 void target_push_init(entity this)
657 {
658  this.mangle = this.angles;
659  setorigin(this, this.origin);
660  target_push_link(this);
661 }
662 
663 void target_push_init2(entity this)
664 {
665  if(this.target && this.target != "") // we have an old style pusher!
666  {
667  InitializeEntity(this, trigger_push_findtarget, INITPRIO_FINDTARGET);
668  this.use = target_push_use;
669  }
670 
671  target_push_init(this); // normal push target behaviour can be combined with a legacy pusher?
672 }
673 
674 spawnfunc(target_push)
675 {
676  target_push_init2(this);
677 }
678 
679 spawnfunc(info_notnull)
680 {
681  target_push_init(this);
682 }
683 spawnfunc(target_position)
684 {
685  target_push_init(this);
686 }
687 
688 #elif defined(CSQC)
689 
690 NET_HANDLE(ENT_CLIENT_TRIGGER_PUSH, bool isnew)
691 {
692  int mytm = ReadByte(); if(mytm) { this.team = mytm - 1; }
693  this.spawnflags = ReadInt24_t();
694  this.active = ReadByte();
695  this.height = ReadCoord();
696 
697  trigger_common_read(this, true);
698 
699  this.entremove = trigger_remove_generic;
700  this.solid = SOLID_TRIGGER;
701  settouch(this, trigger_push_touch);
702  this.move_time = time;
703  defer(this, 0.25, trigger_push_findtarget);
704 
705  return true;
706 }
707 
708 void target_push_remove(entity this)
709 {
710  // strfree(this.classname);
711  strfree(this.targetname);
712 }
713 
714 NET_HANDLE(ENT_CLIENT_TARGET_PUSH, bool isnew)
715 {
716  this.cnt = ReadByte();
717  this.targetname = strzone(ReadString());
718  this.origin = ReadVector();
719 
720  this.angles = ReadAngleVector();
721 
722  return = true;
723 
724  setorigin(this, this.origin);
725 
726  this.drawmask = MASK_NORMAL;
727  this.entremove = target_push_remove;
728 }
729 #endif
void trigger_push_touch(entity this, entity toucher)
Definition: jumppads.qc:260
float MOVETYPE_NONE
Definition: progsdefs.qc:246
#define REGISTER_NET_LINKED(id)
Definition: net.qh:67
float speed
Definition: subs.qh:41
ERASEABLE vector solve_quadratic(float a, float b, float c)
ax^2 + bx + c = 0
Definition: math.qh:307
const int INVERT_TEAMS
Definition: defs.qh:10
const int SF_TRIGGER_INIT
Definition: defs.qh:22
string noise
Definition: progsdefs.qc:209
bool jumppad_push(entity this, entity targ)
Definition: jumppads.qc:131
#define ReadString
int team
Definition: main.qh:157
float MOVETYPE_TOSS
Definition: progsdefs.qc:252
ERASEABLE void RandomSelection_Init()
Definition: random.qc:4
const int ANIMACTION_JUMP
Definition: animdecide.qh:141
#define EXACTTRIGGER_TOUCH(e, t)
Definition: common.qh:116
entity() spawn
const int PUSH_ONCE
Definition: jumppads.qh:4
float MOVETYPE_BOUNCEMISSILE
Definition: progsdefs.qc:257
float trigger_push_get_push_time(entity this, vector endpos)
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition: triggers.qc:366
float DPCONTENTS_BOTCLIP
#define NET_HANDLE(id, param)
Definition: net.qh:12
float pushltime
Definition: jumppads.qh:10
float DPCONTENTS_PLAYERCLIP
vector trigger_push_calculatevelocity(vector org, entity tgt, float ht, entity pushed_entity)
Definition: jumppads.qc:31
entity to
Definition: self.qh:96
spawnfunc(info_player_attacker)
Definition: sv_assault.qc:283
origin
Definition: ent_cs.qc:114
const float EF_NODEPTHTEST
Definition: csprogsdefs.qc:304
float MOVETYPE_BOUNCE
Definition: progsdefs.qc:256
#define DIFF_TEAM(a, b)
Definition: teams.qh:240
#define UNSET_ONGROUND(s)
Definition: movetypes.qh:18
float effects
Definition: csprogsdefs.qc:111
float spawnflags
Definition: progsdefs.qc:191
const int NUM_JUMPPADSUSED
Definition: jumppads.qh:14
#define BITSET_ASSIGN(a, b)
Definition: common.qh:104
#define IS_REAL_CLIENT(v)
Definition: utils.qh:17
entity trace_ent
Definition: csprogsdefs.qc:40
IntrusiveList g_jumppads
Definition: jumppads.qh:7
vector absmax
Definition: csprogsdefs.qc:92
#define RandomSelection_AddEnt(e, weight, priority)
Definition: random.qh:14
vector movedir
Definition: progsdefs.qc:203
entity enemy
Definition: sv_ctf.qh:143
float cnt
Definition: powerups.qc:24
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void UpdateCSQCProjectile(entity e)
ERASEABLE float boxesoverlap(vector m1, vector m2, vector m3, vector m4)
requires that m2>m1 in all coordinates, and that m4>m3
Definition: vector.qh:73
float height
Definition: jumppads.qh:12
void animdecide_setaction(entity e, float action, float restart)
Definition: animdecide.qc:338
const int CH_TRIGGER
Definition: sound.qh:12
entity RandomSelection_chosen_ent
Definition: random.qh:5
const int ACTIVE_ACTIVE
Definition: defs.qh:37
string message
Definition: powerups.qc:19
#define NULL
Definition: post.qh:17
float DPCONTENTS_SOLID
const float VOL_BASE
Definition: sound.qh:36
vector trace_endpos
Definition: csprogsdefs.qc:37
float teamplay
Definition: progsdefs.qc:31
const float MASK_NORMAL
Definition: csprogsdefs.qc:164
#define IS_DEAD(s)
Definition: utils.qh:26
float drawmask
Definition: csprogsdefs.qc:95
const float ATTEN_NORM
Definition: sound.qh:30
float nextthink
Definition: csprogsdefs.qc:121
void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent)
Definition: waypoints.qc:2069
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector v
Definition: ent_cs.qc:116
float DPCONTENTS_BODY
void InitializeEntity(entity e, void(entity this) func, int order)
Definition: world.qc:2146
float move_time
Definition: movetypes.qh:77
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
Definition: vector.qh:8
const vector eZ
Definition: vector.qh:46
#define _sound(e, c, s, v, a)
Definition: sound.qh:50
const float SOLID_TRIGGER
Definition: csprogsdefs.qc:245
string targetname
Definition: progsdefs.qc:194
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
Definition: utils.qh:15
#define vec2(...)
Definition: vector.qh:90
#define LABEL(id)
Definition: compiler.qh:36
int active
Definition: defs.qh:34
bool trigger_push_test(entity this, entity item)
if (item != NULL) returns true if the item can be reached by using this jumppad, false otherwise if (...
Definition: jumppads.qc:387
vector mangle
Definition: subs.qh:51
setorigin(ent, v)
#define setthink(e, f)
void trigger_push_findtarget(entity this)
Definition: jumppads.qc:558
#define strfree(this)
Definition: string.qh:56
vector angles
Definition: csprogsdefs.qc:104
#define use
Definition: csprogsdefs.qh:50
float trace_startsolid
Definition: csprogsdefs.qc:35
string target
Definition: progsdefs.qc:193
vector absmin
Definition: csprogsdefs.qc:92
if(IS_DEAD(this))
Definition: impulse.qc:92
const int ACTIVE_NOT
Definition: defs.qh:36
float time
Definition: csprogsdefs.qc:16
bool isPushable(entity e)
Definition: triggers.qc:3
void set_movetype(entity this, int mt)
float MOVETYPE_FLY
Definition: progsdefs.qc:251
#define IS_PLAYER(v)
Definition: utils.qh:9
var void func_null()
float solid
Definition: csprogsdefs.qc:99
const int SF_TRIGGER_UPDATE
Definition: defs.qh:23