DEADSOFTWARE

more grid code uglification -- should be a little faster now
[d2df-sdl.git] / src / game / g_basic.pas
index 1f3add5d538fe6837f5ca0d3a942207da171fcb2..e3655bbac9678b575f1653b5d0ac535e26f8b6d0 100644 (file)
@@ -88,6 +88,10 @@ procedure SortSArray(var S: SArray);
 function b_Text_Format(S: string): string;
 function b_Text_Unformat(S: string): string;
 
+
+var
+  gmon_dbg_los_enabled: Boolean = true;
+
 implementation
 
 uses
@@ -201,7 +205,7 @@ begin
   Result := True;
   *)
 
-  //result := false;
+  result := false;
   if g_Map_traceToNearestWall(x1, y1, x2, y2, @wallHitX, @wallHitY) then
   begin
     // check distance
@@ -455,6 +459,8 @@ end;
 
 function g_Look(a, b: PObj; d: TDirection): Boolean;
 begin
+  if not gmon_dbg_los_enabled then begin result := false; exit; end; // always "wall hit"
+
   if ((b^.X > a^.X) and (d = D_LEFT)) or
      ((b^.X < a^.X) and (d = D_RIGHT)) then
   begin