nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

Entity deletion with auto clean-up #1001

Open JustGodWork opened 6 months ago

JustGodWork commented 6 months ago

Prerequisites

Your Environment

Description

Entity not despawning when reloading a package that use Entity classes from another package with both auto clean-up enabled

In this example i use nanos-world-weapons and nanos-world-vehicles along with my own package.

All have auto clean-up enabled.

My code:

---@param player Player
---@param character Character
Player.Subscribe("Possess", function(player, character)
    local weapon = NanosWorldWeapons.AK47(Vector(0, 0, 0), Rotator(0, 0, 0));
    local vehicle = NanosWorldVehicles.Hatchback(Vector(0, 0, 0), Rotator(0, 0, 0));
    character:PickUp(weapon);
    character:EnterVehicle(vehicle);
end);

When restarting my package both vehicle and weapon are not deleting from the map

Steps to reproduce the behavior

Just spawned take my weapon and entered my vehicle, restart the package and entities still there.

Expected behavior

Deleting entities created from my code when reloading my package.

Actual behavior

Entities stay on the world.