From a7b57462fa39eac3693dcba77a02fd592fa97a7a Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 15 Mar 2025 21:27:06 +1100 Subject: [PATCH] Completely skip entity name rendering code in singleplayer --- src/EntityRenderers.c | 5 +++++ src/Graphics_SoftGPU.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/EntityRenderers.c b/src/EntityRenderers.c index f08b3d6a5..b7c73da3e 100644 --- a/src/EntityRenderers.c +++ b/src/EntityRenderers.c @@ -11,6 +11,7 @@ #include "World.h" #include "Particle.h" #include "Drawer2D.h" +#include "Server.h" /*########################################################################################################################* *------------------------------------------------------Entity Shadow------------------------------------------------------* @@ -385,6 +386,8 @@ void EntityNames_Render(void) { int i; if (Entities.NamesMode == NAME_MODE_NONE) return; + if (Server.IsSinglePlayer && Game_NumStates == 1) return; + closestEntityId = Entities_GetClosest(&p->Base); if (!p->Hacks.CanSeeAllNames || Entities.NamesMode != NAME_MODE_ALL) return; @@ -410,6 +413,8 @@ void EntityNames_RenderHovered(void) { int i; if (Entities.NamesMode == NAME_MODE_NONE) return; + if (Server.IsSinglePlayer && Game_NumStates == 1) return; + allNames = !(Entities.NamesMode == NAME_MODE_HOVERED || Entities.NamesMode == NAME_MODE_ALL) && p->Hacks.CanSeeAllNames; diff --git a/src/Graphics_SoftGPU.c b/src/Graphics_SoftGPU.c index 3ddcba7ad..07da2888e 100644 --- a/src/Graphics_SoftGPU.c +++ b/src/Graphics_SoftGPU.c @@ -384,7 +384,7 @@ static CC_INLINE int FastFloor(float value) { return valueI > value ? valueI - 1 : valueI; } -static void DrawSprite2D(Vertex* V0, Vertex* V1, Vertex* V2, int hints) { +static void DrawSprite2D(Vertex* V0, Vertex* V1, Vertex* V2) { PackedCol vColor = V0->c; int minX = (int)V0->x; int minY = (int)V0->y;