#include "weapons/weaponsystem.qh"
#include "../common/net_notice.qh"
+#include "../common/net_linked.qh"
#include "../common/physics/player.qh"
#include "../common/items/_mod.qh"
TRANSMUTE(Observer, this);
this.iscreature = false;
this.teleportable = TELEPORT_SIMPLE;
+ if(this.damagedbycontents)
+ IL_REMOVE(g_damagedbycontents, this);
this.damagedbycontents = false;
this.health = FRAGS_SPECTATOR;
SetSpectatee_status(this, etof(this));
this.wasplayer = true;
this.iscreature = true;
this.teleportable = TELEPORT_NORMAL;
+ if(!this.damagedbycontents)
+ IL_PUSH(g_damagedbycontents, this);
this.damagedbycontents = true;
set_movetype(this, MOVETYPE_WALK);
this.solid = SOLID_SLIDEBOX;
FixPlayermodel(this);
this.drawonlytoclient = NULL;
+ this.viewloc = NULL;
+
this.crouch = false;
this.view_ofs = STAT(PL_VIEW_OFS, this);
setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));
void ClientInit_misc(entity this);
-.float ebouncefactor, ebouncestop; // electro's values
// TODO do we need all these fields, or should we stop autodetecting runtime
// changes and just have a console command to update this?
bool ClientInit_SendEntity(entity this, entity to, int sf)
if (IS_REAL_CLIENT(this))
sv_notice_join(this);
+ // update physics stats (players can spawn before physics runs)
+ Physics_UpdateStats(this, PHYS_HIGHSPEED(this));
+
IL_EACH(g_initforplayer, it.init_for_player, {
it.init_for_player(it, this);
});
this.playerid = 0;
ReadyCount();
if (vote_called && IS_REAL_CLIENT(this)) VoteCount(false);
+
+ ONREMOVE(this);
}
void ChatBubbleThink(entity this)
this.angles = spectatee.v_angle;
STAT(FROZEN, this) = STAT(FROZEN, spectatee);
this.revive_progress = spectatee.revive_progress;
+ this.viewloc = spectatee.viewloc;
if(!PHYS_INPUT_BUTTON_USE(this) && STAT(CAMERA_SPECTATOR, this) != 2)
this.fixangle = true;
setorigin(this, spectatee.origin);
setsize(this, spectatee.mins, spectatee.maxs);
SetZoomState(this, spectatee.zoomstate);
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity weaponentity = weaponentities[slot];
+ this.(weaponentity) = spectatee.(weaponentity);
+ }
+
anticheat_spectatecopy(this, spectatee);
this.hud = spectatee.hud;
if(spectatee.vehicle)