mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 12:58:27 +00:00
add possibility to skip minimap load
This commit is contained in:
parent
6692eaec18
commit
c6dea949cf
2 changed files with 7 additions and 2 deletions
|
@ -41,6 +41,8 @@
|
|||
|
||||
"dontLoadTextures": false,
|
||||
|
||||
"skip_minimap_load": false,
|
||||
|
||||
"server_name": "San Andreas Unity Server",
|
||||
|
||||
"RCON_enabled": false,
|
||||
|
|
|
@ -111,6 +111,9 @@ namespace SanAndreasUnity.Behaviours
|
|||
{
|
||||
MapTexture = new Texture2D(mapSize, mapSize, TextureFormat.ARGB32, false, true);
|
||||
|
||||
if (Config.Get<bool>("skip_minimap_load"))
|
||||
return;
|
||||
|
||||
TextureLoadParams textureLoadParams = new TextureLoadParams() { makeNoLongerReadable = false };
|
||||
|
||||
for (int i = 0; i < tileCount; i++)
|
||||
|
@ -125,8 +128,8 @@ namespace SanAndreasUnity.Behaviours
|
|||
Texture2D tex = texDict.GetDiffuse(name, textureLoadParams).Texture;
|
||||
|
||||
for (int ii = 0; ii < texSize; ++ii)
|
||||
for (int jj = 0; jj < texSize; ++jj)
|
||||
MapTexture.SetPixel(x + ii, texSize - (y + jj) - 1, tex.GetPixel(ii, jj));
|
||||
for (int jj = 0; jj < texSize; ++jj)
|
||||
MapTexture.SetPixel(x + ii, texSize - (y + jj) - 1, tex.GetPixel(ii, jj));
|
||||
|
||||
// unload the texture (don't destroy it, because it can be a dummy texture)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue