From dbcd5b0c731caf34fcf9a7b950f53e2cae40c704 Mon Sep 17 00:00:00 2001 From: Ymihere03 Date: Fri, 26 Apr 2024 22:07:24 -0600 Subject: [PATCH 1/2] Fixed to HUD bsps for colors and positioning --- rsrc/aftershock/bsps/190.json | 2 +- rsrc/aftershock/bsps/191.json | 2 +- rsrc/aftershock/bsps/192.json | 2 +- rsrc/bsps/190.json | 2 +- rsrc/bsps/191.json | 2 +- rsrc/bsps/192.json | 2 +- src/game/CAbstractPlayer.cpp | 59 ++++++++++++++++++----------------- src/game/CAbstractPlayer.h | 6 ++-- 8 files changed, 39 insertions(+), 38 deletions(-) diff --git a/rsrc/aftershock/bsps/190.json b/rsrc/aftershock/bsps/190.json index 091715b0..55f7e231 100644 --- a/rsrc/aftershock/bsps/190.json +++ b/rsrc/aftershock/bsps/190.json @@ -1 +1 @@ -{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.44869299509355,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[0,2,3],"vis":1}]} \ No newline at end of file +{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.44869299509355,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,-1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1,0,2,3],"vis":1}]} \ No newline at end of file diff --git a/rsrc/aftershock/bsps/191.json b/rsrc/aftershock/bsps/191.json index 27944298..3b16d023 100644 --- a/rsrc/aftershock/bsps/191.json +++ b/rsrc/aftershock/bsps/191.json @@ -1 +1 @@ -{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45],[0.0,0.0,0.06],[0.25,0.0,-0.37],[0.0,0.0,-0.09],[-0.25,0.0,-0.37]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.2,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[0,2,3],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[6,4,5],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[4,6,7],"vis":1}]} \ No newline at end of file +{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45],[0.0,0.0,0.06],[0.25,0.0,-0.37],[0.0,0.0,-0.09],[-0.25,0.0,-0.37]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.2,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,-1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1,0,2,3],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[6,4,5,4,6,7],"vis":1}]} \ No newline at end of file diff --git a/rsrc/aftershock/bsps/192.json b/rsrc/aftershock/bsps/192.json index 959ddebe..ea23ed7f 100644 --- a/rsrc/aftershock/bsps/192.json +++ b/rsrc/aftershock/bsps/192.json @@ -1 +1 @@ -{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45],[0.0,0.0,0.06],[0.25,0.0,-0.37],[0.0,0.0,-0.09],[-0.25,0.0,-0.37],[0.0,0.0,-0.19],[0.125,0.0,-0.3],[0.0,0.0,-0.24],[-0.125,0.0,-0.3]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.24869299509355,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[0,2,3],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[6,4,5],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[4,6,7],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[10,8,9],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[8,10,11],"vis":1}]} \ No newline at end of file +{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45],[0.0,0.0,0.06],[0.25,0.0,-0.37],[0.0,0.0,-0.09],[-0.25,0.0,-0.37],[0.0,0.0,-0.19],[0.125,0.0,-0.3],[0.0,0.0,-0.24],[-0.125,0.0,-0.3]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.24869299509355,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,-1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1,0,2,3],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[6,4,5,4,6,7],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[10,8,9,8,10,11],"vis":1}]} \ No newline at end of file diff --git a/rsrc/bsps/190.json b/rsrc/bsps/190.json index 091715b0..55f7e231 100644 --- a/rsrc/bsps/190.json +++ b/rsrc/bsps/190.json @@ -1 +1 @@ -{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.44869299509355,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[0,2,3],"vis":1}]} \ No newline at end of file +{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.44869299509355,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,-1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1,0,2,3],"vis":1}]} \ No newline at end of file diff --git a/rsrc/bsps/191.json b/rsrc/bsps/191.json index 27944298..3b16d023 100644 --- a/rsrc/bsps/191.json +++ b/rsrc/bsps/191.json @@ -1 +1 @@ -{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45],[0.0,0.0,0.06],[0.25,0.0,-0.37],[0.0,0.0,-0.09],[-0.25,0.0,-0.37]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.2,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[0,2,3],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[6,4,5],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[4,6,7],"vis":1}]} \ No newline at end of file +{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45],[0.0,0.0,0.06],[0.25,0.0,-0.37],[0.0,0.0,-0.09],[-0.25,0.0,-0.37]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.2,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,-1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1,0,2,3],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[6,4,5,4,6,7],"vis":1}]} \ No newline at end of file diff --git a/rsrc/bsps/192.json b/rsrc/bsps/192.json index 959ddebe..ea23ed7f 100644 --- a/rsrc/bsps/192.json +++ b/rsrc/bsps/192.json @@ -1 +1 @@ -{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45],[0.0,0.0,0.06],[0.25,0.0,-0.37],[0.0,0.0,-0.09],[-0.25,0.0,-0.37],[0.0,0.0,-0.19],[0.125,0.0,-0.3],[0.0,0.0,-0.24],[-0.125,0.0,-0.3]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.24869299509355,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[0,2,3],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[6,4,5],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[4,6,7],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[10,8,9],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[8,10,11],"vis":1}]} \ No newline at end of file +{"points":[[0.0,0.0,0.45],[0.4,0.0,-0.45],[0.0,0.0,0.15],[-0.4,0.0,-0.45],[0.0,0.0,0.06],[0.25,0.0,-0.37],[0.0,0.0,-0.09],[-0.25,0.0,-0.37],[0.0,0.0,-0.19],[0.125,0.0,-0.3],[0.0,0.0,-0.24],[-0.125,0.0,-0.3]],"bounds":{"min":[-0.4038728177547455,0.0,0.039832101123466],"max":[0.4038728177547455,0.0,0.492820148196188]},"center":[0.0,0.0,0.0],"radius1":0.24869299509355,"radius2":0.5964297631225726,"colors":["marker(0)"],"normals":[[0.0,-1.0,0.0]],"polys":[{"back":65535,"front":65535,"color":0,"normal":0,"tris":[2,0,1,0,2,3],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[6,4,5,4,6,7],"vis":1},{"back":65535,"front":65535,"color":0,"normal":0,"tris":[10,8,9,8,10,11],"vis":1}]} \ No newline at end of file diff --git a/src/game/CAbstractPlayer.cpp b/src/game/CAbstractPlayer.cpp index ff86473b..14f5a390 100644 --- a/src/game/CAbstractPlayer.cpp +++ b/src/game/CAbstractPlayer.cpp @@ -655,7 +655,7 @@ void CAbstractPlayer::LoadDashboardParts() { // Weapons grenadeLabel = DashboardPart(kGrenadeBSP, FIX3(700*layoutScale)); missileLabel = DashboardPart(kMissileBSP, FIX3(700*layoutScale)); - boosterLabel = DashboardPart(kBoosterBSP, FIX3(20*layoutScale)); + boosterLabel = DashboardPart(kBoosterBSP, FIX3(27*(layoutScale))); livesLabel = DashboardPart(hullConfig.hullBSP, FIX3(140*layoutScale)); for (int i = 0; i < 4; i++) { grenadeMeter[i] = DashboardPart(kFilledBox, FIX3(100*layoutScale)); @@ -753,7 +753,7 @@ void CAbstractPlayer::RenderDashboard() { if (itsGame->itsApp->Get(kHUDShowMissileLock)) { if (weapon && weapon->isTargetLocked) { - DashboardPosition(lockLight, 0.0, -0.1); + DashboardPosition(lockLight, 0.0, -0.1, false); lockLight->Scale(FIX(.6)); } } @@ -773,19 +773,19 @@ void CAbstractPlayer::RenderDashboard() { // Ammo Labels if (itsGame->itsApp->Get(kHUDShowGrenadeCount) && grenadeLimit != 0) { - DashboardPosition(grenadeLabel, false, grenadePosition[0], grenadePosition[1]-(.09f*(layoutScale/2.0)), 0, dashboardSpinHeading, 0); + DashboardPosition(grenadeLabel, false, grenadePosition[0], grenadePosition[1]-(.09f*(layoutScale/2.0)), false, 0, dashboardSpinHeading, 0); } if (itsGame->itsApp->Get(kHUDShowMissileCount) && missileLimit != 0) { - DashboardPosition(missileLabel, false, missilePosition[0], missilePosition[1]-(.09f*(layoutScale/2.0)), 0, dashboardSpinHeading, 0); + DashboardPosition(missileLabel, false, missilePosition[0], missilePosition[1]-(.09f*(layoutScale/2.0)), false, 0, dashboardSpinHeading, 0); } if (itsGame->itsApp->Get(kHUDShowBoosterCount) && boosterLimit != 0) { - DashboardPosition(boosterLabel, false, boosterPosition[0], boosterPosition[1]-(.03f*(layoutScale/2.0)), FIX(90.0), FIX(60.0), 0); + DashboardPosition(boosterLabel, false, boosterPosition[0], boosterPosition[1]-(.036f*(layoutScale/2.0)), false, FIX(-90.0), 0, 0); } if (itsGame->itsApp->Get(kHUDShowLivesCount) && lives > 0 && lives <= 10) { - DashboardPosition(livesLabel, false, livesPosition[0], livesPosition[1]-(.045f*(layoutScale/2.0)), FIX(40.0), dashboardSpinHeading, 0); + DashboardPosition(livesLabel, false, livesPosition[0], livesPosition[1]-(.045f*(layoutScale/2.0)), false, FIX(40.0), dashboardSpinHeading, 0); } // Ammo counts @@ -793,48 +793,48 @@ void CAbstractPlayer::RenderDashboard() { if (itsGame->itsApp->Get(kHUDShowGrenadeCount) && 0 < grenadeLimit) { if (float(i)/4.0 < float(grenadeCount)/float(grenadeLimit)) { // Fill box - DashboardPosition(grenadeMeter[i], true, grenadePosition[0], grenadePosition[1]+(float(i)/weaponSpacing)); + DashboardPosition(grenadeMeter[i], true, grenadePosition[0], grenadePosition[1]+(float(i)/weaponSpacing), false); } else { // Empty box - DashboardPosition(grenadeBox[i], true, grenadePosition[0], grenadePosition[1]+(float(i)/weaponSpacing)); + DashboardPosition(grenadeBox[i], true, grenadePosition[0], grenadePosition[1]+(float(i)/weaponSpacing), false); } } if (itsGame->itsApp->Get(kHUDShowMissileCount) && 0 < missileLimit) { if (i < missileCount) { // Fill box - DashboardPosition(missileMeter[i], true, missilePosition[0], missilePosition[1]+(float(i)/weaponSpacing)); + DashboardPosition(missileMeter[i], true, missilePosition[0], missilePosition[1]+(float(i)/weaponSpacing), false); } else { // Empty box - DashboardPosition(missileBox[i], true, missilePosition[0], missilePosition[1]+(float(i)/weaponSpacing)); + DashboardPosition(missileBox[i], true, missilePosition[0], missilePosition[1]+(float(i)/weaponSpacing), false); } } if (itsGame->itsApp->Get(kHUDShowBoosterCount) && 0 < boosterLimit) { if (i < boostsRemaining) { // Fill box - DashboardPosition(boosterMeter[i], true, boosterPosition[0], boosterPosition[1]+(float(i)/boosterSpacing)); + DashboardPosition(boosterMeter[i], true, boosterPosition[0], boosterPosition[1]+(float(i)/boosterSpacing), false); } else { // Empty box - DashboardPosition(boosterBox[i], true, boosterPosition[0], boosterPosition[1]+(float(i)/boosterSpacing)); + DashboardPosition(boosterBox[i], true, boosterPosition[0], boosterPosition[1]+(float(i)/boosterSpacing), false); } } if (itsGame->itsApp->Get(kHUDShowLivesCount) && lives > 0 && lives <= 10) { if (i < lives) { // Fill box - DashboardPosition(livesMeter[i], true, livesPosition[0], livesPosition[1]+(float(i)/livesSpacing)); + DashboardPosition(livesMeter[i], true, livesPosition[0], livesPosition[1]+(float(i)/livesSpacing), false); } else { // Empty box - DashboardPosition(livesBox[i], true, livesPosition[0], livesPosition[1]+(float(i)/livesSpacing)); + DashboardPosition(livesBox[i], true, livesPosition[0], livesPosition[1]+(float(i)/livesSpacing), false); } } } // Shields if (itsGame->itsApp->Get(kHUDShowShieldGauge)) { - DashboardPosition(shieldLabel, false, shieldPosition[0], shieldPosition[1]-(.22f*(layoutScale/2.0))); - DashboardPosition(shieldGaugeBackLight, shieldPosition[0], shieldPosition[1]); + DashboardPosition(shieldLabel, false, shieldPosition[0], shieldPosition[1]-(.22f*(layoutScale/2.0)), false); + DashboardPosition(shieldGaugeBackLight, shieldPosition[0], shieldPosition[1], false); Fixed shieldPercent = 0; if (maxShields > 0) shieldPercent = FDiv(shields, maxShields); @@ -854,14 +854,14 @@ void CAbstractPlayer::RenderDashboard() { // Gauge moves further when energy is lower float shieldYOffset = abs(ToFloat(FIX1 - shieldPercent)); - DashboardPosition(shieldGauge, shieldPosition[0], shieldPosition[1] - (offsetMultiplier * shieldYOffset)); + DashboardPosition(shieldGauge, shieldPosition[0], shieldPosition[1] - (offsetMultiplier * shieldYOffset), true); shieldGauge->ScaleXYZ(ToFixed(layoutScale), shieldHeight, ToFixed(layoutScale)); } // Energy if (itsGame->itsApp->Get(kHUDShowEnergyGauge)) { - DashboardPosition(energyLabel, false, energyPosition[0], energyPosition[1]-(.21f*(layoutScale/2.0))); - DashboardPosition(energyGaugeBackLight, energyPosition[0], energyPosition[1]); + DashboardPosition(energyLabel, false, energyPosition[0], energyPosition[1]-(.21f*(layoutScale/2.0)), false); + DashboardPosition(energyGaugeBackLight, energyPosition[0], energyPosition[1], false); Fixed energyPercent = 0; if (maxEnergy > 0) energyPercent = FDiv(energy, maxEnergy); @@ -882,20 +882,20 @@ void CAbstractPlayer::RenderDashboard() { // Gauge moves further when energy is lower float energyYOffset = abs(ToFloat(FIX1 - energyPercent)); - DashboardPosition(energyGauge, energyPosition[0], energyPosition[1] - (offsetMultiplier * energyYOffset )); + DashboardPosition(energyGauge, energyPosition[0], energyPosition[1] - (offsetMultiplier * energyYOffset ), true); energyGauge->ScaleXYZ(ToFixed(layoutScale), energyHeight, ToFixed(layoutScale)); } } -void CAbstractPlayer::DashboardPosition(CScaledBSP *part, float x, float y) { - DashboardPosition(part, false, x, y, 0, 0, 0); +void CAbstractPlayer::DashboardPosition(CScaledBSP *part, float x, float y, bool useZOffset) { + DashboardPosition(part, false, x, y, useZOffset, 0, 0, 0); } -void CAbstractPlayer::DashboardPosition(CScaledBSP *part, bool autoRot, float x, float y) { - DashboardPosition(part, autoRot, x, y, 0, 0, 0); +void CAbstractPlayer::DashboardPosition(CScaledBSP *part, bool autoRot, float x, float y, bool useZOffset) { + DashboardPosition(part, autoRot, x, y, useZOffset, 0, 0, 0); } -void CAbstractPlayer::DashboardPosition(CScaledBSP *part, bool autoRot, float x, float y, Fixed x_rot, Fixed y_rot, Fixed z_rot) { +void CAbstractPlayer::DashboardPosition(CScaledBSP *part, bool autoRot, float x, float y, bool useZOffset, Fixed x_rot, Fixed y_rot, Fixed z_rot) { // Draw a part on the dashboard - // Coordinates on the screen are roughly described as a percentage of the screen away from the bottom and the left + // X/Y Coordinates on the screen are roughly described as a percentage of the screen away from the bottom and the left // (-1.0, -1.0) is the bottom left of the screen // (1.0, 1.0) is the top right of the screen @@ -907,6 +907,10 @@ void CAbstractPlayer::DashboardPosition(CScaledBSP *part, bool autoRot, float x, float scale_y = 8.23; Fixed hud_dist = (FIX3(6000) * 25)/8; + // Prevent z-fighting if parts are layered on top of each other + if (useZOffset) + hud_dist -= FIX3(1); + // Turn elements toward the center of the screen for a better 3d look // Being further away from the center results in greater rotation float yAng = 0; @@ -921,9 +925,6 @@ void CAbstractPlayer::DashboardPosition(CScaledBSP *part, bool autoRot, float x, } } - //InitialRotatePartX(part, FDegToRad(x_rot)); - //InitialRotatePartY(part, FDegToRad(y_rot + ToFixed(yAng))); - //InitialRotatePartZ(part, FDegToRad(z_rot)); part->isTransparent = false; part->Reset(); part->RotateOneX(FDegToOne(x_rot)); diff --git a/src/game/CAbstractPlayer.h b/src/game/CAbstractPlayer.h index f4020d1e..d5f4cf02 100644 --- a/src/game/CAbstractPlayer.h +++ b/src/game/CAbstractPlayer.h @@ -286,9 +286,9 @@ class CAbstractPlayer : public CRealMovers { virtual CScaledBSP* DashboardPart(uint16_t id); virtual CScaledBSP* DashboardPart(uint16_t id, Fixed scale); virtual void RenderDashboard(); - virtual void DashboardPosition(CScaledBSP *part, float x, float y); - virtual void DashboardPosition(CScaledBSP *part, bool autoRot, float x, float y); - virtual void DashboardPosition(CScaledBSP *part, bool autoRot, float x, float y, Fixed x_rot, Fixed y_rot, Fixed z_rot); + virtual void DashboardPosition(CScaledBSP *part, float x, float y, bool useZOffset); + virtual void DashboardPosition(CScaledBSP *part, bool autoRot, float x, float y, bool useZOffset); + virtual void DashboardPosition(CScaledBSP *part, bool autoRot, float x, float y, bool useZOffset, Fixed x_rot, Fixed y_rot, Fixed z_rot); virtual void DashboardFixedPosition(CScaledBSP *part, float dist, Fixed angle); virtual void DashboardFixedPosition(CScaledBSP *part, float dist, Fixed angle, float height, Fixed x_rot, Fixed y_rot, Fixed z_rot); virtual void ResetDashboard(); From 54f860d3f11fd30b3704bcccc1cb9b2075ab0ca6 Mon Sep 17 00:00:00 2001 From: Ymihere03 Date: Thu, 9 May 2024 11:33:01 -0600 Subject: [PATCH 2/2] Don't show kill feed when game is over --- src/game/CHUD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/CHUD.cpp b/src/game/CHUD.cpp index d3f7b689..4f93589c 100644 --- a/src/game/CHUD.cpp +++ b/src/game/CHUD.cpp @@ -717,7 +717,7 @@ void CHUD::DrawShadowBox(NVGcontext *ctx, int x, int y, int width, int height) { void CHUD::DrawKillFeed(NVGcontext *ctx, CNetManager *net, int bufferWidth, float fontSize) { // Kill Events - if (itsGame->itsApp->Get(kHUDShowKillFeed) && !itsGame->scoreEventList.empty()) { + if (itsGame->itsApp->Get(kHUDShowKillFeed) && net->isPlaying && !itsGame->scoreEventList.empty()) { float killEventPosition[2] = {(float)bufferWidth - 50.0f, 200.0f}; float killEventSize[2] = {0, 0};