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;
131 CSQCMODEL_AUTOINIT(clone);
132 clone.CopyBody_nextthink = this.nextthink;
133 clone.CopyBody_think = getthink(this);
134 clone.nextthink = time;
135 setthink(clone, CopyBody_Think);
136 // "bake" the current animation frame for clones (they don't get clientside animation)
137 animdecide_load_if_needed(clone);
138 animdecide_setframes(clone, false, frame, frame1time, frame2, frame2time);
140 IL_PUSH(g_clones, clone);
142 MUTATOR_CALLHOOK(CopyBody, this, clone, keepvelocity);
145 void player_setupanimsformodel(entity this)
147 // load animation info
148 animdecide_load_if_needed(this);
149 animdecide_setstate(this, 0, false);
152 void player_anim(entity this)
154 int deadbits = (this.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2));
157 // Decide on which death animation to use.
159 deadbits = ANIMSTATE_DEAD1;
161 deadbits = ANIMSTATE_DEAD2;
164 // Clear a previous death animation.
167 int animbits = deadbits;
168 if(STAT(FROZEN, this))
169 animbits |= ANIMSTATE_FROZEN;
170 if(this.move_movetype == MOVETYPE_FOLLOW)
171 animbits |= ANIMSTATE_FOLLOW;
173 animbits |= ANIMSTATE_DUCK;
174 animdecide_setstate(this, animbits, false);
175 animdecide_setimplicitstate(this, IS_ONGROUND(this));
178 void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
182 Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, this, attacker);
184 v = healtharmor_applydamage(GetResource(this, RES_ARMOR), autocvar_g_balance_armor_blockpercent, deathtype, damage);
188 if(sound_allowed(MSG_BROADCAST, attacker))
191 sound (this, CH_SHOTS, SND_ARMORIMPACT, VOL_BASE, ATTEN_NORM);
193 sound (this, CH_SHOTS, SND_BODYIMPACT2, VOL_BASE, ATTEN_NORM);
195 sound (this, CH_SHOTS, SND_BODYIMPACT1, VOL_BASE, ATTEN_NORM);
199 Violence_GibSplash_At(hitloc, force * -0.1, 3, 1, this, attacker);
201 Violence_GibSplash_At(hitloc, force * -0.2, 3, 1, this, attacker);
203 TakeResource(this, RES_ARMOR, save);
204 TakeResource(this, RES_HEALTH, take);
205 // pause regeneration for 5 seconds
206 this.pauseregen_finished = max(this.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
208 this.dmg_save = this.dmg_save + save;//max(save - 10, 0);
209 this.dmg_take = this.dmg_take + take;//max(take - 10, 0);
210 this.dmg_inflictor = inflictor;
212 if (GetResource(this, RES_HEALTH) <= -autocvar_sv_gibhealth && this.alpha >= 0)
214 // don't use any animations as a gib
216 // view just above the floor
217 this.view_ofs = '0 0 4';
219 Violence_GibSplash(this, 1, 1, attacker);
221 this.solid = SOLID_NOT; // restore later
222 this.takedamage = DAMAGE_NO; // restore later
223 if(this.damagedbycontents)
224 IL_REMOVE(g_damagedbycontents, this);
225 this.damagedbycontents = false;
229 void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
232 float initial_health = max(GetResource(this, RES_HEALTH), 0);
233 float initial_armor = max(GetResource(this, RES_ARMOR), 0);
234 float take = 0, save = 0;
238 if(!DEATH_ISSPECIAL(deathtype))
240 damage *= Handicap_GetTotalHandicap(this);
241 if (this != attacker && IS_PLAYER(attacker))
243 damage /= Handicap_GetTotalHandicap(attacker);
247 if (STAT(FROZEN, this))
249 if (!ITEM_DAMAGE_NEEDKILL(deathtype))
252 else if (StatusEffects_active(STATUSEFFECT_SpawnShield, this) && autocvar_g_spawnshield_blockdamage < 1)
253 damage *= 1 - bound(0, autocvar_g_spawnshield_blockdamage, 1);
255 if(deathtype & HITTYPE_SOUND) // sound based attacks cause bleeding from the ears
261 ear1_z += 0.125 * this.view_ofs.z + 0.875 * this.maxs.z; // 7/8
263 makevectors(this.angles);
264 ear1 += v_right * -10;
265 ear2 += v_right * +10;
266 d = inflictor.origin - this.origin;
268 f = (d * v_right) / vlen(d); // this is cos of angle of d and v_right!
270 f = 0; // Assum ecenter.
271 force = v_right * vlen(force);
272 Violence_GibSplash_At(ear1, force * -1, 2, bound(0, damage, 25) / 2 * (0.5 - 0.5 * f), this, attacker);
273 Violence_GibSplash_At(ear2, force, 2, bound(0, damage, 25) / 2 * (0.5 + 0.5 * f), this, attacker);
282 // force is already good
286 Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, this, attacker);
288 v = healtharmor_applydamage(GetResource(this, RES_ARMOR), autocvar_g_balance_armor_blockpercent, deathtype, damage);
295 // don't reset pushltime for self damage as it may be an attempt to
296 // escape a lava pit or similar
297 //this.pushltime = 0;
300 else if(IS_PLAYER(attacker))
302 this.pusher = attacker;
303 this.pushltime = time + autocvar_g_maxpushtime;
304 this.istypefrag = PHYS_INPUT_BUTTON_CHAT(this);
306 else if(time < this.pushltime)
308 attacker = this.pusher;
309 this.pushltime = max(this.pushltime, time + 0.6);
317 MUTATOR_CALLHOOK(PlayerDamage_SplitHealthArmor, inflictor, attacker, this, force, take, save, deathtype, damage);
318 take = bound(0, M_ARGV(4, float), GetResource(this, RES_HEALTH));
319 save = bound(0, M_ARGV(5, float), GetResource(this, RES_ARMOR));
320 float excess = max(0, damage - take - save);
322 if(sound_allowed(MSG_BROADCAST, attacker))
324 if (save > 10 && (initial_health - take) > 0) // don't play armor sound if the attack is fatal
325 sound (this, CH_SHOTS, SND_ARMORIMPACT, VOL_BASE, ATTEN_NORM);
327 sound (this, CH_SHOTS, SND_BODYIMPACT2, VOL_BASE, ATTEN_NORM);
329 sound (this, CH_SHOTS, SND_BODYIMPACT1, VOL_BASE, ATTEN_NORM); // FIXME possibly remove them?
333 Violence_GibSplash_At(hitloc, force * -0.1, 3, 1, this, attacker);
335 Violence_GibSplash_At(hitloc, force * -0.2, 3, 1, this, attacker);
337 if (!StatusEffects_active(STATUSEFFECT_SpawnShield, this) || autocvar_g_spawnshield_blockdamage < 1)
339 if (!(this.flags & FL_GODMODE))
341 TakeResource(this, RES_ARMOR, save);
342 TakeResource(this, RES_HEALTH, take);
343 // pause regeneration for 5 seconds
345 this.pauseregen_finished = max(this.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
347 if (time > this.pain_finished && !STAT(FROZEN, this)) // Don't switch pain sequences like crazy
349 this.pain_finished = time + 0.5; //Supajoe
351 if(autocvar_sv_gentle < 1) {
352 if(this.classname != "body") // pain anim is BORKED on our ZYMs, FIXME remove this once we have good models
354 if (!this.animstate_override)
357 animdecide_setaction(this, ANIMACTION_PAIN1, true);
359 animdecide_setaction(this, ANIMACTION_PAIN2, true);
362 float myhp = GetResource(this, RES_HEALTH);
364 if(myhp < 25 || !(DEATH_WEAPONOF(deathtype).spawnflags & WEP_FLAG_CANCLIMB) || take > 20 || attacker != this)
365 if(sound_allowed(MSG_BROADCAST, attacker))
366 // exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
368 if(deathtype == DEATH_FALL.m_id)
369 PlayerSound(this, playersound_fall, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
371 PlayerSound(this, playersound_pain100, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
373 PlayerSound(this, playersound_pain75, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
375 PlayerSound(this, playersound_pain50, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
377 PlayerSound(this, playersound_pain25, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
382 // throw off bot aim temporarily
384 if(IS_BOT_CLIENT(this) && GetResource(this, RES_HEALTH) >= 1)
386 shake = damage * 5 / (bound(0,skill,100) + 1);
387 this.v_angle_x = this.v_angle.x + (random() * 2 - 1) * shake;
388 this.v_angle_y = this.v_angle.y + (random() * 2 - 1) * shake;
389 this.v_angle_x = bound(-90, this.v_angle.x, 90);
393 this.max_armorvalue += (save + take);
395 this.dmg_save = this.dmg_save + save;//max(save - 10, 0);
396 this.dmg_take = this.dmg_take + take;//max(take - 10, 0);
397 this.dmg_inflictor = inflictor;
399 bool abot = (IS_BOT_CLIENT(attacker));
400 bool vbot = (IS_BOT_CLIENT(this));
402 bool valid_damage_for_weaponstats = false;
403 Weapon awep = WEP_Null;
405 if (!(round_handler_IsActive() && !round_handler_IsRoundStarted()) && time >= game_starttime)
406 if(vbot || IS_REAL_CLIENT(this))
407 if(abot || IS_REAL_CLIENT(attacker))
408 if(attacker && this != attacker)
409 if (DIFF_TEAM(this, attacker) && (!STAT(FROZEN, this) || this.freeze_time > time))
411 if(DEATH_ISSPECIAL(deathtype))
412 awep = attacker.(weaponentity).m_weapon;
414 awep = DEATH_WEAPONOF(deathtype);
415 valid_damage_for_weaponstats = true;
418 float dh = initial_health - max(GetResource(this, RES_HEALTH), 0); // health difference
419 float da = initial_armor - max(GetResource(this, RES_ARMOR), 0); // armor difference
420 if(valid_damage_for_weaponstats)
422 WeaponStats_LogDamage(awep.m_id, abot, this.(weaponentity).m_weapon.m_id, vbot, dh + da);
425 bool forbid_logging_damage = MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, hitloc, deathtype, damage);
427 if ((dh || da) && !forbid_logging_damage)
429 float realdmg = damage - excess;
430 if ((this != attacker || deathtype == DEATH_KILL.m_id) && realdmg && !STAT(FROZEN, this)
431 && (!(round_handler_IsActive() && !round_handler_IsRoundStarted()) && time >= game_starttime))
433 if (IS_PLAYER(attacker) && DIFF_TEAM(attacker, this) && deathtype != DEATH_KILL.m_id)
434 GameRules_scoring_add(attacker, DMG, realdmg);
436 GameRules_scoring_add(this, DMGTAKEN, realdmg);
440 if (GetResource(this, RES_HEALTH) < 1)
442 bool defer_ClientKill_Now_TeamChange = false;
446 PlayerStats_GameReport_Event_Player(this, PLAYERSTATS_ALIVETIME, time - this.alivetime);
450 if(valid_damage_for_weaponstats)
451 WeaponStats_LogKill(awep.m_id, abot, this.(weaponentity).m_weapon.m_id, vbot);
453 if(autocvar_sv_gentle < 1)
454 if(sound_allowed(MSG_BROADCAST, attacker))
456 if(deathtype == DEATH_DROWN.m_id)
457 PlayerSound(this, playersound_drown, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
459 PlayerSound(this, playersound_death, CH_PAIN, VOL_BASE, VOICETYPE_PLAYERSOUND);
462 // get rid of kill indicator
463 if(this.killindicator)
465 delete(this.killindicator);
466 this.killindicator = NULL;
467 if(this.killindicator_teamchange)
468 defer_ClientKill_Now_TeamChange = true;
470 if(this.classname == "body")
471 if(deathtype == DEATH_KILL.m_id)
473 // for the lemmings fans, a small harmless explosion
474 Send_Effect(EFFECT_ROCKET_EXPLODE, this.origin, '0 0 0', 1);
478 // print an obituary message
479 if(this.classname != "body")
480 Obituary(attacker, inflictor, this, deathtype, weaponentity);
482 // increment frag counter for used weapon type
483 Weapon w = DEATH_WEAPONOF(deathtype);
484 if(w != WEP_Null && accuracy_isgooddamage(attacker, this))
485 CS(attacker).accuracy.(accuracy_frags[w.m_id-1]) += 1;
487 this.respawn_time = 0;
488 MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, this, deathtype, damage);
489 damage = M_ARGV(4, float);
490 excess = max(0, damage - take - save);
492 //Weapon wep = this.(weaponentity).m_weapon;
493 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
495 .entity went = weaponentities[slot];
497 continue; // TODO: clones have no weapon, but we don't want to have to check this all the time
498 Weapon wep = this.(went).m_weapon;
499 wep.wr_playerdeath(wep, this, went);
502 RemoveGrapplingHooks(this);
504 Portal_ClearAllLater(this);
506 this.fixangle = true;
508 if(defer_ClientKill_Now_TeamChange)
509 ClientKill_Now_TeamChange(this); // can turn player into spectator
511 // player could have been miraculously resuscitated ;)
512 // e.g. players in freezetag get frozen, they don't really die
513 if(GetResource(this, RES_HEALTH) >= 1 || !(IS_PLAYER(this) || this.classname == "body"))
516 if (!this.respawn_time) // can be set in the mutator hook PlayerDies
517 calculate_player_respawn_time(this);
519 // when we get here, player actually dies
521 Unfreeze(this, false); // remove any icy remains
524 WaypointSprite_PlayerDead(this);
526 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
528 .entity went = weaponentities[slot];
529 SpawnThrownWeapon(this, this.origin + (this.mins + this.maxs) * 0.5, this.(went).m_weapon, went);
532 // become fully visible
533 this.alpha = default_player_alpha;
534 // make the corpse upright (not tilted)
538 this.avelocity = '0 0 0';
539 // view from the floor
540 this.view_ofs = '0 0 -8';
541 if(this.move_movetype == MOVETYPE_NOCLIP)
543 // don't toss the corpse in this case, it can get stuck in solid (causing low fps)
544 // or fall indefinitely into the void if out of the map
545 this.velocity = '0 0 0';
550 set_movetype(this, MOVETYPE_TOSS);
553 this.solid = SOLID_CORPSE;
554 PS(this).ballistics_density = autocvar_g_ballistics_density_corpse;
555 // don't stick to the floor
556 UNSET_ONGROUND(this);
558 this.deadflag = DEAD_DYING;
559 // don't play teleportation sounds
560 this.teleportable = TELEPORT_SIMPLE;
562 STAT(AIR_FINISHED, this) = 0;
564 this.death_time = time;
566 animdecide_setstate(this, this.anim_state | ANIMSTATE_DEAD1, true);
568 animdecide_setstate(this, this.anim_state | ANIMSTATE_DEAD2, true);
570 // set damage function to corpse damage
571 this.event_damage = PlayerCorpseDamage;
572 this.event_heal = func_null;
573 // call the corpse damage function just in case it wants to gib
574 this.event_damage(this, inflictor, attacker, excess, deathtype, weaponentity, hitloc, force);
576 // set up to fade out later
577 SUB_SetFade (this, time + 6 + random (), 1);
578 // reset body think wrapper broken by SUB_SetFade
579 if(this.classname == "body" && getthink(this) != CopyBody_Think) {
580 this.CopyBody_think = getthink(this);
581 this.CopyBody_nextthink = this.nextthink;
582 setthink(this, CopyBody_Think);
583 this.nextthink = time;
586 if(autocvar_sv_gentle > 0 || autocvar_ekg || this.classname == "body") {
588 // clones don't run any animation code any more, so we must gib them when they die :(
589 this.event_damage(this, inflictor, attacker, autocvar_sv_gibhealth + 1, deathtype, weaponentity, hitloc, force);
592 // reset fields the weapons may use just in case
593 if(this.classname != "body")
595 FOREACH(Weapons, it != WEP_Null,
597 it.wr_resetplayer(it, this);
598 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
600 ATTACK_FINISHED_FOR(this, it.m_id, slot) = 0;
604 MUTATOR_CALLHOOK(PlayerDied, this);
608 bool PlayerHeal(entity targ, entity inflictor, float amount, float limit)
610 if(GetResource(targ, RES_HEALTH) <= 0 || GetResource(targ, RES_HEALTH) >= limit)
613 GiveResourceWithLimit(targ, RES_HEALTH, amount, limit);
617 void precache_playermodel(string m)
619 int globhandle, i, n;
622 // remove :<skinnumber> suffix
623 int j = strstrofs(m, ":", 0);
625 m = substring(m, 0, j);
627 if(substring(m, -9, 5) == "_lod1")
629 if(substring(m, -9, 5) == "_lod2")
632 f = strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1));
635 f = strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1));
639 globhandle = search_begin(strcat(m, "_*.sounds"), true, false);
642 n = search_getsize(globhandle);
643 for (i = 0; i < n; ++i)
645 //print(search_getfilename(globhandle, i), "\n");
646 f = search_getfilename(globhandle, i);
647 PrecachePlayerSounds(f);
649 search_end(globhandle);
651 void precache_all_playermodels(string pattern)
653 int globhandle = search_begin(pattern, true, false);
654 if (globhandle < 0) return;
655 int n = search_getsize(globhandle);
656 for (int i = 0; i < n; ++i)
658 string s = search_getfilename(globhandle, i);
659 precache_playermodel(s);
661 search_end(globhandle);
664 void precache_playermodels(string s)
666 FOREACH_WORD(s, true, { precache_playermodel(it); });
669 PRECACHE(PlayerModels)
671 // Precache all player models if desired
672 if (autocvar_sv_precacheplayermodels)
674 PrecachePlayerSounds("sound/player/default.sounds");
675 precache_all_playermodels("models/player/*.zym");
676 precache_all_playermodels("models/player/*.dpm");
677 precache_all_playermodels("models/player/*.md3");
678 precache_all_playermodels("models/player/*.psk");
679 precache_all_playermodels("models/player/*.iqm");
682 if (autocvar_sv_defaultcharacter)
684 precache_playermodels(autocvar_sv_defaultplayermodel_red);
685 precache_playermodels(autocvar_sv_defaultplayermodel_blue);
686 precache_playermodels(autocvar_sv_defaultplayermodel_yellow);
687 precache_playermodels(autocvar_sv_defaultplayermodel_pink);
688 precache_playermodels(autocvar_sv_defaultplayermodel);