]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/subs.qh
Merge branch 'master' into 'terencehill/bot_waypoints'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / subs.qh
index 6a844261379a971e3d76da1a371008aac2c3f63a..8d4e406504cf62eadd2458b01912eb938c5c51bc 100644 (file)
@@ -1,47 +1,11 @@
-#ifndef SUBS_H
-#define SUBS_H
-
-#ifdef SVQC
-
-       #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                       think
-       #define SUB_LTIME                       ltime
-       #define SUB_FLAGS                       flags
-
-#elif defined(CSQC)
-
-       void _Movetype_LinkEdict(entity this, float touch_triggers);
-
-       #define SUB_ANGLES(s)   (s).move_angles
-       #define SUB_VELOCITY    move_velocity
-       #define SUB_AVELOCITY   move_avelocity
-       #define SUB_ORIGIN              move_origin
-       #define SUB_NEXTTHINK   move_nextthink
-       #define SUB_THINK               move_think
-       #define SUB_LTIME               move_ltime
-       #define SUB_FLAGS               move_flags
-
-.vector move_origin;
-
-       void SUB_SETORIGIN(entity s, vector v)
-       {
-               s.move_origin = v;
-               _Movetype_LinkEdict(s, true);
-       }
-
-#endif
-
+#pragma once
+#include "defs.qh"
 
 void SUB_SetFade (entity ent, float when, float fading_time);
 void SUB_VanishOrRemove (entity ent);
 
 .vector                finaldest, finalangle;          //plat.qc stuff
-.void()                think1;
+.void(entity this) think1;
 .float state;
 .float         t_length, t_width;
 
@@ -78,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