Returns a valid one in doubt.
=============
*/
-string FallbackPlayerModel = "models/player/marine.zym";
+string FallbackPlayerModel;
string CheckPlayerModel(string plyermodel) {
+ if(FallbackPlayerModel != cvar_defstring("_cl_playermodel"))
+ {
+ // note: we cannot summon Don Strunzone here, some player may
+ // still have the model string set. In case anyone manages how
+ // to change a cvar default, we'll have a small leak here.
+ FallbackPlayerModel = strzone(cvar_defstring("_cl_playermodel"));
+ }
if(strlen(plyermodel) < 4)
return FallbackPlayerModel;
if( substring(plyermodel,0,14) != "models/player/")
self.modelindex_lod0_from_xonotic = ((s == "") || (substring(s, 0, 4) == "data"));
player_setupanimsformodel();
+ UpdatePlayerSounds();
}
/*
WriteCoord(MSG_ENTITY, hook_shotorigin_x);
WriteCoord(MSG_ENTITY, hook_shotorigin_y);
WriteCoord(MSG_ENTITY, hook_shotorigin_z);
-
if(sv_foginterval && world.fog != "")
WriteString(MSG_ENTITY, world.fog);
else
{
entity o;
entity e;
+ e = spawn();
e.classname = "clientinit";
e.think = ClientInit_CheckUpdate;
- e.nextthink = time;
Net_LinkEntity(e, FALSE, 0, ClientInit_SendEntity);
+
o = self;
self = e;
ClientInit_CheckUpdate();
DecodeLevelParms();
+#ifdef WATERMARK
+ sprint(self, strcat("^4SVQC Build information: ", WATERMARK(), "\n"));
+#endif
+
self.classname = "player_joining";
self.flags = FL_CLIENT;
=============
*/
.float idlekick_lasttimeleft;
+.entity showheadshotbbox;
+void showheadshotbbox_think()
+{
+ if(self.owner.showheadshotbbox != self)
+ {
+ remove(self);
+ return;
+ }
+ self.nextthink = time;
+ setorigin(self, self.owner.origin);
+ setsize(self, GetHeadshotMins(self.owner), GetHeadshotMaxs(self.owner));
+}
void PlayerPostThink (void)
{
// Savage: Check for nameless players
if(self.waypointsprite_attachedforcarrier)
WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, cvar("g_balance_armor_blockpercent")));
+ if(self.classname == "player" && self.deadflag == DEAD_NO && cvar("r_showbboxes"))
+ {
+ if(!self.showheadshotbbox)
+ {
+ self.showheadshotbbox = spawn();
+ self.showheadshotbbox.classname = "headshotbbox";
+ self.showheadshotbbox.owner = self;
+ self.showheadshotbbox.think = showheadshotbbox_think;
+ self.showheadshotbbox.nextthink = time;
+ self = self.showheadshotbbox;
+ self.think();
+ self = self.owner;
+ }
+ }
+ else
+ {
+ if(self.showheadshotbbox)
+ remove(self.showheadshotbbox);
+ }
+
playerdemo_write();
/*