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

Water functions generally break outside world boundary #470

Open
ArranTuna opened this issue Sep 16, 2018 · 1 comment
Open

Water functions generally break outside world boundary #470

ArranTuna opened this issue Sep 16, 2018 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@ArranTuna
Copy link
Collaborator

ArranTuna commented Sep 16, 2018

Describe the bug
If you leave the "city" of San Andreas (+/- 3000 world bounds), you can neither use createWater nor setWaterLevel.
The sea outside the map does not react on setWaterLevel, and created water has no collision.

To make things worse, if you create water and move it outside the bounds with setElementPosition, it may even crash.

To Reproduce

height = 40
SizeVal = 600
-- Defining variables.
southWest_X = -SizeVal
southWest_Y = -SizeVal
southEast_X = SizeVal
southEast_Y = -SizeVal
northWest_X = -SizeVal
northWest_Y = SizeVal
northEast_X = SizeVal
northEast_Y = SizeVal

-- OnClientResourceStart function that creates the water.
function thaResourceStarting( )
    water = createWater ( southWest_X, southWest_Y, height, southEast_X, southEast_Y, height, northWest_X, northWest_Y, height, northEast_X, northEast_Y, height )
    -- setWaterLevel ( height )
end
addEventHandler("onClientResourceStart", resourceRoot, thaResourceStarting)

setTimer (100,0,function()
    local x,y,z = getElementPosition(localPlayer)
    if water then
        setElementPosition(water,x,y,40)
    end
end)

crashes the client when he moves outside the world bounds.

Expected behavior
unstated

Screenshots
unstated

MTA Client (please complete the following information):
unstated

MTA Server (please complete the following information):
unstated

Additional context
From https://bugs.mtasa.com/view.php?id=7542

@ArranTuna ArranTuna added the bug Something isn't working label Sep 16, 2018
@qaisjp qaisjp changed the title Water functions in general do not work outside the -3000 -3000 3000 3000 bounds Water functions generally break outside world boundary Sep 21, 2018
@qaisjp qaisjp added this to the Backlog milestone Sep 21, 2018
@Allerek
Copy link
Contributor

Allerek commented Apr 22, 2021

#470
One of the functions fixed, we can also setWaterLevel at ocean water, idk if planned to add posibility to create water outside game area.

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

3 participants