X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fcsqcmodel_hooks.qc;h=104465360770beaddc14298f06d2872f0d2d6d1f;hp=6eeb6c8bd8c2ef1771a79e68ae67384a1c613aa2;hb=905ec2fbd2b610eeb2591cdddbf71ce24b7bb3ab;hpb=5c9dd3786d57cbbbca67043ba8076548c1d486ef diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 6eeb6c8bd..104465360 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -3,6 +3,7 @@ #include "player_skeleton.qh" #include "weapons/projectile.qh" #include +#include #include #include #include @@ -192,7 +193,7 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) bool isfriend; int cm; cm = this.forceplayermodels_savecolormap; - cm = (cm >= 1024) ? cm : (stof(getplayerkeyvalue(cm - 1, "colors")) + 1024); + cm = (cm >= 1024) ? cm : (entcs_GetClientColors(cm - 1) + 1024); if(teamplay) isfriend = (cm == 1024 + 17 * myteam); @@ -279,7 +280,7 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) // GLOWMOD AND DEATH FADING if(this.colormap > 0) - this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : stof(getplayerkeyvalue(this.colormap - 1, "colors"))) & 0x0F, true) * 2; + this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : entcs_GetClientColors(this.colormap - 1)) & 0x0F, true) * 2; else this.glowmod = '1 1 1'; @@ -369,7 +370,7 @@ int CSQCPlayer_FallbackFrame(entity this, int f) case 29: return 4; // anim_duckwalkbackright -> anim_duckwalk case 30: return 4; // anim_duckwalkbackleft -> anim_duckwalk } - LOG_DEBUGF("Frame %d missing in model %s, and we have no fallback - FAIL!\n", f, this.model); + LOG_DEBUGF("Frame %d missing in model %s, and we have no fallback - FAIL!", f, this.model); return f; } void CSQCPlayer_FallbackFrame_Apply(entity this) @@ -391,8 +392,6 @@ void CSQCModel_AutoTagIndex_Apply(entity this) if(this.tag_entity && wasfreed(this.tag_entity)) this.tag_entity = NULL; - viewloc_SetTags(this); - MUTATOR_CALLHOOK(TagIndex_Update, this); if(this.tag_networkentity) @@ -433,7 +432,7 @@ void CSQCModel_AutoTagIndex_Apply(entity this) // we need to prevent this from 'appening this.tag_entity = NULL; this.drawmask = 0; - LOG_TRACE("h_ model lacks weapon attachment, but v_ model is attached to it\n"); + LOG_TRACE("h_ model lacks weapon attachment, but v_ model is attached to it"); } } else if(this.tag_entity.isplayermodel)