]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/triggers.qh
Merge branch 'master' into DefaultUser/trigger_cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / triggers.qh
index 69d53fba41d9d6707a91d9aba7b1801bdca1c5c2..58897200283029dfc056fa4dc4a868e342667b42 100644 (file)
@@ -1,14 +1,5 @@
-#ifndef TRIGGERS_H
-#define TRIGGERS_H
-
-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;
-
-.void() trigger_touch;
+#pragma once
+#include "spawnflags.qh"
 
 .bool pushable;
 
@@ -17,8 +8,7 @@ const float    SPAWNFLAG_NOTOUCH = 1;
 
 .float height;
 
-.float nottargeted;
-#define IFTARGETED if(!self.nottargeted && self.targetname != "")
+#define IFTARGETED if(this.targetname && this.targetname != "")
 
 .float lip;
 
@@ -30,8 +20,12 @@ 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);
 #endif
 
+.float sub_target_used;
+
 .float volume, atten;
 
 .vector dest;
@@ -39,7 +33,7 @@ void target_voicescript_clear(entity pl);
 void FixSize(entity e);
 
 #ifdef CSQC
-void trigger_common_read(bool withtarget);
+void trigger_common_read(entity this, bool withtarget);
 void trigger_remove_generic(entity this);
 
 .float active;
@@ -52,5 +46,3 @@ const int ACTIVE_IDLE                 = 2;
 const int ACTIVE_BUSY          = 2;
 const int ACTIVE_TOGGLE                = 3;
 #endif
-
-#endif