nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

Server.GetMap() when changing map is broken #972

Closed vugi99 closed 10 months ago

vugi99 commented 10 months ago

Prerequisites

Your Environment

Description

Server.GetMap() when changing map is broken

Steps to reproduce the behavior

Start on default-blank-map

Player.Subscribe("Spawn", function(ply)
    if Server.GetMap() == "default-blank-map" then
        Timer.SetTimeout(function()
            Server.ChangeMap("default-testing-map")
        end, 10000)
    end
end)

Player.Subscribe("Destroy", function()
    print("PDestroy, map : ", Server.GetMap())
end)

Expected behavior

Should return default-blank-map when player is destroyed

Actual behavior

returns default-testing-map when player is destroyed

vugi99 commented 10 months ago

This is breaking VZ banks as money gets saved in the next map during changemap instead of current one

vugi99 commented 10 months ago

Also breaking VZ leaderboard sometimes

gtnardy commented 10 months ago

Fixed for the next update, the map will only be updated after the entities are destroyed