Skip to content

onClientElementInteriorChange is triggered even if the element has not changed its interior #2280

@theSarrum

Description

@theSarrum

Describe the bug
As the title says, the onClientElementInteriorChange event is triggered even if the element has not changed its interior.

To reproduce
Steps to reproduce:

  1. Type /debugscript 3
  2. Start runcode
  3. crun setElementPosition(me, 0, 0, 3)
  4. crun addEventHandler("onClientElementInteriorChange", root, function(oldInterior, newInterior) iprint(source, oldInterior, newInterior) end)
  5. crun vehicle = createVehicle(411, 1, 0, 3)
    5.1. Nothing in the debug console
    5.2. crun setElementInterior(vehicle, 0)
    5.3. Output: elem:vehicle[Infernus]14ED1BC8 0 0 - the old and the new interior are the same
  6. crun createPed(22, 1, 0, 3)
    6.1. Output: elem:ped[22]2DE24EB0 0 0 - the debug console shows that the element has changed its interior, although we just created it

Expected behaviour
The event should not be triggered.

Version
Client: Multi Theft Auto v1.5.8-release-20887

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