splewis / csgo-practice-mode

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

csutils thrown Flashs/Molotovs/Incendiaries don't fly as far as Player-thrown ones #85

Open JackJack3231 opened 6 years ago

JackJack3231 commented 6 years ago

Expected behavior

Grenades thrown by csutils should fly as far as player ones.

Actual behavior

Flashes, Molotovs and Incendiaries fly a little bit shorter when thrown by csutils. I believe this happens since csutils doesn't use a bot anymore, however I'm not 100% sure.

For Flashbangs this is an issue, if they explode just after a corner/edge (see example below to reproduce) For Molotovs/Incendiaries this can be an issue, when they explode mid-air (e.g just behind/over a box -> player thrown ones burn the area behind that box, csutils thrown ones will burn on the box)

Steps to reproduce

The following is an example on de_cache with a flashbang, only tested on my server (I can provide more positions if needed):

  1. load de_cache
  2. enter/launch practicemode
  3. use ".flash" at: setpos_exact 204.968750 -1009.979248 1586.416870; setang_exact 1.122429 88.201912 0.000000
  4. throw flash from setpos_exact 1113.988037 -1173.969360 1614.031250; setang_exact -17.331181 152.204376 0.000000-> you should be "full flashed"
  5. now use ".throw" -> not flashed
splewis commented 6 years ago

Thanks for the clearly reproducible steps.

Can you try build 242+ from https://ci.splewis.net/job/csgo-practice-mode/lastSuccessfulBuild/ and see if you still get this? You just need to update csutils.smx.

Unfortunately the change won't fix the throws for data already saved (e.g. entries in the .nades menu), but things should be accurate going forward.

JackJack3231 commented 6 years ago

After some initial testing this seems to be fixed, so I'm closing this issue for now. Thanks for the fast fix.

splewis commented 6 years ago

Good news, this bug seems to happen again. A CS:GO update might have changed nade behavior.

xmrv commented 4 years ago

3. setpos_exact 204.968750 -1009.979248 1586.416870; setang_exact 1.122429 88.201912 0.000000

You can ignore .throw and use sv_rethrow_last_grenade instead. I know it has a limited functionality but it produces accurate results on a dedicated server (do not use sv_rethrow_last_grenade on local server as it starts to bug like .throw.

splewis commented 4 years ago

Yes, if someone could implement the csutils API using that command, it would fix this.

That command alone is not a complete replacement though, as you can .throw any nade, not just the most recently thrown one.