Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to HUD bsps for colors and positioning #404

Merged
merged 4 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rsrc/aftershock/bsps/190.json
Original file line number Diff line number Diff line change
@@ -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}]}
{"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}]}
2 changes: 1 addition & 1 deletion rsrc/aftershock/bsps/191.json
Original file line number Diff line number Diff line change
@@ -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}]}
{"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}]}
2 changes: 1 addition & 1 deletion rsrc/aftershock/bsps/192.json
Original file line number Diff line number Diff line change
@@ -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}]}
{"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}]}
2 changes: 1 addition & 1 deletion rsrc/bsps/190.json
Original file line number Diff line number Diff line change
@@ -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}]}
{"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}]}
2 changes: 1 addition & 1 deletion rsrc/bsps/191.json
Original file line number Diff line number Diff line change
@@ -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}]}
{"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}]}
2 changes: 1 addition & 1 deletion rsrc/bsps/192.json
Original file line number Diff line number Diff line change
@@ -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}]}
{"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}]}
59 changes: 30 additions & 29 deletions src/game/CAbstractPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
}
}
Expand All @@ -773,68 +773,68 @@ 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
for (int i = 0; i < 4; i++) {
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);
Expand All @@ -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);
Expand All @@ -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

Expand All @@ -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;
Expand All @@ -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));
Expand Down
6 changes: 3 additions & 3 deletions src/game/CAbstractPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/game/CHUD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
Loading