Remove duplicate code
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import type { EntityData, EntityEvent, EntityInfo } from "$/common/protocol.ts";
|
||||
import type { EntityJson } from "$/common/mod_data.ts";
|
||||
import { EverythingRegistry } from "$/common/everything_registry.ts";
|
||||
import { wrap_angle } from "$/common/utils.ts";
|
||||
import type { ClientLevel } from "../level/client_level.ts";
|
||||
import { Entity } from "./entity.ts";
|
||||
|
||||
@@ -88,10 +89,3 @@ export class RemoteEntity extends Entity {
|
||||
return this.swing_ticks === undefined ? 0 : Math.min(1, (this.swing_ticks + partial_tick) / SWING_TICKS);
|
||||
}
|
||||
}
|
||||
|
||||
function wrap_angle(angle: number) {
|
||||
angle %= Math.PI * 2;
|
||||
if (angle >= Math.PI) angle -= Math.PI * 2;
|
||||
if (angle < -Math.PI) angle += Math.PI * 2;
|
||||
return angle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user