X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fjumppads.qh;h=819b90995c0e9363184a64a67424d818db0074a8;hb=435bcc06520ed9fb4afb20099245e06963ca5c3d;hp=bb0f4750eebbc2af005c12a86123bb02470270d7;hpb=1e85850478a0174700ab365d6a642a2a420d78f8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/jumppads.qh b/qcsrc/common/triggers/trigger/jumppads.qh index bb0f4750e..819b90995 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,17 +14,10 @@ const int NUM_JUMPPADSUSED = 3; .float jumppadcount; .entity jumppadsused[NUM_JUMPPADSUSED]; -float trigger_push_calculatevelocity_flighttime; - #ifdef SVQC -void() SUB_UseTargets; -void trigger_push_use(); -#endif - -#ifdef CSQC -void ent_trigger_push(); - -void ent_target_push(); +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 /* @@ -35,16 +30,14 @@ void ent_target_push(); ht - jump height, measured from the higher one of org and tgt's midpoint 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); -void trigger_push_touch(); +void trigger_push_touch(entity this, entity toucher); .vector dest; -void trigger_push_findtarget(); +bool trigger_push_test(entity this, entity item); +void trigger_push_findtarget(entity this); /* * ENTITY PARAMETERS: @@ -59,10 +52,9 @@ void trigger_push_findtarget(); * movedir: if target is not set, this * speed * 10 is the velocity to be reached. */ #ifdef SVQC -void spawnfunc_trigger_push(); +spawnfunc(trigger_push); -void spawnfunc_target_push(); -void spawnfunc_info_notnull(); -void spawnfunc_target_position(); -#endif +spawnfunc(target_push); +spawnfunc(info_notnull); +spawnfunc(target_position); #endif