]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/t_jumppads.qh
Merge branch 'Mario/qc_updates' into TimePath/csqc_prediction
[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
12 float trigger_push_calculatevelocity_flighttime;
13
14 #ifdef SVQC
15 void() SUB_UseTargets;
16 void trigger_push_use();
17 #endif
18
19 #ifdef CSQC
20 .float active;
21 .string target;
22 .string targetname;
23
24 const int ACTIVE_NOT            = 0;
25 const int ACTIVE_ACTIVE         = 1;
26 const int ACTIVE_IDLE           = 2;
27 const int ACTIVE_BUSY           = 2;
28 const int ACTIVE_TOGGLE         = 3;
29 void trigger_push_draw();
30 #endif
31
32 /*
33         trigger_push_calculatevelocity
34
35         Arguments:
36           org - origin of the object which is to be pushed
37           tgt - target entity (can be either a point or a model entity; if it is
38                 the latter, its midpoint is used)
39           ht  - jump height, measured from the higher one of org and tgt's midpoint
40
41         Returns: velocity for the jump
42         the global trigger_push_calculatevelocity_flighttime is set to the total
43         jump time
44  */
45
46 vector trigger_push_calculatevelocity(vector org, entity tgt, float ht);
47
48 void trigger_push_touch();
49
50 .vector dest;
51 void trigger_push_findtarget();
52
53 /*
54  * ENTITY PARAMETERS:
55  *
56  *   target:  target of jump
57  *   height:  the absolute value is the height of the highest point of the jump
58  *            trajectory above the higher one of the player and the target.
59  *            the sign indicates whether the highest point is INSIDE (positive)
60  *            or OUTSIDE (negative) of the jump trajectory. General rule: use
61  *            positive values for targets mounted on the floor, and use negative
62  *            values to target a point on the ceiling.
63  *   movedir: if target is not set, this * speed * 10 is the velocity to be reached.
64  */
65 #ifdef SVQC
66 void spawnfunc_trigger_push();
67
68 void spawnfunc_target_push();
69 void spawnfunc_info_notnull();
70 void spawnfunc_target_position();
71 #endif
72 #endif