X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_netmsg.pas;h=98ef65484d75106458c50cf94f86679e52d992ca;hb=20114d602d19e4e913ea1a7c22f2031bd7f54677;hp=88764ed9a2bd913b481a581d55c0d65450d6c3f8;hpb=bc39ceef968c6dabc91c4f4fb94411f52117e9f3;p=d2df-sdl.git diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 88764ed..98ef654 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -914,7 +914,7 @@ begin NetOut.Write(EvStr); NetOut.Write(Byte(gLastMap)); NetOut.Write(gTime); - if (EvType = NET_EV_MAPSTART) and (Pos(':\', EvStr) > 0) then + if (EvType = NET_EV_MAPSTART) and isWadPath(EvStr) then begin NetOut.Write(Byte(1)); NetOut.Write(gWADHash); @@ -1148,13 +1148,16 @@ end; procedure MH_SEND_ItemSpawn(Quiet: Boolean; IID: Word; ID: Integer = NET_EVERYONE); var it: PItem; + tt: Byte; begin it := g_Items_ByIdx(IID); NetOut.Write(Byte(NET_MSG_ISPAWN)); NetOut.Write(IID); NetOut.Write(Byte(Quiet)); - NetOut.Write(it.ItemType); + tt := it.ItemType; + if it.dropped then tt := tt or $80; + NetOut.Write(tt); NetOut.Write(Byte(it.Fall)); NetOut.Write(Byte(it.Respawnable)); NetOut.Write(it.Obj.X); @@ -1668,7 +1671,7 @@ begin gWADHash := EvHash; if not g_Game_StartMap(EvStr, True) then begin - if Pos(':\', EvStr) = 0 then + if not isWadPath(EvStr) then g_FatalError(Format(_lc[I_GAME_ERROR_MAP_LOAD], [gGameSettings.WAD + ':\' + EvStr])) else g_FatalError(Format(_lc[I_GAME_ERROR_MAP_LOAD], [EvStr])); @@ -2306,7 +2309,8 @@ begin VX := M.ReadLongInt(); VY := M.ReadLongInt(); - g_Items_Create(X, Y, T, Fall, False, False, ID); + g_Items_Create(X, Y, T and $7F, Fall, False, False, ID); + if ((T and $80) <> 0) then g_Items_SetDrop(ID); it := g_Items_ByIdx(ID); it.Obj.Vel.X := VX; @@ -2462,10 +2466,10 @@ begin begin if SPlaying then begin - if trigData.trigLocal then - Sound.PlayVolumeAt(X+(Width div 2), Y+(Height div 2), trigData.trigVolume/255.0) + if tgcLocal then + Sound.PlayVolumeAt(X+(Width div 2), Y+(Height div 2), tgcVolume/255.0) else - Sound.PlayPanVolume((trigData.trigPan-127.0)/128.0, trigData.trigVolume/255.0); + Sound.PlayPanVolume((tgcPan-127.0)/128.0, tgcVolume/255.0); Sound.SetPosition(SPos); end else