Skip to content

Commit 89d0cf6

Browse files
committed
remove sprintSpeed
1 parent f3ef3c7 commit 89d0cf6

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@ wss.on("connection", (socket, req) => {
158158
const handlers = new Map();
159159

160160
bot.once("spawn", function () {
161-
handlers.set("sprintSpeed", (speed) => {
162-
bot.physics.sprintSpeed = speed;
163-
});
164161
handlers.set("fly", function (toggle) {
165162
if (toggle) {
166163
bot.creative.startFlying();

src/client/scripts/EventHandler.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ class EventHandler {
9595
this.controls[z.code] !== undefined &&
9696
this.gameState === "gameLock"
9797
) {
98-
this.game.socket.emit("sprintSpeed", this.game.speed);
9998
this.game.socket.emit("move", this.controls[z.code], true);
10099
switch (this.controls[z.code]) {
101100
case "sprint":

src/client/scripts/Setup.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,18 @@ async function Setup(game) {
6666
game.params = {
6767
chunkdist: 3,
6868
};
69-
game.distanceBasedFog.farnear.x = (game.params.chunkdist - 1) * 16;
70-
game.distanceBasedFog.farnear.y = game.params.chunkdist * 16;
69+
game.distanceBasedFog.farnear.x = (game.params.chunkdist - 2) * 16;
70+
game.distanceBasedFog.farnear.y = (game.params.chunkdist - 1) * 16;
7171
gui.add(game.world.material, "wireframe")
7272
.name("Wireframe")
7373
.listen();
7474
var chunkDist = gui
7575
.add(game.params, "chunkdist", 0, 10, 1)
7676
.name("Render distance")
7777
.listen();
78-
gui.add(game, "speed", 1.3, 10).name("sprint speed").listen();
7978
chunkDist.onChange(function (val) {
80-
game.distanceBasedFog.farnear.x = (val - 1) * 16;
81-
game.distanceBasedFog.farnear.y = val * 16;
79+
game.distanceBasedFog.farnear.x = (val - 2) * 16;
80+
game.distanceBasedFog.farnear.y = (val - 1) * 16;
8281
console.log(val);
8382
});
8483
game.playerImpulse = function () {

src/client/scripts/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class Game {
2020
normal: 70,
2121
sprint: 80,
2222
};
23-
this.speed = 1.3;
2423
this.al = new AssetLoader();
2524
this.toxelSize = 27;
2625
this.dimension = null;

0 commit comments

Comments
 (0)