From: Samual Date: Tue, 16 Aug 2011 19:49:20 +0000 (-0400) Subject: Change MOVETYPE_SPECTATOR to MOVETYPE_FLY_WORLDONLY X-Git-Tag: xonotic-v0.5.0~109^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=96d9d8041d026f3a3a7e9459ba8cd91cb434e7cc;p=xonotic%2Fxonotic-data.pk3dir.git Change MOVETYPE_SPECTATOR to MOVETYPE_FLY_WORLDONLY --- diff --git a/qcsrc/client/movetypes.qh b/qcsrc/client/movetypes.qh index 2a917718f..c6ab6543c 100644 --- a/qcsrc/client/movetypes.qh +++ b/qcsrc/client/movetypes.qh @@ -28,7 +28,7 @@ float MOVETYPE_BOUNCE = 10; float MOVETYPE_BOUNCEMISSILE = 11; // Like bounce but doesn't lose speed on bouncing float MOVETYPE_FOLLOW = 12; float MOVETYPE_FAKEPUSH = 13; -float MOVETYPE_SPECTATOR = 14; +float MOVETYPE_FLY_WORLDONLY = 33; float FL_ITEM = 256; float FL_ONGROUND = 512; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 60dbeda7e..8d096b21e 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -665,7 +665,7 @@ void PutObserverInServer (void) self.health = -666; self.takedamage = DAMAGE_NO; self.solid = SOLID_NOT; - self.movetype = MOVETYPE_SPECTATOR; //(self.cvar_cl_clippedspectating ? MOVETYPE_NOCLIP : MOVETYPE_FLY); // it's too early for this anyway, lets just set it in playerprethink + self.movetype = MOVETYPE_FLY_WORLDONLY; //(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; @@ -2514,7 +2514,7 @@ void ObserverThink() self.classname = "spectator"; } } else { - prefered_movetype = ((self.cvar_cl_clippedspectating && !self.BUTTON_USE) ? MOVETYPE_SPECTATOR : MOVETYPE_NOCLIP); + prefered_movetype = ((self.cvar_cl_clippedspectating && !self.BUTTON_USE) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP); if (self.movetype != prefered_movetype) self.movetype = prefered_movetype; } diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 5f82d61e5..101273430 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -963,7 +963,7 @@ void SV_PlayerPhysics() { RaceCarPhysics(); } - else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY || self.movetype == MOVETYPE_SPECTATOR) + else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY || self.movetype == MOVETYPE_FLY_WORLDONLY) { // noclipping or flying self.flags &~= FL_ONGROUND; diff --git a/qcsrc/server/constants.qh b/qcsrc/server/constants.qh index 038dae466..5e18a5cc6 100644 --- a/qcsrc/server/constants.qh +++ b/qcsrc/server/constants.qh @@ -33,7 +33,7 @@ float MOVETYPE_FLYMISSILE = 9; float MOVETYPE_BOUNCE = 10; float MOVETYPE_BOUNCEMISSILE = 11; // Like bounce but doesn't lose speed on bouncing //float MOVETYPE_FOLLOW = 12; // 'Attaches' the entity to its aim_ent -float MOVETYPE_SPECTATOR = 14; +//float MOVETYPE_FLY_WORLDONLY = 33; float SOLID_NOT = 0; float SOLID_TRIGGER = 1; diff --git a/qcsrc/server/extensions.qh b/qcsrc/server/extensions.qh index 1aba127a5..8422cf5df 100644 --- a/qcsrc/server/extensions.qh +++ b/qcsrc/server/extensions.qh @@ -520,6 +520,14 @@ void(entity e, entity tagentity, string tagname) setattachment = #443; // attach //description: //MOVETYPE_BOUNCE but without gravity, and with full reflection (no speed loss like grenades have), in other words - bouncing laser bolts. +//DP_MOVETYPEFLYWORLDONLY +//idea: Samual +//darkplaces implementation: Samual +//movetype definitions: +float MOVETYPE_FLY_WORLDONLY = 33; +//description: +//like MOVETYPE_FLY, but does all traces with MOVE_WORLDONLY, and is ignored by MOVETYPE_PUSH. Should only be combined with SOLID_NOT and SOLID_TRIGGER. + //DP_NULL_MODEL //idea: Chris //darkplaces implementation: divVerent diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index 0a50d3235..29a378dc6 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -784,7 +784,7 @@ void WarpZone_StartFrame() if(f == CLIENTTYPE_REAL) { if(e.solid == SOLID_NOT) // not spectating? - if(e.movetype == MOVETYPE_NOCLIP || e.movetype == MOVETYPE_FLY || e.movetype == MOVETYPE_SPECTATOR) // not spectating? (this is to catch observers) + if(e.movetype == MOVETYPE_NOCLIP || e.movetype == MOVETYPE_FLY || e.movetype == MOVETYPE_FLY_WORLDONLY) // not spectating? (this is to catch observers) { other = e; // player