Remove duplicate code
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user