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
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;
mId := aframesID;
mMinLength := 0;
mLoop := aloop;