From eb6d6d17f31d6ff1b9d655b03faf6200f629a109 Mon Sep 17 00:00:00 2001 From: Freddy Date: Sat, 17 Mar 2018 16:54:02 +0100 Subject: [PATCH] Move non-generic entity flags to their own headers --- qcsrc/common/triggers/defs.qh | 41 +++++ qcsrc/common/triggers/func/bobbing.qh | 5 +- qcsrc/common/triggers/func/breakable.qh | 8 +- qcsrc/common/triggers/func/button.qh | 4 +- qcsrc/common/triggers/func/conveyor.qh | 3 +- qcsrc/common/triggers/func/door.qh | 11 +- qcsrc/common/triggers/func/door_rotating.qh | 7 + qcsrc/common/triggers/func/door_secret.qh | 8 +- qcsrc/common/triggers/func/plat.qc | 2 +- qcsrc/common/triggers/func/pointparticles.qh | 10 ++ qcsrc/common/triggers/func/rotating.qh | 6 +- qcsrc/common/triggers/func/train.qh | 6 +- qcsrc/common/triggers/func/vectormamamam.qh | 6 +- qcsrc/common/triggers/misc/follow.qh | 5 +- qcsrc/common/triggers/misc/laser.qh | 15 +- qcsrc/common/triggers/platforms.qc | 2 +- qcsrc/common/triggers/platforms.qh | 4 +- qcsrc/common/triggers/spawnflags.qh | 166 ------------------ qcsrc/common/triggers/states.qh | 13 -- qcsrc/common/triggers/subs.qh | 2 +- qcsrc/common/triggers/target/changelevel.qh | 3 + qcsrc/common/triggers/target/music.qh | 2 + qcsrc/common/triggers/target/speaker.qh | 6 + qcsrc/common/triggers/teleporters.qh | 11 +- qcsrc/common/triggers/trigger/counter.qh | 3 + qcsrc/common/triggers/trigger/gravity.qh | 4 + qcsrc/common/triggers/trigger/heal.qh | 3 + qcsrc/common/triggers/trigger/impulse.qh | 2 + qcsrc/common/triggers/trigger/jumppads.qh | 5 +- qcsrc/common/triggers/trigger/magicear.qh | 12 ++ qcsrc/common/triggers/trigger/monoflop.qh | 3 + qcsrc/common/triggers/trigger/relay_if.qh | 3 + .../triggers/trigger/relay_teamcheck.qh | 4 + qcsrc/common/triggers/trigger/viewloc.qh | 6 +- qcsrc/common/triggers/triggers.qh | 8 +- 35 files changed, 191 insertions(+), 208 deletions(-) create mode 100644 qcsrc/common/triggers/defs.qh delete mode 100644 qcsrc/common/triggers/spawnflags.qh delete mode 100644 qcsrc/common/triggers/states.qh diff --git a/qcsrc/common/triggers/defs.qh b/qcsrc/common/triggers/defs.qh new file mode 100644 index 000000000..45afb51f9 --- /dev/null +++ b/qcsrc/common/triggers/defs.qh @@ -0,0 +1,41 @@ +#pragma once + +//----------- +// SPAWNFLAGS +//----------- +const int START_ENABLED = BIT(0); +const int START_DISABLED = BIT(0); +const int ALL_ENTITIES = BIT(1); +const int ON_MAPLOAD = BIT(1); +const int INVERT_TEAMS = BIT(2); +const int CRUSH = BIT(2); +const int NOSPLASH = BIT(8); // generic anti-splashdamage spawnflag +const int ONLY_PLAYERS = BIT(14); + +// triggers +const int SPAWNFLAG_NOMESSAGE = BIT(0); +const int SPAWNFLAG_NOTOUCH = BIT(0); + +//---------- +// SENDFLAGS +//---------- +const int SF_TRIGGER_INIT = BIT(0); +const int SF_TRIGGER_UPDATE = BIT(1); +const int SF_TRIGGER_RESET = BIT(2); + +//---------------- +// STATES & ACTIVE +//---------------- +#ifdef CSQC +// this stuff is defined in the server side engine VM, so we must define it separately here +const int STATE_TOP = 0; +const int STATE_BOTTOM = 1; +const int STATE_UP = 2; +const int STATE_DOWN = 3; + +const int ACTIVE_NOT = 0; +const int ACTIVE_ACTIVE = 1; +const int ACTIVE_IDLE = 2; +const int ACTIVE_BUSY = 2; +const int ACTIVE_TOGGLE = 3; +#endif diff --git a/qcsrc/common/triggers/func/bobbing.qh b/qcsrc/common/triggers/func/bobbing.qh index 7c39519e1..58f7bb714 100644 --- a/qcsrc/common/triggers/func/bobbing.qh +++ b/qcsrc/common/triggers/func/bobbing.qh @@ -1,2 +1,5 @@ #pragma once -#include "../spawnflags.qh" + + +const int BOBBING_XAXIS = BIT(0); +const int BOBBING_YAXIS = BIT(1); diff --git a/qcsrc/common/triggers/func/breakable.qh b/qcsrc/common/triggers/func/breakable.qh index 9b16355dd..0efbcfaed 100644 --- a/qcsrc/common/triggers/func/breakable.qh +++ b/qcsrc/common/triggers/func/breakable.qh @@ -1,8 +1,12 @@ #pragma once -#include "../spawnflags.qh" -#include "../states.qh" +const int BREAKABLE_INDICATE_DAMAGE = BIT(1); +const int BREAKABLE_NODAMAGE = BIT(2); + +const int STATE_ALIVE = 0; +const int STATE_BROKEN = 1; + #ifdef SVQC spawnfunc(func_breakable); #endif diff --git a/qcsrc/common/triggers/func/button.qh b/qcsrc/common/triggers/func/button.qh index 7c39519e1..86a0fc918 100644 --- a/qcsrc/common/triggers/func/button.qh +++ b/qcsrc/common/triggers/func/button.qh @@ -1,2 +1,4 @@ #pragma once -#include "../spawnflags.qh" + + +const int BUTTON_DONTACCUMULATEDMG = BIT(7); diff --git a/qcsrc/common/triggers/func/conveyor.qh b/qcsrc/common/triggers/func/conveyor.qh index 20b790f4a..22b674ff3 100644 --- a/qcsrc/common/triggers/func/conveyor.qh +++ b/qcsrc/common/triggers/func/conveyor.qh @@ -1,6 +1,5 @@ #pragma once -#include "../spawnflags.qh" -#include "../states.qh" +#include "../defs.qh" IntrusiveList g_conveyed; STATIC_INIT(g_conveyed) { g_conveyed = IL_NEW(); } diff --git a/qcsrc/common/triggers/func/door.qh b/qcsrc/common/triggers/func/door.qh index faf137d6b..181de8b7b 100644 --- a/qcsrc/common/triggers/func/door.qh +++ b/qcsrc/common/triggers/func/door.qh @@ -1,5 +1,14 @@ #pragma once -#include "../spawnflags.qh" + + +const int DOOR_START_OPEN = BIT(0); +const int DOOR_DONT_LINK = BIT(2); +const int SPAWNFLAGS_GOLD_KEY = BIT(3); // Quake 1 compat, can only be used with func_door! +const int SPAWNFLAGS_SILVER_KEY = BIT(4); // Quake 1 compat, can only be used with func_door! +const int DOOR_TOGGLE = BIT(5); + +const int DOOR_NONSOLID = BIT(10); +const int DOOR_CRUSH = BIT(11); // can't use CRUSH cause that is the same as DOOR_DONT_LINK #ifdef CSQC diff --git a/qcsrc/common/triggers/func/door_rotating.qh b/qcsrc/common/triggers/func/door_rotating.qh index a5cf76932..5ff572859 100644 --- a/qcsrc/common/triggers/func/door_rotating.qh +++ b/qcsrc/common/triggers/func/door_rotating.qh @@ -1,6 +1,13 @@ #pragma once +const int DOOR_ROTATING_BIDIR = BIT(1); +const int DOOR_ROTATING_BIDIR_IN_DOWN = BIT(3); + +const int DOOR_ROTATING_XAXIS = BIT(6); +const int DOOR_ROTATING_YAXIS = BIT(7); + + #ifdef GAMEQC void door_rotating_go_down(entity this); void door_rotating_go_up(entity this, entity oth); diff --git a/qcsrc/common/triggers/func/door_secret.qh b/qcsrc/common/triggers/func/door_secret.qh index 7c39519e1..ee575bc42 100644 --- a/qcsrc/common/triggers/func/door_secret.qh +++ b/qcsrc/common/triggers/func/door_secret.qh @@ -1,2 +1,8 @@ #pragma once -#include "../spawnflags.qh" + + +const int DOOR_SECRET_OPEN_ONCE = BIT(0); // stays open - LEGACY, set wait to -1 instead +const int DOOR_SECRET_1ST_LEFT = BIT(1); // 1st move is left of arrow +const int DOOR_SECRET_1ST_DOWN = BIT(2); // 1st move is down from arrow +const int DOOR_SECRET_NO_SHOOT = BIT(3); // only opened by trigger +const int DOOR_SECRET_YES_SHOOT = BIT(4); // shootable even if targeted diff --git a/qcsrc/common/triggers/func/plat.qc b/qcsrc/common/triggers/func/plat.qc index 00d4f78d2..b05233621 100644 --- a/qcsrc/common/triggers/func/plat.qc +++ b/qcsrc/common/triggers/func/plat.qc @@ -58,7 +58,7 @@ void plat_link(entity this) spawnfunc(func_plat) { - if (this.spawnflags & PLAT_CRUSH) + if (this.spawnflags & CRUSH) { this.dmg = 10000; } diff --git a/qcsrc/common/triggers/func/pointparticles.qh b/qcsrc/common/triggers/func/pointparticles.qh index 6f70f09be..b167527bc 100644 --- a/qcsrc/common/triggers/func/pointparticles.qh +++ b/qcsrc/common/triggers/func/pointparticles.qh @@ -1 +1,11 @@ #pragma once + +// spawnflags +const int PARTICLES_IMPULSE = BIT(1); +const int PARTICLES_VISCULLING = BIT(2); + +// sendflags +const int SF_POINTPARTICLES_IMPULSE = BIT(4); +const int SF_POINTPARTICLES_MOVING = BIT(5); // Send velocity and movedir +const int SF_POINTPARTICLES_JITTER_AND_COUNT = BIT(6); // Send waterlevel (=jitter) and count +const int SF_POINTPARTICLES_BOUNDS = BIT(7); // Send min and max of the brush diff --git a/qcsrc/common/triggers/func/rotating.qh b/qcsrc/common/triggers/func/rotating.qh index 7c39519e1..ad1b6ec92 100644 --- a/qcsrc/common/triggers/func/rotating.qh +++ b/qcsrc/common/triggers/func/rotating.qh @@ -1,2 +1,6 @@ #pragma once -#include "../spawnflags.qh" + + +const int FUNC_ROTATING_XAXIS = BIT(2); +const int FUNC_ROTATING_YAXIS = BIT(3); +const int FUNC_ROTATING_STARTOFF = BIT(4); diff --git a/qcsrc/common/triggers/func/train.qh b/qcsrc/common/triggers/func/train.qh index 0a4605243..0b2a099c5 100644 --- a/qcsrc/common/triggers/func/train.qh +++ b/qcsrc/common/triggers/func/train.qh @@ -1,5 +1,9 @@ #pragma once -#include "../spawnflags.qh" + + +const int TRAIN_CURVE = BIT(0); +const int TRAIN_TURN = BIT(1); +const int TRAIN_NEEDACTIVATION = BIT(2); #ifdef CSQC .float dmgtime; diff --git a/qcsrc/common/triggers/func/vectormamamam.qh b/qcsrc/common/triggers/func/vectormamamam.qh index 4f40f6292..7eb6b0a63 100644 --- a/qcsrc/common/triggers/func/vectormamamam.qh +++ b/qcsrc/common/triggers/func/vectormamamam.qh @@ -1,5 +1,9 @@ #pragma once -#include "../spawnflags.qh" +const int PROJECT_ON_TARGETNORMAL = BIT(0); +const int PROJECT_ON_TARGET2NORMAL = BIT(1); +const int PROJECT_ON_TARGET3NORMAL = BIT(2); +const int PROJECT_ON_TARGET4NORMAL = BIT(3); + const float vectormamamam_timestep = 0.1; diff --git a/qcsrc/common/triggers/misc/follow.qh b/qcsrc/common/triggers/misc/follow.qh index 7c39519e1..aef491ff3 100644 --- a/qcsrc/common/triggers/misc/follow.qh +++ b/qcsrc/common/triggers/misc/follow.qh @@ -1,2 +1,5 @@ #pragma once -#include "../spawnflags.qh" + + +const int FOLLOW_ATTACH = BIT(0); +const int FOLLOW_LOCAL = BIT(1); diff --git a/qcsrc/common/triggers/misc/laser.qh b/qcsrc/common/triggers/misc/laser.qh index 36a25faa0..0ff57646a 100644 --- a/qcsrc/common/triggers/misc/laser.qh +++ b/qcsrc/common/triggers/misc/laser.qh @@ -1,7 +1,20 @@ #pragma once -#include "../spawnflags.qh" +const int LASER_FINITE = BIT(1); +const int LASER_NOTRACE = BIT(2); +const int LASER_INVERT_TEAM = BIT(3); + +const int SF_LASER_UPDATE_ORIGIN = BIT(0); +const int SF_LASER_UPDATE_TARGET = BIT(1); +const int SF_LASER_UPDATE_ACTIVE = BIT(2); +const int SF_LASER_UPDATE_EFFECT = BIT(3); + +const int SF_LASER_NOTRACE = BIT(4); +const int SF_LASER_SCALE = BIT(5); +const int SF_LASER_ALPHA = BIT(6); +const int SF_LASER_FINITE = BIT(7); + .vector beam_color; const float LASER_BEAM_MAXLENGTH = 32768; // maximum length of a beam trace diff --git a/qcsrc/common/triggers/platforms.qc b/qcsrc/common/triggers/platforms.qc index 7acdc614e..474787731 100644 --- a/qcsrc/common/triggers/platforms.qc +++ b/qcsrc/common/triggers/platforms.qc @@ -137,7 +137,7 @@ void plat_trigger_use(entity this, entity actor, entity trigger) void plat_crush(entity this, entity blocker) { - if((this.spawnflags & PLAT_CRUSH) && (blocker.takedamage != DAMAGE_NO)) + if((this.spawnflags & CRUSH) && (blocker.takedamage != DAMAGE_NO)) { // KIll Kill Kill!! #ifdef SVQC Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0'); diff --git a/qcsrc/common/triggers/platforms.qh b/qcsrc/common/triggers/platforms.qh index 83e77ef66..346cebc71 100644 --- a/qcsrc/common/triggers/platforms.qh +++ b/qcsrc/common/triggers/platforms.qh @@ -1,5 +1,7 @@ #pragma once -#include "spawnflags.qh" + + +const int PLAT_LOW_TRIGGER = BIT(0); .float dmgtime2; diff --git a/qcsrc/common/triggers/spawnflags.qh b/qcsrc/common/triggers/spawnflags.qh deleted file mode 100644 index 75464b076..000000000 --- a/qcsrc/common/triggers/spawnflags.qh +++ /dev/null @@ -1,166 +0,0 @@ -#pragma once - -// generic usage -const int START_ENABLED = BIT(0); -const int START_DISABLED = BIT(0); -const int ALL_ENTITIES = BIT(1); -const int ON_MAPLOAD = BIT(1); -const int INVERT_TEAMS = BIT(2); -const int NOSPLASH = BIT(8); // generic anti-splashdamage spawnflag -const int ONLY_PLAYERS = BIT(14); - -// triggers -const int SPAWNFLAG_NOMESSAGE = BIT(0); -const int SPAWNFLAG_NOTOUCH = BIT(0); // why are these the same? - -// bobbing -const int BOBBING_XAXIS = BIT(0); -const int BOBBING_YAXIS = BIT(1); - -// breakable -const int BREAKABLE_INDICATE_DAMAGE = BIT(1); -const int BREAKABLE_NODAMAGE = BIT(2); - -// button -const int BUTTON_DONTACCUMULATEDMG = BIT(7); - -// door, door_rotating and door_secret -const int DOOR_START_OPEN = BIT(0); -const int DOOR_DONT_LINK = BIT(2); -const int SPAWNFLAGS_GOLD_KEY = BIT(3); // Quake 1 compat, can only be used with func_door! -const int SPAWNFLAGS_SILVER_KEY = BIT(4); // Quake 1 compat, can only be used with func_door! -const int DOOR_TOGGLE = BIT(5); - -const int DOOR_NONSOLID = BIT(10); -const int DOOR_CRUSH = BIT(11); // can't use PLAT_CRUSH cause that is the same as DOOR_DONT_LINK - -const int DOOR_ROTATING_BIDIR = BIT(1); -const int DOOR_ROTATING_BIDIR_IN_DOWN = BIT(3); - -const int DOOR_ROTATING_XAXIS = BIT(6); -const int DOOR_ROTATING_YAXIS = BIT(7); - -const int DOOR_SECRET_OPEN_ONCE = BIT(0); // stays open - LEGACY, set wait to -1 instead -const int DOOR_SECRET_1ST_LEFT = BIT(1); // 1st move is left of arrow -const int DOOR_SECRET_1ST_DOWN = BIT(2); // 1st move is down from arrow -const int DOOR_SECRET_NO_SHOOT = BIT(3); // only opened by trigger -const int DOOR_SECRET_YES_SHOOT = BIT(4); // shootable even if targeted - -// particles -const int PARTICLES_IMPULSE = BIT(1); -const int PARTICLES_VISCULLING = BIT(2); - -// rotating -const int FUNC_ROTATING_XAXIS = BIT(2); -const int FUNC_ROTATING_YAXIS = BIT(3); -const int FUNC_ROTATING_STARTOFF = BIT(4); - -// train -const int TRAIN_CURVE = BIT(0); -const int TRAIN_TURN = BIT(1); -const int TRAIN_NEEDACTIVATION = BIT(2); - -// jumppads -const int PUSH_ONCE = BIT(0); // legacy, deactivate with relay instead -const int PUSH_SILENT = BIT(1); // not used? - -// viewloc -const int VIEWLOC_NOSIDESCROLL = BIT(0); // NOTE: currently unimplemented -const int VIEWLOC_FREEAIM = BIT(1); -const int VIEWLOC_FREEMOVE = BIT(2); - -// vectormamamam -const int PROJECT_ON_TARGETNORMAL = BIT(0); -const int PROJECT_ON_TARGET2NORMAL = BIT(1); -const int PROJECT_ON_TARGET3NORMAL = BIT(2); -const int PROJECT_ON_TARGET4NORMAL = BIT(3); - -// follow -const int FOLLOW_ATTACH = BIT(0); -const int FOLLOW_LOCAL = BIT(1); - -// laser -const int LASER_FINITE = BIT(1); -const int LASER_NOTRACE = BIT(2); -const int LASER_INVERT_TEAM = BIT(3); - -// platforms -const int PLAT_LOW_TRIGGER = BIT(0); -const int PLAT_CRUSH = BIT(2); - -// changelevel -const int CHANGELEVEL_MULTIPLAYER = BIT(1); - -// speaker -const int SPEAKER_LOOPED_ON = BIT(0); -const int SPEAKER_LOOPED_OFF = BIT(1); -const int SPEAKER_GLOBAL = BIT(2); // legacy, set speaker atten to -1 instead -const int SPEAKER_ACTIVATOR = BIT(3); - -// teleport -const int TELEPORT_FLAG_SOUND = BIT(0); -const int TELEPORT_FLAG_PARTICLES = BIT(1); -const int TELEPORT_FLAG_TDEATH = BIT(2); -const int TELEPORT_FLAG_FORCE_TDEATH = BIT(3); - -// counter -const int COUNTER_FIRE_AT_COUNT = BIT(2); - -// gravity -const int GRAVITY_STICKY = BIT(0); // keep gravity multiplier even after exiting the trigger_gravity -const int GRAVITY_START_DISABLED = BIT(1); - -// heal -const int HEAL_SOUND_ALWAYS = BIT(2); - -// impulse -const int IMPULSE_DIRECTIONAL_SPEEDTARGET = BIT(6); - -// magicear -const int MAGICEAR_IGNORE_SAY = BIT(0); -const int MAGICEAR_IGNORE_TEAMSAY = BIT(1); -const int MAGICEAR_IGNORE_TELL = BIT(2); -const int MAGICEAR_IGNORE_INVALIDTELL = BIT(3); -const int MAGICEAR_REPLACE_WHOLE_MESSAGE = BIT(4); -const int MAGICEAR_REPLACE_OUTSIDE = BIT(5); -const int MAGICEAR_CONTINUE = BIT(6); -const int MAGICEAR_NODECOLORIZE = BIT(7); -const int MAGICEAR_TUBA = BIT(8); -const int MAGICEAR_TUBA_EXACTPITCH = BIT(9); - -// monoflop -const int MONOFLOP_FIXED = BIT(0); - -// relay_if -const int RELAYIF_NEGATE = BIT(0); - -// relay_teamcheck -const int RELAYTEAMCHECK_NOTEAM = BIT(0); -const int RELAYTEAMCHECK_INVERT = BIT(1); - -//---------- -// SENDFLAGS -//---------- -const int SF_TRIGGER_INIT = BIT(0); -const int SF_TRIGGER_UPDATE = BIT(1); -const int SF_TRIGGER_RESET = BIT(2); - -// pointparticles -const int SF_POINTPARTICLES_IMPULSE = BIT(4); -const int SF_POINTPARTICLES_MOVING = BIT(5); // Send velocity and movedir -const int SF_POINTPARTICLES_JITTER_AND_COUNT = BIT(6); // Send waterlevel (=jitter) and count -const int SF_POINTPARTICLES_BOUNDS = BIT(7); // Send min and max of the brush - -// laser -const int SF_LASER_UPDATE_ORIGIN = BIT(0); -const int SF_LASER_UPDATE_TARGET = BIT(1); -const int SF_LASER_UPDATE_ACTIVE = BIT(2); -const int SF_LASER_UPDATE_EFFECT = BIT(3); - -const int SF_LASER_NOTRACE = BIT(4); -const int SF_LASER_SCALE = BIT(5); -const int SF_LASER_ALPHA = BIT(6); -const int SF_LASER_FINITE = BIT(7); - -// music -const int SF_MUSIC_ORIGIN = BIT(2); diff --git a/qcsrc/common/triggers/states.qh b/qcsrc/common/triggers/states.qh deleted file mode 100644 index 6ed47df3d..000000000 --- a/qcsrc/common/triggers/states.qh +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#ifdef CSQC -// this stuff is defined in the server side engine VM, so we must define it separately here -const int STATE_TOP = 0; -const int STATE_BOTTOM = 1; -const int STATE_UP = 2; -const int STATE_DOWN = 3; -#endif - -// breakable -const int STATE_ALIVE = 0; -const int STATE_BROKEN = 1; diff --git a/qcsrc/common/triggers/subs.qh b/qcsrc/common/triggers/subs.qh index d8d926c80..8d4e40650 100644 --- a/qcsrc/common/triggers/subs.qh +++ b/qcsrc/common/triggers/subs.qh @@ -1,5 +1,5 @@ #pragma once -#include "states.qh" +#include "defs.qh" void SUB_SetFade (entity ent, float when, float fading_time); void SUB_VanishOrRemove (entity ent); diff --git a/qcsrc/common/triggers/target/changelevel.qh b/qcsrc/common/triggers/target/changelevel.qh index 6f70f09be..f6e206edc 100644 --- a/qcsrc/common/triggers/target/changelevel.qh +++ b/qcsrc/common/triggers/target/changelevel.qh @@ -1 +1,4 @@ #pragma once + + +const int CHANGELEVEL_MULTIPLAYER = BIT(1); diff --git a/qcsrc/common/triggers/target/music.qh b/qcsrc/common/triggers/target/music.qh index 80b3684a4..fd8855eaf 100644 --- a/qcsrc/common/triggers/target/music.qh +++ b/qcsrc/common/triggers/target/music.qh @@ -2,6 +2,8 @@ .float lifetime; +const int SF_MUSIC_ORIGIN = BIT(2); + #ifdef CSQC float music_disabled; entity music_default; diff --git a/qcsrc/common/triggers/target/speaker.qh b/qcsrc/common/triggers/target/speaker.qh index 6f70f09be..53e0194be 100644 --- a/qcsrc/common/triggers/target/speaker.qh +++ b/qcsrc/common/triggers/target/speaker.qh @@ -1 +1,7 @@ #pragma once + + +const int SPEAKER_LOOPED_ON = BIT(0); +const int SPEAKER_LOOPED_OFF = BIT(1); +const int SPEAKER_GLOBAL = BIT(2); // legacy, set speaker atten to -1 instead +const int SPEAKER_ACTIVATOR = BIT(3); diff --git a/qcsrc/common/triggers/teleporters.qh b/qcsrc/common/triggers/teleporters.qh index 6056e0696..68c5114f4 100644 --- a/qcsrc/common/triggers/teleporters.qh +++ b/qcsrc/common/triggers/teleporters.qh @@ -1,18 +1,23 @@ #pragma once -#include "spawnflags.qh" +#include "defs.qh" IntrusiveList g_teleporters; STATIC_INIT(g_teleporters) { g_teleporters = IL_NEW(); } .entity pusher; +const int TELEPORT_FLAG_SOUND = BIT(0); +const int TELEPORT_FLAG_PARTICLES = BIT(1); +const int TELEPORT_FLAG_TDEATH = BIT(2); +const int TELEPORT_FLAG_FORCE_TDEATH = BIT(3); + #define TELEPORT_FLAGS_WARPZONE 0 #define TELEPORT_FLAGS_PORTAL (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH | TELEPORT_FLAG_FORCE_TDEATH) #define TELEPORT_FLAGS_TELEPORTER (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH) // types for .teleportable entity setting -const float TELEPORT_NORMAL = 1; // play sounds/effects etc -const float TELEPORT_SIMPLE = 2; // only do teleport, nothing special +const int TELEPORT_NORMAL = 1; // play sounds/effects etc +const int TELEPORT_SIMPLE = 2; // only do teleport, nothing special entity Simple_TeleportPlayer(entity teleporter, entity player); diff --git a/qcsrc/common/triggers/trigger/counter.qh b/qcsrc/common/triggers/trigger/counter.qh index 6f70f09be..394d15472 100644 --- a/qcsrc/common/triggers/trigger/counter.qh +++ b/qcsrc/common/triggers/trigger/counter.qh @@ -1 +1,4 @@ #pragma once + + +const int COUNTER_FIRE_AT_COUNT = BIT(2); diff --git a/qcsrc/common/triggers/trigger/gravity.qh b/qcsrc/common/triggers/trigger/gravity.qh index 6f70f09be..872f04ad9 100644 --- a/qcsrc/common/triggers/trigger/gravity.qh +++ b/qcsrc/common/triggers/trigger/gravity.qh @@ -1 +1,5 @@ #pragma once + + +const int GRAVITY_STICKY = BIT(0); // keep gravity multiplier even after exiting the trigger_gravity +const int GRAVITY_START_DISABLED = BIT(1); diff --git a/qcsrc/common/triggers/trigger/heal.qh b/qcsrc/common/triggers/trigger/heal.qh index 6f70f09be..8dbeea545 100644 --- a/qcsrc/common/triggers/trigger/heal.qh +++ b/qcsrc/common/triggers/trigger/heal.qh @@ -1 +1,4 @@ #pragma once + + +const int HEAL_SOUND_ALWAYS = BIT(2); diff --git a/qcsrc/common/triggers/trigger/impulse.qh b/qcsrc/common/triggers/trigger/impulse.qh index 5c3ff7bc9..e86de4a49 100644 --- a/qcsrc/common/triggers/trigger/impulse.qh +++ b/qcsrc/common/triggers/trigger/impulse.qh @@ -10,6 +10,8 @@ const int FALLOFF_NO = 0; const int FALLOFF_LINEAR = 1; const int FALLOFF_LINEAR_INV = 2; +const int IMPULSE_DIRECTIONAL_SPEEDTARGET = BIT(6); + const float IMPULSE_DEFAULT_RADIAL_STRENGTH = 2000; const float IMPULSE_DEFAULT_DIRECTIONAL_STRENGTH = 950; const float IMPULSE_DEFAULT_ACCEL_STRENGTH = 0.9; diff --git a/qcsrc/common/triggers/trigger/jumppads.qh b/qcsrc/common/triggers/trigger/jumppads.qh index 99aa5cb81..07ab441fe 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qh +++ b/qcsrc/common/triggers/trigger/jumppads.qh @@ -1,5 +1,8 @@ #pragma once -#include "../spawnflags.qh" + + +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(); } diff --git a/qcsrc/common/triggers/trigger/magicear.qh b/qcsrc/common/triggers/trigger/magicear.qh index 6f70f09be..4e705868c 100644 --- a/qcsrc/common/triggers/trigger/magicear.qh +++ b/qcsrc/common/triggers/trigger/magicear.qh @@ -1 +1,13 @@ #pragma once + + +const int MAGICEAR_IGNORE_SAY = BIT(0); +const int MAGICEAR_IGNORE_TEAMSAY = BIT(1); +const int MAGICEAR_IGNORE_TELL = BIT(2); +const int MAGICEAR_IGNORE_INVALIDTELL = BIT(3); +const int MAGICEAR_REPLACE_WHOLE_MESSAGE = BIT(4); +const int MAGICEAR_REPLACE_OUTSIDE = BIT(5); +const int MAGICEAR_CONTINUE = BIT(6); +const int MAGICEAR_NODECOLORIZE = BIT(7); +const int MAGICEAR_TUBA = BIT(8); +const int MAGICEAR_TUBA_EXACTPITCH = BIT(9); diff --git a/qcsrc/common/triggers/trigger/monoflop.qh b/qcsrc/common/triggers/trigger/monoflop.qh index 6f70f09be..c64dffdee 100644 --- a/qcsrc/common/triggers/trigger/monoflop.qh +++ b/qcsrc/common/triggers/trigger/monoflop.qh @@ -1 +1,4 @@ #pragma once + + +const int MONOFLOP_FIXED = BIT(0); diff --git a/qcsrc/common/triggers/trigger/relay_if.qh b/qcsrc/common/triggers/trigger/relay_if.qh index 6f70f09be..6f37aa71d 100644 --- a/qcsrc/common/triggers/trigger/relay_if.qh +++ b/qcsrc/common/triggers/trigger/relay_if.qh @@ -1 +1,4 @@ #pragma once + + +const int RELAYIF_NEGATE = BIT(0); diff --git a/qcsrc/common/triggers/trigger/relay_teamcheck.qh b/qcsrc/common/triggers/trigger/relay_teamcheck.qh index 6f70f09be..602d25356 100644 --- a/qcsrc/common/triggers/trigger/relay_teamcheck.qh +++ b/qcsrc/common/triggers/trigger/relay_teamcheck.qh @@ -1 +1,5 @@ #pragma once + + +const int RELAYTEAMCHECK_NOTEAM = BIT(0); +const int RELAYTEAMCHECK_INVERT = BIT(1); diff --git a/qcsrc/common/triggers/trigger/viewloc.qh b/qcsrc/common/triggers/trigger/viewloc.qh index d8e2bb3d8..3c393afd3 100644 --- a/qcsrc/common/triggers/trigger/viewloc.qh +++ b/qcsrc/common/triggers/trigger/viewloc.qh @@ -1,5 +1,9 @@ #pragma once -#include "../spawnflags.qh" + + +const int VIEWLOC_NOSIDESCROLL = BIT(0); // NOTE: currently unimplemented +const int VIEWLOC_FREEAIM = BIT(1); +const int VIEWLOC_FREEMOVE = BIT(2); .entity viewloc; diff --git a/qcsrc/common/triggers/triggers.qh b/qcsrc/common/triggers/triggers.qh index 1ecef7638..bfb32696a 100644 --- a/qcsrc/common/triggers/triggers.qh +++ b/qcsrc/common/triggers/triggers.qh @@ -1,5 +1,5 @@ #pragma once -#include "spawnflags.qh" +#include "defs.qh" .bool pushable; @@ -46,10 +46,4 @@ void trigger_remove_generic(entity this); .float active; .string target; .string targetname; - -const int ACTIVE_NOT = 0; -const int ACTIVE_ACTIVE = 1; -const int ACTIVE_IDLE = 2; -const int ACTIVE_BUSY = 2; -const int ACTIVE_TOGGLE = 3; #endif -- 2.39.2