X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_panel.pas;h=5e2988572ad5e129746b5caf8b546a9bb36e4e99;hb=db4e988645273fe1c11611d84e03f0199cd181f7;hp=00407dbd68921463601b5b932ae4cd444d9d07d6;hpb=254041134b399e948e554ae99171174a7087ae40;p=d2df-sdl.git diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index 00407db..5e29885 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -98,10 +98,8 @@ type FX, FY: Integer; FWidth, FHeight: Word; FPanelType: Word; - FSaveIt: Boolean; // Ñîõðàíÿòü ïðè SaveState? FEnabled: Boolean; FDoor: Boolean; - FMoved: Boolean; FLiftType: Byte; FLastAnimLoop: Byte; // sorry, there fields are public to allow setting 'em in g_map; this should be fixed later @@ -159,10 +157,8 @@ type property width: Word read FWidth write FWidth; property height: Word read FHeight write FHeight; property panelType: Word read FPanelType write FPanelType; - property saveIt: Boolean read FSaveIt write FSaveIt; // Ñîõðàíÿòü ïðè SaveState? property enabled: Boolean read FEnabled write FEnabled; // Ñîõðàíÿòü ïðè SaveState? property door: Boolean read FDoor write FDoor; // Ñîõðàíÿòü ïðè SaveState? - property moved: Boolean read FMoved write FMoved; // Ñîõðàíÿòü ïðè SaveState? property liftType: Byte read FLiftType write FLiftType; // Ñîõðàíÿòü ïðè SaveState? property lastAnimLoop: Byte read FLastAnimLoop write FLastAnimLoop; // Ñîõðàíÿòü ïðè SaveState? @@ -236,7 +232,6 @@ begin FCurFrame := 0; FCurFrameCount := 0; LastAnimLoop := 0; - Moved := False; mapId := PanelRec.id; mGUID := aguid; @@ -244,7 +239,7 @@ begin mMovingSpeed := PanelRec.moveSpeed; mMovingStart := PanelRec.moveStart; mMovingEnd := PanelRec.moveEnd; - mMovingActive := PanelRec['move_active'].varvalue; + mMovingActive := PanelRec['move_active'].value; mOldMovingActive := mMovingActive; mMoveOnce := PanelRec.moveOnce; @@ -261,37 +256,14 @@ begin Enabled := True; Door := False; LiftType := 0; - SaveIt := False; case PanelType of - PANEL_OPENDOOR: - begin - Enabled := False; - Door := True; - SaveIt := True; - end; - PANEL_CLOSEDOOR: - begin - Door := True; - SaveIt := True; - end; - PANEL_LIFTUP: - SaveIt := True; - PANEL_LIFTDOWN: - begin - LiftType := 1; - SaveIt := True; - end; - PANEL_LIFTLEFT: - begin - LiftType := 2; - SaveIt := True; - end; - PANEL_LIFTRIGHT: - begin - LiftType := 3; - SaveIt := True; - end; + PANEL_OPENDOOR: begin Enabled := False; Door := True; end; + PANEL_CLOSEDOOR: Door := True; + PANEL_LIFTUP: LiftType := 0; //??? + PANEL_LIFTDOWN: LiftType := 1; + PANEL_LIFTLEFT: LiftType := 2; + PANEL_LIFTRIGHT: LiftType := 3; end; // Íåâèäèìàÿ: @@ -354,7 +326,6 @@ begin True, Textures[AddTextures[i].Texture].Speed); FTextureIDs[i].AnTex.Blending := ByteBool(PanelRec.Flags and PANEL_FLAG_BLENDING); FTextureIDs[i].AnTex.Alpha := PanelRec.Alpha; - SaveIt := True; end else begin // Îáû÷íàÿ òåêñòóðà @@ -363,8 +334,7 @@ begin end; // Òåêñòóð íåñêîëüêî - íóæíî ñîõðàíÿòü òåêóùóþ: - if Length(FTextureIDs) > 1 then - SaveIt := True; + //if Length(FTextureIDs) > 1 then SaveIt := True; // Åñëè íå ñïåöòåêñòóðà, òî çàäàåì ðàçìåðû: if PanelRec.TextureNum > High(Textures) then @@ -446,8 +416,8 @@ var NW, NH: Word; begin if {Enabled and} (FCurTexture >= 0) and - (Width > 0) and (Height > 0) and (FAlpha < 255) and - ((g_dbg_scale <> 1.0) or g_Collide(X, Y, Width, Height, sX, sY, sWidth, sHeight)) then + (Width > 0) and (Height > 0) and (FAlpha < 255) {and + g_Collide(X, Y, Width, Height, sX, sY, sWidth, sHeight)} then begin if FTextureIDs[FCurTexture].Anim then begin // Àíèìèðîâàííàÿ òåêñòóðà @@ -523,8 +493,8 @@ procedure TPanel.DrawShadowVolume(lightX: Integer; lightY: Integer; radius: Inte begin if radius < 4 then exit; - if Enabled and (FCurTexture >= 0) and (Width > 0) and (Height > 0) and (FAlpha < 255) and - ((g_dbg_scale <> 1.0) or g_Collide(X, Y, Width, Height, sX, sY, sWidth, sHeight)) then + if Enabled and (FCurTexture >= 0) and (Width > 0) and (Height > 0) and (FAlpha < 255) {and + g_Collide(X, Y, Width, Height, sX, sY, sWidth, sHeight)} then begin if not FTextureIDs[FCurTexture].Anim then begin @@ -902,7 +872,7 @@ begin if (mOldMovingActive <> mMovingActive) then mNeedSend := true; mOldMovingActive := mMovingActive; - if g_Game_IsServer and g_Game_IsNet then + if not g_Game_IsClient then begin if actMoveTrig then g_Triggers_Press(mEndPosTrig, ACTIVATE_CUSTOM); if actSizeTrig then g_Triggers_Press(mEndSizeTrig, ACTIVATE_CUSTOM); @@ -1057,7 +1027,6 @@ var ver: Byte; begin if (Mem = nil) then exit; - //if not SaveIt then exit; // Ñèãíàòóðà ïàíåëè: sig := PANEL_SIGNATURE; // 'PANL' @@ -1116,7 +1085,6 @@ var //ox, oy: Integer; begin if (Mem = nil) then exit; - //if not SaveIt then exit; // Ñèãíàòóðà ïàíåëè: Mem.ReadDWORD(sig);