- self.just_joined = false;
- }
-
- PlayerScore_Clear(self); // clear scores when needed
-
- accuracy_resend(self);
-
- self.spectatortime = time;
-
- self.classname = STR_OBSERVER;
- self.iscreature = false;
- self.teleportable = TELEPORT_SIMPLE;
- self.damagedbycontents = false;
- self.health = FRAGS_SPECTATOR;
- self.takedamage = DAMAGE_NO;
- self.solid = SOLID_NOT;
- self.movetype = MOVETYPE_FLY_WORLDONLY; // user preference is controlled by playerprethink
- self.flags = FL_CLIENT | FL_NOTARGET;
- self.armorvalue = 666;
- self.effects = 0;
- self.armorvalue = autocvar_g_balance_armor_start;
- self.pauserotarmor_finished = 0;
- self.pauserothealth_finished = 0;
- self.pauseregen_finished = 0;
- self.damageforcescale = 0;
- self.death_time = 0;
- self.respawn_flags = 0;
- self.respawn_time = 0;
- self.stat_respawn_time = 0;
- self.alpha = 0;
- self.scale = 0;
- self.fade_time = 0;
- self.pain_frame = 0;
- self.pain_finished = 0;
- self.strength_finished = 0;
- self.invincible_finished = 0;
- self.superweapons_finished = 0;
- self.pushltime = 0;
- self.istypefrag = 0;
- self.think = func_null;
- self.nextthink = 0;
- self.hook_time = 0;
- self.deadflag = DEAD_NO;
- self.angles = spot.angles;
- self.angles_z = 0;
- self.fixangle = true;
- self.crouch = false;
- self.revival_time = 0;
-
- setorigin (self, (spot.origin + PL_VIEW_OFS)); // offset it so that the spectator spawns higher off the ground, looks better this way
- self.prevorigin = self.origin;
- self.items = 0;
- self.weapons = '0 0 0';
- self.model = "";
- FixPlayermodel(self);
- setmodel(self, MDL_Null);
- self.drawonlytoclient = self;
-
- setsize (self, PL_CROUCH_MIN, PL_CROUCH_MAX); // give the spectator some space between walls for MOVETYPE_FLY_WORLDONLY
- self.view_ofs = '0 0 0'; // so that your view doesn't go into the ceiling with MOVETYPE_FLY_WORLDONLY, previously "PL_VIEW_OFS"
-
- self.weapon = 0;
- self.weaponname = "";
- self.switchingweapon = 0;
- self.weaponmodel = "";
+ this.just_joined = false;
+ }
+
+ PlayerScore_Clear(this); // clear scores when needed
+
+ accuracy_resend(this);
+
+ this.spectatortime = time;
+ this.frags = FRAGS_SPECTATOR;
+ this.bot_attack = false;
+ this.hud = HUD_NORMAL;
+ this.classname = STR_OBSERVER;
+ this.iscreature = false;
+ this.teleportable = TELEPORT_SIMPLE;
+ this.damagedbycontents = false;
+ this.health = FRAGS_SPECTATOR;
+ this.takedamage = DAMAGE_NO;
+ this.solid = SOLID_NOT;
+ this.movetype = MOVETYPE_FLY_WORLDONLY; // user preference is controlled by playerprethink
+ this.flags = FL_CLIENT | FL_NOTARGET;
+ this.armorvalue = 666;
+ this.effects = 0;
+ this.armorvalue = autocvar_g_balance_armor_start;
+ this.pauserotarmor_finished = 0;
+ this.pauserothealth_finished = 0;
+ this.pauseregen_finished = 0;
+ this.damageforcescale = 0;
+ this.death_time = 0;
+ this.respawn_flags = 0;
+ this.respawn_time = 0;
+ this.stat_respawn_time = 0;
+ this.alpha = 0;
+ this.scale = 0;
+ this.fade_time = 0;
+ this.pain_frame = 0;
+ this.pain_finished = 0;
+ this.strength_finished = 0;
+ this.invincible_finished = 0;
+ this.superweapons_finished = 0;
+ this.pushltime = 0;
+ this.istypefrag = 0;
+ this.think = func_null;
+ this.nextthink = 0;
+ this.hook_time = 0;
+ this.deadflag = DEAD_NO;
+ this.crouch = false;
+ this.revival_time = 0;
+
+ this.items = 0;
+ this.weapons = '0 0 0';
+ this.model = "";
+ FixPlayermodel(this);
+ setmodel(this, MDL_Null);
+ this.drawonlytoclient = this;
+
+ this.weaponname = "";
+ this.weaponmodel = "";