]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/csqcmodel_hooks.qc
Some new features and stuff for triggers (plus side-scrolling mode)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / csqcmodel_hooks.qc
index 92cef15efff3316b3f936aa2dca50a95f359e575..1981c171dcd6c3f6040a1b1d5e61d2d0183dc074 100644 (file)
@@ -10,6 +10,7 @@
 #include "../common/animdecide.qh"
 #include "../common/csqcmodel_settings.qh"
 #include "../common/teams.qh"
+#include "../common/triggers/trigger/viewloc.qh"
 
 #include "../csqcmodellib/cl_model.qh"
 #include "../csqcmodellib/cl_player.qh"
@@ -400,6 +401,12 @@ void CSQCModel_AutoTagIndex_Apply(void)
        if(self.tag_entity && wasfreed(self.tag_entity))
                self.tag_entity = world;
 
+       if(self.viewloc && wasfreed(self.viewloc))
+               self.viewloc = world;
+
+       if(self.viewloc.entnum != self.tag_networkviewloc)
+               self.viewloc = findfloat(world, entnum, self.tag_networkviewloc);
+
        if(self.tag_networkentity)
        {
                // we are ATTACHED!