X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_panel.pas;h=490a728ee45f0573e80c7b97e0a8634ede139226;hb=5929d2a7e4ac7aef4d49bdef3bef3ef506e4b9b0;hp=d0eb1ce7dc3ed2ec7e4b5f0e6ac6f12b96a6fccc;hpb=785fe3df9d3c82df346034780156cb63bae43ff7;p=d2df-sdl.git diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index d0eb1ce..490a728 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -957,22 +957,8 @@ end; procedure TPanel.SetTexture(ID: Integer; AnimLoop: Byte = 0); begin -// Íåò òåêñòóð: - if Length(FTextureIDs) = 0 then - FCurTexture := -1 - else - // Òîëüêî îäíà òåêñòóðà: - if Length(FTextureIDs) = 1 then - begin - if (ID = 0) or (ID = -1) then - FCurTexture := ID; - end - else - // Áîëüøå îäíîé òåêñòóðû: - begin - if (ID >= -1) and (ID <= High(FTextureIDs)) then - FCurTexture := ID; - end; + if (ID >= -1) and (ID < Length(FTextureIDs)) then + FCurTexture := ID; // Ïåðåêëþ÷èëèñü íà âèäèìóþ àíèì. òåêñòóðó: if (FCurTexture >= 0) and FTextureIDs[FCurTexture].Anim then