]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/csqcmodellib/cl_player.qc
Merge branch 'TimePath/global_self' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / csqcmodellib / cl_player.qc
index da10d10ad3d56be0017123444a101aac0f675982..1a96e23dd6d6c0e1fbe77ff4744e541fa3b4ffbf 100644 (file)
@@ -220,7 +220,6 @@ void CSQCPlayer_SetCamera()
 
        if(csqcplayer)
        {
-               entity oldself = self;
                setself(csqcplayer);
 
                if(servercommandframe == 0 || clientcommandframe == 0)
@@ -298,17 +297,15 @@ void CSQCPlayer_SetCamera()
                // relink
                setorigin(self, self.origin);
 
-               setself(oldself);
+               setself(this);
        }
 
-       entity view;
-       view = CSQCModel_server2csqc(player_localentnum);
+       entity view = CSQCModel_server2csqc(player_localentnum);
 
        if(view && view != csqcplayer)
        {
-               SELFCALL(view, InterpolateOrigin_Do());
-               self.view_ofs = '0 0 1' * getstati(STAT_VIEWHEIGHT);
-               SELFCALL_DONE();
+               WITH(entity, self, view, InterpolateOrigin_Do());
+               view.view_ofs = '0 0 1' * getstati(STAT_VIEWHEIGHT);
        }
 
        if(view)