X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_map.pas;h=39a6692f2b228df76f4274e25abc139397a58b8a;hp=20bfa3bf1bee93ff29bc5471cb86a60cf214941a;hb=d55f78661cd9bd77609beed2552d7dd6262ad65c;hpb=465b38160672db2ce8f540ddc0dc4f948b6de4d1 diff --git a/src/game/g_map.pas b/src/game/g_map.pas index 20bfa3b..39a6692 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -54,6 +54,7 @@ type CaptureTime: LongWord; Animation: TAnimation; Direction: TDirection; + NeedSend: Boolean; end; function g_Map_Load(Res: String): Boolean; @@ -2567,8 +2568,13 @@ begin begin if gFlags[a].Animation <> nil then gFlags[a].Animation.Update(); + Obj.oldX := Obj.X; + Obj.oldY := Obj.Y; + m := g_Obj_Move(@Obj, True, True); + NeedSend := NeedSend or (Obj.X <> Obj.oldX) or (Obj.Y <> Obj.oldY); + if gTime mod (GAME_TICK*2) <> 0 then Continue; // Ñîïðîòèâëåíèå âîçäóõà @@ -3153,6 +3159,9 @@ begin Direction := FlagPoints[Flag]^.Direction; State := FLAG_STATE_NORMAL; end; + Obj.oldX := Obj.X; + Obj.oldY := Obj.Y; + NeedSend := False; // the event will take care of this Count := -1; end; end;