X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fjumppads.qh;h=cd6adec310ccf2c00b974f92329f519f0561b45e;hb=bc50c2d7ca3e0a44ed1712400ef8e170e6df8210;hp=a1260c4e5382fc2d5decb130a34e980bb38ac82f;hpb=9e113dae328809b5e7432f434649a35ebb185a52;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/jumppads.qh b/qcsrc/common/triggers/trigger/jumppads.qh index a1260c4e53..cd6adec310 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qh +++ b/qcsrc/common/triggers/trigger/jumppads.qh @@ -1,7 +1,11 @@ #pragma once -const float PUSH_ONCE = 1; -const float PUSH_SILENT = 2; + +const int PUSH_ONCE = BIT(0); // legacy, deactivate with relay instead +const int PUSH_SILENT = BIT(1); // not used? + +IntrusiveList g_jumppads; +STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); } .float pushltime; .float istypefrag; @@ -14,6 +18,8 @@ const int NUM_JUMPPADSUSED = 3; #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); +bool trigger_push_testorigin_for_item(entity tracetest_ent, entity item, vector org); #endif /* @@ -24,14 +30,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 */ -vector trigger_push_calculatevelocity(vector org, entity tgt, float ht); +vector trigger_push_calculatevelocity(vector org, entity tgt, float ht, entity pushed_entity); void trigger_push_touch(entity this, entity toucher); .vector dest; +bool trigger_push_test(entity this, entity item); void trigger_push_findtarget(entity this); /*