Vanilla-Conquer icon indicating copy to clipboard operation
Vanilla-Conquer copied to clipboard

[TD] Music fails to auto-start in Multiplayer and Skirmish modes

Open Gerwin2k opened this issue 3 years ago • 3 comments
trafficstars

Moved into a separate issue, originally mentioned in issue #719

For reference: In original C&C Gold music auto-starts when entering a multiplayer game. (Skirmish was not an available option in the original game.)

In Current VanillaTD:

  1. Any of the multiplayer modes, in tiberiandawn\init.cpp after line 1110 it sets "Options.ScoreVolume = 0;" for these game modes.

  2. Skirmish: it seems that music on Skirmish maps only auto-starts with certain map numbers. When I extract map 'Green Acres' SCM01EA and give it number SCM19EA, the music still auto-starts. Give it number SCM20EA or higher: no music. There are stock multiplayer maps that are numbered 20 or higher.

The logic that determines the music in skirmish is in line 90 of tiberiandawn\scenario.cpp

The "< 20" there limits the music to map scm19ea and lower. The song that gets chosen is 19 lines below: THEME_AOI = Act On Instinct.

        if (Scenario < 20 && (!Special.IsJurassic || !AreThingiesEnabled)) {
            if (Scenario != 1 || Whom == HOUSE_GOOD) {
                Play_Movie(IntroMovie);
            }
#ifndef REMASTER_BUILD
            if (Scenario > 1 || Whom == HOUSE_BAD) {
                if (briefing) {
                    PreserveVQAScreen = (Scenario == 1);
                    Play_Movie(BriefMovie);
                }
            }
#else
            if (briefing) {
                PreserveVQAScreen = (Scenario == 1);
                Play_Movie(BriefMovie);
            }
#endif
            Play_Movie(ActionMovie, TransitTheme);
            if (TransitTheme == THEME_NONE) {
                Theme.Queue_Song(THEME_AOI);
            }
        } else {
            Play_Movie(BriefMovie);
            Play_Movie(ActionMovie, TransitTheme);

Gerwin2k avatar Jan 08 '22 01:01 Gerwin2k

"For reference: In original C&C Gold music auto-starts when entering a multiplayer game. (Skirmish was not an available option in the original game.)"

No, it didn't. I am pretty sure that it was a v1.06 patch thing.

Still, I think this should be fixed nonetheless.

giulianobelinassi avatar Jan 09 '22 21:01 giulianobelinassi

I did not consider the v1.06 unofficial patch was involved with this. My reference C&C gold is at v1.06 level indeed.

Gerwin2k avatar Jan 09 '22 22:01 Gerwin2k

The music was indeed disabled in multiplay originally. This was most likely for two reasons:

  • Reading music from CD could lag the game
  • There is a bug in the game where the random numbers used for randomising the music are taken from the same random number generation used for game events, meaning that if one player has the music set on random, and someone else in the game doesn't, the game will desync after the first random track lookup. See #369

I was aware of the first issue, and that prompted me to re-enable it since people mostly have their music on hard disc these days anyway. The patch also enabled random music by default for multiplayer games.

Imagine my surprise when we played games online and noticed that our music was completely synchronised among all players.

And my horror, when I realised the full consequences of that... :facepalm:

I did not consider the v1.06 unofficial patch was involved with this. My reference C&C gold is at v1.06 level indeed.

Yea, you'd be surprised how many things can be seen as regressions when comparing to my patch instead of to the real original :stuck_out_tongue:

If you can't be bothered figuring out how to set up an actual original installation, you should at least double-check issues like this in the 1.06 changelog, so you can correctly mark them as improvements here. http://nyerguds.arsaneus-design.com/cnc95upd/cc95p106/patch106c_r3_en.html

Nyerguds avatar Apr 08 '22 09:04 Nyerguds