Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Area: Fix RotateArea's NewOrientation for NWN bearings #1710

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ https://github.com/nwnxee/unified/compare/build8193.35.40...HEAD
### Fixed
- Experimental: PlayerHitpointsAsPercentage: added the new argument nMessageLimit to SendServerToPlayerGameObjUpdate hook
- Reveal: Fixed Reveal plugin always revealing all PCs regardless of plugin usage.
- Area: RotateArea's 'NewOrientation' corrected for NWN bearings, correcting direction of objects within the area after 90 or 270 degree rotation.

## 8193.35.40
https://github.com/nwnxee/unified/compare/build8193.35.37...build8193.35.40
Expand Down
4 changes: 2 additions & 2 deletions Plugins/Area/Area.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ NWNX_EXPORT ArgumentStack RotateArea(ArgumentStack&& args)
case 1:
{
vOrientation.x = (std::cos(std::acos(vOrientation.x) - (M_PI/2)));//less half-radian
vOrientation.y = (std::sin(std::asin(vOrientation.y) - (M_PI/2)));
vOrientation.y = (std::sin(std::asin(vOrientation.y) + (M_PI/2)));
break;
}
case 2:
Expand All @@ -1056,7 +1056,7 @@ NWNX_EXPORT ArgumentStack RotateArea(ArgumentStack&& args)
case 3:
{
vOrientation.x = (std::cos(std::acos(vOrientation.x) + (M_PI/2)));//Add half-radian
vOrientation.y = (std::sin(std::asin(vOrientation.y) + (M_PI/2)));
vOrientation.y = (std::sin(std::asin(vOrientation.y) - (M_PI/2)));
break;
}
}
Expand Down