]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/subs.qh
trigger_gravity: use .active instead of .state, remove magic numbers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / subs.qh
index 096022c848644ac499c5c674e4f0fe1c709079e1..d8d926c80dd51b296990a77cf2a675817e526b72 100644 (file)
@@ -1,16 +1,5 @@
-#ifndef SUBS_H
-#define SUBS_H
-
-#define SUB_ANGLES(s)          (s).angles
-#define SUB_VELOCITY           velocity
-#define SUB_AVELOCITY          avelocity
-#define SUB_ORIGIN                     origin
-#define SUB_SETORIGIN(s,v)     setorigin((s), (v))
-#define SUB_NEXTTHINK          nextthink
-#define SUB_THINK(e, f)     setthink(e, f)
-#define SUB_THUNK(e)        getthink(e)
-#define SUB_LTIME                      ltime
-
+#pragma once
+#include "states.qh"
 
 void SUB_SetFade (entity ent, float when, float fading_time);
 void SUB_VanishOrRemove (entity ent);
@@ -53,21 +42,16 @@ void SUB_VanishOrRemove (entity ent);
 
 .vector dest1, dest2;
 
+.entity move_controller;
+
 #ifdef CSQC
 // this stuff is defined in the server side engine VM, so we must define it separately here
 .float takedamage;
-const float DAMAGE_NO  = 0;
-const float DAMAGE_YES = 1;
-const float DAMAGE_AIM = 2;
-
-float  STATE_TOP               = 0;
-float  STATE_BOTTOM    = 1;
-float  STATE_UP                = 2;
-float  STATE_DOWN              = 3;
+const int DAMAGE_NO = 0;
+const int DAMAGE_YES = 1;
+const int DAMAGE_AIM = 2;
 
 .string                noise, noise1, noise2, noise3;  // contains names of wavs to play
 
 .float         max_health;             // players maximum health is stored here
 #endif
-
-#endif