X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_weapons.pas;h=24908271dc62734bc2f1d0fbeb019de387f9b67c;hp=e8f855d1c6005fd1a5dc262c81d461d3e039c899;hb=00c73a7e4b162b8adb061e4b4715ee35ba9a2df5;hpb=68c42628e70ba676bb438d90a7f77b51b20314e1 diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas index e8f855d..2490827 100644 --- a/src/game/g_weapons.pas +++ b/src/game/g_weapons.pas @@ -1,3 +1,19 @@ +(* 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 . + *) +{$MODE DELPHI} unit g_weapons; interface @@ -60,7 +76,7 @@ procedure g_Weapon_mgun(x, y, xd, yd: Integer; SpawnerUID: Word; Silent: Boolean procedure g_Weapon_shotgun(x, y, xd, yd: Integer; SpawnerUID: Word; Silent: Boolean = False); procedure g_Weapon_dshotgun(x, y, xd, yd: Integer; SpawnerUID: Word; Silent: Boolean = False); -function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word): Boolean; +function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word; IgnoreTrigger: Integer = -1): Boolean; procedure g_Weapon_BFG9000(X, Y: Integer; SpawnerUID: Word); procedure g_Weapon_Update(); procedure g_Weapon_Draw(); @@ -780,14 +796,15 @@ begin end; end; -function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word): Boolean; +function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word; IgnoreTrigger: Integer = -1): Boolean; var i, h, r, dx, dy, m, mm: Integer; _angle: SmallInt; begin Result := False; - g_Triggers_PressC(X, Y, rad, SpawnerUID, ACTIVATE_SHOT); + // don't let turret explosions use the turret + g_Triggers_PressC(X, Y, rad, SpawnerUID, ACTIVATE_SHOT, IgnoreTrigger); r := rad*rad; @@ -1933,7 +1950,7 @@ begin e_Draw(TextureID, Obj.X, Obj.Y, 0, True, False); end; - if g_debug_Frames then + if g_debug_Frames then begin e_DrawQuad(Obj.X+Obj.Rect.X, Obj.Y+Obj.Rect.Y,