mtasa-blue
mtasa-blue copied to clipboard
The grenade bug / exploit
Describe the bug The "grenade" exploit/ bug is an issue that has been getting abused more and more recently. This game breaking issue generally affects the Shooter game-mode (if you don't know what Shooter is, it's a race-based mode that involves vehicles shooting missiles from their bonnet using createProjectile(vehicle, 19, x, y, z, 1.0, nil)). This bug, or rather exploit, results in the game to behave abnormally. After being triggered, shots don't look or feel the same, they often teleport, appear laggy, explode near enemies, do more damage, etc.
To reproduce Steps to reproduce the behaviour generally involve switching between freeroam to race: -REMOVED I removed the reproduction steps because so far, this only helped spread this issue.
Video proof https://youtu.be/_N-JGYyti9I You can see how the shot magically teleports/explode near another player.
https://youtu.be/Sau5Y9faFS4 Another example showing how the shot explodes near me without hitting me or the ground (the other player also has the bug active, for us to test it around)
Additional context Something worth mentioning is if you restart MTA, everything goes back to normal and the bug doesn't work unless you trigger it again. Also this generally involves switching between servers (one to trigger the bug at, one to benefit from it at), so a potential fix could be by somehow resetting whatever this bug changes about the game whenever you leave a server.
- Do you trigger the bug by throwing the grenade or by dieing to a grenade - is it important who throws the grenade, another player or you?
- Does it merely work by taking damage from a grenade or actually dieing?
- Can you provide other reproduction steps, which don't require a server or gamemode change - it should be possible?
- Can you explain the difference between results before and after triggering 'the bug' in other words or show data from events? (in chat or drawn on screen)
createProjectile is clientside but server needs to synchronize it somehow. Could it be the reason why this happens if someone has high ping?
Sorry for the inconvenient delay. I've been testing this bug out and I'll try to answer @botder 's questions (my results are subject to being not 100% accurate as it doesn't seem to work everytime). 1&2. The bug will still work even if you just take damage from the grenade, regardless of who throws it. 3. I haven't got any idea about other steps, I'm open to any suggestion to try out though. 4. If I understood you correctly; before triggering the bug, the game would just go on as normal, like you'd expect and I don't think i know or can show data from events.
createProjectile is clientside but server needs to synchronize it somehow. Could it be the reason why this happens if someone has high ping?
I can guarantee this is not due to any high ping; me and whoever I try it with both have relatively low ping.
I would also like to attach this other video showing how broken it is; a direct hit to my friend (who also has the bug on) only took ~50% of his health, when in reality he shouldn't died instantly. https://youtu.be/3vrJomJYd-0
We (FFS Gaming) would like to offer a 25€ bribe to MTA for fixing this issue. A lot of competitive play depends on it and we would highly appreciate a fix.
I have tried logically to think about this; what could cause this? Dying by explosion and then going to another server and having lots of advantages sounds strange. But, it's real and it does happen, and gives a big advantage. The only theory which I could work up was that maybe some crappy logic in GTA causes this.
Maybe while in first server when you die and go to another server, explosion from the game doesn't get removed properly and maybe some of it's variables or states remain from earlier, and it becomes default behaviour of further explosions, and since you died from them, they had biggest damage, but now that biggest damage became the default setting for further explosions.
it ain't much but it's honest ~work~ theory
I have tried logically to think about this; what could cause this? Dying by explosion and then going to another server and having lots of advantages sounds strange. But, it's real and it does happen, and gives a big advantage. The only theory which I could work up was that maybe some crappy logic in GTA causes this.
Maybe while in first server when you die and go to another server, explosion from the game doesn't get removed properly and maybe some of it's variables or states remain from earlier, and it becomes default behaviour of further explosions, and since you died from them, they had biggest damage, but now that biggest damage became the default setting for further explosions.
it ain't much but it's honest ~work~ theory
It is not necessary to switch between servers, a simple /start race from within the same server is enough to notice the difference. In fact, I believe it's not even necessary to switch between gamemodes to see the result.
Your theory is not bad at all.
As the bug that is here with us for a long time - like 5 years and it's still not fixed and it's ruining atmosphere of clanwars and arenas on all Shooter/Hunter servers
As there it was explained ^^ but I'll explain it once more again: How can you trigger Grenade bug?*
You'll go to some Freeroam server (any, also you can use Host Game) and will take Grenade/Satchel. If grenade, you'll start throwing grenades under you and die by it. Then you'll join some server and you have triggered grenade bug. Same it's working with Satchel.
What's grenade?* https://youtu.be/RraAIjzOet0
A lot of times it's exploding over they player, so he die instantly instead of burning. I'll add few videos of explanation: 00:00 - 00:10 | You can see, that he has grenade and I don't, so his shoot disappeared for me, because I don't have grenade and it sticked with mine and exploded. It wouldn't happened, if he wouldn't use grenade bug. 00:11 - 00:23 | Clearly you can see, that he hit him, but he didn't die, because Hardy was using grenade. If he wouldn't, he would die. This can happen only with grenade. 00:24 - 00:30 | You can see, that the player hit Chiki, but he started burning, because the player who hit him was using grenade. 00:31 - 00:35 | Same situation as last one. 00:36 - 00:46 | Same situation as in 00:11 - 00:23. Zeroxy hit Vndtt, but he didn't die because he was using grenade. He got just -40hp. This can happen only with this bug. 00:47 - 00:53 | He shooted corner and it teleported to Lonnex because of grenade.
You should fix this bug because it's ruining atmosphere of fun and it's hard to fix it by normal script. FFS made some script, but it's not working well. You can still trigger grenade and it's also kicking players who aren't using it or who came from PTP - mode which can trigger grenade bug, because there you can use 'Grenade'
Please take care of it..
Let see if I understood the problem. All proyectiles now just converted to grenades? That's the issue?
I think the main reason this bug is not fixed yet is because we (we meaning I rlly) don't understand whats happening and the tedious of testing it (which requieres two players afaik).
Could some of you make a video comparision with and without the bug? Preferible outside of FFS so it's easier to test. That would probably be of great help for the folks that will actually fix this.
A way to always reproduce this with minimum time spent would be also nice. Someone here said that just by starting another race the bug activates? Does getProjectileType() give a wrong value?
Hi there.
This topic got crowded with a lot of information, and it's becoming confusing to understand and read through it. I have spent some of my time investigating this "grenade bug" further. I made a lot of progress and I might have a solution. If you are an MTA dev, please read this, even if you don't have much will, at least look at Solution category below (1 and 3)
Grenade bug detection
At the very moment most efficient method that I found of detecting it is by spawning a ped, creating a projectile directly underneath him (with a script) and seeing if he receives fall damage. Video demonstration: https://streamable.com/whm5w8
I have explored both GTA and MTA with various projectiles, explosions, and etc, and here are my notes:
Notes
- grenade bug is triggered by damage of a projectile, not death
- ped OR player can be damaged to trigger grenade bug (before it was thought that player was required, but this involves peds as well)
- grenade bug doesn't get triggered by explosions, only by projectiles (either u drop it by yourself with weapon or u use createProjectile, both work)
- createExplosion even with grenade type doesn't trigger grenade bug.
- once again, grenade bug is only triggered by projectiles
- dying in a vehicle, shooting yourself with your own hydra/etc rockets doesn't trigger the bug
- after the initial damage by a projectile, grenade bug cannot be reversed until MTA is restarted
- ANY projectile works to trigger grenade bug (like teargas, molotov, etc, all of them)
- GTA Singleplayer seems to suffer from the same issue, so it might not be MTA related (i tried this out with m0d sobeit to see health, it was a bit painful to test but it seems to be reproducing even in singleplayer, which i guess makes fixing this much harder)
- in the end, the reason why fall damage happens to ped in the video is because once grenade bug is active, it increases velocity by which the ped is catapulted into the air (as opposed to before grenade bug)
- i remember toying around with onClientExplosion in past and noticing that projectile explosions cause damage from a slightly bigger distance (default ~1m, grenade bug ~1.14m), which indicates that it also affects radius of the projectile explosions
- no need for 2 servers for grenade bug to occur, only 1 is sufficient
Solution?
-
Workaround: As this grenade bug is relatively easy to accidentally activate, I would advise multigamemode/shooter servers to secretly behind the screens damage a random ped or local player with a projectile, so that everyone has the grenade bug, and by doing so, everyone is equalized. I see FFS Gaming is kicking players for grenade bug, but as it's so easy to trigger the grenade bug, I believe this workaround would work better and wouldn't require kicking people at all.
-
MTA built-in solution (hard) Much harder, and would require (i guess) way longer time, but to wait for some MTA developer who is a reverse engineer god of San Andreas to analyze the game and try to patch it within MTA after discovering why/how it happens
-
MTA built-in solution (easy) Somehow MTA does a workaround without needing to reverse engineer GTA:SA (maybe by doing solution 1) within MTA?)
edit: uploaded a test resource to try out grenade bug and see the outputs similar to the video gd.zip
I was working on a script to make rockets non-collidable with certain elements, it was all fine until I noticed that the script stops working properly once a non-rocket projectile (grenade, satchel, molotov or teargas) is created. https://www.youtube.com/watch?v=uV2_bDy9eOU resource: rocket.zip
Then, while I was coding a custom projectile creation script in order to prevent triggering the "grenade bug", I noticed that weapon/projectile objects dont collide with anything (even with world models) until a real non-rocket projectile is created and the grenade bug is triggered. This might help finding what causes the bug. You can know whether or not the bug is active by creating any weapon/projectile object and checking if it has collisions. Here is an example: https://www.youtube.com/watch?v=oocmBHD3NyU
code used in the video:
addCommandHandler("drop", function()
local x,y,z = getElementPosition(localPlayer)
local object = createObject(342, x,y,z+2)
setTimer(function()
setElementVelocity(object, 0,0,-0.1)
setTimer(function()
local _,_,obj_z = getElementPosition(object)
if z - obj_z > 0 and z - obj_z < 1 then
outputConsole("____ GRENADE BUG ACTIVE ____")
end
destroyElement(object)
end, 900, 1)
end, 100, 1)
end)
Btw, creating any projectile (excluding rocket) is enough to trigger the bug, even if it doesnt explode, it'll trigger the bug.
I looked at this and all weapons have the same colmodel. When the first grenade is thrown a colsphere is added to it. There are 2 options we have.
I can patch it so the colsphere is added upon game start and all weapons and projectiles will have this collision. Which would mean the "grenade bug" is the default behavior.
Or I can patch it and split it into 2 colmodels one for all weapons and another one with the colsphere only for the 4 grenades. Which would leave projectiles the way it's now without the grenade bug.
I just need someone from the MTA Team to decide. I would go with option 2.
I looked at this and all weapons have the same colmodel. When the first grenade is thrown a colsphere is added to it. There are 2 options we have.
I can patch it so the colsphere is added upon game start and all weapons and projectiles will have this collision. Which would mean the "grenade bug" is the default behavior.
Or I can patch it and split it into 2 colmodels one for all weapons and another one with the colsphere only for the 4 grenades. Which would leave projectiles the way it's now without the grenade bug.
I just need someone from the MTA Team to decide. I would go with option 2.
If the 2nd option means everything goes back to normal and this "grenade bug" is wiped out of the game, then that is what everyone would want.
00:36 - 00:46 | Same situation as in 00:11 - 00:23. Zeroxy hit Vndtt, but he didn't die because he was using grenade. He got just -40hp. This can happen only with this bug.
For me it looks like that rocket went through vehicle because explosion appears behind it. Vehicle collisions are built from many collision spheres and could have holes.
Another example showing how the shot explodes near me without hitting me or the ground (the other player also has the bug active, for us to test it around)
It looks like that rocket actually collided with vehicle for the creator player and he synced that explosion.
This issue looks messy to me. It looks like a few issues reported as one. It would be nice to have clear reproduction steps and a resource.
@xPREDATORx or @ffsPLASMA, can you confirm whether or not 0e2b203 fixed this issue? It was a test fix after all.
@xPREDATORx or @ffsPLASMA, can you confirm whether or not 0e2b203 fixed this issue? It was a test fix after all.
-ffs-Drake — heute um 11:29 Uhr we tested it and it is working, but some zn members are complaining it's not lel
So yes the fix is working fine :3