]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
warpzones: fix attempt for physics to adjust for warpzone transforms; may be VERY...
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 28 Apr 2011 20:10:28 +0000 (22:10 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 28 Apr 2011 20:10:28 +0000 (22:10 +0200)
qcsrc/server/cl_physics.qc
qcsrc/warpzonelib/server.qc
qcsrc/warpzonelib/server.qh

index 9662e0ae61035dbe402bfec093c71f0753a99644..defbb04e426de3750529768c2234931da019a2e7 100644 (file)
@@ -884,6 +884,8 @@ void SV_PlayerPhysics()
        if (self.deadflag)
                goto end;
 
+       WarpZoneLib_PlayerPhysics_FixVAngle();
+
        if (!self.fixangle && !g_bugrigs)
        {
                self.angles_x = 0;
index e0dfc6675342eb9282283f6f6599398896370e4a..bf2cca7e59d92935290c2f267f93eab135ef96b6 100644 (file)
@@ -89,7 +89,8 @@ float WarpZone_Teleport(entity player)
        WarpZone_RefSys_Add(player, self);
        WarpZone_TeleportPlayer(self, player, o1 - player.view_ofs, a1, v1);
        WarpZone_StoreProjectileData(player);
-       player.warpzone_teleport_time = time;
+       player.warpzone_teleport_time = servertime;
+       player.warpzone_teleport_zone = self;
 
        return 1;
 }
@@ -685,3 +686,9 @@ void spawnfunc_target_warpzone_reconnect()
 {
        spawnfunc_trigger_warpzone_reconnect(); // both names make sense here :(
 }
+
+void WarpZone_PlayerPhysics_FixVAngle(void)
+{
+       if(time < self.warpzone_teleport_time)
+               self.v_angle = WarpZone_TransformVAngles(self.warpzone_teleport_zone, self.v_angle);
+}
index 392e6f39d13ff41e454ac61fdb69cab789cf96e5..621e0f9517169e3d9ea22a8329baad9347decbfb 100644 (file)
@@ -8,3 +8,5 @@ float WarpZone_Projectile_Touch_ImpactFilter_Callback();
 // server must also define a float called ENT_CLIENT_WARPZONE for the initial byte of WarpZone entities
 const float ENT_CLIENT_WARPZONE;
 const float ENT_CLIENT_WARPZONE_CAMERA;
+
+void WarpZone_PlayerPhysics_FixVAngle(void);