From: Rudolf Polzer Date: Tue, 6 Mar 2012 09:14:57 +0000 (+0100) Subject: fix bone selection for weapon attachments for player models in the new overkill playe... X-Git-Tag: xonotic-v0.6.0~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2503b3e0b8401288516d64ac85c3f41bc7a7cb9c;p=xonotic%2Fxonotic-data.pk3dir.git fix bone selection for weapon attachments for player models in the new overkill players dir --- 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_") {