]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Change MOVETYPE_SPECTATOR to MOVETYPE_FLY_WORLDONLY
authorSamual <samual@xonotic.org>
Tue, 16 Aug 2011 19:49:20 +0000 (15:49 -0400)
committerSamual <samual@xonotic.org>
Tue, 16 Aug 2011 19:49:20 +0000 (15:49 -0400)
qcsrc/client/movetypes.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/constants.qh
qcsrc/server/extensions.qh
qcsrc/warpzonelib/server.qc

index 2a917718f9225f397f039b31d079dbfb876e77c1..c6ab6543cb347efe7825c07c18cea339d25bb03a 100644 (file)
@@ -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;
index 60dbeda7e15df958ac656f4f6aedaef73b7dbb72..8d096b21e702cecf55f2d0bba8e226be4bc95607 100644 (file)
@@ -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;
                }
index 5f82d61e5bf8b374a1461c707e0864304e386204..1012734302a67f372e1979a78e2bdacbc7498526 100644 (file)
@@ -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;
index 038dae4664257c9f65a8d34d68a12dce9e89fef4..5e18a5cc60c55bb4936887ab9fab6f8b80153105 100644 (file)
@@ -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;
index 1aba127a584f1b7a4c46b17dda93a060bdf48e31..8422cf5df8d7b73294b0b18cf6061e4f7730ee41 100644 (file)
@@ -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
index 0a50d3235f76dcbad3ef687a3b456f7889643527..29a378dc6c27892ce17635dfd1711c260f689f1e 100644 (file)
@@ -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