set cl_handicap 1 "the higher, the more damage you will receive (client setting)"
+seta cl_noclipspectating 0 "noclip for spectators so that you can pass through walls and such. (client setting)"
+
// must be at the bottom of this file:
// alias for switching the teamselect menu
alias menu_showteamselect "menu_cmd directmenu TeamSelect"
accuracy_resend(self);
self.spectatortime = time;
-
+
self.classname = "observer";
self.iscreature = FALSE;
self.health = -666;
self.takedamage = DAMAGE_NO;
self.solid = SOLID_NOT;
- self.movetype = MOVETYPE_FLY;
+ self.movetype = (self.cvar_cl_noclipspectating ? MOVETYPE_NOCLIP : MOVETYPE_FLY);
self.flags = FL_CLIENT | FL_NOTARGET;
self.armorvalue = 666;
self.effects = 0;
.float cvar_cl_playerdetailreduction;
.float cvar_scr_centertime;
.float cvar_cl_shownames;
+.float cvar_cl_noclipspectating;
.string cvar_g_xonoticversion;
.string cvar_cl_weaponpriority;
.string cvar_cl_weaponpriorities[10];
GetCvars_handleFloat(s, f, cvar_cl_shownames, "cl_shownames");
GetCvars_handleString(s, f, cvar_g_xonoticversion, "g_xonoticversion");
GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap");
+ GetCvars_handleFloat(s, f, cvar_cl_noclipspectating, "cl_noclipspectating");
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList);
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[0], "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[1], "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);