]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/triggers.qh
Replace magic numbers in func_train
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / triggers.qh
index 8a8eb566c19b2ed844035390e6236e78fd1e18b3..681bb898ba14b2abe2b973b28e00d30aa4ea1d0d 100644 (file)
@@ -1,11 +1,5 @@
 #pragma once
-
-const float SF_TRIGGER_INIT = 1;
-const float SF_TRIGGER_UPDATE = 2;
-const float SF_TRIGGER_RESET = 4;
-
-const float    SPAWNFLAG_NOMESSAGE = 1;
-const float    SPAWNFLAG_NOTOUCH = 1;
+#include "spawnflags.qh"
 
 .bool pushable;
 
@@ -14,8 +8,7 @@ const float    SPAWNFLAG_NOTOUCH = 1;
 
 .float height;
 
-.float nottargeted;
-#define IFTARGETED if(!this.nottargeted && this.targetname != "")
+#define IFTARGETED if(this.targetname && this.targetname != "")
 
 .float lip;
 
@@ -27,8 +20,18 @@ string trigger_magicear_processmessage_forallears(entity source, float teamsay,
 
 void target_voicescript_next(entity pl);
 void target_voicescript_clear(entity pl);
+
+void SUB_UseTargets_PreventReuse(entity this, entity actor, entity trigger);
+
+// generic methods for netlinked entities
+void generic_netlinked_reset(entity this);
+void generic_netlinked_setactive(entity this, int act);
+// WARNING: DON'T USE, ONLY TO KEEP COMPATIBILITY BECAUSE OF SWITCH FROM .state TO .alive!!!!
+void generic_netlinked_legacy_use(entity this, entity actor, entity trigger);
 #endif
 
+.float sub_target_used;
+
 .float volume, atten;
 
 .vector dest;