Remove duplicate code

This commit is contained in:
2026-10-13 11:57:43 -03:00
parent dfc6a6d77b
commit 5165698fe3
50 changed files with 307 additions and 812 deletions
+2 -4
View File
@@ -25,6 +25,7 @@ import {
push_vertex,
set_current_texture,
Texture,
use_texture,
view_projection,
white_tex,
} from "$/client/renderer/mod.ts";
@@ -123,10 +124,7 @@ export class LevelRenderer {
for (const entity of level.entities.values()) {
if (entity !== camera_entity && entity instanceof RemotePlayer) {
const skin = entity.skin ?? default_skin;
if (get_current_texture() !== skin.tex) {
flush_batch();
set_current_texture(skin.tex);
}
use_texture(skin.tex);
const tint = entity_tint(entity, partial_tick, entity.hurt_time > 0 ? HURT_TINT : undefined);
const pose = player_pose(entity, partial_tick);
render_player(skin, pose, tint);