From: Ketmar Dark Date: Thu, 7 Nov 2019 20:31:31 +0000 (+0200) Subject: engine: hack for missing anims X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=305dd578c69d930bdbb89a11d7e564b74f34378a;p=d2df-sdl.git engine: hack for missing anims --- diff --git a/src/game/g_textures.pas b/src/game/g_textures.pas index 87893c2..7d8ad75 100644 --- a/src/game/g_textures.pas +++ b/src/game/g_textures.pas @@ -737,7 +737,13 @@ end; constructor TAnimation.Create (aframesID: LongWord; aloop: Boolean; aspeed: Byte); begin - if (aframesID >= Length(framesArray)) then raise Exception.Create('trying to create inexisting frame: something is very wrong here'); + if (aframesID >= Length(framesArray)) then + begin + //raise Exception.Create('trying to create inexisting frame: something is very wrong here'); + e_LogWritefln('trying to create inexisting frame %u of %u: something is very wrong here', [aframesID, LongWord(Length(framesArray))], TMsgType.Warning); + aframesID := 0; + if (Length(framesArray) = 0) then raise Exception.Create('trying to create inexisting frame: something is very wrong here'); + end; mId := aframesID; mMinLength := 0; mLoop := aloop;