multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.38k stars 424 forks source link

setPedControlState #779

Open Ambassador64 opened 5 years ago

Ambassador64 commented 5 years ago

The bug. On my client when I fire without aiming with weapons that can be dual wielded, (LMB only, not RMB) it will look normal on my screen but for most players that have see me on their screens they see that I am not aiming straight. The same goes for everybody else who just holds LMB, it will look normal on their screens but for people who see them, they will look bugged out.

The same happens with NPC's, they're able to shoot their targets just fine but their arms will not point towards their target.

Steps to reproduce the behavior for yourself.

  1. Ask a friend to hold LMB only.
  2. Look at them

Steps to reproduce the behavior for others.

  1. Ask a friend to look at you.
  2. Hold LMB.
  3. Ask if you are shooting straight on their screen.

Steps to reproduce the behavior for most.

  1. Download my resource below
  2. Spawn a NPC by typing "/ped" or just "ped" in the console
  3. Type "/attack " or "attack " in the console. Obviously is just indicating that you can put your username as an argument.
  4. (not really a step but a note) If you switch targets by typing /attack again then the script will bug out due to a timer bug I haven't fixed yet, you'll just have to restart the resource to repeat the steps again.

npc.txt server npc_client.txt client meta.xml.txt meta.xml

Expected behavior. Arms not pointing in the right direction in the fire state.

Screenshots.

The first 2 screenshots are from a Dev server. The first screenshot looks like he's aiming back but he's not. I probably should of asked him to shoot me to have blood coming out like in the fourth screenshot. mta-screen_2019-01-14_22-03-51 mta-screen_2019-01-14_22-05-45 The next one is from CIT. mta-screen_2019-01-14_17-04-45 This one is from my server. mta-screen_2019-01-14_13-40-16 This one is also from my server but from NPC's that aren't moving. This is from a separate resource that I haven't mostly made but still produces the same result. mta-screen_2019-01-15_23-04-36 This screenshot was from my friends perspective, it's a horrible picture and I even thought it wasn't real "proof" but I noticed a bullet is in the bottom right of the screen, proving that I was shooting straight, but my arms weren't straight. You can barely see the bullet but it's there. 20190116_010706

Version.

Additional context. If you want screenshots of confirmation of the versions. I can print out every index/key and value from the table returned from the getVersion() function.

StifflersMom commented 5 years ago

I can confirm this for players, also. Also I thought, weapon flags 0x000001 can disable shooting without aiming - It doesn't. So the topic of this issue should be "desynced animation while shooting without aiming"

Reproduce with 2 players: Player A get a Sawn-off shotgun (ID 26) with pro stats and shoot player B with only pressing left mouse button.