Completely skip entity name rendering code in singleplayer

This commit is contained in:
UnknownShadow200 2025-03-15 21:27:06 +11:00
parent 5ed12e0cc0
commit a7b57462fa
2 changed files with 6 additions and 1 deletions

View File

@ -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;

View File

@ -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;