summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 00ada89)
raw | patch | inline | side by side (parent: 00ada89)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Thu, 7 Nov 2019 20:31:31 +0000 (22:31 +0200) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Thu, 7 Nov 2019 20:33:27 +0000 (22:33 +0200) |
src/game/g_textures.pas | patch | blob | history |
index 87893c2a9cc22089e60ac02798d1bbbdf2e097a2..7d8ad75283212881d9f40d4963ab75de5ef27b1c 100644 (file)
--- a/src/game/g_textures.pas
+++ b/src/game/g_textures.pas
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;