| 186 | } |
| 187 | |
| 188 | void Mus_Serialize(FSerializer &arc) |
| 189 | { |
| 190 | if (arc.BeginObject("music")) |
| 191 | { |
| 192 | if (arc.isWriting()) |
| 193 | { |
| 194 | FString music = mus_playing.name; |
| 195 | if (music.IsEmpty()) music = mus_playing.LastSong; |
| 196 | |
| 197 | arc.AddString("music", music.GetChars()); |
| 198 | } |
| 199 | else arc("music", mus_playing.LastSong); |
| 200 | |
| 201 | arc("baseorder", mus_playing.baseorder) |
| 202 | ("loop", mus_playing.loop) |
| 203 | .EndObject(); |
| 204 | |
| 205 | // this is to prevent scripts from resetting the music after it has been loaded from the savegame. |
| 206 | if (arc.isReading()) mus_blocked = true; |
| 207 | // Actual music resuming cannot be performed here, it must be done in the game code. |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | void Mus_ResumeSaved() |
| 212 | { |
no test coverage detected