X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=653ba539cf7f1fd4138d26dec714ef679f6ecf38;hp=add8be44def44354fd817f129e847a4e9c914944;hb=d55f78661cd9bd77609beed2552d7dd6262ad65c;hpb=465b38160672db2ce8f540ddc0dc4f948b6de4d1 diff --git a/src/game/g_game.pas b/src/game/g_game.pas index add8be4..653ba53 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -1781,6 +1781,16 @@ var if mon.gncNeedSend then MH_SEND_MonsterPos(mon.UID); end; + function sendItemPos (it: PItem): Boolean; + begin + result := false; // don't stop + if it.needSend then + begin + MH_SEND_ItemPos(it.myId); + it.needSend := False; + end; + end; + var reliableUpdate: Boolean; begin @@ -2239,6 +2249,18 @@ begin g_Mons_ForEach(sendMonsPos); + // update flags that aren't stationary + if gGameSettings.GameMode = GM_CTF then + for I := FLAG_RED to FLAG_BLUE do + if gFlags[I].NeedSend then + begin + gFlags[I].NeedSend := False; + MH_SEND_FlagPos(I); + end; + + // update items that aren't stationary + g_Items_ForEachAlive(sendItemPos); + if reliableUpdate then begin NetTimeToReliable := 0;