diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index a008366b66617507e8fcb922b3b3e98c5169974e..3585ef2b4d136f148003fcc717d9a172bc28f4e6 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
-{$INCLUDE g_amodes.inc}
+{$INCLUDE ../shared/a_modes.inc}
unit g_weapons;
interface
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;
SHOT_FLAME_WIDTH = 4;
SHOT_FLAME_HEIGHT = 4;
- SHOT_FLAME_LIFETIME = 180;
+ SHOT_FLAME_LIFETIME = 180;
SHOT_SIGNATURE = $544F4853; // 'SHOT'
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;
(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
end;
end;
+
+procedure TShot.positionChanged (); begin end;
+
+
end.