summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a5056ac)
raw | patch | inline | side by side (parent: a5056ac)
author | Stas'M <x86corez@gmail.com> | |
Mon, 24 Sep 2018 14:46:33 +0000 (17:46 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Mon, 24 Sep 2018 14:46:33 +0000 (17:46 +0300) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 6cc70f53c4a8c1fd232eb57d68721f364fae4214..ca23ce315cc7f2009d858a527d208163a0693b47 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
FRulez := [];
end;
+// Ðàçðûâàåì ñâÿçè ñ òðóïàìè:
+ if gCorpses <> nil then
+ for a := 0 to High(gCorpses) do
+ if gCorpses[a] <> nil then
+ if gCorpses[a].FPlayerUID = FUID then
+ gCorpses[a].FPlayerUID := 0;
+
// Ïîëó÷àåì êîîðäèíàòû òî÷êè âîçðîæäåíèÿ:
if not g_Map_GetPoint(c, RespawnPoint) then
begin
Exit;
if (gCorpses = nil) or (Length(gCorpses) = 0) then
Exit;
- if gCorpses <> nil then
- for i := 0 to High(gCorpses) do
- if gCorpses[i] <> nil then
- if gCorpses[i].FPlayerUID = FUID then
- begin
- Result := True;
- FObj.X := gCorpses[i].FObj.X;
- FObj.Y := gCorpses[i].FObj.Y;
- FObj.Vel.X := gCorpses[i].FObj.Vel.X;
- FObj.Vel.Y := gCorpses[i].FObj.Vel.Y;
- FObj.Accel.X := gCorpses[i].FObj.Accel.X;
- FObj.Accel.Y := gCorpses[i].FObj.Accel.Y;
- break;
- end;
+ for i := 0 to High(gCorpses) do
+ if gCorpses[i] <> nil then
+ if gCorpses[i].FPlayerUID = FUID then
+ begin
+ Result := True;
+ FObj.X := gCorpses[i].FObj.X;
+ FObj.Y := gCorpses[i].FObj.Y;
+ FObj.Vel.X := gCorpses[i].FObj.Vel.X;
+ FObj.Vel.Y := gCorpses[i].FObj.Vel.Y;
+ FObj.Accel.X := gCorpses[i].FObj.Accel.X;
+ FObj.Accel.Y := gCorpses[i].FObj.Accel.Y;
+ break;
+ end;
end;
procedure TPlayer.Update();