\r
set cl_handicap 1 "the higher, the more damage you will receive (client setting)"\r
\r
+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." \r
+\r
// must be at the bottom of this file:\r
// alias for switching the teamselect menu\r
alias menu_showteamselect "menu_cmd directmenu TeamSelect"\r
float MOVETYPE_BOUNCEMISSILE = 11; // Like bounce but doesn't lose speed on bouncing\r
float MOVETYPE_FOLLOW = 12;\r
float MOVETYPE_FAKEPUSH = 13;\r
+float MOVETYPE_FLY_WORLDONLY = 33;\r
\r
float FL_ITEM = 256;\r
float FL_ONGROUND = 512;\r
self.health = -666;\r
self.takedamage = DAMAGE_NO;\r
self.solid = SOLID_NOT;\r
- self.movetype = MOVETYPE_NOCLIP;\r
+ self.movetype = MOVETYPE_FLY_WORLDONLY; // user preference is controlled by playerprethink\r
self.flags = FL_CLIENT | FL_NOTARGET;\r
self.armorvalue = 666;\r
self.effects = 0;\r
self.fixangle = TRUE;\r
self.crouch = FALSE;\r
\r
- self.view_ofs = PL_VIEW_OFS;\r
+ self.view_ofs = '0 0 0'; // so that your view doesn't go into the ceiling with MOVETYPE_FLY_WORLDONLY, previously "PL_VIEW_OFS"\r
setorigin (self, spot.origin);\r
- setsize (self, '0 0 0', '0 0 0');\r
+ setsize (self, PL_CROUCH_MIN, PL_CROUCH_MAX); // give the spectator some space between walls for MOVETYPE_FLY_WORLDONLY\r
self.prevorigin = self.origin;\r
self.items = 0;\r
self.weapons = 0;\r
\r
void ObserverThink()\r
{\r
+ float prefered_movetype;\r
if (self.flags & FL_JUMPRELEASED) {\r
if (self.BUTTON_JUMP && !self.version_mismatch) {\r
- self.welcomemessage_time = 0;\r
self.flags &~= FL_JUMPRELEASED;\r
self.flags |= FL_SPAWNING;\r
} else if(self.BUTTON_ATCK && !self.version_mismatch) {\r
- self.welcomemessage_time = 0;\r
self.flags &~= FL_JUMPRELEASED;\r
if(SpectateNext() == 1) {\r
self.classname = "spectator";\r
}\r
+ } else {\r
+ prefered_movetype = ((!self.BUTTON_USE ? self.cvar_cl_clippedspectating : !self.cvar_cl_clippedspectating) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP);\r
+ if (self.movetype != prefered_movetype)\r
+ self.movetype = prefered_movetype;\r
}\r
} else {\r
if (!(self.BUTTON_ATCK || self.BUTTON_JUMP)) {\r
}\r
}\r
}\r
+\r
PrintWelcomeMessage(self);\r
}\r
\r
{\r
RaceCarPhysics();\r
}\r
- else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY)\r
+ else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY || self.movetype == MOVETYPE_FLY_WORLDONLY)\r
{\r
// noclipping or flying\r
self.flags &~= FL_ONGROUND;\r
float MOVETYPE_BOUNCE = 10;\r
float MOVETYPE_BOUNCEMISSILE = 11; // Like bounce but doesn't lose speed on bouncing\r
//float MOVETYPE_FOLLOW = 12; // 'Attaches' the entity to its aim_ent\r
+float MOVETYPE_FLY_WORLDONLY = 33;\r
\r
float SOLID_NOT = 0;\r
float SOLID_TRIGGER = 1;\r
\r
.float() customizeentityforclient;\r
.float cvar_cl_handicap;\r
+.float cvar_cl_clippedspectating;\r
.float cvar_scr_centertime;\r
.float cvar_cl_shownames;\r
.string cvar_g_voretournamentversion;\r
GetCvars_handleFloat(s, f, cvar_cl_shownames, "cl_shownames");\r
GetCvars_handleString(s, f, cvar_g_voretournamentversion, "g_voretournamentversion");\r
GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap");\r
+ GetCvars_handleFloat(s, f, cvar_cl_clippedspectating, "cl_clippedspectating");\r
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete);\r
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[0], "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);\r
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[1], "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);\r
\r
- 0.7 | 0.8: Add some saliva to the regurgitate particle effects (both constant and one-time effects)\r
\r
-- 0.8: Can I port the flying spectators from Xonotic?\r
-\r
- 0.7: Enable that new engine setting, to render models in batches for higher FPS\r
\r
- 0.7 | 0.8: Remake helper voices\r
- 0.7 | 0.8 BUG: Gibbed dead bodies seem to keep throwing gibs infinitely on dedicated servers.\r
\r
- 0.8: Chat portraits for all models.\r
+\r
+- 0.7: Fix flying spectators not going through teleporters and warpzones.\r