summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 601480a)
raw | patch | inline | side by side (parent: 601480a)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Tue, 6 Feb 2018 23:03:59 +0000 (02:03 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Tue, 6 Feb 2018 23:03:59 +0000 (02:03 +0300) |
src/game/g_netmsg.pas | patch | blob | history | |
src/game/g_panel.pas | patch | blob | history |
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index ce4238a69d454b185a3fc0f57a08ec292a865e30..b98681b1c42dd705a623edf16a4cb2d1f280b76c 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
TP := g_Map_PanelByGUID(PGUID);
if (TP <> nil) then
begin
- if Loop = 0 then
- begin
- // switch texture
- TP.SetTexture(Tex, Loop);
- TP.SetFrame(Fr, Cnt);
- end
- else
- begin
- // looped or non-looped animation
- TP.NextTexture(Loop);
- end;
+ // switch texture
+ TP.SetTexture(Tex, Loop);
+ TP.SetFrame(Fr, Cnt);
end;
end;
diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index d0eb1ce7dc3ed2ec7e4b5f0e6ac6f12b96a6fccc..490a728ee45f0573e80c7b97e0a8634ede139226 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
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