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=c3b0b339def6c2f0f7b8e5c35f6773c91bcb4aea;hp=bb0f4750eebbc2af005c12a86123bb02470270d7;hb=99f5aae787d0e46852e2340594c5cb4805c0f3f3;hpb=ff442844108257ce535eae6dc08eaf659ff5efd7 diff --git a/qcsrc/common/triggers/trigger/jumppads.qh b/qcsrc/common/triggers/trigger/jumppads.qh index bb0f4750ee..c3b0b339de 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qh +++ b/qcsrc/common/triggers/trigger/jumppads.qh @@ -1,5 +1,4 @@ -#ifndef T_JUMPPADS_H -#define T_JUMPPADS_H +#pragma once const float PUSH_ONCE = 1; const float PUSH_SILENT = 2; @@ -12,17 +11,9 @@ 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); #endif /* @@ -33,18 +24,16 @@ void ent_target_push(); 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; -void trigger_push_findtarget(); +void trigger_push_findtarget(entity this); /* * ENTITY PARAMETERS: @@ -59,10 +48,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