altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 16 forks source link

multiple moving tasks broken when using netOwner of Ped #2244

Closed dGxxxx closed 7 months ago

dGxxxx commented 7 months ago

Description of the problem

Tried 3 natives that should move the ped in a specific direction / random direction.

Tried the following 3 natives:

native.taskWanderStandard(animalPed.scriptID, 10, 10);
native.taskGoStraightToCoord(animalPed.scriptID, randomCoords.x, randomCoords.y, groundZ[1], 20, 0, coordsAngle, 0);
native.taskWanderInArea(animalPed.scriptID, animalSpawnPosition.x, animalSpawnPosition.y, animalSpawnPosition.z, 25, 0, 0);

All 3 are broken when I try to apply them to the netOwner of the Ped. The first native, doesn't even move the ped, the second native, just makes the ped disappear, and the third one, sometimes works, sometimes it doesnt.

I checked all the args that I provided in the natives, all of them are correct, and are in range of the ped. Tried multiple variations.

Reproduction steps

native.taskWanderStandard(animalPed.scriptID, 10, 10);
native.taskGoStraightToCoord(animalPed.scriptID, randomCoords.x, randomCoords.y, groundZ[1], 20, 0, coordsAngle, 0);
native.taskWanderInArea(animalPed.scriptID, animalSpawnPosition.x, animalSpawnPosition.y, animalSpawnPosition.z, 25, 0, 0);

Expected behaviour

The ped should move without issues when using these natives.

Additional context

All of this natives are used for the movement of the ped, and all of them are broken.

Operating system

Windows

Version

16.0.0-dev.248

Crashdump ID

No response

Confirmation of issue's presence