fix lasers emitting too many network packets
This commit is contained in:
parent
bf17bd43fd
commit
ac962eb183
1 changed files with 7 additions and 5 deletions
|
@ -36,7 +36,7 @@ public class TileLaser extends TileBuildCraft implements IHasWork, IControllable
|
|||
|
||||
@NetworkData
|
||||
public LaserData laser = new LaserData();
|
||||
|
||||
|
||||
private final SafeTimeTracker laserTickTracker = new SafeTimeTracker(10);
|
||||
private final SafeTimeTracker searchTracker = new SafeTimeTracker(100, 100);
|
||||
private final SafeTimeTracker networkTracker = new SafeTimeTracker(20, 3);
|
||||
|
@ -245,10 +245,12 @@ public class TileLaser extends TileBuildCraft implements IHasWork, IControllable
|
|||
}
|
||||
|
||||
protected void removeLaser() {
|
||||
laser.isVisible = false;
|
||||
// force sending the network update even if the network tracker
|
||||
// refuses.
|
||||
super.sendNetworkUpdate();
|
||||
if (laser.isVisible) {
|
||||
laser.isVisible = false;
|
||||
// force sending the network update even if the network tracker
|
||||
// refuses.
|
||||
super.sendNetworkUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue