View Issue Details

IDProjectCategoryView StatusLast Update
0005824Multi Theft Auto : San AndreasScriptingpublic2012-01-24 19:44
Reportermekorea Assigned ToCazomino05  
Status resolvedResolutionfixed 
Target Version1.3Fixed in Version1.3 
Summary0005824: [Request] Add function for unloading and reloading San Andreas map

Afaik, this feature has popped on several conversations over the years but it has not made its way to mantis until now.

Now that we have water functions, all we need in order to create a 100% clean map is the ability to unload the current San Andreas default map so that players can replace it and/or build their own custom maps.

<Cazomino05> unloading it is easy
<Cazomino05> but when you disconnect and go somewhere else you expect it to be back
<x86> Maybe hooking the SA streamer

TagsNo tags attached.


related to 0004796 closed New Feature Requests Make sky and water visible in interiors. 
child of 0003344 closed New Feature Requests Requested features tracker 



2011-01-26 06:19

administrator   ~~0012764

Indeed... something is needed to make loading up GTA3 and Vice possible!


2011-09-24 23:01

viewer   ~~0014920

Can't be possible to unload only some objects?


2011-10-18 10:07

administrator   ~~0015092

Related to:

Maybe not disabling the entire map, but disabling specific mapfiles. Amongst this a "loadMap", for IPL ( i think that is the map format ) files too. This would be awesome for a private project of mine. Also a contribution to the editor would be "Remove map" and you click on an object and then the map file for that object is unloaded.

What about dimensions? Removing maps/world according to the dimension or entirely. If this works, TheKid's minecraft gamemode would be epic. (everything is squared shader + no map + custom mapped hills and lava stuff)


2011-10-19 11:14

reporter   ~~0015096

I've done some related documentation on this;
The easiest way to do this is to find where the objects are added to the world (CWorld::Add) and then remove them (CWorld::Remove)

The problem I had with that was I could only remove the IPL's created from GTA3.IMG which are stuff like A51 and it's gates etc but large land masses and certain buildings are based in the text IPL found in /data and those are another ballgame.

To save iterating the entire list the example hook I did was this
Hook at an address (I'll try and post this later)
check object ID is in the removed objects array
-check x,y,z

this worked flawlessly apart from already streamed in objects, there is some documentation on the CBuildingSA interface on here which I added to recently so that could be an alternative in which we give it a dummy object to create and migrate the proper SA object to our own list and move it back to fix when you rejoin/when reset is called that's the hack method.

Just ideas anyway but remember that there are TWO types of IPL one in GTA3.img which is encrypted (still .ipl) and one in data.


2011-10-19 11:16

reporter   ~~0015097

the reason I did the hook like that is because your not doing a position comparison on everything streamed in (it should help reduce the overhead) and doing a position comparison on an object that's not even replaced (SA has like 13k of them) is a bit wasteful


2011-12-21 04:52

updater   ~~0015451

Issue automatically marked as fixed by mantisbot ( Fixed in )

Issue History

Date Modified Username Field Change