forked from SteamWar/SteamWar
Fix output on to small/large speed value
This commit is contained in:
@@ -41,9 +41,9 @@ public class SpeedCommand extends SWCommand {
|
||||
public void speedCommand(Player p, float speed) {
|
||||
speed = speed / 10F;
|
||||
if (speed < -1F) {
|
||||
BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed);
|
||||
BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed * 10);
|
||||
} else if (speed > 1F) {
|
||||
BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed);
|
||||
BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed * 10);
|
||||
} else {
|
||||
p.setFlySpeed(speed);
|
||||
p.setWalkSpeed(Math.min(speed + 0.1F, 1F));
|
||||
|
||||
Reference in New Issue
Block a user