mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-06 00:49:14 +07:00
Fixing RegionPart Child Rotation (#9137)
why would it ever need i * sign. when it first goes around i = 0; second time i = 1; it just breaks the Child Mirroring by adding 1 tiny little annoying offset.
This commit is contained in:
parent
a91d39f9f2
commit
16488aeae4
@ -152,7 +152,7 @@ public class RegionPart extends DrawPart{
|
||||
float sign = (i == 1 ? -1 : 1) * params.sideMultiplier;
|
||||
Tmp.v1.set((x + mx) * sign, y + my).rotateRadExact((params.rotation - 90) * Mathf.degRad);
|
||||
|
||||
childParam.set(params.warmup, params.reload, params.smoothReload, params.heat, params.recoil, params.charge, params.x + Tmp.v1.x, params.y + Tmp.v1.y, i * sign + mr * sign + params.rotation);
|
||||
childParam.set(params.warmup, params.reload, params.smoothReload, params.heat, params.recoil, params.charge, params.x + Tmp.v1.x, params.y + Tmp.v1.y, mr * sign + params.rotation);
|
||||
childParam.sideMultiplier = params.sideMultiplier;
|
||||
childParam.life = params.life;
|
||||
childParam.sideOverride = i;
|
||||
|
Loading…
Reference in New Issue
Block a user