View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004504||Multi Theft Auto : San Andreas||Client||public||2009-06-24 17:05||2018-09-18 18:47|
|Target Version||Fixed in Version|
|Summary||0004504: Peds shooting incorrectly|
Peds are shooting away from the player while they're not supposed to (aimed directly at player's coordinates). This can be "fixed" by alt+tabbing out of SA and back in. A sample script to reproduce the bug included.
Commands to reproduce the bug:
Then you'll see that the ped is shown shooting away and doesn't hit the player. Alt+tab to the desktop and back and you'll see that, even though the ped is still shown shooting away, he succesfully hits you.
|Tags||No tags attached.|
cant reproduce using resource. ( but i managed to do this, weapon creation doesn't work http://youtu.be/Wf4gpj-YukE )
I've simplied his test resource, just do /peds and the ped will start shooting at you, but their aim is completely wrong, I added a line between start aim and start end to prove he's meant to be aiming there but it's like he's shooting at you, but isn't.
I've also experienced this problem when making peds that are meant to shoot, this bug basically makes it impossible to have a game mode that relies on fighting peds.
Edit: I've been working with peds again and keep getting this bug so I debugged it some more and turns out that what it's meant to be aiming at is completely wrong to what it should be aiming at, the X Y and or Z randomly become NaN which is why they're usually aiming direction is all wrong. It doesn't happen if stood still but as soon as you start moving the XYZ start becoming NaN.
I was able to successfully mitigate this bug by having the ped stop shooting for 100ms every 1000ms. After he stops shooting, the XYZ stops being a NaN until it happens again in a few seconds time.