mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-08 14:56:12 -04:00
Completely skip entity name rendering code in singleplayer
This commit is contained in:
parent
5ed12e0cc0
commit
a7b57462fa
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user