]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/common.qh
Add an intrusive list for warpzones
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / common.qh
index ebea01108dc72927c5180964e4599ed85e2262ff..26c0e80fe4623526ee12cecc05842fb92c4f5dd0 100644 (file)
@@ -1,9 +1,11 @@
-#ifndef LIB_WARPZONE_COMMON_H
-#define LIB_WARPZONE_COMMON_H
+#pragma once
 
 // uncomment this if your mod uses the roll angle in fixangle
 // #define KEEP_ROLL
 
+IntrusiveList g_warpzones;
+STATIC_INIT(g_warpzones) { g_warpzones = IL_NEW(); }
+
 float warpzone_warpzones_exist;
 float warpzone_cameras_exist;
 
@@ -107,10 +109,9 @@ entity WarpZone_RefSys_SpawnSameRefSys(entity me); // spawn().R = me.R
 float WarpZoneLib_MoveOutOfSolid(entity e);
 #define move_out_of_solid(e) WarpZoneLib_MoveOutOfSolid(e)
 
-float WarpZoneLib_ExactTrigger_Touch();
-void WarpZoneLib_ExactTrigger_Init();
+float WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher);
+void WarpZoneLib_ExactTrigger_Init(entity this);
 
 // WARNING: this kills the trace globals
-#define EXACTTRIGGER_TOUCH if(WarpZoneLib_ExactTrigger_Touch()) return
-#define EXACTTRIGGER_INIT  WarpZoneLib_ExactTrigger_Init()
-#endif
+#define EXACTTRIGGER_TOUCH(e,t) if(WarpZoneLib_ExactTrigger_Touch((e), (t))) return
+#define EXACTTRIGGER_INIT  WarpZoneLib_ExactTrigger_Init(this)