Make server control knockback

This commit is contained in:
2026-09-30 10:54:09 -03:00
parent 4fbcca6851
commit dc70ada7c4
8 changed files with 99 additions and 53 deletions
+3
View File
@@ -64,6 +64,8 @@ export class LocalPlayer extends Player {
// blocks per second, peaks about 1.25 blocks up with the entity's gravity and drag
jump_force = 9.23;
// the last teleport from the server, sent back with every move so the server knows which moves came after it
teleport_id = 0;
#ticks_since_sent = 0;
// counts down every tick, letting go of jump clears it
#jump_delay = 0;
@@ -207,6 +209,7 @@ export class LocalPlayer extends Player {
z: this.z,
yaw: this.yaw,
pitch: this.pitch,
teleport: this.teleport_id,
});
}
}