fix ping breaking world loading
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m41s

This commit is contained in:
Daniella / Tove 2024-10-03 23:17:52 +02:00
parent bdf9a62288
commit b2a4e89b49
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -2,6 +2,7 @@ package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.BaseBand;
import de.com.baseband.client.event.events.PacketEvent;
import de.com.baseband.client.event.events.PlayerDestroyEvent;
import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.Ingame;
import de.com.baseband.client.registry.annotation.Config;
@ -50,8 +51,6 @@ public class Ping extends Feature {
@Override
public void onTick() {
if(notIngame())
return;
while (true) {
PacketHolder holder = this.holderSend.peek();
if(holder == null || !holder.passed())
@ -99,7 +98,7 @@ public class Ping extends Feature {
}
public void onPacket(PacketEvent.Send e) {
if(allowSend == e.getPacket())
if(allowSend == e.getPacket() || notIngame())
return;
if (e.getPacket() instanceof CPacketKeepAlive || holdAll) {
totalSent++;
@ -109,7 +108,7 @@ public class Ping extends Feature {
}
public void onPacket(PacketEvent.Receive e) {
if(allowRecv == e.getPacket())
if(allowRecv == e.getPacket() || notIngame())
return;
if (e.getPacket() instanceof SPacketKeepAlive || holdAll) {
totalRecieved++;