From: Mario Date: Sun, 3 Jan 2016 14:30:53 +0000 (+1000) Subject: Make sure it can't be null X-Git-Tag: xonotic-v0.8.2~1307 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ed4304fccd0aa8992c7c6643bc061dd2ef661e64;p=xonotic%2Fxonotic-data.pk3dir.git Make sure it can't be null --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index f1d083173..1999bfb5a 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1486,6 +1486,8 @@ void CSQC_UpdateView(float w, float h) 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);