Fixed #4879 / Fixed server speed validation check
This commit is contained in:
@@ -4,6 +4,7 @@ import arc.func.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.ai.formations.*;
|
||||
import mindustry.ai.types.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
@@ -29,7 +30,7 @@ abstract class CommanderComp implements Entityc, Posc{
|
||||
transient float minFormationSpeed;
|
||||
|
||||
public void update(){
|
||||
if(controlling.isEmpty()){
|
||||
if(controlling.isEmpty() && !Vars.net.client()){
|
||||
formation = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,8 +110,12 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
||||
unit.aim(mouseX, mouseY);
|
||||
//this is only necessary when the thing being controlled isn't synced
|
||||
unit.controlWeapons(shooting, shooting);
|
||||
//save previous formation to prevent reset
|
||||
var formation = unit.formation;
|
||||
//extra precaution, necessary for non-synced things
|
||||
unit.controller(this);
|
||||
//keep previous formation
|
||||
unit.formation = formation;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user