diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index 20bfa3bf1bee93ff29bc5471cb86a60cf214941a..2b8e9ff34d5875ab0042b71f15b9936bfb680e97 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
CaptureTime: LongWord;
Animation: TAnimation;
Direction: TDirection;
CaptureTime: LongWord;
Animation: TAnimation;
Direction: TDirection;
+ NeedSend: Boolean;
end;
function g_Map_Load(Res: String): Boolean;
end;
function g_Map_Load(Res: String): Boolean;
begin
if gFlags[a].Animation <> nil then gFlags[a].Animation.Update();
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);
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;
// Ñîïðîòèâëåíèå âîçäóõà
if gTime mod (GAME_TICK*2) <> 0 then Continue;
// Ñîïðîòèâëåíèå âîçäóõà
Direction := FlagPoints[Flag]^.Direction;
State := FLAG_STATE_NORMAL;
end;
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;
Count := -1;
end;
end;
procedure g_Map_DrawFlags();
var
i, dx: Integer;
procedure g_Map_DrawFlags();
var
i, dx: Integer;
+ tx, ty: Integer;
Mirror: TMirrorType;
begin
if gGameSettings.GameMode <> GM_CTF then
Mirror: TMirrorType;
begin
if gGameSettings.GameMode <> GM_CTF then
if State = FLAG_STATE_NONE then
continue;
if State = FLAG_STATE_NONE then
continue;
+ Obj.lerp(gLerpFactor, tx, ty);
+
if Direction = TDirection.D_LEFT then
begin
Mirror := TMirrorType.Horizontal;
if Direction = TDirection.D_LEFT then
begin
Mirror := TMirrorType.Horizontal;
dx := 1;
end;
dx := 1;
end;
- Animation.Draw(Obj.X+dx, Obj.Y+1, Mirror);
+ Animation.Draw(tx+dx, ty+1, Mirror);
if g_debug_Frames then
begin
if g_debug_Frames then
begin
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin
// Î÷êè Êðàñíîé êîìàíäû
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin
// Î÷êè Êðàñíîé êîìàíäû
- utils.writeInt(st, SmallInt(gTeamStat[TEAM_RED].Goals));
+ utils.writeInt(st, SmallInt(gTeamStat[TEAM_RED].Score));
// Î÷êè Ñèíåé êîìàíäû
// Î÷êè Ñèíåé êîìàíäû
- utils.writeInt(st, SmallInt(gTeamStat[TEAM_BLUE].Goals));
+ utils.writeInt(st, SmallInt(gTeamStat[TEAM_BLUE].Score));
end;
///// /////
end;
end;
///// /////
end;
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin
// Î÷êè Êðàñíîé êîìàíäû
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin
// Î÷êè Êðàñíîé êîìàíäû
- gTeamStat[TEAM_RED].Goals := utils.readSmallInt(st);
+ gTeamStat[TEAM_RED].Score := utils.readSmallInt(st);
// Î÷êè Ñèíåé êîìàíäû
// Î÷êè Ñèíåé êîìàíäû
- gTeamStat[TEAM_BLUE].Goals := utils.readSmallInt(st);
+ gTeamStat[TEAM_BLUE].Score := utils.readSmallInt(st);
end;
///// /////
end;
end;
///// /////
end;