From 8c0ad50db353672c33c78a9b88016f9e853be128 Mon Sep 17 00:00:00 2001 From: Marisa the Magician <marisa@sayachan.org> Date: Wed, 24 Aug 2022 18:11:09 +0200 Subject: [PATCH] UE1 models now handle frame index -1 properly. --- src/common/models/models_ue1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/models/models_ue1.cpp b/src/common/models/models_ue1.cpp index ad80789f3..3e47d87e0 100644 --- a/src/common/models/models_ue1.cpp +++ b/src/common/models/models_ue1.cpp @@ -232,7 +232,7 @@ int FUE1Model::FindFrame( const char *name, bool nodefault ) void FUE1Model::RenderFrame( FModelRenderer *renderer, FGameTexture *skin, int frame, int frame2, double inter, int translation, const FTextureID* surfaceskinids) { // the moment of magic - if ( (frame >= numFrames) || (frame2 >= numFrames) ) return; + if ( (frame < 0) || (frame2 < 0) || (frame >= numFrames) || (frame2 >= numFrames) ) return; renderer->SetInterpolation(inter); int vsize, fsize = 0, vofs = 0; for ( int i=0; i<numGroups; i++ ) fsize += groups[i].numPolys*3;