]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' of /var/cache/git/xonotic/xonotic-data.pk3dir
authorRudolf Polzer <divverent@alientrap.org>
Sat, 31 Dec 2011 09:16:29 +0000 (10:16 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 31 Dec 2011 09:16:29 +0000 (10:16 +0100)
1  2 
qcsrc/csqcmodellib/cl_player.qc

index 242dc81e028a51da9e6b521bdca1494f5bcced67,c48dc41c8ae0def3d0b6c57678f2aa056ca20b47..66b32befab0ea247f6f219511c7768f86da841d2
@@@ -209,6 -209,15 +209,15 @@@ void CSQCPlayer_SetCamera(
        view = CSQCModel_server2csqc(player_localentnum);
  #endif
  
+       if(view != csqcplayer)
+       {
+               entity oldself = self;
+               self = view;
+               InterpolateOrigin_Do();
+               self.view_ofs = '0 0 1' * getstati(STAT_VIEWHEIGHT);
+               self = oldself;
+       }
  #ifdef COMPAT_XON050_ENGINE
        if(view && !(checkextension("DP_CSQC_V_CALCREFDEF") || checkextension("DP_CSQC_V_CALCREFDEF_WIP1")))
        {
        }
        else
        {
 +              // FIXME by CSQC spec we have to do this:
 +              // but it breaks chase cam
 +              /*
                setproperty(VF_ORIGIN, pmove_org + '0 0 1' * getstati(STAT_VIEWHEIGHT));
                setproperty(VF_ANGLES, view_angles);
 +              */
        }
  
        { CSQCPLAYER_HOOK_POSTCAMERASETUP }
  
  void CSQCPlayer_Remove()
  {
-       if(self.entnum != player_localnum + 1)
-               return;
        csqcplayer = world;
-       cvar_clientsettemp("cl_movement_replay", "1");
+       cvar_settemp("cl_movement_replay", "1");
  }
  
  float CSQCPlayer_PreUpdate()
  {
-       if(self.entnum != player_localnum + 1)
+       if(self != csqcplayer)
                return 0;
-       cvar_clientsettemp("cl_movement_replay", "0");
        if(csqcplayer_status != CSQCPLAYERSTATUS_FROMSERVER)
                CSQCPlayer_Unpredict();
        return 1;
  
  float CSQCPlayer_PostUpdate()
  {
-       if(self.entnum != player_localentnum)
+       if(self.entnum != player_localnum + 1)
                return 0;
-       csqcplayer_status = CSQCPLAYERSTATUS_FROMSERVER;
        csqcplayer = self;
+       csqcplayer_status = CSQCPLAYERSTATUS_FROMSERVER;
+       cvar_settemp("cl_movement_replay", "0");
        self.entremove = CSQCPlayer_Remove;
        return 1;
  }