]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "vehicles-no-viewport test" as it never was meant to be committed.
authorRudolf Polzer <divverent@alientrap.org>
Sun, 18 Dec 2011 19:59:21 +0000 (20:59 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 18 Dec 2011 19:59:21 +0000 (20:59 +0100)
This reverts commit 8ad395df2c29ab67b0cfffab57fa45d1077b734a.

qcsrc/server/cl_client.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/vehicles/vehicles_def.qh

index 8acc933cd31f16042b8e9fa7c0feb730a6df37ba..d34a0c28756c05e966a1ff986dd41dc54b43addc 100644 (file)
@@ -2165,6 +2165,11 @@ void SpectateCopy(entity spectatee) {
         self.vehicle_ammo2 = spectatee.vehicle_ammo2;
         self.vehicle_reload1 = spectatee.vehicle_reload1;
         self.vehicle_reload2 = spectatee.vehicle_reload2;
+        
+        msg_entity = self;
+        WriteByte (MSG_ONE, SVC_SETVIEWPORT);
+        WriteEntity(MSG_ONE, spectatee);
+        //self.tur_head = spectatee.vehicle.vehicle_viewport;
     }
 }
 
@@ -2222,17 +2227,20 @@ float SpectateNext() {
                self.enemy = other;
 
        if(self.enemy.classname == "player") {
-            msg_entity = self;
-            WriteByte(MSG_ONE, SVC_SETVIEW);
-            WriteEntity(MSG_ONE, self.enemy);
            if(self.enemy.vehicle)
            {      
+            msg_entity = self;
+            WriteByte(MSG_ONE, SVC_SETVIEWPORT);
+            WriteEntity(MSG_ONE, self.enemy);
             //stuffcmd(self, "set viewsize $tmpviewsize \n");
             self.movetype = MOVETYPE_NONE;
             accuracy_resend(self);
            }
            else 
            {           
+            msg_entity = self;
+            WriteByte(MSG_ONE, SVC_SETVIEW);
+            WriteEntity(MSG_ONE, self.enemy);
             //stuffcmd(self, "set viewsize $tmpviewsize \n");
             self.movetype = MOVETYPE_NONE;
             accuracy_resend(self);
@@ -3044,8 +3052,5 @@ void PlayerPostThink (void)
                dprint(sprintf("%f %.6f\n", time, race_GetFractionalLapCount(self)));
        */
 
-       if(self.vehicle)
-               vehicles_updateplayer();
-
        CSQCMODEL_AUTOUPDATE();
 }
index 94f44b077ba53c243fed4010ec4584644ed2766a..8063c2791fd66eb0943453afe9cf92a76e890f0d 100644 (file)
@@ -499,6 +499,8 @@ void vehicles_enter()
     self.flags               -= FL_NOTARGET;
 
     msg_entity = other;
+    WriteByte (MSG_ONE, SVC_SETVIEWPORT);
+    WriteEntity(MSG_ONE, self.vehicle_viewport);
 
     WriteByte (MSG_ONE, SVC_SETVIEWANGLES);
     if(self.tur_head)
@@ -1054,8 +1056,3 @@ void bugmenot()
     self.vehicle_spawn      = self.vehicle_exit;
     self.AuxiliaryXhair     = self.AuxiliaryXhair;
 }
-
-void vehicles_updateplayer()
-{
-       setorigin(self, gettaginfo(self.vehicle.vehicle_viewport, 0));
-}
index 6e1a4cbfe1a7c9535de9dff35fef2b29bbc8e0fd..dcb1854f368b45803f828bab8a12bfa0e73e86c0 100644 (file)
@@ -44,7 +44,6 @@ float VHF_DMGHEADROLL   = 4096;
 .void() vehicle_spawn;
 
 void vehicles_exit(float eject);
-void vehicles_updateplayer(void);
 var .void(float exit_flags) vehicle_exit;
 float VHEF_NORMAL = 0;  /// User pressed exit key
 float VHEF_EJECT  = 1;  /// User pressed exit key 3 times fast (not implemented) or vehile is dying