mirror fix

This commit is contained in:
Platinum 2020-04-18 10:22:05 -07:00
parent 90400a798a
commit f8872b6a50
3 changed files with 5 additions and 3 deletions

View file

@ -99,7 +99,7 @@ namespace Rimworld_Animations {
AlienRaceOffset offset = anim?.actors[actor]?.raceOffsets?.Find(x => x.defName == pawn.def.defName); AlienRaceOffset offset = anim?.actors[actor]?.raceOffsets?.Find(x => x.defName == pawn.def.defName);
if (offset != null) { if (offset != null) {
anchor.x += offset.x; anchor.x += mirror ? offset.x * -1f : offset.x;
anchor.z += offset.z; anchor.z += offset.z;
} }

View file

@ -65,10 +65,12 @@ namespace Rimworld_Animations {
if (anim != null) { if (anim != null) {
Log.Message("Now playing " + anim.defName);
bool mirror = GenTicks.TicksGame % 2 == 0; bool mirror = GenTicks.TicksGame % 2 == 0;
Log.Message("Now playing " + anim.defName + (mirror ? " mirrored" : ""));
IntVec3 pos = pawn.Position; IntVec3 pos = pawn.Position;
for (int i = 0; i < pawnsToAnimate.Count; i++) { for (int i = 0; i < pawnsToAnimate.Count; i++) {