X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_weapons.pas;h=38d33e3b5c713244a7c978857c816d1d39d2f35a;hb=f0c98dc86657bdc08f6049872f12b554e1654fa4;hp=24908271dc62734bc2f1d0fbeb019de387f9b67c;hpb=00c73a7e4b162b8adb061e4b4715ee35ba9a2df5;p=d2df-sdl.git diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas index 2490827..38d33e3 100644 --- a/src/game/g_weapons.pas +++ b/src/game/g_weapons.pas @@ -76,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; IgnoreTrigger: Integer = -1): Boolean; +function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word): Boolean; procedure g_Weapon_BFG9000(X, Y: Integer; SpawnerUID: Word); procedure g_Weapon_Update(); procedure g_Weapon_Draw(); @@ -97,7 +97,7 @@ const WEAPON_PLASMA = 7; WEAPON_BFG = 8; WEAPON_SUPERPULEMET = 9; - WEAPON_MEGAKASTET = 10; + WEAPON_FLAMETHROWER = 10; WEAPON_ZOMBY_PISTOL = 20; WEAPON_IMP_FIRE = 21; WEAPON_BSP_FIRE = 22; @@ -106,6 +106,9 @@ const WEAPON_MANCUB_FIRE = 25; WEAPON_SKEL_FIRE = 26; + WP_FIRST = WEAPON_KASTET; + WP_LAST = WEAPON_FLAMETHROWER; + implementation uses @@ -122,11 +125,11 @@ type end; const - SHOT_ROCKETLAUNCHER_WIDTH = 27; - SHOT_ROCKETLAUNCHER_HEIGHT = 12; + SHOT_ROCKETLAUNCHER_WIDTH = 14; + SHOT_ROCKETLAUNCHER_HEIGHT = 14; - SHOT_SKELFIRE_WIDTH = 32; - SHOT_SKELFIRE_HEIGHT = 16; + SHOT_SKELFIRE_WIDTH = 14; + SHOT_SKELFIRE_HEIGHT = 14; SHOT_PLASMA_WIDTH = 16; SHOT_PLASMA_HEIGHT = 16; @@ -796,15 +799,14 @@ begin end; end; -function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word; IgnoreTrigger: Integer = -1): Boolean; +function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word): Boolean; var i, h, r, dx, dy, m, mm: Integer; _angle: SmallInt; begin Result := False; - // don't let turret explosions use the turret - g_Triggers_PressC(X, Y, rad, SpawnerUID, ACTIVATE_SHOT, IgnoreTrigger); + g_Triggers_PressC(X, Y, rad, SpawnerUID, ACTIVATE_SHOT); r := rad*rad; @@ -1206,7 +1208,7 @@ begin Obj.Rect.Width := SHOT_ROCKETLAUNCHER_WIDTH; Obj.Rect.Height := SHOT_ROCKETLAUNCHER_HEIGHT; - dx := IfThen(xd>x, -Obj.Rect.Width, 0); + dx := IfThen(xd > x, -Obj.Rect.Width, 0); dy := -(Obj.Rect.Height div 2); throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 12); @@ -1244,7 +1246,7 @@ begin Obj.Rect.Width := SHOT_SKELFIRE_WIDTH; Obj.Rect.Height := SHOT_SKELFIRE_HEIGHT; - dx := IfThen(xd>x, -Obj.Rect.Width, 0); + dx := -(Obj.Rect.Width div 2); dy := -(Obj.Rect.Height div 2); throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 12); @@ -1692,7 +1694,7 @@ begin begin Anim := TAnimation.Create(_id, False, 3); Anim.Alpha := 150; - g_GFX_OnceAnim(Obj.X-8+Random(9), + g_GFX_OnceAnim(Obj.X-14+Random(9), Obj.Y+(Obj.Rect.Height div 2)-20+Random(9), Anim, ONCEANIM_SMOKE); Anim.Free(); @@ -1714,7 +1716,7 @@ begin begin Anim := TAnimation.Create(TextureID, False, 8); Anim.Blending := False; - g_GFX_OnceAnim((Obj.X+32)-32, (Obj.Y+8)-32, Anim); + g_GFX_OnceAnim((Obj.X+32)-58, (Obj.Y+8)-36, Anim); Anim.Free(); end; end