View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007970||Multi Theft Auto : San Andreas||Client||public||2014-01-07 01:09||2014-11-19 00:02|
|Platform||Q9450 | GTX 280 | 8 GB DDR3 RAM||OS||Windows 7 Professional 64Bit||OS Version||V6.1 B:7601 SP1|
|Target Version||1.4.1||Fixed in Version||1.4.1|
|Summary||0007970: Peds with weapons malfunction due to weird totalAmmo and ammoInClip values|
When setting a peds (server side, synced = true) current weapon serverside, the clients will be updated correctly, however when getting the slot serverside it will remain as 0. Clients on the other hand have the problem, that whenever a ped with a weapon is streamed in the total ammo and ammo in clip will both be 1. When the server updates the ammo of a ped while the client has it streamed in it will update, however there are still weird results that can occur:
I attached a small resource I used for some testing. Press b to spawn a ped, you can then use your "aim_weapon" and "fire" key to have the peds aim their weapons and fire at you. The onClientStreamIn event lets you know the peds ammo in clip and their total ammo, the server will also give you the information it has about the ped.
The resource also shows that its impossible for a ped to rotate their camera around while aiming their weapon and sometimes peds can fire in a direction 180° from the direction they are facing.
|Tags||No tags attached.|
|Users sponsoring this issue|
Total Sponsorship = EUR 20
2014-09-26 12:26: arranTuna (EUR 20)
Confirmed, this bug where their ammo value is set to 1 when streamed in makes it impossible to have a game mode with peds that shoot guns as the peds won't be shooting at you.
Edit: Just thought I'd add that there is a quick 'hacky' fix for this. If there ammo is set to 1 on stream in, how about change the 1 to 9999? At least then we've got peds that can actually shoot bullets.
Edit: I've updated the test resource so it's much simpler now, to reproduce just follow these steps:
-- Start it