31 string modelname = this.
model;
61 _setmodel(
this, modelname);
62 setsize(
this, mi, ma);
139 cm = (cm >= 1024) ? cm : (entcs_GetClientColors(cm - 1) + 1024);
142 goto skipforcemodels;
203 isfriend = (cm == 1024 + 17 * myteam);
205 isfriend = islocalplayer;
232 LABEL(skipforcemodels)
235 goto skipforcecolors;
237 bool forceplayercolors_enabled =
false;
238 #define fpc autocvar_cl_forceplayercolors 242 forceplayercolors_enabled =
true;
247 forceplayercolors_enabled =
true;
252 forceplayercolors_enabled =
true;
259 int forcecolor_friend = 0, forcecolor_enemy = 0;
265 if(forceplayercolors_enabled)
268 if(forcecolor_enemy && !forcecolor_friend)
272 if(forcecolor_enemy == 1024 + 17 * myteam)
273 forcecolor_enemy = 0;
276 if(forcecolor_friend && !forcecolor_enemy)
280 for(tm =
teams.sort_next; tm; tm = tm.sort_next)
285 if(forcecolor_friend == 1024 + 17 * tm.team)
286 forcecolor_friend = 0;
289 if(cm == 1024 + 17 * myteam)
291 if(forcecolor_friend)
310 int num = this.
entnum - 1;
312 int q =
floor(num / 15);
313 int c2 = (c1 + 1 + q) % 15;
314 this.
colormap = 1024 + (c1 << 4) + c2;
316 else if(forceplayercolors_enabled)
320 LABEL(skipforcecolors)
343 this.
glowmod *= (min_factor + glow_fade * (1 - min_factor));
355 #ifdef CSQCMODEL_HAVE_TWO_FRAMES 356 .int csqcmodel_saveframe3;
357 .int csqcmodel_saveframe4;
361 #define IS_DEAD_FRAME(f) ((f) == 0 || (f) == 1) 366 #ifdef CSQCMODEL_HAVE_TWO_FRAMES 367 this.
frame3 = this.csqcmodel_saveframe3;
368 this.
frame4 = this.csqcmodel_saveframe4;
375 #ifdef CSQCMODEL_HAVE_TWO_FRAMES 376 this.csqcmodel_saveframe3 = this.
frame3;
377 this.csqcmodel_saveframe4 = this.
frame4;
384 #define FIX_FRAMETIME(f,ft) MACRO_BEGIN \ 385 if(IS_DEAD_FRAME(this.f) && this.ft != 0 && this.death_time != 0) \ 386 this.ft = this.death_time; \ 390 #ifdef CSQCMODEL_HAVE_TWO_FRAMES 419 LOG_DEBUGF(
"Frame %d missing in model %s, and we have no fallback - FAIL!", f, this.
model);
426 #ifdef CSQCMODEL_HAVE_TWO_FRAMES 443 if(this.tag_networkentity)
447 if(this.
tag_entity.entnum !=
this.tag_networkentity)
454 if(this.
tag_entity.classname ==
"ENT_CLIENT_MODEL")
459 if(this.
tag_entity.modelindex !=
this.tag_entity_lastmodelindex)
481 LOG_TRACE(
"h_ model lacks weapon attachment, but v_ model is attached to it");
539 this.traileffect = 0;
542 tref = EFFECT_TR_NEXUIZPLASMA.m_id;
582 tref = EFFECT_TR_ROCKET.m_id;
584 tref = EFFECT_TR_GRENADE.m_id;
586 tref = EFFECT_TR_BLOOD.m_id;
596 tref = EFFECT_TR_WIZSPIKE.m_id;
598 tref = EFFECT_TR_SLIGHTBLOOD.m_id;
600 tref = EFFECT_TR_KNIGHTSPIKE.m_id;
602 tref = EFFECT_TR_VORESPIKE.m_id;
604 this.traileffect = tref;
671 bool doblend = (this.bone_upperbody >= 0);
689 bool doblend = (this.bone_upperbody >= 0);
696 if(this.
flags & FL_DUCKED)
724 this.
lerpfrac = (doblend ? 0.5 : 0);
#define CSQCMODEL_EF_RESPAWNGHOST
int forceplayermodels_goodmodelindex
bool autocvar_cl_respawn_ghosts_keepcolors
void CSQCModel_Hook_PostUpdate(entity this, bool isnew, bool isplayer, bool islocalplayer)
void CSQCModel_Effects_Apply(entity this)
int autocvar_cl_forcemyplayerskin
float autocvar_cl_deathglow_min
const int EF_DYNAMICMODELLIGHT
string forceplayermodels_mymodel
string forceplayermodels_isgoodmodel_mdl
void CSQCPlayer_AnimDecide_PostUpdate(entity this, bool isnew)
string forceplayermodels_model
void animdecide_setframes(entity e, float support_blending,.float fld_frame,.float fld_frame1time,.float fld_frame2,.float fld_frame2time)
const int EF_NOSELFSHADOW
void CSQCModel_Effects_PostUpdate(entity this)
void animdecide_setstate(entity e, int newstate, float restart)
const float RF_FULLBRIGHT
string autocvar_cl_forcemyplayermodel
void CSQCPlayer_ModelAppearance_PostUpdate(entity this)
float frame2
secondary framegroup animation (strength = lerpfrac)
int autocvar__cl_playerskin
float autocvar_cl_jetpack_attenuation
string autocvar__cl_playermodel
void animdecide_load_if_needed(entity e)
float frame4
quaternary framegroup animation (strength = lerpfrac4)
float fmod(float e, float f)
bool autocvar_cl_forceuniqueplayercolors
string forceplayermodels_savemodel
float frame3
tertiary framegroup animation (strength = lerpfrac3)
float frame2time
start time of framegroup animation
int forceplayermodels_mymodelindex
int csqcmodel_traileffect
const float EF_NODEPTHTEST
void CSQCPlayer_FallbackFrame_PostUpdate(entity this, bool isnew)
void CSQCModel_InterpolateAnimation_2To4_Do(entity this)
void CSQCModel_AutoTagIndex_Apply(entity this)
const int CSQCMODEL_PROPERTY_FRAME2
void Projectile_DrawTrail(entity this, vector to)
void Projectile_ResetTrail(entity this, vector to)
string forceplayermodels_goodmodel
void CSQCPlayer_LOD_Apply(entity this)
const float EF_FULLBRIGHT
void CSQCPlayer_FallbackFrame_Apply(entity this)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
void CSQCModel_Hook_PreDraw(entity this, bool isplayer)
int forceplayermodels_saveskin
void CSQCModel_Effects_PreUpdate(entity this)
void CSQCPlayer_FallbackFrame_PreUpdate(entity this)
float frame3time
start time of framegroup animation
int autocvar_cl_forcemyplayercolors
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
float lerpfrac
strength of framegroup blend
void animdecide_setimplicitstate(entity e, float onground)
int CSQCPlayer_FallbackFrame(entity this, int f)
void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer)
float lerpfrac4
strength of framegroup blend
bool forceplayermodels_modelisgoodmodel
const int IFLAG_V_ANGLE_X
float autocvar_cl_loddistance1
void CSQCModel_InterpolateAnimation_2To4_PreNote(entity this, int sf)
bool forceplayermodels_myisgoodmodel
int anim_prev_pmove_flags
const int CH_TRIGGER_SINGLE
#define BITSET(var, mask, flag)
const int CSQCMODEL_PROPERTY_LERPFRAC
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float autocvar_cl_loddistance2
float frame4time
start time of framegroup animation
int forceplayermodels_modelindex
const int CSQCMODEL_PROPERTY_FRAME
int forceplayermodels_savecolormap
void CSQCPlayer_ModelAppearance_PreUpdate(entity this)
const int ISPLAYER_CLIENT
#define MUTATOR_CALLHOOK(id,...)
const int ANIMSTATE_DEAD2
int autocvar_cl_playerdetailreduction
void free_skeleton_from_frames(entity e)
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
void CSQCModel_Hook_PreUpdate(entity this, bool isnew, bool isplayer, bool islocalplayer)
vector CSQCModel_ApplyStairSmoothing(entity this, bool isonground, vector v)
bool autocvar_cl_forceplayermodels
const int ANIMSTATE_DEAD1
int csqcmodel_predraw_run
float autocvar_cl_deathglow
#define sound(e, c, s, v, a)
void CSQCModel_InterpolateAnimation_2To4_Note(entity this, int sf, bool set_times)
ERASEABLE bool fexists(string f)
void skeleton_from_frames(entity e, bool is_dead)
int forceplayermodels_skin
int forceplayermodels_savemodelindex
void skeleton_loadinfo(entity e)
bool forceplayermodels_isgoodmodel
#define FIX_FRAMETIME(f, ft)
float RF_DYNAMICMODELLIGHT
int tag_entity_lastmodelindex
float csqcmodel_teleported
#define colormapPaletteColor(c, isPants)
float frame1time
start time of framegroup animation
bool forceplayermodels_attempted
#define particleeffectnum(e)