]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/csqcmodellib/cl_player.qc
change hceck back to WIP1, it's harmless
[xonotic/xonotic-data.pk3dir.git] / qcsrc / csqcmodellib / cl_player.qc
index c48dc41c8ae0def3d0b6c57678f2aa056ca20b47..d9a2782c44c5eb2c5543f5dcb3da042a8aac33ed 100644 (file)
@@ -209,7 +209,7 @@ void CSQCPlayer_SetCamera()
        view = CSQCModel_server2csqc(player_localentnum);
 #endif
 
-       if(view != csqcplayer)
+       if(view && view != csqcplayer)
        {
                entity oldself = self;
                self = view;
@@ -237,12 +237,23 @@ void CSQCPlayer_SetCamera()
                if(input_buttons & 4)
                        refdefflags |= REFDEFFLAG_JUMPING;
 
+               // note: these two only work in WIP2, but are harmless in WIP1
+               if(getstati(STAT_HEALTH) <= 0)
+                       refdefflags |= REFDEFFLAG_DEAD;
+
+               if(intermission)
+                       refdefflags |= REFDEFFLAG_INTERMISSION;
+
                V_CalcRefdef(view, refdefflags);
        }
        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 }