summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d418da)
raw | patch | inline | side by side (parent: 5d418da)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Sun, 13 Aug 2017 16:54:24 +0000 (19:54 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Sun, 13 Aug 2017 16:54:24 +0000 (19:54 +0300) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index eea3f5db57e4b85c0ced6448b4d64eb642f41a86..b6a6bc16f507b818f7b7ffc6491cfff79b3adb1a 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
firew, fireh: Integer;
angle: SmallInt;
mon: TMonster;
- pla: TPlayer;
+ pla, tpla: TPlayer;
vsPlayer, vsMonster, ok: Boolean;
begin
vsPlayer := LongBool(gGameSettings.Options and GAME_OPTION_BOTVSPLAYER);
if (g_GetUIDType(Target.UID) = UID_PLAYER) and
vsPlayer then
begin // Èãðîê
- with g_Player_Get(Target.UID) do
- begin
- if (@FObj) <> nil then
+ tpla := g_Player_Get(Target.UID);
+ if tpla <> nil then
+ with tpla do
begin
- Target.X := FObj.X;
- Target.Y := FObj.Y;
+ if (@FObj) <> nil then
+ begin
+ Target.X := FObj.X;
+ Target.Y := FObj.Y;
+ end;
end;
- end;
Target.cX := Target.X + PLAYER_RECT_CX;
Target.cY := Target.Y + PLAYER_RECT_CY;