View Issue Details

IDProjectCategoryView StatusLast Update
0007542Multi Theft Auto : San AndreasClientpublic2018-09-16 16:39
ReporterPhatLooser Assigned To 
Status closedResolutionsuspended 
Summary0007542: Water functions in general do not work outside the -3000 -3000 3000 3000 bounds

If you leave the "city" of San Andreas, 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.

Steps 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 )
addEventHandler("onClientResourceStart", resourceRoot, thaResourceStarting)

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

crashes the client when he moves outside the world bounds.

TagsNo tags attached.


has duplicate 0008161 closed New issues setWaterLevel is not functioning 
related to 0009255 closed New issues Expand map limits? 
related to 0009559 closedqaisjp New issues setWaterLevel bug 



2014-04-09 22:04

updater   ~~0020643

Might become an serious issue with EIR in future, or not?


2018-06-30 16:45

reporter   ~~0026587

I tested this and issue is in this function:
CWaterManager__CreateWaterVertex offset: 006E5A40
There's conditions that check x and y value isn't larger then 3000 and smaller then -3000.
I overwrite this conditions and changed value to 50000 and i removed check in mta code and i could create water outside map.
But this water did'nt have collision ( mayby becose there's second water was above original water )
Here's c++ code that remove limits in gtasa

double* dMinusLimit = (double *)0x859A90;
double* dPlusLimit = (double *)0x859A94;
dMinusLimit = (double *)-50000;
dPlusLimit = (double *)50000;

Issue History

Date Modified Username Field Change