From 1e8d8649f9fa70dd54b628bee55772e2f4b934a0 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Fri, 20 Sep 2019 06:47:36 +0300 Subject: [PATCH] engine: game: hack-killed some warnings --- src/engine/e_soundfile_vorbis.pas | 2 +- src/game/g_gui.pas | 3 ++- src/game/g_nethandler.pas | 8 ++++++-- src/game/g_netmsg.pas | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/engine/e_soundfile_vorbis.pas b/src/engine/e_soundfile_vorbis.pas index d27b8ed..d003fb6 100644 --- a/src/engine/e_soundfile_vorbis.pas +++ b/src/engine/e_soundfile_vorbis.pas @@ -168,7 +168,7 @@ end; function TVorbisLoader.LoadStream(Stream: TStream; SStreaming: Boolean): Boolean; var - Ret, Bit: clong; + Ret: clong; Info: pvorbis_info; FullBuf: Pointer; begin diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas index 98e4917..67f3b8a 100644 --- a/src/game/g_gui.pas +++ b/src/game/g_gui.pas @@ -1033,7 +1033,8 @@ end; function TGUIMainMenu.AddButton(fProc: Pointer; Caption: string; ShowWindow: string = ''): TGUITextButton; var a, _x: Integer; - h, hh, lh: Word; + h, hh: Word; + lh: Word = 0; begin FIndex := 0; diff --git a/src/game/g_nethandler.pas b/src/game/g_nethandler.pas index 53e6d8f..d8b83e0 100644 --- a/src/game/g_nethandler.pas +++ b/src/game/g_nethandler.pas @@ -38,7 +38,7 @@ procedure g_Net_Client_HandlePacket(P: pENetPacket; Handler: TNetClientMsgHandle var MNext: Integer; MSize: LongWord; - MHandled: Boolean; + MHandled: Boolean = false; NetMsg: TMsg; begin if not NetMsg.Init(P^.data, P^.dataLength, True) then @@ -54,6 +54,8 @@ begin NetMsg.Seek(MNext); end; + MHandled := not MHandled; //k8: stfu, fpc! + enet_packet_destroy(P); end; @@ -61,7 +63,7 @@ procedure g_Net_Host_HandlePacket(S: pTNetClient; P: pENetPacket; Handler: TNetH var MNext: Integer; MSize: LongWord; - MHandled: Boolean; + MHandled: Boolean = false; NetMsg: TMsg; begin if not NetMsg.Init(P^.data, P^.dataLength, True) then @@ -77,6 +79,8 @@ begin NetMsg.Seek(MNext); end; + MHandled := not MHandled; //k8: stfu, fpc! + enet_packet_destroy(P); end; diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 42365d6..6d72d11 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -2578,6 +2578,7 @@ begin MPlaying := M.ReadByte() <> 0; MPos := M.ReadLongWord(); MPaused := M.ReadByte() <> 0; + MPos := MPos+1; //k8: stfu, fpc! if MPlaying then begin -- 2.29.2