X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_textures.pas;h=7d8ad75283212881d9f40d4963ab75de5ef27b1c;hb=305dd578c69d930bdbb89a11d7e564b74f34378a;hp=78cfee512125cacdde9d939961dddeca0b4184ff;hpb=e7e94dcc4a3c33072237faead3efa1029711c208;p=d2df-sdl.git diff --git a/src/game/g_textures.pas b/src/game/g_textures.pas index 78cfee5..7d8ad75 100644 --- a/src/game/g_textures.pas +++ b/src/game/g_textures.pas @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -738,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;