修复服务端无法禁用战术冲刺的bug

This commit is contained in:
17146 2025-04-12 20:20:35 +08:00 committed by Light_Quanta
parent e9558aafee
commit 37cdc7246a
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -3,6 +3,7 @@ package com.atsuishio.superbwarfare.event;
import com.atsuishio.superbwarfare.Mod;
import com.atsuishio.superbwarfare.client.ClickHandler;
import com.atsuishio.superbwarfare.config.client.DisplayConfig;
import com.atsuishio.superbwarfare.config.server.MiscConfig;
import com.atsuishio.superbwarfare.entity.vehicle.*;
import com.atsuishio.superbwarfare.entity.vehicle.base.ArmedVehicleEntity;
import com.atsuishio.superbwarfare.entity.vehicle.base.MobileVehicleEntity;
@ -296,7 +297,7 @@ public class ClientEventHandler {
}
//耐力
// 耐力
public static void staminaSystem() {
if (notInGame()) return;
@ -307,6 +308,10 @@ public class ClientEventHandler {
tacticalSprint = !exhaustion && !zoom && isMoving() && player.isSprinting() && player.getVehicle() == null && !player.getAbilities().flying;
if (!MiscConfig.ALLOW_TACTICAL_SPRINT.get()) {
tacticalSprint = false;
}
ItemStack stack = player.getMainHandItem();
float sprintCost;