mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-06 16:27:25 +07:00
Fixed some crashes
This commit is contained in:
@ -27,7 +27,7 @@ allprojects {
|
|||||||
gdxVersion = '1.9.8'
|
gdxVersion = '1.9.8'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.0'
|
||||||
aiVersion = '1.8.1'
|
aiVersion = '1.8.1'
|
||||||
uCoreVersion = 'c502931313'
|
uCoreVersion = '3e5d498bd7'
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
|
@ -412,11 +412,13 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TargetTrait target = player.target;
|
||||||
|
|
||||||
//draw targeting crosshair
|
//draw targeting crosshair
|
||||||
if(player.target != null){
|
if(target != null){
|
||||||
if(player.target != lastTarget){
|
if(target != lastTarget){
|
||||||
crosshairScale = 0f;
|
crosshairScale = 0f;
|
||||||
lastTarget = player.target;
|
lastTarget = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
crosshairScale = Mathf.lerpDelta(crosshairScale, 1f, 0.2f);
|
crosshairScale = Mathf.lerpDelta(crosshairScale, 1f, 0.2f);
|
||||||
@ -426,8 +428,8 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
float radius = Interpolation.swingIn.apply(crosshairScale);
|
float radius = Interpolation.swingIn.apply(crosshairScale);
|
||||||
|
|
||||||
Lines.poly(player.target.getX(), player.target.getY(), 4, 7f * radius, Timers.time() * 1.5f);
|
Lines.poly(target.getX(), target.getY(), 4, 7f * radius, Timers.time() * 1.5f);
|
||||||
Lines.spikes(player.target.getX(), player.target.getY(), 3f * radius, 6f * radius, 4, Timers.time() * 1.5f);
|
Lines.spikes(target.getX(), target.getY(), 3f * radius, 6f * radius, 4, Timers.time() * 1.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
Reference in New Issue
Block a user