mirror of
https://github.com/DrBeef/Raze.git
synced 2025-03-06 17:31:22 +00:00
Fix terrible headtracking in Blood
This commit is contained in:
parent
d507b0f60e
commit
8634e397fa
2 changed files with 6 additions and 9 deletions
|
@ -17,17 +17,11 @@ LOCAL_MODULE := raze
|
|||
LOCAL_CFLAGS := -D$(OPENXR_HMD) -funsigned-char -DHAVE_GLES2 -DUSE_OPENGL -DNO_CLOCK_GETTIME -DUSE_GL_HW_BUFFERS -fvisibility=hidden -frtti -D__MOBILE__ -DOPNMIDI_DISABLE_GX_EMULATOR -DGZDOOM -DGZDOOM_GL3 -D__STDINT_LIMITS -DENGINE_NAME=\"gzdoom_dev\"
|
||||
LOCAL_CPPFLAGS := -D$(OPENXR_HMD) -include g_pch.h -DHAVE_FLUIDSYNTH -DHAVE_MPG123 -DHAVE_SNDFILE -std=c++17 -Wno-inconsistent-missing-override -Werror=format-security -fexceptions -fpermissive -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D__forceinline=inline -DNO_GTK -DNO_SSE
|
||||
|
||||
LOCAL_CFLAGS += -DNO_SEND_STATS
|
||||
|
||||
LOCAL_CFLAGS += -DOPNMIDI_USE_LEGACY_EMULATOR
|
||||
LOCAL_CFLAGS += -DADLMIDI_DISABLE_MUS_SUPPORT -DADLMIDI_DISABLE_XMI_SUPPORT -DADLMIDI_DISABLE_MIDI_SEQUENCER
|
||||
LOCAL_CFLAGS += -DOPNMIDI_DISABLE_MUS_SUPPORT -DOPNMIDI_DISABLE_XMI_SUPPORT -DOPNMIDI_DISABLE_MIDI_SEQUENCER
|
||||
|
||||
ifeq ($(BUILD_SERIAL),1)
|
||||
LOCAL_CPPFLAGS += -DANTI_HACK
|
||||
endif
|
||||
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(TOP_DIR)/../../../../../3rdParty/khronos/openxr/OpenXR-SDK/include \
|
||||
$(TOP_DIR)/../../../../../3rdParty/khronos/openxr/OpenXR-SDK/src/common \
|
||||
|
|
|
@ -208,8 +208,11 @@ FRenderViewpoint SetupViewpoint(DCoreActor* cam, const DVector3& position, int s
|
|||
float dummy, yaw, pitch, roll;
|
||||
VR_GetMove(&dummy, &dummy, &dummy, &dummy, &dummy, &yaw, &pitch, &roll);
|
||||
|
||||
//Don't do the following if rendering a camera tex
|
||||
if (!cam || !(cam->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
//Special handling for Duke's security cameras
|
||||
bool renderingSecurityCamera = isDuke() && (cam && cam->spr.cstat & CSTAT_SPRITE_INVISIBLE);
|
||||
|
||||
//Only do the following if not rendering a camera tex
|
||||
if (!renderingSecurityCamera)
|
||||
{
|
||||
//Yaw
|
||||
float hmdYawDeltaDegrees;
|
||||
|
@ -238,7 +241,7 @@ FRenderViewpoint SetupViewpoint(DCoreActor* cam, const DVector3& position, int s
|
|||
r_viewpoint.SectNums = nullptr;
|
||||
r_viewpoint.SectCount = sectnum;
|
||||
r_viewpoint.Pos = { position.X, -position.Y, -position.Z };
|
||||
if (cam && cam->spr.cstat & CSTAT_SPRITE_INVISIBLE)
|
||||
if (renderingSecurityCamera)
|
||||
{
|
||||
r_viewpoint.HWAngles.Yaw = FAngle::fromDeg(-90.f + (float)angles.Yaw.Degrees());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue