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

Duplicated Reborn/Nightfall-Breakthrough functions #17

Open
eduzappa18 opened this issue Dec 4, 2021 · 1 comment
Open

Duplicated Reborn/Nightfall-Breakthrough functions #17

eduzappa18 opened this issue Dec 4, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@eduzappa18
Copy link

This is not really an issue but just something to have in mind if there is ever a client version of Reborn/Nightfall for Breakthrough
Or for old mods/maps that make use of this functions

The trigonometric functions atan, cos, sin and tan are different than the ones in the vanilla game
Reborn functions expects radians, while Breakthrough functions expects degrees
So the same imput gives different results

The scripting documentation for Breakthrough, should have a warning about this


This are the scripts that use some of this functions in Breakthrough

# global/parachuteDrop.scr
line 116:    local.swayY = local.d*(sin local.angle)
line 119:    local.dZ = local.d*(cos local.angle)

# maps/e1l4/SunkShip.scr
line  93:    local.t1 = sin (local.t*180)

# maps/e2l3/FinalHouse.scr
line 543:    local.xup = atan local.towards[0] local.towards[2]
line 562:    local.zup = atan local.towards[1] local.towards[2]

Other duplicated functions like sqrt or netname works the same or don't cause any conflict with old scripts

@mohabhassan
Copy link
Owner

This seems to be mainly a compatibility issue.
BT only has sin, cos, tan and atan. The rest of the math functions are are new additions from NF.
I think the best way to solve this would be to keep original BT behavior, and display a (suppressible) warning for modders regarding this exact problem.
Let me know if you have a better suggestion.

@mohabhassan mohabhassan added the bug Something isn't working label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants