Prevent players from placing blocks inside themselves
This commit is contained in:
@@ -188,6 +188,12 @@ export class LocalPlayer extends Player {
|
||||
}
|
||||
}
|
||||
|
||||
// tells the server where it is right away, before something that depends on it like placing a block, so the
|
||||
// server doesn't decide with where it was up to SEND_POSITION_TICKS ago
|
||||
send_position_now() {
|
||||
this.#send_position(true);
|
||||
}
|
||||
|
||||
#send_position(now: boolean) {
|
||||
this.#ticks_since_sent += 1;
|
||||
if (!now && this.#ticks_since_sent < SEND_POSITION_TICKS) {
|
||||
|
||||
Reference in New Issue
Block a user