set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)"
-set cl_handicap 1 "the higher, the more damage you will receive (client setting)"
+set cl_handicap 1 "the higher, the more damage you will receive (client setting) NOTE: reconnect or use sendcvar command to update the choice."
-seta cl_noclipspectating 0 "noclip for spectators so that you can pass through walls and such. (client setting)"
+seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
// must be at the bottom of this file:
// alias for switching the teamselect menu
self.health = -666;
self.takedamage = DAMAGE_NO;
self.solid = SOLID_NOT;
- self.movetype = (self.cvar_cl_noclipspectating ? MOVETYPE_NOCLIP : MOVETYPE_FLY);
+ self.movetype = MOVETYPE_FLY; //(self.cvar_cl_clippedspectating ? MOVETYPE_NOCLIP : MOVETYPE_FLY); // it's too early for this anyway, lets just set it in playerprethink
self.flags = FL_CLIENT | FL_NOTARGET;
self.armorvalue = 666;
self.effects = 0;
void ObserverThink()
{
+ float prefered_movetype;
if (self.flags & FL_JUMPRELEASED) {
if (self.BUTTON_JUMP && !self.version_mismatch) {
self.welcomemessage_time = 0;
if(SpectateNext() == 1) {
self.classname = "spectator";
}
+ } else {
+ prefered_movetype = (self.cvar_cl_clippedspectating ? MOVETYPE_FLY : MOVETYPE_NOCLIP);
+ if (self.movetype != prefered_movetype)
+ self.movetype = prefered_movetype;
}
} else {
if (!(self.BUTTON_ATCK || self.BUTTON_JUMP)) {
.float cvar_cl_playerdetailreduction;
.float cvar_scr_centertime;
.float cvar_cl_shownames;
-.float cvar_cl_noclipspectating;
+.float cvar_cl_clippedspectating;
.string cvar_g_xonoticversion;
.string cvar_cl_weaponpriority;
GetCvars_handleFloat(s, f, cvar_scr_centertime, "scr_centertime");
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_handleFloat(s, f, cvar_cl_clippedspectating, "cl_clippedspectating");
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);