NeotokyoRebuild / neo

NEOTOKYO Rebuild - Source SDK 2013 mod of NEOTOKYO
https://neotokyorebuild.github.io/
Other
23 stars 13 forks source link

[BUG] After your cloak has ran out, the game does not play the decloaking sound #764

Open kassibuss opened 3 weeks ago

kassibuss commented 3 weeks ago

Build Info

20241012_bc3a767

Description

When your cloak runs out in OGNT, there is an audible sound. Currently, in NTRE, the sound does not play when your cloak runs out, only when you decloak manually does the sound play.

To Reproduce

  1. Join the game
  2. Cloak
  3. Wait for the cloak to run out

Expected behavior

The decloaking sound should play from your character.

Actual behavior

No sound is made

Operating System

Version/Distro

10

Machine's CPU

No response

Machine's GPU

No response

GPU's driver

No response

Build's compiler

No response

Additional context and Screenshots

https://github.com/user-attachments/assets/da065c85-6b4a-433b-aee2-371ef84247c9

VantoNortim commented 2 weeks ago

I have added the cloak sound client side but the cloak energy is not synced properly. So it sometimes plays twice when it updates from the server.

AdamTadeusz commented 1 week ago

A workaround I've found that works fine is to only play the decloak sound when a cloak runs out of power server side, and in that specific case to not remove the local player from the recipient list

https://github.com/user-attachments/assets/0af9b05c-d79a-4bd0-bc3f-b6eaabd5e792

AdamTadeusz commented 1 week ago

I guess this means the flickering of the cloak wasn't intentional either. Maybe it's better just not to predict the cloak drain on the client side?

https://github.com/user-attachments/assets/a0676f90-9473-488c-8bed-2fc7c3614c9b

[Edit] or at the very least not to turn off the cloak client side as a result of running out of power, and instead letting the server tell us when the cloak is switched off which results in a smoother transition of cloak power in the hta hud element