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:
Siede 2023-10-04 20:30:13 +02:00 committed by GitHub
parent a91d39f9f2
commit 16488aeae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;