]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/t_jumppads.qh
Merge branch 'master' into Mario/buff_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_jumppads.qh
1 #ifndef T_JUMPPADS_H
2 #define T_JUMPPADS_H
3
4 const float PUSH_ONCE           = 1;
5 const float PUSH_SILENT         = 2;
6
7 .float pushltime;
8 .float istypefrag;
9 .float height;
10
11 void() SUB_UseTargets;
12
13 float trigger_push_calculatevelocity_flighttime;
14
15 void trigger_push_use();
16
17 /*
18         trigger_push_calculatevelocity
19
20         Arguments:
21           org - origin of the object which is to be pushed
22           tgt - target entity (can be either a point or a model entity; if it is
23                 the latter, its midpoint is used)
24           ht  - jump height, measured from the higher one of org and tgt's midpoint
25
26         Returns: velocity for the jump
27         the global trigger_push_calculatevelocity_flighttime is set to the total
28         jump time
29  */
30
31 vector trigger_push_calculatevelocity(vector org, entity tgt, float ht);
32
33 void trigger_push_touch();
34
35 .vector dest;
36 void trigger_push_findtarget();
37
38 /*
39  * ENTITY PARAMETERS:
40  *
41  *   target:  target of jump
42  *   height:  the absolute value is the height of the highest point of the jump
43  *            trajectory above the higher one of the player and the target.
44  *            the sign indicates whether the highest point is INSIDE (positive)
45  *            or OUTSIDE (negative) of the jump trajectory. General rule: use
46  *            positive values for targets mounted on the floor, and use negative
47  *            values to target a point on the ceiling.
48  *   movedir: if target is not set, this * speed * 10 is the velocity to be reached.
49  */
50 void spawnfunc_trigger_push();
51
52 void spawnfunc_target_push();
53 void spawnfunc_info_notnull();
54 void spawnfunc_target_position();
55 #endif