Skip to content

Commit

Permalink
Revert "Add hud viewport data exports"
Browse files Browse the repository at this point in the history
This reverts commit 8aa3f20.
  • Loading branch information
Drombeys committed Sep 23, 2024
1 parent 8aa3f20 commit 407248a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
9 changes: 0 additions & 9 deletions src/Layers/xrRender/Blender_Recorder_StandartBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,6 @@ static class cl_inv_v : public R_constant_setup
}
} binder_inv_v;

static class cl_m_hud_params : public R_constant_setup
{
virtual void setup(R_constant* C) {
RCache.set_c(C, RDEVICE.hudViewportData.isRenderProcess, RDEVICE.hudViewportData.isRenderActive, 0.0f, RDEVICE.hudViewportData.renderZoomRotateFactor);
}
} binder_m_hud_params;

// Standart constant-binding
void CBlender_Compile::SetMapping()
{
Expand Down Expand Up @@ -600,8 +593,6 @@ void CBlender_Compile::SetMapping()
// Rain
r_Constant ("rain_params", &binder_rain_params);

r_Constant("m_hud_params", &binder_m_hud_params);

// detail
//if (bDetail && detail_scaler)
// Igor: bDetail can be overridden by no_detail_texture option.
Expand Down
6 changes: 0 additions & 6 deletions src/xrEngine/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ class ENGINE_API CRenderDeviceData
BOOL b_is_Ready;
BOOL b_is_Active;
public:
struct {
float renderZoomFactor = 1.0f;
float renderZoomRotateFactor = 0.0f;
bool isRenderActive{};
bool isRenderProcess{};
} hudViewportData;

// Engine flow-control
u32 dwFrame;
Expand Down
8 changes: 1 addition & 7 deletions src/xrGame/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,10 +1094,8 @@ void CActor::UpdateCL ()

psHUD_Flags.set( HUD_CROSSHAIR_RT2, B );
psHUD_Flags.set( HUD_DRAW_RT, pWeapon->show_indicators() );
Device.hudViewportData.renderZoomRotateFactor = pWeapon->GetAimFactor();
Device.hudViewportData.renderZoomFactor = pWeapon->GetZoomFactor();
Device.hudViewportData.isRenderActive = pWeapon->IsScopeAttached() && (pWeapon->GetAimFactor() > 0.0f) && (pWeapon->GetZoomFactor() > 0.0f);
}

}
else
{
Expand All @@ -1107,10 +1105,6 @@ void CActor::UpdateCL ()
HUD().SetCrosshairDisp(0.f);
HUD().ShowCrosshair(false);

Device.hudViewportData.renderZoomRotateFactor = 0.0f;
Device.hudViewportData.renderZoomFactor = 1.0f;
Device.hudViewportData.isRenderActive = false;

// Switch back to third-person if was forced
if (bLook_cam_fp_zoom && cam_active == eacFirstEye) {
cam_Set(eacLookAt);
Expand Down

0 comments on commit 407248a

Please sign in to comment.