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

Changed to vector #70

Merged
merged 2 commits into from
Dec 6, 2017
Merged

Changed to vector #70

merged 2 commits into from
Dec 6, 2017

Conversation

mathiascode
Copy link
Member

Removes messages about deprecated parameters.

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()))
Copy link
Contributor

@Bond-009 Bond-009 Nov 25, 2017

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.

Copy link
Member Author

@mathiascode mathiascode Nov 25, 2017

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.

Copy link
Contributor

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?

Copy link
Member Author

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)
Copy link
Contributor

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?

Copy link
Member Author

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.

@mathiascode mathiascode merged commit 037920f into master Dec 6, 2017
@mathiascode mathiascode deleted the fixdeprecated branch December 6, 2017 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants