From 2503b3e0b8401288516d64ac85c3f41bc7a7cb9c Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 6 Mar 2012 10:14:57 +0100 Subject: [PATCH] fix bone selection for weapon attachments for player models in the new overkill players dir --- qcsrc/client/csqcmodel_hooks.qc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 27fb70d86..2cda005ce 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -305,6 +305,7 @@ void CSQCModel_AutoTagIndex_Apply(void) { // the best part is: IT EXISTS if(substring(self.model, 0, 17) == "models/weapons/v_") + { if(substring(self.tag_entity.model, 0, 17) == "models/weapons/h_") { self.tag_index = gettagindex(self.tag_entity, "weapon"); @@ -318,14 +319,15 @@ void CSQCModel_AutoTagIndex_Apply(void) dprint("h_ model lacks weapon attachment, but v_ model is attached to it\n"); } } - - if(substring(self.model, 0, 17) == "models/weapons/v_") - if(substring(self.tag_entity.model, 0, 14) == "models/player/") + else { - self.tag_index = gettagindex(self.tag_entity, "tag_weapon"); + self.tag_index = gettagindex(self.tag_entity, "weapon"); + if(!self.tag_index) + self.tag_index = gettagindex(self.tag_entity, "tag_weapon"); if(!self.tag_index) self.tag_index = gettagindex(self.tag_entity, "bip01 r hand"); } + } if(substring(self.tag_entity.model, 0, 17) == "models/weapons/v_") { -- 2.39.2