Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
OnPlayerWeaponShot doesn't get called when the driver of a vehicle fires a weapon, but does get called by a passenger drive-by. Can this be fixed?
Posts: 2,175
Threads: 235
Joined: Sep 2009
Reputation:
0
You mean pressing Q and E ?
Yea i've noticed that too
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
23.01.2014, 17:38
(
Последний раз редактировалось Mauzen; 23.01.2014 в 20:55.
)
Correction: its not always 0. For the passenger the weaponid is kind of random, could be something like the weapon in the previous slot, or its somehow dependent from the previously used weapon. At least its the wrong ID most of the time. Tiny bug, but should also be easy to fix.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
On a side note, does anyone know if drive-bys (driver or passenger) are lag compensated? Or is it only on-foot? What about someone on-foot shooting someone in a moving vehicle?
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
I guess passenger drivebys are synced, and driver drivebys not (yet), since they call/dont call OnPlayerWeaponShot. From what I know synced shots should always trigger that callback, and there shouldnt be unsynced shots related with the callback as it is freshly added.
Not sure about your second question. Though I guess for GTA's hitdetection theres no big difference if someone is walking or sitting in a car, so if OnPlayerWeaponShot really is directly linked to that client's hitdetection it should also work for guys in vehicles. Would be easy to test that, but im also too lazy right now.
Posts: 2,593
Threads: 38
Joined: Aug 2007
Reputation:
0
What about vehicles with guns? (Helicopters)
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
The guns on vehicles (seasparrow/hunter guns) work (they call OnPlayerWeaponShot). The reason is WEAPON_M4 IIRC.