X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fjumppads.qh;h=50ed0a343c8c86b7cc53e12274ddac7261bead75;hp=6fd61dc9da7561fb0bd684d30e50f95113267917;hb=4299b97f93fc4753665e198066970bd51bb3b06a;hpb=669311cae7c93d70ff08fa2e3dd30cabdd2da8fa diff --git a/qcsrc/common/triggers/trigger/jumppads.qh b/qcsrc/common/triggers/trigger/jumppads.qh index 6fd61dc9d..50ed0a343 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qh +++ b/qcsrc/common/triggers/trigger/jumppads.qh @@ -1,5 +1,7 @@ -#ifndef T_JUMPPADS_H -#define T_JUMPPADS_H +#pragma once + +IntrusiveList g_jumppads; +STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); } const float PUSH_ONCE = 1; const float PUSH_SILENT = 2; @@ -12,11 +14,10 @@ const int NUM_JUMPPADSUSED = 3; .float jumppadcount; .entity jumppadsused[NUM_JUMPPADSUSED]; -float trigger_push_calculatevelocity_flighttime; - #ifdef SVQC void SUB_UseTargets(entity this, entity actor, entity trigger); void trigger_push_use(entity this, entity actor, entity trigger); +bool trigger_push_testorigin(entity tracetest_ent, entity targ, entity jp, vector org); #endif /* @@ -27,17 +28,16 @@ void trigger_push_use(entity this, entity actor, entity trigger); tgt - target entity (can be either a point or a model entity; if it is the latter, its midpoint is used) ht - jump height, measured from the higher one of org and tgt's midpoint + pushed_entity - object that is to be pushed Returns: velocity for the jump - the global trigger_push_calculatevelocity_flighttime is set to the total - jump time */ +vector trigger_push_calculatevelocity(vector org, entity tgt, float ht, entity pushed_entity); -vector trigger_push_calculatevelocity(vector org, entity tgt, float ht); - -void trigger_push_touch(); +void trigger_push_touch(entity this, entity toucher); .vector dest; +bool trigger_push_test(entity this, entity item); void trigger_push_findtarget(entity this); /* @@ -59,4 +59,3 @@ spawnfunc(target_push); spawnfunc(info_notnull); spawnfunc(target_position); #endif -#endif