From: Stas'M Date: Tue, 25 Sep 2018 11:11:30 +0000 (+0300) Subject: Player: Fix follow corpses at client side X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=273168af46366b78a16d29061a4ee26a4d0ec230;p=d2df-sdl.git Player: Fix follow corpses at client side --- diff --git a/src/game/g_player.pas b/src/game/g_player.pas index c65d720..94c2871 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -1512,11 +1512,20 @@ end; procedure g_Player_CreateCorpse(Player: TPlayer); var + i: Integer; find_id: DWORD; ok: Boolean; begin if Player.alive then Exit; + +// Ðàçðûâàåì ñâÿçü ñ ïðåæíèì òðóïîì: + if gCorpses <> nil then + for i := 0 to High(gCorpses) do + if gCorpses[i] <> nil then + if gCorpses[i].FPlayerUID = Player.FUID then + gCorpses[i].FPlayerUID := 0; + if Player.FObj.Y >= gMapInfo.Height+128 then Exit; @@ -4518,13 +4527,6 @@ begin 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