MP40 plays strange "click" sound after firing without ironsights

Issue #246 resolved
Colin Basnett created an issue

No description provided.

Comments (5)

  1. Andrew Theel

    Assigned to Matt, because the bug was caused by him in I believe commit a60653e.

    If not a60653e, then for sure between commits eb0c384 and a60653e

    I believe the issue is a default property or function difference that needs fixed for just the MP40.

    The issue: When the gun is silenced (comment out the firesounds), you will hear an additional sound (not supposed to). The additional sound is a bolt sound in Inf_Weapons_Foley called boltup02. The sound will play twice when hipfiring and once when ironsighted.

    I tried a global search of "boltup02" which returned nothing, so I believe the boltaction stuff is in native code. I have no other way of knowing how to fix this issue without going line per line vs the RO MP40 classes and checking for differences with the DH.

    Changed to critical.

  2. Matt Hands

    Thanks for the investigatory work - very useful, cheers ! Allowed me to work out where that sound is being triggered. The reason you didn't find any code reference to the bolt sound is because it's triggered by an animation notify. If you look in the RO MP40 anim file & select any of the shoot anims & click on the 'notify' tab, you'll see the bolt sound being played at a specified anim frame. So, good or bad, it was designed as an intended bolt sound.

    But it wasn't playing in DH 5.1 or in RO. So why appear now? Very strange.

    The answer is that the MP40 firing animation wasn't playing before. To demo this, go into 5.1 or RO in single player and go into slow motion ("slomo 0" in console). if you fire the MP40 in slomo, there isn't a proper 1st person anim - the bolt doesn't move correctly, it just jerks instantly. Now go into the DH dev build and so the same - you'll see a nice bolt animation, with the bolt sound timed to coincide with the bolt recoiling.

    So it's not a bug, it's a fix ! Some change has made the MP40 firing anim play properly.

    And that means the anim notify is playing the bolt sound, as the original animator intended. May or may not like it, and it may or may not sound realistic (I don't know), but it's only performing as originally intended. I think to remove it probably means a DH version of the MP40 anim file, minus the anim notify sounds.

    But that's the explanation.

  3. Log in to comment