Fixed vqa crashes

This commit is contained in:
DeadlySurprise
2014-11-18 17:01:10 +01:00
parent 6774435ef4
commit b7e3dfc665
2 changed files with 13 additions and 6 deletions

View File

@@ -90,10 +90,17 @@ namespace OpenRA.FileFormats
frameData = new uint[frameSize, frameSize]; frameData = new uint[frameSize, frameSize];
var type = stream.ReadASCII(4); var type = stream.ReadASCII(4);
if (type != "FINF") while (type != "FINF")
{ {
stream.Seek(27, SeekOrigin.Current); // Sub type is a file tag
type = stream.ReadASCII(4); if (type[3] == 'F')
{
var jmp = int2.Swap(stream.ReadUInt32());
stream.Seek(jmp, SeekOrigin.Current);
type = stream.ReadASCII(4);
}
else
throw new NotSupportedException("Vqa uses unknown Subtype : {0}".F(type));
} }
/*var length = */stream.ReadUInt16(); /*var length = */stream.ReadUInt16();

View File

@@ -135,9 +135,9 @@ end
MissionAccomplished = function() MissionAccomplished = function()
Media.PlaySpeechNotification(player, "Win") Media.PlaySpeechNotification(player, "Win")
--Trigger.AfterDelay(DateTime.Seconds(1), function() Trigger.AfterDelay(DateTime.Seconds(1), function()
--Media.PlayMovieFullscreen("snowbomb.vqa") -- https://github.com/OpenRA/OpenRA/issues/4224 Media.PlayMovieFullscreen("snowbomb.vqa")
--end) end)
end end
MissionFailed = function() MissionFailed = function()