]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make warpzones nicer with chase_active (no longer hide the player)
authorRudolf Polzer <divverent@xonotic.org>
Sat, 28 May 2011 06:18:47 +0000 (08:18 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 28 May 2011 06:18:47 +0000 (08:18 +0200)
qcsrc/warpzonelib/client.qc

index fb78595a182b2ba86ad8787f1d6ef0f5c471a6d9..d0e797448effce04ba99e24f69349b86a520e4aa 100644 (file)
@@ -164,14 +164,7 @@ void WarpZone_Teleported_Read(float isnew)
 
 float warpzone_fixingview;
 float warpzone_fixingview_drawexteriormodel;
-void WarpZone_View_Inside()
-{
-       if(warpzone_fixingview)
-               return;
-       warpzone_fixingview = 1;
-       warpzone_fixingview_drawexteriormodel = cvar("r_drawexteriormodel");
-       cvar_set("r_drawexteriormodel", "0");
-}
+float autocvar_chase_active;
 
 void WarpZone_View_Outside()
 {
@@ -179,8 +172,20 @@ void WarpZone_View_Outside()
                return;
        warpzone_fixingview = 0;
        cvar_set("r_drawexteriormodel", ftos(warpzone_fixingview_drawexteriormodel));
-       //cvar_set("cl_sidespeed", ftos(warpzone_fixingview_sidespeed));
-       //cvar_set("cl_forwardspeed", ftos(warpzone_fixingview_forwardspeed));
+}
+
+void WarpZone_View_Inside()
+{
+       if(autocvar_chase_active)
+       {
+               WarpZone_View_Outside();
+               return;
+       }
+       if(warpzone_fixingview)
+               return;
+       warpzone_fixingview = 1;
+       warpzone_fixingview_drawexteriormodel = cvar("r_drawexteriormodel");
+       cvar_set("r_drawexteriormodel", "0");
 }
 
 vector WarpZone_FixNearClip(vector o, vector c0, vector c1, vector c2, vector c3)