Vice City: Multiplayer

VC:MP Discussion => Support => Bugs and Crashes => Topic started by: Spiller on November 4th, 2021, 05:31 AM

Title: [Bug] onObjectShot gets called for all players for explosions
Post by: Spiller on November 4th, 2021, 05:31 AM
When you shoot an (tracked) object with explosions, the onObjectShot function is called for all the spawned players.


What you think caused the bug
Explosion tracking was fixed in the QoL updates, it possibly exists ever since.
Quote from AdTec_224 on December 24th, 2020, 09:01 PM
  • Fixed an issue where onObjectShot was not being called for explosions
Used this code on a blank server:

Code: [Select]
local Tree = CreateObject( 444, 1, Vector( -337.578, -519.728, 11.9022), 255 );
Tree.TrackingShots = true;

function onObjectShot( object, player, weapon )
if(object.ID == Tree.ID)
Message("[#7A7A7A]Shot by: [#C0C0C0]" + player.Name);

Edit: Looks like a report already existed for this too ( :facepalm: