1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-22 17:35:29 +00:00

Properly fix blip rendering during scripted sequences

Changes conditionals from "DrawBlips" and "ShowRadarTrace", "ShowRadarTraceWithHeight" to allow blips to be rendered during scripted sequences when "MENU_MAP" is enabled.
This commit is contained in:
Davi 2021-07-21 23:13:35 -03:00
parent 1d1f10d68c
commit bd3c3849fe

View file

@ -485,7 +485,11 @@ void CRadar::Draw3dMarkers()
void CRadar::DrawBlips() void CRadar::DrawBlips()
{ {
if (!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud) { if ((!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud)
#ifdef MENU_MAP
|| CMenuManager::bMenuMapActive
#endif
) {
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
@ -1216,7 +1220,11 @@ void CRadar::ShowRadarMarker(CVector pos, uint32 color, float radius) {
void CRadar::ShowRadarTrace(float x, float y, uint32 size, uint8 red, uint8 green, uint8 blue, uint8 alpha) void CRadar::ShowRadarTrace(float x, float y, uint32 size, uint8 red, uint8 green, uint8 blue, uint8 alpha)
{ {
if (!CHud::m_Wants_To_Draw_Hud || TheCamera.m_WideScreenOn) if ((TheCamera.m_WideScreenOn || !CHud::m_Wants_To_Draw_Hud)
#ifdef MENU_MAP
&& !CMenuManager::bMenuMapActive
#endif
)
return; return;
CSprite2d::DrawRect(CRect(x - SCREEN_SCALE_X(size + 1.0f), y - SCREEN_SCALE_Y(size + 1.0f), SCREEN_SCALE_X(size + 1.0f) + x, SCREEN_SCALE_Y(size + 1.0f) + y), CRGBA(0, 0, 0, alpha)); CSprite2d::DrawRect(CRect(x - SCREEN_SCALE_X(size + 1.0f), y - SCREEN_SCALE_Y(size + 1.0f), SCREEN_SCALE_X(size + 1.0f) + x, SCREEN_SCALE_Y(size + 1.0f) + y), CRGBA(0, 0, 0, alpha));
@ -1225,7 +1233,11 @@ void CRadar::ShowRadarTrace(float x, float y, uint32 size, uint8 red, uint8 gree
void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red, uint8 green, uint8 blue, uint8 alpha, uint8 mode) void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red, uint8 green, uint8 blue, uint8 alpha, uint8 mode)
{ {
if (!CHud::m_Wants_To_Draw_Hud || TheCamera.m_WideScreenOn) if ((TheCamera.m_WideScreenOn || !CHud::m_Wants_To_Draw_Hud)
#ifdef MENU_MAP
&& !CMenuManager::bMenuMapActive
#endif
)
return; return;
switch (mode) switch (mode)