mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 23:38:10 +07:00
Restrict the ipt (#7226)
This commit is contained in:
@ -3,6 +3,7 @@ package mindustry.world.blocks.logic;
|
||||
import arc.Graphics.*;
|
||||
import arc.Graphics.Cursor.*;
|
||||
import arc.func.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.struct.Bits;
|
||||
@ -624,7 +625,7 @@ public class LogicBlock extends Block{
|
||||
write.i(0);
|
||||
|
||||
if(privileged){
|
||||
write.s(ipt);
|
||||
write.s(Mathf.clamp(ipt, 1, maxInstructionsPerTick));
|
||||
}
|
||||
}
|
||||
|
||||
@ -679,7 +680,7 @@ public class LogicBlock extends Block{
|
||||
});
|
||||
|
||||
if(privileged && revision >= 2){
|
||||
ipt = Math.max(read.s(), 1);
|
||||
ipt = Mathf.clamp(read.s(), 1, maxInstructionsPerTick);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user