Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peds shooting incorrectly #492

Open
ArranTuna opened this issue Sep 18, 2018 · 0 comments
Open

Peds shooting incorrectly #492

ArranTuna opened this issue Sep 18, 2018 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@ArranTuna
Copy link
Collaborator

ArranTuna commented Sep 18, 2018

Describe the bug
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.

To Reproduce
peds.zip

I've simplified 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.

Expected behavior
To aim at the desired target.

MTA Client: 1.5.3

MTA Server: 1.5.3

Additional context
From https://bugs.mtasa.com/view.php?id=4504

@ArranTuna ArranTuna added the bug Something isn't working label Sep 18, 2018
@qaisjp qaisjp added this to the Backlog milestone Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants