-
Notifications
You must be signed in to change notification settings - Fork 11
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
Changed to vector #70
Conversation
moderator.lua
Outdated
@@ -96,12 +96,12 @@ function HandleLightningCommand(Split, Player) | |||
local LookPos = GetPlayerLookPos(Player) | |||
if Split[2] == nil then | |||
if LookPos == nil then | |||
Player:GetWorld():CastThunderbolt(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ()) | |||
Player:GetWorld():CastThunderbolt(Vector3i(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cPlayer has a GetPosition
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Player:GetPosition() uses Vector3d, but CastThunderbolt requires Vector3i.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you could do ‘Vector3i(Player:GetPosition())’ , right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
@@ -178,7 +178,7 @@ function HandleAntiOchCommand(Split, Player) | |||
cRoot:Get():BroadcastChat("...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,") | |||
cRoot:Get():BroadcastChat("who being naughty in My sight, shall snuff it.") | |||
end | |||
Player:GetWorld():SpawnPrimedTNT(LookPos.x, LookPos.y, LookPos.z, 35) | |||
Player:GetWorld():SpawnPrimedTNT(Vector3d(LookPos.x, LookPos.y, LookPos.z), 35) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't Vector3d(LookPos)
work too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not with the current approach. LookPos is a table.
Removes messages about deprecated parameters.