Turret ammo sync
This commit is contained in:
@@ -140,6 +140,7 @@ public class Turret extends ReloadTurret{
|
||||
quickRotate = false;
|
||||
outlinedIcon = 1;
|
||||
drawLiquidLight = false;
|
||||
sync = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -664,6 +665,17 @@ public class Turret extends ReloadTurret{
|
||||
public byte version(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSync(Reads read, byte revision){
|
||||
//maintain rotation and reload when syncing so clients don't see turrets snapping around
|
||||
float oldRot = rotation, oldReload = reloadCounter;
|
||||
|
||||
readAll(read, revision);
|
||||
|
||||
rotation = oldRot;
|
||||
reloadCounter = oldReload;
|
||||
}
|
||||
}
|
||||
|
||||
public static class BulletEntry{
|
||||
|
||||
Reference in New Issue
Block a user