]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/trigger/jumppads.qh
Don't even try to translate keys if game isn't translated
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / jumppads.qh
1 #pragma once
2
3 IntrusiveList g_jumppads;
4 STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); }
5
6 const float PUSH_ONCE           = 1;
7 const float PUSH_SILENT         = 2;
8
9 .float pushltime;
10 .float istypefrag;
11 .float height;
12
13 const int NUM_JUMPPADSUSED = 3;
14 .float jumppadcount;
15 .entity jumppadsused[NUM_JUMPPADSUSED];
16
17 #ifdef SVQC
18 void SUB_UseTargets(entity this, entity actor, entity trigger);
19 void trigger_push_use(entity this, entity actor, entity trigger);
20 bool trigger_push_testorigin(entity tracetest_ent, entity targ, entity jp, vector org);
21 #endif
22
23 /*
24         trigger_push_calculatevelocity
25
26         Arguments:
27           org - origin of the object which is to be pushed
28           tgt - target entity (can be either a point or a model entity; if it is
29                 the latter, its midpoint is used)
30           ht  - jump height, measured from the higher one of org and tgt's midpoint
31           pushed_entity - object that is to be pushed
32
33         Returns: velocity for the jump
34  */
35 vector trigger_push_calculatevelocity(vector org, entity tgt, float ht, entity pushed_entity);
36
37 void trigger_push_touch(entity this, entity toucher);
38
39 .vector dest;
40 bool trigger_push_test(entity this, entity item);
41 void trigger_push_findtarget(entity this);
42
43 /*
44  * ENTITY PARAMETERS:
45  *
46  *   target:  target of jump
47  *   height:  the absolute value is the height of the highest point of the jump
48  *            trajectory above the higher one of the player and the target.
49  *            the sign indicates whether the highest point is INSIDE (positive)
50  *            or OUTSIDE (negative) of the jump trajectory. General rule: use
51  *            positive values for targets mounted on the floor, and use negative
52  *            values to target a point on the ceiling.
53  *   movedir: if target is not set, this * speed * 10 is the velocity to be reached.
54  */
55 #ifdef SVQC
56 spawnfunc(trigger_push);
57
58 spawnfunc(target_push);
59 spawnfunc(info_notnull);
60 spawnfunc(target_position);
61 #endif