string modelname = self.model;
string s;
+ vector mi = self.mins;
+ vector ma = self.maxs;
+
// set modelindex
self.lodmodelindex0 = self.modelindex;
self.lodmodelindex1 = self.modelindex;
}
setmodel(self, modelname); // make everything normal again
+ setsize(self, mi, ma);
}
// apply LOD
}
// recursive predraw call to fix issues with forcemodels and LOD if bone indexes mismatch
+ if(self.tag_entity.classname == "csqcmodel")
{
entity oldself = self;
self = self.tag_entity;
{
// 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");
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 if(self.tag_entity.isplayermodel)
{
- 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_")
{
void CSQCModel_Hook_PostUpdate(float isnew, float isplayer, float islocalplayer)
{
// is it a player model? (shared state)
- self.isplayermodel = (substring(self.model, 0, 14) == "models/player/");
+ self.isplayermodel = (substring(self.model, 0, 14) == "models/player/" || substring(self.model, 0, 17) == "models/ok_player/");
// save values set by server
if(self.isplayermodel)