34 string modelname = this.
model;
64 _setmodel(
this, modelname);
65 setsize(
this, mi, ma);
69 if(detailreduction <= 0)
71 if(detailreduction <= -2)
73 else if(detailreduction <= -1)
147 goto skipforcemodels;
208 isfriend = (cm == 1024 + 17 *
myteam);
210 isfriend = islocalplayer;
237 LABEL(skipforcemodels)
240 goto skipforcecolors;
242 bool forceplayercolors_enabled =
false;
243 #define fpc autocvar_cl_forceplayercolors
247 forceplayercolors_enabled =
true;
252 forceplayercolors_enabled =
true;
257 forceplayercolors_enabled =
true;
264 int forcecolor_friend = 0, forcecolor_enemy = 0;
270 if(forceplayercolors_enabled)
273 if(forcecolor_enemy && !forcecolor_friend)
277 if(forcecolor_enemy == 1024 + 17 *
myteam)
278 forcecolor_enemy = 0;
281 if(forcecolor_friend && !forcecolor_enemy)
285 for(tm =
teams.sort_next; tm; tm = tm.sort_next)
290 if(forcecolor_friend == 1024 + 17 * tm.team)
291 forcecolor_friend = 0;
294 if(cm == 1024 + 17 *
myteam)
296 if(forcecolor_friend)
321 int q =
floor(num / 15);
322 int c2 = (c1 + 1 + q) % 15;
323 this.
colormap = 1024 + (c1 << 4) + c2;
325 else if(forceplayercolors_enabled)
329 LABEL(skipforcecolors)
352 this.
glowmod *= (min_factor + glow_fade * (1 - min_factor));
368#ifdef CSQCMODEL_HAVE_TWO_FRAMES
369.int csqcmodel_saveframe3;
370.int csqcmodel_saveframe4;
374#define IS_DEAD_FRAME(f) ((f) == 0 || (f) == 1)
379#ifdef CSQCMODEL_HAVE_TWO_FRAMES
380 this.
frame3 = this.csqcmodel_saveframe3;
381 this.
frame4 = this.csqcmodel_saveframe4;
388#ifdef CSQCMODEL_HAVE_TWO_FRAMES
389 this.csqcmodel_saveframe3 = this.
frame3;
390 this.csqcmodel_saveframe4 = this.
frame4;
397#define FIX_FRAMETIME(f,ft) MACRO_BEGIN \
398 if(IS_DEAD_FRAME(this.f) && this.ft != 0 && this.death_time != 0) \
399 this.ft = this.death_time; \
403#ifdef CSQCMODEL_HAVE_TWO_FRAMES
432 LOG_DEBUGF(
"Frame %d missing in model %s, and we have no fallback - FAIL!", f, this.
model);
439#ifdef CSQCMODEL_HAVE_TWO_FRAMES
460 if(this.
tag_entity.entnum !=
this.tag_networkentity)
467 if(this.
tag_entity.classname ==
"ENT_CLIENT_MODEL")
472 if(this.
tag_entity.modelindex !=
this.tag_entity_lastmodelindex)
494 LOG_TRACE(
"h_ model lacks weapon attachment, but v_ model is attached to it");
552 this.traileffect = 0;
555 tref = EFFECT_TR_NEXUIZPLASMA.m_id;
577 if (ef_shock_num >= 0)
587 if (ef_shock_num >= 0)
612 tref = EFFECT_TR_ROCKET.m_id;
614 tref = EFFECT_TR_GRENADE.m_id;
616 tref = EFFECT_TR_BLOOD.m_id;
626 tref = EFFECT_TR_WIZSPIKE.m_id;
628 tref = EFFECT_TR_SLIGHTBLOOD.m_id;
630 tref = EFFECT_TR_KNIGHTSPIKE.m_id;
632 tref = EFFECT_TR_VORESPIKE.m_id;
634 this.traileffect = tref;
701 bool doblend = (this.bone_upperbody >= 0);
719 bool doblend = (this.bone_upperbody >= 0);
754 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
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
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)