Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
csqcmodel_hooks.qc File Reference
Include dependency graph for csqcmodel_hooks.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FIX_FRAMETIME(f, ft)
#define fpc   autocvar_cl_forceplayercolors
#define IS_DEAD_FRAME(f)

Functions

void CSQCModel_AutoTagIndex_Apply (entity this)
void CSQCModel_Effects_Apply (entity this)
void CSQCModel_Effects_PostUpdate (entity this)
void CSQCModel_Effects_PreUpdate (entity this)
void CSQCModel_Hook_PostUpdate (entity this, bool isnew, bool isplayer, bool islocalplayer)
void CSQCModel_Hook_PreDraw (entity this, bool isplayer)
void CSQCModel_Hook_PreUpdate (entity this, bool isnew, bool isplayer, bool islocalplayer)
void CSQCModel_LOD_Apply (entity this, bool isplayer)
void CSQCPlayer_AnimDecide_PostUpdate (entity this, bool isnew)
int CSQCPlayer_FallbackFrame (entity this, int f)
void CSQCPlayer_FallbackFrame_Apply (entity this)
void CSQCPlayer_FallbackFrame_PostUpdate (entity this, bool isnew)
void CSQCPlayer_FallbackFrame_PreUpdate (entity this)
void CSQCPlayer_ModelAppearance_Apply (entity this, bool islocalplayer)
void CSQCPlayer_ModelAppearance_PostUpdate (entity this)
void CSQCPlayer_ModelAppearance_PreUpdate (entity this)
void Reset_ArcBeam ()

Variables

int anim_frame
int anim_frame1time
int anim_frame2
int anim_frame2time
int anim_prev_pmove_flags
int anim_saveframe
int anim_saveframe1time
int anim_saveframe2
int anim_saveframe2time
int csqcmodel_framecount
int csqcmodel_predraw_run
int csqcmodel_saveframe
int csqcmodel_saveframe2
bool forceplayermodels_attempted
string forceplayermodels_goodmodel
int forceplayermodels_goodmodelindex
bool forceplayermodels_isgoodmodel
string forceplayermodels_isgoodmodel_mdl
string forceplayermodels_model
int forceplayermodels_modelindex
bool forceplayermodels_modelisgoodmodel
bool forceplayermodels_myisgoodmodel
string forceplayermodels_mymodel
int forceplayermodels_mymodelindex
int forceplayermodels_savecolormap
string forceplayermodels_savemodel
int forceplayermodels_savemodelindex
int forceplayermodels_saveskin
int forceplayermodels_skin
vector glowmod
float loddistance1
float loddistance2
int lodmodelindex0
int lodmodelindex1
int lodmodelindex2
int modelflags
int snd_looping
entity tag_entity
int tag_entity_lastmodelindex
int tag_index

Macro Definition Documentation

◆ FIX_FRAMETIME

#define FIX_FRAMETIME ( f,
ft )
Value:
MACRO_BEGIN \
if(IS_DEAD_FRAME(this.f) && this.ft != 0 && this.death_time != 0) \
this.ft = this.death_time; \
#define IS_DEAD_FRAME(f)
float death_time
#define MACRO_END
Definition macro.qh:7

Referenced by CSQCPlayer_FallbackFrame_PostUpdate().

◆ fpc

◆ IS_DEAD_FRAME

#define IS_DEAD_FRAME ( f)
Value:
((f) == 0 || (f) == 1)

Definition at line 374 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_FallbackFrame_PostUpdate().

Function Documentation

◆ CSQCModel_AutoTagIndex_Apply()

void CSQCModel_AutoTagIndex_Apply ( entity this)

Definition at line 449 of file csqcmodel_hooks.qc.

450{
451 if(this.tag_entity && wasfreed(this.tag_entity))
452 this.tag_entity = NULL;
453
454 MUTATOR_CALLHOOK(TagIndex_Update, this);
455
456 if(this.tag_networkentity)
457 {
458 // we are ATTACHED!
459 bool changed = 0;
460 if(this.tag_entity.entnum != this.tag_networkentity)
461 {
463 changed = 1;
464 }
465
466 // recursive predraw call to fix issues with forcemodels and LOD if bone indexes mismatch
467 if(this.tag_entity.classname == "ENT_CLIENT_MODEL")
468 {
469 CSQCModel_Hook_PreDraw(this.tag_entity, (this.tag_entity.isplayermodel & ISPLAYER_CLIENT));
470 }
471
472 if(this.tag_entity.modelindex != this.tag_entity_lastmodelindex)
473 {
474 this.tag_entity_lastmodelindex = this.tag_entity.modelindex;
475 changed = 1;
476 }
477 if(changed)
478 {
479 if(this.tag_entity)
480 {
481 // the best part is: IT EXISTS
482 if(substring(this.model, 0, 14) == "models/weapons")
483 {
484 if(substring(this.tag_entity.model, 0, 14) == "models/weapons")
485 {
486 this.tag_index = gettagindex(this.tag_entity, "weapon");
487 if(!this.tag_index)
488 this.tag_index = gettagindex(this.tag_entity, "tag_weapon");
489 if(!this.tag_index)
490 {
491 // we need to prevent this from 'appening
492 this.tag_entity = NULL;
493 this.drawmask = 0;
494 LOG_TRACE("h_ model lacks weapon attachment, but v_ model is attached to it");
495 }
496 }
497 else if((this.tag_entity.isplayermodel & ISPLAYER_MODEL))
498 {
500 this.tag_index = this.tag_entity.bone_weapon;
501 }
502 }
503
504 if(substring(this.tag_entity.model, 0, 14) == "models/weapons")
505 {
506 this.tag_index = gettagindex(this.tag_entity, "shot");
507 if(!this.tag_index)
508 this.tag_index = gettagindex(this.tag_entity, "tag_shot");
509 }
510
511 MUTATOR_CALLHOOK(TagIndex_Apply, this);
512 }
513 else
514 {
515 // damn, see you next frame
516 this.drawmask = 0;
517 }
518 }
519 }
520}
#define MUTATOR_CALLHOOK(id,...)
Definition base.qh:143
float drawmask
float entnum
void CSQCModel_Hook_PreDraw(entity this, bool isplayer)
int tag_entity_lastmodelindex
entity tag_entity
int tag_index
float tag_networkentity
#define gettagindex
model
Definition ent_cs.qc:139
const int ISPLAYER_MODEL
Definition common.qh:56
const int ISPLAYER_CLIENT
Definition common.qh:57
#define LOG_TRACE(...)
Definition log.qh:76
string substring(string s, float start, float length)
entity findfloat(entity start,.float field, float match)
void skeleton_loadinfo(entity e)
#define NULL
Definition post.qh:14

References CSQCModel_Hook_PreDraw(), drawmask, entity(), entnum, findfloat(), gettagindex, ISPLAYER_CLIENT, ISPLAYER_MODEL, LOG_TRACE, model, MUTATOR_CALLHOOK, NULL, skeleton_loadinfo(), substring(), tag_entity, tag_entity_lastmodelindex, tag_index, and tag_networkentity.

Referenced by CSQCModel_Hook_PreDraw().

◆ CSQCModel_Effects_Apply()

void CSQCModel_Effects_Apply ( entity this)

Definition at line 545 of file csqcmodel_hooks.qc.

546{
548 int tref = this.csqcmodel_traileffect;
549
551 this.effects = 0;
552 this.traileffect = 0;
553
554 if(eff & EF_BRIGHTFIELD)
555 tref = EFFECT_TR_NEXUIZPLASMA.m_id;
556 // ignoring EF_MUZZLEFLASH
557 if(eff & EF_BRIGHTLIGHT)
558 adddynamiclight(this.origin, 400, '3 3 3');
559 if(eff & EF_DIMLIGHT)
560 adddynamiclight(this.origin, 200, '1.5 1.5 1.5');
561 if((eff & EF_NODRAW) || (this.alpha < 0))
562 this.drawmask = 0;
563 if(eff & EF_ADDITIVE)
564 this.renderflags |= RF_ADDITIVE;
565 if(eff & EF_BLUE)
566 adddynamiclight(this.origin, 200, '0.15 0.15 1.5');
567 if(eff & EF_RED)
568 adddynamiclight(this.origin, 200, '1.5 0.15 0.15');
569 // ignoring EF_NOGUNBOB
570 if(eff & EF_FULLBRIGHT)
572 if(eff & EF_FLAME)
573 {
574 // XONRELEASE TODO: xonotic-v0.9.0 after release remove the ef_shock_num check
575 // NOTE here we check if EF_SHOCK exists because it was added together with the change to EF_FLAME
576 int ef_shock_num = particleeffectnum(EFFECT_EF_SHOCK);
577 if (ef_shock_num >= 0) // in the old version of EF_FLAME the light was spawned by boxparticles
578 adddynamiclight2(this.origin + '0 0 10', 200, '1 0.35 0', 6, "", PFLAGS_FULLDYNAMIC); // no PFLAGS_CORONA, it looks bad
579 int ef_flame_num = particleeffectnum(EFFECT_EF_FLAME);
580 boxparticles(ef_flame_num, this, this.absmin, this.absmax, this.velocity, this.velocity, bound(0, frametime, 0.1), 0);
581 //pointparticles(EFFECT_EF_FLAME, this.origin, '0 0 0', bound(0, frametime, 0.1));
582 }
583 if(eff & EF_SHOCK)
584 {
585 // XONRELEASE TODO: xonotic-v0.9.0 after release remove the ef_shock_num check
586 int ef_shock_num = particleeffectnum(EFFECT_EF_SHOCK);
587 if (ef_shock_num >= 0) // in ARC_LIGHTNING the light is spawned by boxparticles
588 adddynamiclight2(this.origin, 50, '3.1 4.4 10', 10, "", PFLAGS_FULLDYNAMIC); // no PFLAGS_CORONA, it looks bad
589 else
590 ef_shock_num = particleeffectnum(EFFECT_ARC_LIGHTNING);
591 boxparticles(ef_shock_num, this, this.absmin, this.absmax, '0 0 0', '0 0 0', bound(0, frametime, 0.1), 0);
592 //pointparticles(EFFECT_ARC_LIGHTNING, this.origin, '0 0 0', bound(0, frametime, 0.1));
593 }
594 if(eff & EF_STARDUST)
595 {
596 boxparticles(particleeffectnum(EFFECT_EF_STARDUST), this, this.absmin, this.absmax, this.velocity, this.velocity, bound(0, frametime, 0.1), 0);
597 //pointparticles(EFFECT_EF_STARDUST, this.origin, '0 0 0', bound(0, frametime, 0.1));
598 }
599 if(eff & EF_NOSHADOW)
600 this.renderflags |= RF_NOSHADOW;
601 if(eff & EF_NODEPTHTEST)
603 // ignoring EF_SELECTABLE
604 if(eff & EF_DOUBLESIDED)
605 this.effects |= EF_DOUBLESIDED;
606 if(eff & EF_NOSELFSHADOW)
607 this.effects |= EF_NOSELFSHADOW;
608 if(eff & EF_DYNAMICMODELLIGHT)
610 // ignoring EF_UNUSED18, EF_UNUSED19, EF_RESTARTANIM_BIT, EF_TELEPORT_BIT, EF_LOWPRECISION
612 tref = EFFECT_TR_ROCKET.m_id;
614 tref = EFFECT_TR_GRENADE.m_id;
616 tref = EFFECT_TR_BLOOD.m_id;
618 {
619 // This will be hard to replace with MAKE_VECTORS because it's called as part of the predraw function
620 // as documented in csprogs.h in the engine. The globals can then be read in many places in the engine.
621 // However MF_ROTATE is currently only used in one place - might be possible to get rid of it entirely.
622 this.renderflags |= RF_USEAXIS;
623 makevectors(this.angles + '0 100 0' * fmod(time, 3.6));
624 }
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;
633
634 this.traileffect = tref;
635
636 if(this.drawmask)
637 Projectile_DrawTrail(this, this.origin);
638 else
639 Projectile_ResetTrail(this, this.origin);
640
642 this.renderflags |= RF_ADDITIVE;
643 // also special in CSQCPlayer_GlowMod_Apply
644
646 {
647 if(!this.snd_looping)
648 {
651 }
652 }
653 else
654 {
655 if(this.snd_looping)
656 {
658 this.snd_looping = 0;
659 }
660 }
661}
float alpha
Definition items.qc:13
float renderflags
Definition main.qh:111
const int EF_SHOCK
Definition constants.qh:103
const float EF_STARDUST
const float RF_ADDITIVE
const float RF_USEAXIS
float frametime
const float EF_RED
vector velocity
const float EF_ADDITIVE
const float EF_FULLBRIGHT
float effects
float time
const float EF_FLAME
const float EF_BLUE
vector absmax
const float EF_NODEPTHTEST
vector origin
vector absmin
const float RF_FULLBRIGHT
float RF_DYNAMICMODELLIGHT
const float EF_NOSHADOW
const float EF_NODRAW
const float RF_NOSHADOW
const float RF_DEPTHHACK
const float PFLAGS_FULLDYNAMIC
int snd_looping
const int MF_ROTATE
const int MF_GRENADE
const int MF_TRACER3
int csqcmodel_traileffect
int csqcmodel_effects
const int MF_TRACER
const int EF_BRIGHTFIELD
const int MF_ROCKET
const int MF_GIB
const int EF_BRIGHTLIGHT
const int MF_ZOMGIB
const int EF_DIMLIGHT
float autocvar_cl_jetpack_attenuation
int csqcmodel_modelflags
const int MF_TRACER2
const int EF_NOSELFSHADOW
const int EF_DOUBLESIDED
const int EF_DYNAMICMODELLIGHT
#define CSQCMODEL_EF_RESPAWNGHOST
#define particleeffectnum(e)
Definition effect.qh:3
ent angles
Definition ent_cs.qc:121
float fmod(float e, float f)
Definition mathlib.qc:208
float bound(float min, float value, float max)
#define makevectors
Definition post.qh:21
#define adddynamiclight2
Definition post.qh:30
#define adddynamiclight
Definition post.qh:29
void Projectile_DrawTrail(entity this, vector to)
Definition projectile.qc:30
void Projectile_ResetTrail(entity this, vector to)
Definition projectile.qc:24
const int CH_TRIGGER_SINGLE
Definition sound.qh:13
const float VOL_BASE
Definition sound.qh:36
#define sound(e, c, s, v, a)
Definition sound.qh:52

References absmax, absmin, adddynamiclight, adddynamiclight2, alpha, angles, autocvar_cl_jetpack_attenuation, bound(), CH_TRIGGER_SINGLE, CSQCMODEL_EF_RESPAWNGHOST, csqcmodel_effects, csqcmodel_modelflags, csqcmodel_traileffect, drawmask, EF_ADDITIVE, EF_BLUE, EF_BRIGHTFIELD, EF_BRIGHTLIGHT, EF_DIMLIGHT, EF_DOUBLESIDED, EF_DYNAMICMODELLIGHT, EF_FLAME, EF_FULLBRIGHT, EF_NODEPTHTEST, EF_NODRAW, EF_NOSELFSHADOW, EF_NOSHADOW, EF_RED, EF_SHOCK, EF_STARDUST, effects, entity(), fmod(), frametime, makevectors, MF_GIB, MF_GRENADE, MF_ROCKET, MF_ROTATE, MF_TRACER, MF_TRACER2, MF_TRACER3, MF_ZOMGIB, origin, particleeffectnum, PFLAGS_FULLDYNAMIC, Projectile_DrawTrail(), Projectile_ResetTrail(), renderflags, RF_ADDITIVE, RF_DEPTHHACK, RF_DYNAMICMODELLIGHT, RF_FULLBRIGHT, RF_NOSHADOW, RF_USEAXIS, snd_looping, sound, time, velocity, and VOL_BASE.

Referenced by CSQCModel_Hook_PreDraw(), and viewmodel_draw().

◆ CSQCModel_Effects_PostUpdate()

void CSQCModel_Effects_PostUpdate ( entity this)

Definition at line 529 of file csqcmodel_hooks.qc.

530{
531 if (this == csqcplayer) {
532 if (this.csqcmodel_teleported) {
534 }
535 }
536 this.csqcmodel_effects = this.effects;
538 this.csqcmodel_traileffect = this.traileffect;
539 this.effects = 0;
540 this.modelflags = 0;
541 if(this.csqcmodel_teleported)
542 Projectile_ResetTrail(this, this.origin);
543}
float csqcmodel_teleported
Definition cl_model.qh:39
entity csqcplayer
Definition cl_player.qh:26
int modelflags
void Reset_ArcBeam()
Definition arc.qc:852

References csqcmodel_effects, csqcmodel_modelflags, csqcmodel_teleported, csqcmodel_traileffect, csqcplayer, effects, entity(), modelflags, origin, Projectile_ResetTrail(), and Reset_ArcBeam().

Referenced by CSQCModel_Hook_PostUpdate().

◆ CSQCModel_Effects_PreUpdate()

void CSQCModel_Effects_PreUpdate ( entity this)

Definition at line 522 of file csqcmodel_hooks.qc.

523{
524 this.effects = this.csqcmodel_effects;
526 this.traileffect = this.csqcmodel_traileffect;
527}

References csqcmodel_effects, csqcmodel_modelflags, csqcmodel_traileffect, effects, entity(), and modelflags.

Referenced by CSQCModel_Hook_PreUpdate().

◆ CSQCModel_Hook_PostUpdate()

void CSQCModel_Hook_PostUpdate ( entity this,
bool isnew,
bool isplayer,
bool islocalplayer )

Definition at line 796 of file csqcmodel_hooks.qc.

797{
798 // is it a player model? (shared state)
799 bool is_playermodel = (substring(this.model, 0, 14) == "models/player/" || substring(this.model, 0, 17) == "models/ok_player/" ||
800 (substring(this.model, 0, 16) == "models/monsters/" && (this.isplayermodel & BIT(1))));
801 this.isplayermodel = BITSET(this.isplayermodel, ISPLAYER_MODEL, is_playermodel);
802 this.csqcmodel_isdead = false; // workaround for dead players who become a spectator
803
804 // save values set by server
805 if((this.isplayermodel & ISPLAYER_MODEL))
806 {
808 if(isplayer)
810 else
812 }
814}
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
#define BITSET(var, mask, flag)
Definition bits.qh:11
void CSQCPlayer_ModelAppearance_PostUpdate(entity this)
void CSQCPlayer_FallbackFrame_PostUpdate(entity this, bool isnew)
void CSQCPlayer_AnimDecide_PostUpdate(entity this, bool isnew)
void CSQCModel_Effects_PostUpdate(entity this)
bool csqcmodel_isdead
int isplayermodel

References BIT, BITSET, CSQCModel_Effects_PostUpdate(), csqcmodel_isdead, CSQCPlayer_AnimDecide_PostUpdate(), CSQCPlayer_FallbackFrame_PostUpdate(), CSQCPlayer_ModelAppearance_PostUpdate(), entity(), ISPLAYER_MODEL, isplayermodel, model, and substring().

Referenced by NET_HANDLE().

◆ CSQCModel_Hook_PreDraw()

void CSQCModel_Hook_PreDraw ( entity this,
bool isplayer )

Definition at line 674 of file csqcmodel_hooks.qc.

675{
677 return;
679
680 if(!this.modelindex || this.model == "null")
681 {
682 this.drawmask = 0;
683 if(this.snd_looping > 0)
684 {
686 this.snd_looping = 0;
687 }
688 return;
689 }
690 else
691 this.drawmask = MASK_NORMAL;
692
693 if((this.isplayermodel & ISPLAYER_MODEL) && this.drawmask) // this checks if it's a player MODEL!
694 {
696 CSQCModel_LOD_Apply(this, true);
697
698 if(!isplayer)
699 {
700 skeleton_loadinfo(this);
701 bool doblend = (this.bone_upperbody >= 0);
703 if(doblend)
704 {
706 }
707 else
708 {
710 // just in case, clear these (we're animating in frame and frame3)
711 this.lerpfrac = 0;
712 this.lerpfrac4 = 0;
713 }
714 }
715 else
716 {
717 // we know that frame3 and frame4 fields, used by InterpolateAnimation, are left alone - but that is all we know!
718 skeleton_loadinfo(this);
719 bool doblend = (this.bone_upperbody >= 0);
720 bool onground = 0;
721 if(this == csqcplayer)
722 {
723 if(IS_ONGROUND(this))
724 onground = 1;
725 this.anim_prev_pmove_flags = this.flags;
726 if(this.flags & FL_DUCKED)
727 animdecide_setstate(this, this.anim_state | ANIMSTATE_DUCK, false);
728 else if(this.anim_state & ANIMSTATE_DUCK)
729 animdecide_setstate(this, this.anim_state - ANIMSTATE_DUCK, false);
730 }
731 else
732 {
733 tracebox(this.origin + '0 0 1', this.mins, this.maxs, this.origin - '0 0 4', MOVE_NORMAL, this);
735 onground = 1;
736 // predicted clients handle smoothing in the prediction code
737 this.origin = CSQCModel_ApplyStairSmoothing(this, onground, this.origin);
738 }
740 animdecide_setimplicitstate(this, onground);
742 int sf = 0;
743 if(this.anim_saveframe != this.anim_frame || this.anim_saveframe1time != this.anim_frame1time)
745 if(this.anim_saveframe2 != this.anim_frame2 || this.anim_saveframe2time != this.anim_frame2time)
747 this.anim_saveframe = this.anim_frame;
749 this.anim_saveframe2 = this.anim_frame2;
751 // Note: we always consider lerpfrac "changed", as it uses fixed values every time anyway.
752 // This ensures that .frame etc. are always written.
754 this.lerpfrac = (doblend ? 0.5 : 0);
755 this.frame = this.anim_frame;
756 this.frame1time = this.anim_frame1time;
757 this.frame2 = this.anim_frame2;
758 this.frame2time = this.anim_frame2time;
761 if(doblend)
762 {
764 }
765 else
766 {
768 // just in case, clear these (we're animating in frame and frame3)
769 this.lerpfrac = 0;
770 this.lerpfrac4 = 0;
771 }
772 }
773 }
774 else
775 CSQCModel_LOD_Apply(this, false);
776
778
780}
float frame1time
start time of framegroup animation
Definition anim.qh:22
float frame2time
start time of framegroup animation
Definition anim.qh:24
float frame2
secondary framegroup animation (strength = lerpfrac)
Definition anim.qh:8
float lerpfrac
strength of framegroup blend
Definition anim.qh:15
float lerpfrac4
strength of framegroup blend
Definition anim.qh:19
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
Definition anim.qh:6
void animdecide_setimplicitstate(entity e, float onground)
void animdecide_load_if_needed(entity e)
Definition animdecide.qc:53
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)
int anim_state
const int ANIMSTATE_DUCK
void CSQCModel_InterpolateAnimation_2To4_PreNote(entity this, int sf)
Definition cl_model.qc:37
void CSQCModel_InterpolateAnimation_2To4_Note(entity this, int sf, bool set_times)
Definition cl_model.qc:73
void CSQCModel_InterpolateAnimation_2To4_Do(entity this)
Definition cl_model.qc:109
vector CSQCModel_ApplyStairSmoothing(entity this, bool isonground, vector v)
Definition cl_player.qc:248
int framecount
Definition main.qh:180
const int FL_DUCKED
Definition constants.qh:89
float flags
float modelindex
const float MASK_NORMAL
const float MOVE_NORMAL
vector mins
float trace_startsolid
vector maxs
float trace_fraction
int anim_prev_pmove_flags
int anim_saveframe2
int anim_frame2
void CSQCModel_AutoTagIndex_Apply(entity this)
void CSQCPlayer_FallbackFrame_Apply(entity this)
int anim_frame
int anim_frame1time
int anim_frame2time
void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer)
void CSQCModel_LOD_Apply(entity this, bool isplayer)
int anim_saveframe1time
void CSQCModel_Effects_Apply(entity this)
int csqcmodel_predraw_run
int anim_saveframe
int anim_saveframe2time
const int CSQCMODEL_PROPERTY_FRAME2
Definition common.qh:67
const int ISPLAYER_LOCAL
Definition common.qh:58
const int CSQCMODEL_PROPERTY_FRAME
Definition common.qh:61
const int CSQCMODEL_PROPERTY_LERPFRAC
Definition common.qh:68
#define IS_ONGROUND(s)
Definition movetypes.qh:16
void skeleton_from_frames(entity e, bool is_dead)
void free_skeleton_from_frames(entity e)

References anim_frame, anim_frame1time, anim_frame2, anim_frame2time, anim_prev_pmove_flags, anim_saveframe, anim_saveframe1time, anim_saveframe2, anim_saveframe2time, anim_state, animdecide_load_if_needed(), animdecide_setframes(), animdecide_setimplicitstate(), animdecide_setstate(), ANIMSTATE_DUCK, autocvar_cl_jetpack_attenuation, CSQCModel_ApplyStairSmoothing(), CSQCModel_AutoTagIndex_Apply(), CSQCModel_Effects_Apply(), CSQCModel_InterpolateAnimation_2To4_Do(), CSQCModel_InterpolateAnimation_2To4_Note(), CSQCModel_InterpolateAnimation_2To4_PreNote(), csqcmodel_isdead, CSQCModel_LOD_Apply(), csqcmodel_predraw_run, CSQCMODEL_PROPERTY_FRAME, CSQCMODEL_PROPERTY_FRAME2, CSQCMODEL_PROPERTY_LERPFRAC, csqcplayer, CSQCPlayer_FallbackFrame_Apply(), CSQCPlayer_ModelAppearance_Apply(), drawmask, entity(), FL_DUCKED, flags, frame, frame1time, frame2, frame2time, framecount, free_skeleton_from_frames(), IS_ONGROUND, ISPLAYER_LOCAL, ISPLAYER_MODEL, isplayermodel, lerpfrac, lerpfrac4, MASK_NORMAL, maxs, mins, model, modelindex, MOVE_NORMAL, origin, skeleton_from_frames(), skeleton_loadinfo(), snd_looping, sound, trace_fraction, trace_startsolid, and VOL_BASE.

Referenced by CSQCModel_AutoTagIndex_Apply(), and CSQCModel_Draw().

◆ CSQCModel_Hook_PreUpdate()

void CSQCModel_Hook_PreUpdate ( entity this,
bool isnew,
bool isplayer,
bool islocalplayer )

Definition at line 782 of file csqcmodel_hooks.qc.

783{
784 // interpolate v_angle
785 this.iflags |= IFLAG_V_ANGLE_X;
786 // revert to values from server
788 if((this.isplayermodel & ISPLAYER_MODEL))
789 {
790 if(!isplayer)
793 }
794}
void CSQCPlayer_FallbackFrame_PreUpdate(entity this)
void CSQCModel_Effects_PreUpdate(entity this)
void CSQCPlayer_ModelAppearance_PreUpdate(entity this)
const int IFLAG_V_ANGLE_X
int iflags

References CSQCModel_Effects_PreUpdate(), CSQCPlayer_FallbackFrame_PreUpdate(), CSQCPlayer_ModelAppearance_PreUpdate(), entity(), IFLAG_V_ANGLE_X, iflags, ISPLAYER_MODEL, and isplayermodel.

Referenced by NET_HANDLE().

◆ CSQCModel_LOD_Apply()

void CSQCModel_LOD_Apply ( entity this,
bool isplayer )

Definition at line 27 of file csqcmodel_hooks.qc.

28{
29 int detailreduction = ((isplayer) ? autocvar_cl_playerdetailreduction : autocvar_cl_modeldetailreduction);
30
31 // LOD model loading
32 if(this.lodmodelindex0 != this.modelindex && this.lodmodelindex1 != this.modelindex && this.lodmodelindex2 != this.modelindex)
33 {
34 string modelname = this.model;
35 string s;
36
37 vector mi = this.mins;
38 vector ma = this.maxs;
39
40 // set modelindex
41 this.lodmodelindex0 = this.modelindex;
42 this.lodmodelindex1 = this.modelindex;
43 this.lodmodelindex2 = this.modelindex;
44
45 // FIXME: this only supports 3-letter extensions
46 s = strcat(substring(modelname, 0, strlen(modelname)-4), "_lod1", substring(modelname, -4, 4));
47 if(fexists(s))
48 {
49 precache_model(s);
50 _setmodel(this, s);
51 if(this.modelindex)
52 this.lodmodelindex2 = this.lodmodelindex1 = this.modelindex;
53 }
54
55 s = strcat(substring(modelname, 0, strlen(modelname)-4), "_lod2", substring(modelname, -4, 4));
56 if(fexists(s))
57 {
58 precache_model(s);
59 _setmodel(this, s);
60 if(this.modelindex)
61 this.lodmodelindex2 = this.modelindex;
62 }
63
64 _setmodel(this, modelname); // make everything normal again
65 setsize(this, mi, ma);
66 }
67
68 // apply LOD
69 if(detailreduction <= 0)
70 {
71 if(detailreduction <= -2)
72 this.modelindex = this.lodmodelindex2;
73 else if(detailreduction <= -1)
74 this.modelindex = this.lodmodelindex1;
75 else
76 this.modelindex = this.lodmodelindex0;
77 }
78 else
79 {
80 float distance = vlen(((isplayer) ? this.origin : NearestPointOnBox(this, view_origin)) - view_origin); // TODO: perhaps it should just use NearestPointOnBox all the time, player hitbox can potentially be huge
81 float dist1 = (this.loddistance1 > 0) ? this.loddistance1 : autocvar_cl_loddistance1;
82 float dist2 = (this.loddistance2 > 0) ? this.loddistance2 : autocvar_cl_loddistance2;
83 float f = (distance * current_viewzoom + 100.0) * detailreduction;
84 f *= 1.0 / bound(0.01, view_quality, 1);
85 if(f > dist2)
86 this.modelindex = this.lodmodelindex2;
87 else if(f > dist1)
88 this.modelindex = this.lodmodelindex1;
89 else
90 this.modelindex = this.lodmodelindex0;
91 }
92}
float current_viewzoom
Definition main.qh:118
vector view_origin
Definition main.qh:109
float view_quality
Definition main.qh:174
int lodmodelindex2
float loddistance2
int lodmodelindex1
float loddistance1
int lodmodelindex0
int autocvar_cl_modeldetailreduction
float autocvar_cl_loddistance1
float autocvar_cl_loddistance2
int autocvar_cl_playerdetailreduction
#define strlen
ERASEABLE bool fexists(string f)
Definition file.qh:4
float vlen(vector v)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
vector
Definition self.qh:92
ERASEABLE vector NearestPointOnBox(entity box, vector org)
Definition vector.qh:178

References autocvar_cl_loddistance1, autocvar_cl_loddistance2, autocvar_cl_modeldetailreduction, autocvar_cl_playerdetailreduction, bound(), current_viewzoom, entity(), fexists(), loddistance1, loddistance2, lodmodelindex0, lodmodelindex1, lodmodelindex2, maxs, mins, model, modelindex, NearestPointOnBox(), origin, strcat(), strlen, substring(), vector, view_origin, view_quality, and vlen().

Referenced by CSQCModel_Hook_PreDraw().

◆ CSQCPlayer_AnimDecide_PostUpdate()

void CSQCPlayer_AnimDecide_PostUpdate ( entity this,
bool isnew )

Definition at line 410 of file csqcmodel_hooks.qc.

411{
413}
const int ANIMSTATE_DEAD1
const int ANIMSTATE_DEAD2
#define boolean(value)
Definition bool.qh:9

References anim_state, ANIMSTATE_DEAD1, ANIMSTATE_DEAD2, boolean, csqcmodel_isdead, and entity().

Referenced by CSQCModel_Hook_PostUpdate().

◆ CSQCPlayer_FallbackFrame()

int CSQCPlayer_FallbackFrame ( entity this,
int f )

Definition at line 414 of file csqcmodel_hooks.qc.

415{
416 TC(int, f);
417 if(frameduration(this.modelindex, f) > 0)
418 return f; // goooooood
419 if(frameduration(this.modelindex, 1) <= 0)
420 return f; // this is a static model. We can't fix it if we wanted to
421 switch(f)
422 {
423 case 23: return 11; // anim_melee -> anim_shoot
424 case 24: return 4; // anim_duckwalkbackwards -> anim_duckwalk
425 case 25: return 4; // anim_duckwalkstrafeleft -> anim_duckwalk
426 case 26: return 4; // anim_duckwalkstraferight -> anim_duckwalk
427 case 27: return 4; // anim_duckwalkforwardright -> anim_duckwalk
428 case 28: return 4; // anim_duckwalkforwardleft -> anim_duckwalk
429 case 29: return 4; // anim_duckwalkbackright -> anim_duckwalk
430 case 30: return 4; // anim_duckwalkbackleft -> anim_duckwalk
431 }
432 LOG_DEBUGF("Frame %d missing in model %s, and we have no fallback - FAIL!", f, this.model);
433 return f;
434}
#define TC(T, sym)
Definition _all.inc:82
#define LOG_DEBUGF(...)
Definition log.qh:81

References entity(), LOG_DEBUGF, model, modelindex, and TC.

Referenced by CSQCPlayer_FallbackFrame_Apply().

◆ CSQCPlayer_FallbackFrame_Apply()

void CSQCPlayer_FallbackFrame_Apply ( entity this)

Definition at line 435 of file csqcmodel_hooks.qc.

436{
437 this.frame = CSQCPlayer_FallbackFrame(this, this.frame);
438 this.frame2 = CSQCPlayer_FallbackFrame(this, this.frame2);
439#ifdef CSQCMODEL_HAVE_TWO_FRAMES
440 this.frame3 = CSQCPlayer_FallbackFrame(this, this.frame3);
441 this.frame4 = CSQCPlayer_FallbackFrame(this, this.frame4);
442#endif
443}
float frame3
tertiary framegroup animation (strength = lerpfrac3)
Definition anim.qh:10
float frame4
quaternary framegroup animation (strength = lerpfrac4)
Definition anim.qh:12
int CSQCPlayer_FallbackFrame(entity this, int f)

References CSQCPlayer_FallbackFrame(), entity(), frame, frame2, frame3, and frame4.

Referenced by CSQCModel_Hook_PreDraw().

◆ CSQCPlayer_FallbackFrame_PostUpdate()

void CSQCPlayer_FallbackFrame_PostUpdate ( entity this,
bool isnew )

Definition at line 384 of file csqcmodel_hooks.qc.

385{
386 this.csqcmodel_saveframe = this.frame;
387 this.csqcmodel_saveframe2 = this.frame2;
388#ifdef CSQCMODEL_HAVE_TWO_FRAMES
389 this.csqcmodel_saveframe3 = this.frame3;
390 this.csqcmodel_saveframe4 = this.frame4;
391#endif
392
393 // hack for death animations: set their frametime to zero in case a
394 // player "pops in"
395 if(isnew)
396 {
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; \
400MACRO_END
403#ifdef CSQCMODEL_HAVE_TWO_FRAMES
406#endif
407 }
409}
float frame3time
start time of framegroup animation
Definition anim.qh:26
float frame4time
start time of framegroup animation
Definition anim.qh:28
int csqcmodel_saveframe2
int csqcmodel_saveframe
#define FIX_FRAMETIME(f, ft)

References csqcmodel_isdead, csqcmodel_saveframe, csqcmodel_saveframe2, entity(), FIX_FRAMETIME, frame, frame1time, frame2, frame2time, frame3, frame3time, frame4, frame4time, and IS_DEAD_FRAME.

Referenced by CSQCModel_Hook_PostUpdate().

◆ CSQCPlayer_FallbackFrame_PreUpdate()

void CSQCPlayer_FallbackFrame_PreUpdate ( entity this)

Definition at line 375 of file csqcmodel_hooks.qc.

376{
377 this.frame = this.csqcmodel_saveframe;
378 this.frame2 = this.csqcmodel_saveframe2;
379#ifdef CSQCMODEL_HAVE_TWO_FRAMES
380 this.frame3 = this.csqcmodel_saveframe3;
381 this.frame4 = this.csqcmodel_saveframe4;
382#endif
383}

References csqcmodel_saveframe, csqcmodel_saveframe2, entity(), frame, frame2, frame3, and frame4.

Referenced by CSQCModel_Hook_PreUpdate().

◆ CSQCPlayer_ModelAppearance_Apply()

void CSQCPlayer_ModelAppearance_Apply ( entity this,
bool islocalplayer )

Definition at line 141 of file csqcmodel_hooks.qc.

142{
143 int cm = this.forceplayermodels_savecolormap;
144 cm = (cm >= 1024) ? cm : (entcs_GetClientColors(cm - 1) + 1024);
145
146 if(MUTATOR_CALLHOOK(ForcePlayermodels_Skip, this, islocalplayer))
147 goto skipforcemodels;
148
149 // FORCEMODEL
150 // which one is ALWAYS good?
152 {
153 entity e = spawn();
154 precache_model(cvar_defstring("_cl_playermodel"));
155 _setmodel(e, cvar_defstring("_cl_playermodel"));
158 delete(e);
159 }
160
161 // first, try finding it from the server
163 {
164 if(islocalplayer)
165 {
166 if(!isdemo()) // this is mainly cheat protection; not needed for demos
167 {
168 // trust server's idea of "own player model"
174 }
175 }
176 }
177
178 // forcemodel finding
180 {
182
183 // only if this failed, find it out on our own
184 entity e = spawn();
185 precache_model(autocvar__cl_playermodel);
186 _setmodel(e, autocvar__cl_playermodel); // this is harmless, see below
188 forceplayermodels_model = e.model;
189 forceplayermodels_modelindex = e.modelindex;
191 delete(e);
192 }
193
195 {
196 entity e = spawn();
197 _setmodel(e, autocvar_cl_forcemyplayermodel); // this is harmless, see below
200 forceplayermodels_mymodelindex = e.modelindex;
201 delete(e);
202 }
203
204 // apply it
205 bool isfriend;
206
207 if(teamplay)
208 isfriend = (cm == 1024 + 17 * myteam);
209 else
210 isfriend = islocalplayer;
211
213 {
217 }
219 {
223 }
225 {
229 }
230 else
231 {
235 }
236
237 LABEL(skipforcemodels)
238
239 if(MUTATOR_CALLHOOK(ForcePlayercolors_Skip, this, islocalplayer))
240 goto skipforcecolors;
241
242 bool forceplayercolors_enabled = false;
243 #define fpc autocvar_cl_forceplayercolors
244 if (gametype.m_1v1)
245 {
246 if ((myteam != NUM_SPECTATOR) && (fpc == 1 || fpc == 2 || fpc == 3 || fpc == 5))
247 forceplayercolors_enabled = true;
248 }
249 else if (teamplay)
250 {
251 if ((team_count == 2) && (myteam != NUM_SPECTATOR) && (fpc == 2 || fpc == 4 || fpc == 5))
252 forceplayercolors_enabled = true;
253 }
254 else
255 {
256 if (fpc == 1 || fpc == 2)
257 forceplayercolors_enabled = true;
258 }
259
260 // forceplayercolors too
261 if(teamplay)
262 {
263 // own team's color is never forced
264 int forcecolor_friend = 0, forcecolor_enemy = 0;
265 entity tm;
266
268 forcecolor_friend = 1024 + autocvar_cl_forcemyplayercolors;
269
270 if(forceplayercolors_enabled)
271 forcecolor_enemy = 1024 + autocvar__cl_color;
272
273 if(forcecolor_enemy && !forcecolor_friend)
274 {
275 // only enemy color is forced?
276 // verify it is not equal to the friend color
277 if(forcecolor_enemy == 1024 + 17 * myteam)
278 forcecolor_enemy = 0;
279 }
280
281 if(forcecolor_friend && !forcecolor_enemy)
282 {
283 // only friend color is forced?
284 // verify it is not equal to the enemy color
285 for(tm = teams.sort_next; tm; tm = tm.sort_next)
286 // note: we even compare against our own team.
287 // if we rejected because we matched our OWN team color,
288 // this is not bad; we then simply keep our color as is
289 // anyway.
290 if(forcecolor_friend == 1024 + 17 * tm.team)
291 forcecolor_friend = 0;
292 }
293
294 if(cm == 1024 + 17 * myteam)
295 {
296 if(forcecolor_friend)
297 this.colormap = forcecolor_friend;
298 }
299 else
300 {
301 if(forcecolor_enemy)
302 this.colormap = forcecolor_enemy;
303 }
304 }
305 else // if(!teamplay)
306 {
307 if(autocvar_cl_forcemyplayercolors && islocalplayer)
309 else if (autocvar_cl_forceuniqueplayercolors && !islocalplayer && !gametype.m_1v1)
310 {
311 // Assign each enemy an unique color combination
312 // pick colors from 0 to 14 since 15 is the rainbow color
313 // pl01 0 1, pl02 1 2, ..., pl14 13 14, pl15 14 0
314 // pl16 0 2, pl17 1 3, ..., pl29 13 0, pl30 14 1
315 int num;
317 num = this.entnum - 1;
318 else
319 num = this.sv_entnum - 1;
320 int c1 = num % 15;
321 int q = floor(num / 15);
322 int c2 = (c1 + 1 + q) % 15;
323 this.colormap = 1024 + (c1 << 4) + c2;
324 }
325 else if(forceplayercolors_enabled)
326 this.colormap = player_localnum + 1;
327 }
328
329 LABEL(skipforcecolors)
330
332 {
333 this.glowmod = '0 0 0';
334 this.colormap = 0;
335 return;
336 }
337
338 // GLOWMOD AND DEATH FADING
339 if(this.colormap > 0)
340 this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : entcs_GetClientColors(this.colormap - 1)) & 0x0F, true);
341 else
342 this.glowmod = '1 1 1';
343
345 {
346 if(this.csqcmodel_isdead)
347 {
348 float min_factor = bound(0, autocvar_cl_deathglow_min, 1);
349 if(this.colormap > 0)
350 min_factor /= 2;
351 float glow_fade = bound(0, 1 - (time - this.death_time) / autocvar_cl_deathglow, 1);
352 this.glowmod *= (min_factor + glow_fade * (1 - min_factor));
353 if (this.glowmod == '0 0 0')
354 this.glowmod.x = 0.000001;
355 }
356 }
357
358 // don't let the engine increase player's glowmod
361
362 //printf("CSQCPlayer_ModelAppearance_Apply(): state = %s, colormap = %f, glowmod = %s\n", (this.csqcmodel_isdead ? "DEAD" : "ALIVE"), this.colormap, vtos(this.glowmod));
363}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity gametype
Definition main.qh:43
int sv_entnum
Definition main.qh:186
float team_count
Definition main.qh:59
entity teams
Definition main.qh:58
#define colormapPaletteColor(c, isPants)
Definition color.qh:5
#define LABEL(id)
Definition compiler.qh:34
float player_localnum
float skin
float colormap
#define spawn
int forceplayermodels_savemodelindex
string forceplayermodels_mymodel
bool forceplayermodels_isgoodmodel
int forceplayermodels_saveskin
int forceplayermodels_skin
string forceplayermodels_savemodel
bool forceplayermodels_attempted
int forceplayermodels_savecolormap
int forceplayermodels_mymodelindex
#define fpc
bool forceplayermodels_myisgoodmodel
int forceplayermodels_modelindex
vector glowmod
bool forceplayermodels_modelisgoodmodel
string forceplayermodels_model
int forceplayermodels_goodmodelindex
string forceplayermodels_goodmodel
bool autocvar_cl_respawn_ghosts_keepcolors
int autocvar__cl_color
float autocvar_cl_deathglow
int autocvar_cl_forcemyplayerskin
bool autocvar_cl_forceplayermodels
float autocvar_cl_deathglow_min
int autocvar__cl_playerskin
bool autocvar_cl_forceuniqueplayercolors
string autocvar_cl_forcemyplayermodel
int autocvar_cl_forcemyplayercolors
float autocvar_r_hdr_glowintensity
string autocvar__cl_playermodel
int entcs_GetClientColors(int i)
Definition ent_cs.qh:115
float isdemo()
float floor(float f)
const string cvar_defstring(string name)
int myteam
Definition teams.qh:60
const int NUM_SPECTATOR
Definition teams.qh:23
bool teamplay
Definition teams.qh:59

References autocvar__cl_color, autocvar__cl_playermodel, autocvar__cl_playerskin, autocvar_cl_deathglow, autocvar_cl_deathglow_min, autocvar_cl_forcemyplayercolors, autocvar_cl_forcemyplayermodel, autocvar_cl_forcemyplayerskin, autocvar_cl_forceplayermodels, autocvar_cl_forceuniqueplayercolors, autocvar_cl_respawn_ghosts_keepcolors, autocvar_r_hdr_glowintensity, bound(), colormap, colormapPaletteColor, CSQCMODEL_EF_RESPAWNGHOST, csqcmodel_effects, csqcmodel_isdead, cvar_defstring(), death_time, entcs_GetClientColors(), entity(), entnum, fexists(), floor(), forceplayermodels_attempted, forceplayermodels_goodmodel, forceplayermodels_goodmodelindex, forceplayermodels_isgoodmodel, forceplayermodels_model, forceplayermodels_modelindex, forceplayermodels_modelisgoodmodel, forceplayermodels_myisgoodmodel, forceplayermodels_mymodel, forceplayermodels_mymodelindex, forceplayermodels_savecolormap, forceplayermodels_savemodel, forceplayermodels_savemodelindex, forceplayermodels_saveskin, forceplayermodels_skin, fpc, gametype, glowmod, isdemo(), ISPLAYER_CLIENT, isplayermodel, LABEL, model, modelindex, MUTATOR_CALLHOOK, myteam, NUM_SPECTATOR, player_localnum, skin, spawn, sv_entnum, team_count, teamplay, teams, and time.

Referenced by CSQCModel_Hook_PreDraw().

◆ CSQCPlayer_ModelAppearance_PostUpdate()

◆ CSQCPlayer_ModelAppearance_PreUpdate()

◆ Reset_ArcBeam()

void Reset_ArcBeam ( )

Definition at line 852 of file arc.qc.

853{
854 entity e;
855 for (e = NULL; (e = findfloat(e, beam_usevieworigin, 1)); ) {
856 e.beam_initialized = false;
857 }
858 for (e = NULL; (e = findfloat(e, beam_usevieworigin, 2)); ) {
859 e.beam_initialized = false;
860 }
861}
float beam_usevieworigin
Definition arc.qh:154

References beam_usevieworigin, entity(), findfloat(), and NULL.

Referenced by CSQCModel_Effects_PostUpdate(), TeleportPlayer(), and WarpZone_PostTeleportPlayer_Callback().

Variable Documentation

◆ anim_frame

int anim_frame

Definition at line 665 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ anim_frame1time

int anim_frame1time

Definition at line 666 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ anim_frame2

int anim_frame2

Definition at line 667 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ anim_frame2time

int anim_frame2time

Definition at line 668 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ anim_prev_pmove_flags

int anim_prev_pmove_flags

Definition at line 673 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ anim_saveframe

int anim_saveframe

Definition at line 669 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ anim_saveframe1time

int anim_saveframe1time

Definition at line 670 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ anim_saveframe2

int anim_saveframe2

Definition at line 671 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ anim_saveframe2time

int anim_saveframe2time

Definition at line 672 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ csqcmodel_framecount

int csqcmodel_framecount

Definition at line 372 of file csqcmodel_hooks.qc.

◆ csqcmodel_predraw_run

int csqcmodel_predraw_run

Definition at line 664 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Hook_PreDraw().

◆ csqcmodel_saveframe

int csqcmodel_saveframe

◆ csqcmodel_saveframe2

int csqcmodel_saveframe2

◆ forceplayermodels_attempted

bool forceplayermodels_attempted

Definition at line 104 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_goodmodel

string forceplayermodels_goodmodel

Definition at line 114 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_goodmodelindex

int forceplayermodels_goodmodelindex

Definition at line 115 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_isgoodmodel

bool forceplayermodels_isgoodmodel

◆ forceplayermodels_isgoodmodel_mdl

string forceplayermodels_isgoodmodel_mdl

Definition at line 111 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_PostUpdate().

◆ forceplayermodels_model

string forceplayermodels_model

Definition at line 95 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_modelindex

int forceplayermodels_modelindex

Definition at line 97 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_modelisgoodmodel

bool forceplayermodels_modelisgoodmodel

Definition at line 96 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_myisgoodmodel

bool forceplayermodels_myisgoodmodel

Definition at line 101 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_mymodel

string forceplayermodels_mymodel

Definition at line 100 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_mymodelindex

int forceplayermodels_mymodelindex

Definition at line 102 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ forceplayermodels_savecolormap

◆ forceplayermodels_savemodel

◆ forceplayermodels_savemodelindex

◆ forceplayermodels_saveskin

◆ forceplayermodels_skin

int forceplayermodels_skin

Definition at line 98 of file csqcmodel_hooks.qc.

Referenced by CSQCPlayer_ModelAppearance_Apply().

◆ glowmod

◆ loddistance1

float loddistance1

◆ loddistance2

float loddistance2

◆ lodmodelindex0

◆ lodmodelindex1

int lodmodelindex1

◆ lodmodelindex2

int lodmodelindex2

◆ modelflags

◆ snd_looping

int snd_looping

Definition at line 544 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_Effects_Apply(), CSQCModel_Hook_PreDraw(), and Ent_Remove().

◆ tag_entity

◆ tag_entity_lastmodelindex

int tag_entity_lastmodelindex

Definition at line 447 of file csqcmodel_hooks.qc.

Referenced by CSQCModel_AutoTagIndex_Apply().

◆ tag_index

int tag_index