altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

explosion event cancellation is broke

Open tastydev opened this issue 2 years ago • 4 comments

Description of the problem

As soon as you register the explosion event the explosion sync of throwables will break. It doesn't matter if and what you return. see steps below

Reproduction steps

  1. Use a clean gamemode
  2. connect to it with 2 players
  3. throw a grenade Result: Explosion synced
  4. only register this serverside event (i.e with runtime editor):

alt.on('explosion', (source, type, pos, fx, target) => {
  console.log('explosion', source.name, type, pos, fx);
  //return true; doesn't work too
});
  1. retry step 2 and step 3 -> sync broke

Expected behaviour

//still sync the explosion
alt.on('explosion', (source, type, pos, fx, target) => {
  console.log('explosion', source.name, type, pos, fx);
});
//still sync the explosion
alt.on('explosion', (source, type, pos, fx, target) => {
  console.log('explosion', source.name, type, pos, fx);
  return true;
});
//don't sync the explosion
alt.on('explosion', (source, type, pos, fx, target) => {
  console.log('explosion', source.name, type, pos, fx);
  return false;
});

Additional context

used linux server binaries client version: 12.10 release server version: 12.10 release

maybe it affects other cancelable events too

Operating system

Ubuntu 20.04

Version

12.10 release

tastydev avatar Aug 09 '22 17:08 tastydev

Can you test if its a js or core issue?

FabianTerhorst avatar Aug 09 '22 17:08 FabianTerhorst

Can you test if its a js or core issue?

@FabianTerhorst i tested it with c#-module too now and it's the same... so it's core related

tastydev avatar Aug 09 '22 19:08 tastydev

more info: POV thrower: everything is working as intended POV target: sees grenade/molotov flying, for grenades sees no explosion but gets dmg... for molotovs the fire on the ground is synced but the explosion of the molotov isn't synced, too

tastydev avatar Aug 09 '22 19:08 tastydev

Hi , i've the same probleme with an only if into the event without any return as tasty say , the explosion work on thrower but not synced on target ( tested with vehicle explosion and rpg)

Shino58 avatar Aug 09 '22 20:08 Shino58

Would fix it as soon as possible, it's impossible to fight cheaters without it

unnick94 avatar Nov 08 '22 12:11 unnick94

Fixed in 12.22

FabianTerhorst avatar Nov 08 '22 19:11 FabianTerhorst

more info: POV thrower: everything is working as intended POV target: sees grenade/molotov flying, for grenades sees no explosion but gets dmg... for molotovs the fire on the ground is synced but the explosion of the molotov isn't synced, too

@tastydev for damage you also need to cancel weaponDamage event

xxshady avatar Nov 09 '22 19:11 xxshady