X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_weapons.pas;h=3585ef2b4d136f148003fcc717d9a172bc28f4e6;hb=0fdf4d69047801a6a8d789df6def4a47015e9ae4;hp=81db80314333fb159b8396ad7bafabf84fa22700;hpb=43b93cdfd0d02c486600ec7c4e79f5903da23418;p=d2df-sdl.git diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas index 81db803..3585ef2 100644 --- a/src/game/g_weapons.pas +++ b/src/game/g_weapons.pas @@ -45,8 +45,11 @@ type TextureID: DWORD; Timeout: DWORD; Stopped: Byte; + + procedure positionChanged (); //WARNING! call this after monster position was changed, or coldet will not work right! end; + var Shots: array of TShot = nil; LastShotID: Integer = 0; @@ -145,7 +148,7 @@ const SHOT_FLAME_WIDTH = 4; SHOT_FLAME_HEIGHT = 4; - SHOT_FLAME_LIFETIME = 180; + SHOT_FLAME_LIFETIME = 180; SHOT_SIGNATURE = $544F4853; // 'SHOT' @@ -961,6 +964,7 @@ begin Obj.Y+Obj.Rect.Y+(Obj.Rect.Height div 2), X, Y); g_Obj_PushA(@Obj, Round(15*(rad-m)/rad), _angle); + positionChanged(); // this updates spatial accelerators end; end; end; @@ -1768,9 +1772,14 @@ begin (ShotType <> WEAPON_FLAMETHROWER); if Stopped = 0 then - st := g_Obj_Move(@Obj, False, spl) + begin + st := g_Obj_Move(@Obj, False, spl); + end else + begin st := 0; + end; + positionChanged(); // this updates spatial accelerators if WordBool(st and MOVE_FALLOUT) or (Obj.X < -1000) or (Obj.X > gMapInfo.Width+1000) or (Obj.Y < -1000) then @@ -2467,4 +2476,8 @@ begin end; end; + +procedure TShot.positionChanged (); begin end; + + end.