summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73adc74)
raw | patch | inline | side by side (parent: 73adc74)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Sun, 1 Mar 2020 23:51:44 +0000 (02:51 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Sun, 1 Mar 2020 23:51:44 +0000 (02:51 +0300) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index fe38642843d48311e9169bb13b93973c9fcfa0b5..90588ba10e31d4be1d60592fad315687274c8aff 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
SavedState.MaxAmmo[i] := FMaxAmmo[i];
SavedState.Rulez := FRulez - [R_KEY_RED, R_KEY_GREEN, R_KEY_BLUE];
- if FSavedStateNum < 0 then
- begin
- for i := Low(SavedStates) to High(SavedStates) do
- if not SavedStates[i].Used then
- begin
- FSavedStateNum := i;
- break;
- end;
- if FSavedStateNum < 0 then
+ for i := Low(SavedStates) to High(SavedStates) do
+ if not SavedStates[i].Used then
begin
- SetLength(SavedStates, Length(SavedStates) + 1);
- FSavedStateNum := High(SavedStates);
+ FSavedStateNum := i;
+ break;
end;
+ if FSavedStateNum < 0 then
+ begin
+ SetLength(SavedStates, Length(SavedStates) + 1);
+ FSavedStateNum := High(SavedStates);
end;
-
SavedState.Used := True;
SavedStates[i] := SavedState;
end;