]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/trigger/jumppads.qh
Merge branch 'master' into terencehill/bot_waypoints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / jumppads.qh
1 #pragma once
2
3 const float PUSH_ONCE           = 1;
4 const float PUSH_SILENT         = 2;
5
6 .float pushltime;
7 .float istypefrag;
8 .float height;
9
10 const int NUM_JUMPPADSUSED = 3;
11 .float jumppadcount;
12 .entity jumppadsused[NUM_JUMPPADSUSED];
13
14 #ifdef SVQC
15 void SUB_UseTargets(entity this, entity actor, entity trigger);
16 void trigger_push_use(entity this, entity actor, entity trigger);
17 #endif
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 void trigger_push_touch(entity this, entity toucher);
34
35 .vector dest;
36 void trigger_push_findtarget(entity this);
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 #ifdef SVQC
51 spawnfunc(trigger_push);
52
53 spawnfunc(target_push);
54 spawnfunc(info_notnull);
55 spawnfunc(target_position);
56 #endif