]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qc
Merge branch 'TimePath/experiments/csqc_prediction' into Mario/qc_physics
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qc
index e5c875b37c25abdf2f620422f62ae5f7b678a5ef..3903cb42716563c9020979a58f04f5a56c1098a1 100644 (file)
@@ -17,6 +17,8 @@
 
 #include "../common/monsters/monsters.qh"
 
+#include "../common/triggers/include.qh"
+
 #include "../warpzonelib/client.qh"
 
 // --------------------------------------------------------------------------
@@ -350,26 +352,6 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
 
 // --------------------------------------------------------------------------
 // BEGIN OPTIONAL CSQC FUNCTIONS
-void trigger_touch_generic(void() touchfunc)
-{
-       entity e;
-       for(e = findradius((self.absmin + self.absmax) * 0.5, vlen(self.absmax - self.absmin) * 0.5 + 1); e; e = e.chain)
-       if(e.isplayermodel)
-       {
-               vector emin = e.absmin, emax = e.absmax;
-               if(self.solid == SOLID_BSP)
-               {
-                       emin -= '1 1 1';
-                       emax += '1 1 1';
-               }
-               if(boxesoverlap(emin, emax, self.absmin, self.absmax)) // quick
-               if(WarpZoneLib_BoxTouchesBrush(emin, emax, self, e)) // accurate
-               {
-                       other = e;
-                       touchfunc();
-               }
-       }
-}
 
 void Ent_RemoveEntCS()
 {
@@ -779,12 +761,6 @@ void Ent_ReadSpawnEvent(float is_new)
 void Ent_RadarLink();
 void Ent_Init();
 void Ent_ScoresInfo();
-#ifdef CSQC
-void ent_func_ladder();
-void ent_trigger_push();
-void ent_target_push();
-void ent_conveyor();
-#endif
 void CSQC_Ent_Update(float bIsNewEntity)
 {
        float t;
@@ -873,6 +849,11 @@ void CSQC_Ent_Update(float bIsNewEntity)
                case ENT_CLIENT_TRIGGER_PUSH: ent_trigger_push(); break;
                case ENT_CLIENT_TARGET_PUSH: ent_target_push(); break;
                case ENT_CLIENT_CONVEYOR: ent_conveyor(); break;
+               case ENT_CLIENT_DOOR: ent_door(); break;
+               case ENT_CLIENT_DOOR_TRIGGER: ent_door_trigger(); break;
+               case ENT_CLIENT_PLAT: ent_plat(); break;
+               case ENT_CLIENT_PLAT_TRIGGER: ent_plat_trigger(); break;
+               case ENT_CLIENT_SWAMP: ent_swamp(); break;
 
                default:
                        //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));