]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/csqcmodel_hooks.qc
Merge branch 'TimePath/itemstime2.0_regressions' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / csqcmodel_hooks.qc
index 1981c171dcd6c3f6040a1b1d5e61d2d0183dc074..227341ae3d4936458a81d1369e89e1fa8e92d492 100644 (file)
@@ -12,6 +12,8 @@
 #include "../common/teams.qh"
 #include "../common/triggers/trigger/viewloc.qh"
 
+#include "mutators/events.qh"
+
 #include "../csqcmodellib/cl_model.qh"
 #include "../csqcmodellib/cl_player.qh"
 #include "../csqcmodellib/interpolate.qh"
@@ -407,6 +409,8 @@ void CSQCModel_AutoTagIndex_Apply(void)
        if(self.viewloc.entnum != self.tag_networkviewloc)
                self.viewloc = findfloat(world, entnum, self.tag_networkviewloc);
 
+       MUTATOR_CALLHOOK(TagIndex_Update, self);
+
        if(self.tag_networkentity)
        {
                // we are ATTACHED!
@@ -436,9 +440,9 @@ void CSQCModel_AutoTagIndex_Apply(void)
                        if(self.tag_entity)
                        {
                                // the best part is: IT EXISTS
-                               if(substring(self.model, 0, 17) == "models/weapons/v_")
+                               if(substring(self.model, 0, 14) == "models/weapons")
                                {
-                                       if(substring(self.tag_entity.model, 0, 17) == "models/weapons/h_")
+                                       if(substring(self.tag_entity.model, 0, 14) == "models/weapons")
                                        {
                                                self.tag_index = gettagindex(self.tag_entity, "weapon");
                                                if(!self.tag_index)
@@ -458,12 +462,14 @@ void CSQCModel_AutoTagIndex_Apply(void)
                                        }
                                }
 
-                               if(substring(self.tag_entity.model, 0, 17) == "models/weapons/v_")
+                               if(substring(self.tag_entity.model, 0, 14) == "models/weapons")
                                {
                                        self.tag_index = gettagindex(self.tag_entity, "shot");
                                        if(!self.tag_index)
                                                self.tag_index = gettagindex(self.tag_entity, "tag_shot");
                                }
+
+                               MUTATOR_CALLHOOK(TagIndex_Apply, self);
                        }
                        else
                        {