-
Notifications
You must be signed in to change notification settings - Fork 234
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
Use Vector
types instead of tables for Scathis script
#6528
base: develop
Are you sure you want to change the base?
Conversation
fixes `fa\lua\utilities.lua(412): attempt to perform arithmetic on local `z2' (a nil value) url0401_script.lua(78): in function `CreateProjectileAtMuzzle'`
The use of tables as a replacement for
I think that solution is fine.
I agree, and I also do not approve of the naming convention that is used 😄 . Feel free to pick this up in a separate pull request. |
As long as the tables are using arrays instead of hash tables the utility functions should work on them; the functions should be written using array accesses. |
Description of the proposed changes
Fixes #6524.
Vector
s instead of local tables{ x: number, y: number, z: number}
This is more performant and easier to maintain.
__newindex
call.Testing done on the proposed changes
There are 3 scenarios for the
CreateProjectileAtMuzzle
function changed in this PR:self.initialaim
)self.losttarget
)In all three scenarios the Scathis fires without errors in the log. The fake barrels are misaligned with the real barrel due to a refactoring error fixed in #6525.
Additional context
OnStartTracking
andOnStopTracking
weapon functions.Checklist