]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make sure it can't be null
authorMario <mario@smbclan.net>
Sun, 3 Jan 2016 14:30:53 +0000 (00:30 +1000)
committerMario <mario@smbclan.net>
Sun, 3 Jan 2016 14:30:53 +0000 (00:30 +1000)
qcsrc/client/view.qc

index f1d083173cec09cf446afeeef143eb4878b163ee..1999bfb5acd34783d6309f538330aefa3e3e649b 100644 (file)
@@ -1486,6 +1486,8 @@ void CSQC_UpdateView(float w, float h)
                        eventchase_running = true;
 
                        entity local_player = ((csqcplayer) ? csqcplayer : CSQCModel_server2csqc(player_localentnum - 1));
                        eventchase_running = true;
 
                        entity local_player = ((csqcplayer) ? csqcplayer : CSQCModel_server2csqc(player_localentnum - 1));
+                       if(!local_player)
+                               local_player = self; // fall back!
 
                        // make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.)
                        vector current_view_origin = (csqcplayer ? csqcplayer.origin : pmove_org);
 
                        // make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.)
                        vector current_view_origin = (csqcplayer ? csqcplayer.origin : pmove_org);