From 8c3544e3b955f57245bd9899e82fdff037781b6b Mon Sep 17 00:00:00 2001 From: Jeffrey Thomas Piercy Date: Sat, 18 May 2024 17:11:08 -0700 Subject: [PATCH] Mirrored Hong Kong Helibase buttons are oriented correctly (#769) * rotate 06_HONGKONG_HELIBASE buttons so that they're correct on mirrored maps * check for button event in DXRFixupM06 * remove #var(prefix) since HX doesn't replace ProjectileGenerator --------- Co-authored-by: Die4Ever --- DXRCore/DeusEx/Classes/DXRActorsBase.uc | 2 ++ DXRMapFixups/DeusEx/Classes/DXRFixupM06.uc | 15 +++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/DXRCore/DeusEx/Classes/DXRActorsBase.uc b/DXRCore/DeusEx/Classes/DXRActorsBase.uc index 82ef3e056..7685e3e34 100644 --- a/DXRCore/DeusEx/Classes/DXRActorsBase.uc +++ b/DXRCore/DeusEx/Classes/DXRActorsBase.uc @@ -892,6 +892,8 @@ static function int GetRotationOffset(class c) return 16384; if(ClassIsChildOf(c, class'#var(prefix)ComputerPublic')) return 16384; + if(ClassIsChildOf(c, class'ProjectileGenerator')) + return 16384; //ComputerPersonal is fine without this, so just leave it commented out //if(ClassIsChildOf(c, class'#var(prefix)ComputerPersonal')) // return 32768; diff --git a/DXRMapFixups/DeusEx/Classes/DXRFixupM06.uc b/DXRMapFixups/DeusEx/Classes/DXRFixupM06.uc index d05958f5b..35dc8132a 100644 --- a/DXRMapFixups/DeusEx/Classes/DXRFixupM06.uc +++ b/DXRMapFixups/DeusEx/Classes/DXRFixupM06.uc @@ -78,16 +78,16 @@ function PreFirstEntryMapFixes() pg.ProjectileClass = class'PurgeGas'; switch(pg.Name) { case 'ProjectileGenerator5':// left side - pg.SetRotation(rotm(-7000, 80000, 0, 16384)); + pg.SetRotation(rotm(-7000, 80000, 0, GetRotationOffset(pg.class))); break; case 'ProjectileGenerator2':// middle left - pg.SetRotation(rotm(-6024, 70000, 0, 16384)); + pg.SetRotation(rotm(-6024, 70000, 0, GetRotationOffset(pg.class))); break; case 'ProjectileGenerator3':// middle right - pg.SetRotation(rotm(-8056, 64000, 0, 16384)); + pg.SetRotation(rotm(-8056, 64000, 0, GetRotationOffset(pg.class))); break; case 'ProjectileGenerator7':// right side - pg.SetRotation(rotm(-8056, 60000, 0, 16384)); + pg.SetRotation(rotm(-8056, 60000, 0, GetRotationOffset(pg.class))); break; } } @@ -104,6 +104,13 @@ function PreFirstEntryMapFixes() break; } } + + foreach AllActors(class'Button1', b) { + if (b.tag == 'Weapons_Lock_broken' || b.tag == 'Weapons_lock' || b.event == 'missile_door') { + b.SetRotation(rot(14312, 18536, 51312)); // my guess is that the vanilla rotations were each done by eye + } + } + buttonHint = DXRButtonHoverHint(class'DXRButtonHoverHint'.static.Create(self, "", button.Location, button.CollisionRadius+5, button.CollisionHeight+5, exit)); buttonHint.SetBaseActor(button);