Skip to content

Commit 18a4f80

Browse files
authored
Merge pull request #1710 from WilliamDraco/patch-3
Area: Fix RotateArea's NewOrientation for NWN bearings
2 parents 459d30c + c7e0cab commit 18a4f80

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ https://github.com/nwnxee/unified/compare/build8193.35.40...HEAD
5252
### Fixed
5353
- Experimental: PlayerHitpointsAsPercentage: added the new argument nMessageLimit to SendServerToPlayerGameObjUpdate hook
5454
- Reveal: Fixed Reveal plugin always revealing all PCs regardless of plugin usage.
55+
- Area: RotateArea's 'NewOrientation' corrected for NWN bearings, correcting direction of objects within the area after 90 or 270 degree rotation.
5556

5657
## 8193.35.40
5758
https://github.com/nwnxee/unified/compare/build8193.35.37...build8193.35.40

Plugins/Area/Area.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ NWNX_EXPORT ArgumentStack RotateArea(ArgumentStack&& args)
10441044
case 1:
10451045
{
10461046
vOrientation.x = (std::cos(std::acos(vOrientation.x) - (M_PI/2)));//less half-radian
1047-
vOrientation.y = (std::sin(std::asin(vOrientation.y) - (M_PI/2)));
1047+
vOrientation.y = (std::sin(std::asin(vOrientation.y) + (M_PI/2)));
10481048
break;
10491049
}
10501050
case 2:
@@ -1056,7 +1056,7 @@ NWNX_EXPORT ArgumentStack RotateArea(ArgumentStack&& args)
10561056
case 3:
10571057
{
10581058
vOrientation.x = (std::cos(std::acos(vOrientation.x) + (M_PI/2)));//Add half-radian
1059-
vOrientation.y = (std::sin(std::asin(vOrientation.y) + (M_PI/2)));
1059+
vOrientation.y = (std::sin(std::asin(vOrientation.y) - (M_PI/2)));
10601060
break;
10611061
}
10621062
}

0 commit comments

Comments
 (0)