Batfoxkid / Freak-Fortress-2-Rewrite

The gamemode that's now also a standalone boss maker.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
17 stars 7 forks source link

[Bug] If a music sound (one with "time" in it) is in section other than for music, then sound will not play at all and won't show information #205

Closed naydef closed 1 month ago

naydef commented 3 months ago

Description

Basically this won't work at all:

"sound_lastman"
{
    "freak_fortress_2/gangplank/gang_last.mp3"
    {
        "time"  "36"
        "artist"    "Klaus Badelt"
        "name"  "He's a Pirate"
        "volume"    "2.0"
    }
}

Fix

@@ -831,7 +831,7 @@ static void LoadCharacter(const char[] character, int charset, const char[] map,
                                    {
                                        ConfigMap cfgsound = val.cfg;
                                        if(cfgsound)
-                                           music = view_as<bool>(cfgsound.GetInt("time", length2));
+                                           cfgsound.GetInt("time", music);
                                    }

                                    if(StrContains(key, SndExts[0]) != -1 || StrContains(key, SndExts[1]) != -1)