splewis / csgo-practice-mode

CS:GO Sourcemod plugin for private team/individual practice servers
GNU General Public License v3.0
455 stars 70 forks source link

Different behavior in sv_rethrow_last_grenade and sm_throw #247

Open Dying-Ducks opened 2 years ago

Dying-Ducks commented 2 years ago

Expected behavior

If repeating the same nade both commands should throw the same nade with the same trajectory.

Actual behavior

The rethrow of the same nade using sv_rethrow_last_grenade and sm_throw can have different trajectories. The same applies to throwing a nade manually with the .goto command, which can result in a different trajectory than .throw

Steps to reproduce

I found this bug on Ancient, throwing a molotov to B site from the double Doors. You get in the doors throw the molli, so it barely went over the top of the cube thing. With .throw the molotov bounced of the cube thing and lands on my feet.

I noticed it from the difference while using .goto and .throw. It was a standing throw, so no movement involved. I threw the molotov, saved it and let the plugin throw it again, now it bounced of a wall and didn’t land on B Site. I tried .goto to verify the throw but it was perfectly fine, the lineup worked when I threw it myself and because it’s a standing throw my only input was the left mouse click. I tried .update and deleting the saved nade and save it again, but the results didn’t change. .throw just wasn’t able to get the molotov on B Site.

Then I noticed the difference in sv_rethrow_last_grenade and sm_throw. Again, to reproduce: get in position in the doors, throw the molli over the cube thing so it lands on B Site. Repeat the throw with sv_rethrow_last_grenade and it lands on B Site. Repeat the same throw with sm_throw and the molotov doesn’t land on B Site.

So sv_rethrow_last_grenade really repeats the nade exactly how you threw it. sm_throw does not and apparently can have a different trajectory and can bounce of surfaces “your” nade don’t.

splewis commented 2 years ago

This doesn't surprise me, there have always been issues with the grenade replaying logic: https://github.com/splewis/csgo-practice-mode/issues/71

Theoretically practicemode could perhaps use the games "new" builtin logic for grenade replays, but no progress has been made on that: https://github.com/splewis/csgo-practice-mode/issues/128