35 string modelname = this.
model;
65 _setmodel(
this, modelname);
66 setsize(
this, mi, ma);
70 if(detailreduction <= 0)
72 if(detailreduction <= -2)
74 else if(detailreduction <= -1)
148 goto skipforcemodels;
209 isfriend = (cm == 1024 + 17 *
myteam);
211 isfriend = islocalplayer;
238 LABEL(skipforcemodels)
241 goto skipforcecolors;
243 bool forceplayercolors_enabled =
false;
244 #define fpc autocvar_cl_forceplayercolors
248 forceplayercolors_enabled =
true;
253 forceplayercolors_enabled =
true;
258 forceplayercolors_enabled =
true;
265 int forcecolor_friend = 0, forcecolor_enemy = 0;
271 if(forceplayercolors_enabled)
274 if(forcecolor_enemy && !forcecolor_friend)
278 if(forcecolor_enemy == 1024 + 17 *
myteam)
279 forcecolor_enemy = 0;
282 if(forcecolor_friend && !forcecolor_enemy)
286 for(tm =
teams.sort_next; tm; tm = tm.sort_next)
291 if(forcecolor_friend == 1024 + 17 * tm.team)
292 forcecolor_friend = 0;
295 if(cm == 1024 + 17 *
myteam)
297 if(forcecolor_friend)
322 int q =
floor(num / 15);
323 int c2 = (c1 + 1 + q) % 15;
324 this.
colormap = 1024 + (c1 << 4) + c2;
326 else if(forceplayercolors_enabled)
330 LABEL(skipforcecolors)
353 this.
glowmod *= (min_factor + glow_fade * (1 - min_factor));
369#ifdef CSQCMODEL_HAVE_TWO_FRAMES
370.int csqcmodel_saveframe3;
371.int csqcmodel_saveframe4;
375#define IS_DEAD_FRAME(f) ((f) == 0 || (f) == 1)
380#ifdef CSQCMODEL_HAVE_TWO_FRAMES
381 this.
frame3 = this.csqcmodel_saveframe3;
382 this.
frame4 = this.csqcmodel_saveframe4;
389#ifdef CSQCMODEL_HAVE_TWO_FRAMES
390 this.csqcmodel_saveframe3 = this.
frame3;
391 this.csqcmodel_saveframe4 = this.
frame4;
398#define FIX_FRAMETIME(f,ft) MACRO_BEGIN \
399 if(IS_DEAD_FRAME(this.f) && this.ft != 0 && this.death_time != 0) \
400 this.ft = this.death_time; \
404#ifdef CSQCMODEL_HAVE_TWO_FRAMES
433 LOG_DEBUGF(
"Frame %d missing in model %s, and we have no fallback - FAIL!", f, this.
model);
440#ifdef CSQCMODEL_HAVE_TWO_FRAMES
461 if(this.
tag_entity.entnum !=
this.tag_networkentity)
468 if(this.
tag_entity.classname ==
"ENT_CLIENT_MODEL")
473 if(this.
tag_entity.modelindex !=
this.tag_entity_lastmodelindex)
495 LOG_TRACE(
"h_ model lacks weapon attachment, but v_ model is attached to it");
554 this.traileffect = 0;
556 float pl_alpha = (!this.
alpha ? 1 : this.
alpha);
558 tref = EFFECT_TR_NEXUIZPLASMA.m_id;
584 if (ef_shock_num >= 0)
595 if (ef_shock_num >= 0)
613 if (foot_L_idx && foot_R_idx)
617 if (ef_speed_num >= 0)
630 if (ef_speed_num >= 0)
660#define TRAIL_FROM_MODEL(modelflag, trailent) \
661 else if (this.csqcmodel_modelflags & (modelflag)) \
662 tref = EFFECT_##trailent.m_id
670#undef TRAIL_FROM_MODEL
680 this.traileffect = tref;
747 bool doblend = (this.bone_upperbody >= 0);
765 bool doblend = (this.bone_upperbody >= 0);
800 this.
lerpfrac = (doblend ? 0.5 : 0);
float frame3time
start time of framegroup animation
float frame1time
start time of framegroup animation
float frame2time
start time of framegroup animation
float frame2
secondary framegroup animation (strength = lerpfrac)
float lerpfrac
strength of framegroup blend
float frame3
tertiary framegroup animation (strength = lerpfrac3)
float lerpfrac4
strength of framegroup blend
float frame4time
start time of framegroup animation
float frame4
quaternary framegroup animation (strength = lerpfrac4)
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
void animdecide_setimplicitstate(entity e, float onground)
void animdecide_load_if_needed(entity e)
void animdecide_setframes(entity e, float support_blending,.float fld_frame,.float fld_frame1time,.float fld_frame2,.float fld_frame2time)
void animdecide_setstate(entity e, int newstate, float restart)
const int ANIMSTATE_DEAD1
const int ANIMSTATE_DEAD2
#define MUTATOR_CALLHOOK(id,...)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
#define BITSET(var, mask, flag)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void CSQCModel_InterpolateAnimation_2To4_PreNote(entity this, int sf)
void CSQCModel_InterpolateAnimation_2To4_Note(entity this, int sf, bool set_times)
void CSQCModel_InterpolateAnimation_2To4_Do(entity this)
float csqcmodel_teleported
vector CSQCModel_ApplyStairSmoothing(entity this, bool isonground, vector v)
#define colormapPaletteColor(c, isPants)
const float EF_FULLBRIGHT
const float EF_NODEPTHTEST
const float RF_FULLBRIGHT
float RF_DYNAMICMODELLIGHT
const float PFLAGS_FULLDYNAMIC
int forceplayermodels_savemodelindex
string forceplayermodels_isgoodmodel_mdl
int anim_prev_pmove_flags
string forceplayermodels_mymodel
bool forceplayermodels_isgoodmodel
#define TRAIL_FROM_MODEL(modelflag, trailent)
void CSQCModel_Hook_PreDraw(entity this, bool isplayer)
void CSQCModel_AutoTagIndex_Apply(entity this)
int forceplayermodels_saveskin
void CSQCPlayer_FallbackFrame_Apply(entity this)
int forceplayermodels_skin
void CSQCPlayer_ModelAppearance_PostUpdate(entity this)
void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer)
int tag_entity_lastmodelindex
string forceplayermodels_savemodel
void CSQCModel_Hook_PostUpdate(entity this, bool isnew, bool isplayer, bool islocalplayer)
bool forceplayermodels_attempted
void CSQCModel_LOD_Apply(entity this, bool isplayer)
void CSQCPlayer_FallbackFrame_PreUpdate(entity this)
int forceplayermodels_savecolormap
int forceplayermodels_mymodelindex
void CSQCModel_Effects_PreUpdate(entity this)
void CSQCPlayer_FallbackFrame_PostUpdate(entity this, bool isnew)
void CSQCPlayer_AnimDecide_PostUpdate(entity this, bool isnew)
bool forceplayermodels_myisgoodmodel
int forceplayermodels_modelindex
bool forceplayermodels_modelisgoodmodel
void CSQCModel_Effects_Apply(entity this)
int csqcmodel_predraw_run
#define FIX_FRAMETIME(f, ft)
string forceplayermodels_model
void CSQCModel_Effects_PostUpdate(entity this)
void CSQCPlayer_ModelAppearance_PreUpdate(entity this)
int CSQCPlayer_FallbackFrame(entity this, int f)
int forceplayermodels_goodmodelindex
string forceplayermodels_goodmodel
void CSQCModel_Hook_PreUpdate(entity this, bool isnew, bool isplayer, bool islocalplayer)
bool autocvar_cl_respawn_ghosts_keepcolors
int autocvar_cl_modeldetailreduction
int csqcmodel_traileffect
float autocvar_cl_deathglow
int autocvar_cl_forcemyplayerskin
bool autocvar_cl_forceplayermodels
float autocvar_cl_deathglow_min
int autocvar__cl_playerskin
float autocvar_cl_loddistance1
bool autocvar_cl_forceuniqueplayercolors
float autocvar_cl_loddistance2
string autocvar_cl_forcemyplayermodel
int autocvar_cl_playerdetailreduction
int autocvar_cl_forcemyplayercolors
float autocvar_r_hdr_glowintensity
float autocvar_cl_jetpack_attenuation
const int EF_NOSELFSHADOW
string autocvar__cl_playermodel
const int EF_DYNAMICMODELLIGHT
#define CSQCMODEL_EF_RESPAWNGHOST
#define particleeffectnum(e)
int entcs_GetClientColors(int i)
ERASEABLE bool fexists(string f)
const int IFLAG_V_ANGLE_X
const int CSQCMODEL_PROPERTY_FRAME2
const int CSQCMODEL_PROPERTY_FRAME
const int ISPLAYER_CLIENT
const int CSQCMODEL_PROPERTY_LERPFRAC
void WarpZone_TrailParticles_WithMultiplier(entity own, float eff, vector org, vector end, float f, int boxflags)
float fmod(float e, float f)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void skeleton_loadinfo(entity e)
void skeleton_from_frames(entity e, bool is_dead)
void free_skeleton_from_frames(entity e)
void Projectile_DrawTrail(entity this, vector to)
void Projectile_ResetTrail(entity this, vector to)
const int CH_TRIGGER_SINGLE
#define sound(e, c, s, v, a)
ERASEABLE vector NearestPointOnBox(entity box, vector org)