diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index 88670fdb5a59ccf102cfa252b8ff235e816020d3..aa78ebd94e7ddae5fa7f224eada8b21f0cf3f79e 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
stt := curTimeMicro();
{$ENDIF}
- wallHitFlag := g_Map_traceToNearestWall(x, y, x2, y2, @wallHitX, @wallHitY);
+ wallHitFlag := (g_Map_traceToNearestWall(x, y, x2, y2, @wallHitX, @wallHitY) <> nil);
if wallHitFlag then
begin
x2 := wallHitX;
if playerPossibleHit() then exit; // instant hit
// collect monsters
- g_Mons_alongLine(x, y, x2, y2, sqchecker);
+ g_Mons_AlongLine(x, y, x2, y2, sqchecker);
// here, we collected all monsters and players in `wgunHitHeap` and `wgunHitTime`
// also, if `wallWasHit` is `true`, then `wallHitX` and `wallHitY` contains spark coords