X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Ftrigger%2Fjumppads.qh;h=54366ddf4b290df1c97b99ddf607b474ad2c4a6e;hb=HEAD;hp=c994bc61085b5971ee3c32aa7ea19e9b8d81e56a;hpb=cf34c825e0e646cc1d80dcfbe5123ce33d0db000;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapobjects/trigger/jumppads.qh b/qcsrc/common/mapobjects/trigger/jumppads.qh index c994bc610..54366ddf4 100644 --- a/qcsrc/common/mapobjects/trigger/jumppads.qh +++ b/qcsrc/common/mapobjects/trigger/jumppads.qh @@ -5,6 +5,16 @@ const int PUSH_ONCE = BIT(0); // legacy, deactivate with relay instead const int PUSH_SILENT = BIT(1); // not used? const int PUSH_STATIC = BIT(12); // xonotic-only, Q3 already behaves like this by default +#define PUSH_VELOCITY_PLAYERDIR_XY BIT(0) +#define PUSH_VELOCITY_ADD_XY BIT(1) +#define PUSH_VELOCITY_PLAYERDIR_Z BIT(2) +#define PUSH_VELOCITY_ADD_Z BIT(3) +#define PUSH_VELOCITY_BIDIRECTIONAL_XY BIT(4) +#define PUSH_VELOCITY_BIDIRECTIONAL_Z BIT(5) +#define PUSH_VELOCITY_CLAMP_NEGATIVE_ADDS BIT(6) + +#define Q3_TARGET_PUSH_JUMPPAD BIT(0) // target_push defaults to "wind tunnel" mode in Q3 + IntrusiveList g_jumppads; STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); } @@ -12,6 +22,8 @@ STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); } .bool istypefrag; .float height; +.entity last_pushed; + const int NUM_JUMPPADSUSED = 3; .float jumppadcount; .entity jumppadsused[NUM_JUMPPADSUSED]; @@ -44,7 +56,7 @@ bool trigger_push_test(entity this, entity item); void trigger_push_findtarget(entity this); /* - * ENTITY PARAMETERS: + * ENTITY PARAMETERS trigger_push: * * target: target of jump * height: the absolute value is the height of the highest point of the jump @@ -55,8 +67,17 @@ void trigger_push_findtarget(entity this); * values to target a point on the ceiling. * movedir: if target is not set, this * speed * 10 is the velocity to be reached. */ + +/* + * ENTITY PARAMETERS trigger_push_velocity: + * + * target: this points to the target_position to which the player will jump. + * speed: XY speed for player-directional velocity pads - either sets or adds to the player's horizontal velocity. + * count: Z speed for player-directional velocity pads - either sets or adds to the player's vertical velocity. + */ #ifdef SVQC spawnfunc(trigger_push); +spawnfunc(trigger_push_velocity); spawnfunc(target_push); spawnfunc(info_notnull);