Skip to content

Radarareas created with map files are not being destroyed after the map is stopped #737

@4O4

Description

@4O4

Describe the bug
RadarArea defined in .map is not being destroyed after map is stopped. It gets duplicated over and over on each restart of the map.

After the map is stopped, the radararea somehow becomes a direct child of root element (you can see that in the Element browser in web panel).

Note that this doesn't happen with radarareas created by Lua scripts with createRadarArea.

To reproduce

  1. Get the demo resource from here and put it into server resources. This is just a simple map like this:
<map edf:definitions="editor_main">

<radararea posX="-2017,18688" posY="-2966,11035" sizeX="2136,6816" sizeY="2656,3564" color="#401a4285" dimension="0" />

</map>
  1. Before starting the map, count radarareas on the server for reference
srun #Element.getAllByType("radararea")
  1. Start the map
  2. Restart it a few times and stop it
  3. Compare the current radarareas count with the previous reference count. It increases with each restart of the map resource. Radarareas are not destroyed and become parentless (root element is the parent).

Expected behaviour
Radarareas created using map files should behave like all other entities and thus disappear when the parent resource is stopped.

Version
Latest stable linux server release, that is:
MTA 1.5.6 - Linux server package
R7 (build 14688) - Updated 11th October 2018

Also confirmed on local windows server MTA:SA Server v1.5.6-release-16068

Additional info
The last version of the server I am sure it worked correctly on is 1.5.3/1.5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions