X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_phys.pas;h=498bd7587489f9faf6e72ffca873c72e06de6702;hb=1a10061a1cd706f5f06b923740e45a462d2bd885;hp=a22cd1702cc385dfdc506def039da18f0b757f2c;hpb=ac201b02f10ef558087d50f6b03b4519ab567558;p=d2df-sdl.git diff --git a/src/game/g_phys.pas b/src/game/g_phys.pas index a22cd17..498bd75 100644 --- a/src/game/g_phys.pas +++ b/src/game/g_phys.pas @@ -1,4 +1,19 @@ -{$MODE DELPHI} +(* Copyright (C) DooM 2D:Forever Developers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + *) +{$INCLUDE ../shared/a_modes.inc} unit g_phys; interface @@ -128,26 +143,6 @@ begin end; end; -function CollideMonsters(Obj: PObj; XInc, YInc: Integer): Boolean; -var - a: Integer; -begin - Result := False; - - if gMonsters = nil then - Exit; - - for a := 0 to High(gMonsters) do - if gMonsters[a] <> nil then - if gMonsters[a].Live and - gMonsters[a].Collide(Obj^.X+Obj^.Rect.X+XInc, Obj^.Y+Obj^.Rect.Y+YInc, - Obj^.Rect.Width, Obj^.Rect.Height) then - begin - Result := True; - Exit; - end; -end; - function Blocked(Obj: PObj; XInc, YInc: Integer): Boolean; begin Result := g_Map_CollidePanel(Obj^.X+Obj^.Rect.X+XInc, Obj^.Y+Obj.Rect.Y+YInc, @@ -466,13 +461,13 @@ _move: Obj^.Rect.Width, Obj^.Rect.Height*2 div 3); case wtx of - TEXTURE_SPECIAL_WATER: + LongWord(TEXTURE_SPECIAL_WATER): g_Obj_Splash(Obj, 3); - TEXTURE_SPECIAL_ACID1: + LongWord(TEXTURE_SPECIAL_ACID1): g_Obj_Splash(Obj, 2); - TEXTURE_SPECIAL_ACID2: + LongWord(TEXTURE_SPECIAL_ACID2): g_Obj_Splash(Obj, 1); - TEXTURE_NONE: + LongWord(TEXTURE_NONE): ; else g_Obj_Splash(Obj, 0);