]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/triggers.qh
trigger_gravity: use .active instead of .state, remove magic numbers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / triggers.qh
index 2b8274f4b890aa473b5432de2415bb1719e925a1..1ecef76383b47e3d6cb4e25c2d18cef6bfaf02ba 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;
 
@@ -29,6 +22,13 @@ void target_voicescript_next(entity pl);
 void target_voicescript_clear(entity pl);
 
 void SUB_UseTargets_PreventReuse(entity this, entity actor, entity trigger);
+
+void generic_setactive(entity this, int act);
+// 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;