3 #include <common/anim.qh>
4 #include <common/animdecide.qh>
5 #include <common/csqcmodel_settings.qh>
6 #include <common/deathtypes/all.qh>
7 #include <common/effects/all.qh>
8 #include <common/effects/qc/_mod.qh>
9 #include <common/gamemodes/_mod.qh>
10 #include <common/gamemodes/sv_rules.qh>
11 #include <common/mapobjects/_mod.qh>
12 #include <common/mapobjects/subs.qh>
13 #include <common/mapobjects/teleporters.qh>
14 #include <common/minigames/sv_minigames.qh>
15 #include <common/mutators/mutator/status_effects/_mod.qh>
16 #include <common/mutators/mutator/waypoints/waypointsprites.qh>
17 #include <common/physics/player.qh>
18 #include <common/playerstats.qh>
19 #include <common/state.qh>
20 #include <common/wepent.qh>
21 #include <lib/csqcmodel/sv_model.qh>
22 #include <server/bot/api.qh>
23 #include <server/cheats.qh>
24 #include <server/client.qh>
25 #include <server/clientkill.qh>
26 #include <server/command/common.qh>
27 #include <server/command/vote.qh>
28 #include <server/damage.qh>
29 #include <server/handicap.qh>
30 #include <server/hook.qh>
31 #include <server/main.qh>
32 #include <server/mutators/_mod.qh>
33 #include <server/portals.qh>
34 #include <server/teamplay.qh>
35 #include <server/weapons/accuracy.qh>
36 #include <server/weapons/common.qh>
37 #include <server/weapons/throwing.qh>
38 #include <server/weapons/weaponstats.qh>
39 #include <server/weapons/weaponsystem.qh>
40 #include <server/world.qh>
42 void Drop_Special_Items(entity player)
44 // called when the player has become stuck or frozen
45 // so objective items aren't stuck with the player
47 MUTATOR_CALLHOOK(DropSpecialItems, player);
50 void CopyBody_Think(entity this)
52 if(this.CopyBody_nextthink && time > this.CopyBody_nextthink)
54 this.CopyBody_think(this);
57 this.CopyBody_nextthink = this.nextthink;
58 this.CopyBody_think = getthink(this);
59 setthink(this, CopyBody_Think);
61 CSQCMODEL_AUTOUPDATE(this);
62 this.nextthink = time;
64 void CopyBody(entity this, float keepvelocity)
66 if (this.effects & EF_NODRAW)
68 entity clone = new(body);
71 clone.colormap = this.colormap;
72 clone.iscreature = this.iscreature;
73 clone.teleportable = this.teleportable;
74 clone.damagedbycontents = this.damagedbycontents;
75 if(clone.damagedbycontents)
76 IL_PUSH(g_damagedbycontents, clone);
77 clone.angles = this.angles;
78 clone.v_angle = this.v_angle;
79 clone.avelocity = this.avelocity;
80 clone.damageforcescale = this.damageforcescale;
81 clone.effects = this.effects;
82 clone.glowmod = this.glowmod;
83 clone.event_damage = this.event_damage;
84 clone.event_heal = this.event_heal;
85 clone.anim_state = this.anim_state;
86 clone.anim_time = this.anim_time;
87 clone.anim_lower_action = this.anim_lower_action;
88 clone.anim_lower_time = this.anim_lower_time;
89 clone.anim_upper_action = this.anim_upper_action;
90 clone.anim_upper_time = this.anim_upper_time;
91 clone.anim_implicit_state = this.anim_implicit_state;
92 clone.anim_implicit_time = this.anim_implicit_time;
93 clone.anim_lower_implicit_action = this.anim_lower_implicit_action;
94 clone.anim_lower_implicit_time = this.anim_lower_implicit_time;
95 clone.anim_upper_implicit_action = this.anim_upper_implicit_action;
96 clone.anim_upper_implicit_time = this.anim_upper_implicit_time;
97 clone.dphitcontentsmask = this.dphitcontentsmask;
98 clone.death_time = this.death_time;
99 clone.pain_finished = this.pain_finished;
100 SetResourceExplicit(clone, RES_HEALTH, GetResource(this, RES_HEALTH));
101 SetResourceExplicit(clone, RES_ARMOR, GetResource(this, RES_ARMOR));
102 clone.armortype = this.armortype;
103 clone.model = this.model;
104 clone.modelindex = this.modelindex;
105 clone.skin = this.skin;
106 clone.species = this.species;
107 clone.move_qcphysics = false; // don't run gamecode logic on clones, too many
108 set_movetype(clone, this.move_movetype);
109 clone.solid = this.solid;
110 clone.takedamage = this.takedamage;
111 setcefc(clone, getcefc(this));
112 clone.uncustomizeentityforclient = this.uncustomizeentityforclient;
113 clone.uncustomizeentityforclient_set = this.uncustomizeentityforclient_set;
114 if (keepvelocity == 1)
115 clone.velocity = this.velocity;
116 clone.oldvelocity = clone.velocity;
117 clone.alpha = this.alpha;
118 clone.fade_time = this.fade_time;
119 clone.fade_rate = this.fade_rate;
120 //clone.weapon = this.weapon;
121 setorigin(clone, this.origin);
122 setsize(clone, this.mins, this.maxs);
123 clone.reset = SUB_Remove;
124 clone._ps = this._ps;
126 Drag_MoveDrag(this, clone);
128 if(clone.colormap <= maxclients && clone.colormap > 0)
129 clone.colormap = 1024 + this.clientcolors;
130 clone.sv_entnum = etof(this); // sent to CSQC for color mapping purposes
132 CSQCMODEL_AUTOINIT(clone);
133 clone.CopyBody_nextthink = this.nextthink;
134 clone.CopyBody_think = getthink(this);
135 clone.nextthink = time;
136 setthink(clone, CopyBody_Think);
137 // "bake" the current animation frame for clones (they don't get clientside animation)
138 animdecide_load_if_needed(clone);
139 animdecide_setframes(clone, false, frame, frame1time, frame2, frame2time);
141 IL_PUSH(g_clones, clone);
143 MUTATOR_CALLHOOK(CopyBody, this, clone, keepvelocity);
146 void player_setupanimsformodel(entity this)
148 // load animation info
149 animdecide_load_if_needed(this);
150 animdecide_setstate(this, 0, false);
153 void player_anim(entity this)
155 int deadbits = (this.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2));
158 // Decide on which death animation to use.
160 deadbits = ANIMSTATE_DEAD1;
162 deadbits = ANIMSTATE_DEAD2;
165 // Clear a previous death animation.
168 int animbits = deadbits;
169 if(STAT(FROZEN, this))
170 animbits |= ANIMSTATE_FROZEN;
171 if(this.move_movetype == MOVETYPE_FOLLOW)
172 animbits |= ANIMSTATE_FOLLOW;
174 animbits |= ANIMSTATE_DUCK;
175 animdecide_setstate(this, animbits, false);
176 animdecide_setimplicitstate(this, IS_ONGROUND(this));
179 void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
183 Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, this, attacker);
185 v = healtharmor_applydamage(GetResource(this, RES_ARMOR), autocvar_g_balance_armor_blockpercent, deathtype, damage);
189 if(sound_allowed(MSG_BROADCAST, attacker))
192 sound (this, CH_SHOTS, SND_ARMORIMPACT, VOL_BASE, ATTEN_NORM);
194 sound (this, CH_SHOTS, SND_BODYIMPACT2, VOL_BASE, ATTEN_NORM);
196 sound (this, CH_SHOTS, SND_BODYIMPACT1, VOL_BASE, ATTEN_NORM);
200 Violence_GibSplash_At(hitloc, force * -0.1, 3, 1, this, attacker);
202 Violence_GibSplash_At(hitloc, force * -0.2, 3, 1, this, attacker);
204 TakeResource(this, RES_ARMOR, save);
205 TakeResource(this, RES_HEALTH, take);
206 // pause regeneration for 5 seconds
207 this.pauseregen_finished = max(this.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
209 this.dmg_save = this.dmg_save + save;//max(save - 10, 0);
210 this.dmg_take = this.dmg_take + take;//max(take - 10, 0);
211 this.dmg_inflictor = inflictor;
213 if (GetResource(this, RES_HEALTH) <= -autocvar_sv_gibhealth && this.alpha >= 0)
215 // don't use any animations as a gib
217 // view just above the floor
218 this.view_ofs = '0 0 4';
220 Violence_GibSplash(this, 1, 1, attacker);
222 this.solid = SOLID_NOT; // restore later
223 this.takedamage = DAMAGE_NO; // restore later
224 if(this.damagedbycontents)
225 IL_REMOVE(g_damagedbycontents, this);
226 this.damagedbycontents = false;
230 void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
233 float initial_health = max(GetResource(this, RES_HEALTH), 0);
234 float initial_armor = max(GetResource(this, RES_ARMOR), 0);
235 float take = 0, save = 0;
239 if(!DEATH_ISSPECIAL(deathtype))
241 damage *= Handicap_GetTotalHandicap(this);
242 if (this != attacker && IS_PLAYER(attacker))
244 damage /= Handicap_GetTotalHandicap(attacker);
248 if (STAT(FROZEN, this))
250 if (!ITEM_DAMAGE_NEEDKILL(deathtype))
253 else if (StatusEffects_active(STATUSEFFECT_SpawnShield, this) && autocvar_g_spawnshield_blockdamage < 1)
254 damage *= 1 - bound(0, autocvar_g_spawnshield_blockdamage, 1);
256 if(deathtype & HITTYPE_SOUND) // sound based attacks cause bleeding from the ears
262 ear1_z += 0.125 * this.view_ofs.z + 0.875 * this.maxs.z; // 7/8
264 makevectors(this.angles);
265 ear1 += v_right * -10;
266 ear2 += v_right * +10;
267 d = inflictor.origin - this.origin;
269 f = (d * v_right) / vlen(d); // this is cos of angle of d and v_right!
271 f = 0; // Assum ecenter.
272 force = v_right * vlen(force);
273 Violence_GibSplash_At(ear1, force * -1, 2, bound(0, damage, 25) / 2 * (0.5 - 0.5 * f), this, attacker);
274 Violence_GibSplash_At(ear2, force, 2, bound(0, damage, 25) / 2 * (0.5 + 0.5 * f), this, attacker);
283 // force is already good
287 Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, this, attacker);
289 v = healtharmor_applydamage(GetResource(this, RES_ARMOR), autocvar_g_balance_armor_blockpercent, deathtype, damage);
296 // don't reset pushltime for self damage as it may be an attempt to
297 // escape a lava pit or similar
298 //this.pushltime = 0;
301 else if(IS_PLAYER(attacker))
303 this.pusher = attacker;
304 this.pushltime = time + autocvar_g_maxpushtime;
305 this.istypefrag = PHYS_INPUT_BUTTON_CHAT(this);
307 else if(time < this.pushltime)
309 attacker = this.pusher;
310 this.pushltime = max(this.pushltime, time + 0.6);
318 MUTATOR_CALLHOOK(PlayerDamage_SplitHealthArmor, inflictor, attacker, this, force, take, save, deathtype, damage);
319 take = bound(0, M_ARGV(4, float), GetResource(this, RES_HEALTH));
320 save = bound(0, M_ARGV(5, float), GetResource(this, RES_ARMOR));
321 float excess = max(0, damage - take - save);
323 if(sound_allowed(MSG_BROADCAST, attacker))
325 if (save > 10 && (initial_health - take) > 0) // don't play armor sound if the attack is fatal
326 sound (this, CH_SHOTS, SND_ARMORIMPACT, VOL_BASE, ATTEN_NORM);
328 sound (this, CH_SHOTS, SND_BODYIMPACT2, VOL_BASE, ATTEN_NORM);
330 sound (this, CH_SHOTS, SND_BODYIMPACT1, VOL_BASE, ATTEN_NORM); // FIXME possibly remove them?
334 Violence_GibSplash_At(hitloc, force * -0.1, 3, 1, this, attacker);
336 Violence_GibSplash_At(hitloc, force * -0.2, 3, 1, this, attacker);
338 if (!StatusEffects_active(STATUSEFFECT_SpawnShield, this) || autocvar_g_spawnshield_blockdamage < 1)
340 if (!(this.flags & FL_GODMODE))
342 TakeResource(this, RES_ARMOR, save);
343 TakeResource(this, RES_HEALTH, take);
344 // pause regeneration for 5 seconds
346 this.pauseregen_finished = max(this.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
348 if (time > this.pain_finished && !STAT(FROZEN, this)) // Don't switch pain sequences like crazy
350 this.pain_finished = time + 0.5; //Supajoe
352 if(autocvar_sv_gentle < 1) {
353 if(this.classname != "body") // pain anim is BORKED on our ZYMs, FIXME remove this once we have good models
355 if (!this.animstate_override)
358 animdecide_setaction(this, ANIMACTION_PAIN1, true);
360 animdecide_setaction(this, ANIMACTION_PAIN2, true);
363 float myhp = GetResource(this, RES_HEALTH);
365 if(myhp < 25 || !(DEATH_WEAPONOF(deathtype).spawnflags & WEP_FLAG_CANCLIMB) || take > 20 || attacker != this)
366 if(sound_allowed(MSG_BROADCAST, attacker))
367 // exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
369 if(deathtype == DEATH_FALL.m_id)
370 PlayerSound(this, playersound_fall, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
372 PlayerSound(this, playersound_pain100, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
374 PlayerSound(this, playersound_pain75, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
376 PlayerSound(this, playersound_pain50, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
378 PlayerSound(this, playersound_pain25, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
383 // throw off bot aim temporarily
385 if(IS_BOT_CLIENT(this) && GetResource(this, RES_HEALTH) >= 1)
387 shake = damage * 5 / (bound(0,skill,100) + 1);
388 this.v_angle_x = this.v_angle.x + (random() * 2 - 1) * shake;
389 this.v_angle_y = this.v_angle.y + (random() * 2 - 1) * shake;
390 this.v_angle_x = bound(-90, this.v_angle.x, 90);
394 this.max_armorvalue += (save + take);
396 this.dmg_save = this.dmg_save + save;//max(save - 10, 0);
397 this.dmg_take = this.dmg_take + take;//max(take - 10, 0);
398 this.dmg_inflictor = inflictor;
400 bool abot = (IS_BOT_CLIENT(attacker));
401 bool vbot = (IS_BOT_CLIENT(this));
403 bool valid_damage_for_weaponstats = false;
404 Weapon awep = WEP_Null;
406 if (!(round_handler_IsActive() && !round_handler_IsRoundStarted()) && time >= game_starttime)
407 if(vbot || IS_REAL_CLIENT(this))
408 if(abot || IS_REAL_CLIENT(attacker))
409 if(attacker && this != attacker)
410 if (DIFF_TEAM(this, attacker) && (!STAT(FROZEN, this) || this.freeze_time > time))
412 if(DEATH_ISSPECIAL(deathtype))
413 awep = attacker.(weaponentity).m_weapon;
415 awep = DEATH_WEAPONOF(deathtype);
416 valid_damage_for_weaponstats = true;
419 float dh = initial_health - max(GetResource(this, RES_HEALTH), 0); // health difference
420 float da = initial_armor - max(GetResource(this, RES_ARMOR), 0); // armor difference
421 if(valid_damage_for_weaponstats)
423 WeaponStats_LogDamage(awep.m_id, abot, this.(weaponentity).m_weapon.m_id, vbot, dh + da);
426 bool forbid_logging_damage = MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, hitloc, deathtype, damage);
428 if ((dh || da) && !forbid_logging_damage)
430 float realdmg = damage - excess;
431 if ((this != attacker || deathtype == DEATH_KILL.m_id) && realdmg && !STAT(FROZEN, this)
432 && (!(round_handler_IsActive() && !round_handler_IsRoundStarted()) && time >= game_starttime))
434 if (IS_PLAYER(attacker) && DIFF_TEAM(attacker, this) && deathtype != DEATH_KILL.m_id)
435 GameRules_scoring_add(attacker, DMG, realdmg);
437 GameRules_scoring_add(this, DMGTAKEN, realdmg);
441 if (GetResource(this, RES_HEALTH) < 1)
443 bool defer_ClientKill_Now_TeamChange = false;
447 PlayerStats_GameReport_Event_Player(this, PLAYERSTATS_ALIVETIME, time - this.alivetime);
451 if(valid_damage_for_weaponstats)
452 WeaponStats_LogKill(awep.m_id, abot, this.(weaponentity).m_weapon.m_id, vbot);
454 if(autocvar_sv_gentle < 1)
455 if(sound_allowed(MSG_BROADCAST, attacker))
457 if(deathtype == DEATH_DROWN.m_id)
458 PlayerSound(this, playersound_drown, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
460 PlayerSound(this, playersound_death, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
463 // get rid of kill indicator
464 if(this.killindicator)
466 delete(this.killindicator);
467 this.killindicator = NULL;
468 if(this.killindicator_teamchange)
469 defer_ClientKill_Now_TeamChange = true;
471 if(this.classname == "body")
472 if(deathtype == DEATH_KILL.m_id)
474 // for the lemmings fans, a small harmless explosion
475 Send_Effect(EFFECT_ROCKET_EXPLODE, this.origin, '0 0 0', 1);
479 // print an obituary message
480 if(this.classname != "body")
481 Obituary(attacker, inflictor, this, deathtype, weaponentity);
483 // increment frag counter for used weapon type
484 Weapon w = DEATH_WEAPONOF(deathtype);
485 if(w != WEP_Null && accuracy_isgooddamage(attacker, this))
486 CS(attacker).accuracy.(accuracy_frags[w.m_id-1]) += 1;
488 this.respawn_time = 0;
489 MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, this, deathtype, damage);
490 damage = M_ARGV(4, float);
491 excess = max(0, damage - take - save);
493 //Weapon wep = this.(weaponentity).m_weapon;
494 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
496 .entity went = weaponentities[slot];
498 continue; // TODO: clones have no weapon, but we don't want to have to check this all the time
499 Weapon wep = this.(went).m_weapon;
500 wep.wr_playerdeath(wep, this, went);
503 RemoveGrapplingHooks(this);
505 Portal_ClearAllLater(this);
507 this.fixangle = true;
509 if(defer_ClientKill_Now_TeamChange)
510 ClientKill_Now_TeamChange(this); // can turn player into spectator
512 // player could have been miraculously resuscitated ;)
513 // e.g. players in freezetag get frozen, they don't really die
514 if(GetResource(this, RES_HEALTH) >= 1 || !(IS_PLAYER(this) || this.classname == "body"))
517 if (!this.respawn_time) // can be set in the mutator hook PlayerDies
518 calculate_player_respawn_time(this);
520 // when we get here, player actually dies
522 Unfreeze(this, false); // remove any icy remains
525 WaypointSprite_PlayerDead(this);
527 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
529 .entity went = weaponentities[slot];
530 SpawnThrownWeapon(this, this.origin + (this.mins + this.maxs) * 0.5, this.(went).m_weapon, went);
533 // become fully visible
534 this.alpha = default_player_alpha;
535 // make the corpse upright (not tilted)
539 this.avelocity = '0 0 0';
540 // view from the floor
541 this.view_ofs = '0 0 -8';
542 if(this.move_movetype == MOVETYPE_NOCLIP)
544 // don't toss the corpse in this case, it can get stuck in solid (causing low fps)
545 // or fall indefinitely into the void if out of the map
546 this.velocity = '0 0 0';
551 set_movetype(this, MOVETYPE_TOSS);
554 this.solid = SOLID_CORPSE;
555 PS(this).ballistics_density = autocvar_g_ballistics_density_corpse;
556 // don't stick to the floor
557 UNSET_ONGROUND(this);
559 this.deadflag = DEAD_DYING;
560 // don't play teleportation sounds
561 this.teleportable = TELEPORT_SIMPLE;
563 STAT(AIR_FINISHED, this) = 0;
565 this.death_time = time;
567 animdecide_setstate(this, this.anim_state | ANIMSTATE_DEAD1, true);
569 animdecide_setstate(this, this.anim_state | ANIMSTATE_DEAD2, true);
571 // set damage function to corpse damage
572 this.event_damage = PlayerCorpseDamage;
573 this.event_heal = func_null;
574 // call the corpse damage function just in case it wants to gib
575 this.event_damage(this, inflictor, attacker, excess, deathtype, weaponentity, hitloc, force);
577 // set up to fade out later
578 SUB_SetFade (this, time + 6 + random (), 1);
579 // reset body think wrapper broken by SUB_SetFade
580 if(this.classname == "body" && getthink(this) != CopyBody_Think) {
581 this.CopyBody_think = getthink(this);
582 this.CopyBody_nextthink = this.nextthink;
583 setthink(this, CopyBody_Think);
584 this.nextthink = time;
587 if(autocvar_sv_gentle > 0 || autocvar_ekg || this.classname == "body") {
589 // clones don't run any animation code any more, so we must gib them when they die :(
590 this.event_damage(this, inflictor, attacker, autocvar_sv_gibhealth + 1, deathtype, weaponentity, hitloc, force);
593 // reset fields the weapons may use just in case
594 if(this.classname != "body")
596 FOREACH(Weapons, it != WEP_Null,
598 it.wr_resetplayer(it, this);
599 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
601 ATTACK_FINISHED_FOR(this, it.m_id, slot) = 0;
605 MUTATOR_CALLHOOK(PlayerDied, this);
609 bool PlayerHeal(entity targ, entity inflictor, float amount, float limit)
611 if(GetResource(targ, RES_HEALTH) <= 0 || GetResource(targ, RES_HEALTH) >= limit)
614 GiveResourceWithLimit(targ, RES_HEALTH, amount, limit);
618 void precache_playermodel(string m)
620 int globhandle, i, n;
623 // remove :<skinnumber> suffix
624 int j = strstrofs(m, ":", 0);
626 m = substring(m, 0, j);
628 if(substring(m, -9, 5) == "_lod1")
630 if(substring(m, -9, 5) == "_lod2")
633 f = strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1));
636 f = strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1));
640 globhandle = search_begin(strcat(m, "_*.sounds"), true, false);
643 n = search_getsize(globhandle);
644 for (i = 0; i < n; ++i)
646 //print(search_getfilename(globhandle, i), "\n");
647 f = search_getfilename(globhandle, i);
648 PrecachePlayerSounds(f);
650 search_end(globhandle);
652 void precache_all_playermodels(string pattern)
654 int globhandle = search_begin(pattern, true, false);
655 if (globhandle < 0) return;
656 int n = search_getsize(globhandle);
657 for (int i = 0; i < n; ++i)
659 string s = search_getfilename(globhandle, i);
660 precache_playermodel(s);
662 search_end(globhandle);
665 void precache_playermodels(string s)
667 FOREACH_WORD(s, true, { precache_playermodel(it); });
670 PRECACHE(PlayerModels)
672 // Precache all player models if desired
673 if (autocvar_sv_precacheplayermodels)
675 PrecachePlayerSounds("sound/player/default.sounds");
676 precache_all_playermodels("models/player/*.zym");
677 precache_all_playermodels("models/player/*.dpm");
678 precache_all_playermodels("models/player/*.md3");
679 precache_all_playermodels("models/player/*.psk");
680 precache_all_playermodels("models/player/*.iqm");
683 if (autocvar_sv_defaultcharacter)
685 precache_playermodels(autocvar_sv_defaultplayermodel_red);
686 precache_playermodels(autocvar_sv_defaultplayermodel_blue);
687 precache_playermodels(autocvar_sv_defaultplayermodel_yellow);
688 precache_playermodels(autocvar_sv_defaultplayermodel_pink);
689 precache_playermodels(autocvar_sv_defaultplayermodel);