shithub: sce

Download patch

ref: eb7621a5aef227bd912814ef24def5c9a272156f
parent: 45c882a6aea8e02784e79c2e26d2ed5286556ddd
author: qwx <qwx@sciops.net>
date: Fri Apr 23 11:24:02 EDT 2021

path: haha nope

--- a/fns.h
+++ b/fns.h
@@ -27,6 +27,7 @@
 void	initimg(void);
 void	initfs(void);
 void	setgoal(Point*, Mobj*, Mobj*);
+Mobj*	unitat(int, int);
 int	isblocked(int, int, Obj*);
 void	markmobj(Mobj*, int);
 int	findpath(Point, Mobj*);
--- a/map.c
+++ b/map.c
@@ -12,6 +12,13 @@
 static void
 updatemap(Mobj *mo)
 {
+	Mobj *bmo;
+
+	if(isblocked(mo->x, mo->y, mo->o)){
+		bmo = unitat(mo->x, mo->y);
+		sysfatal("markmobj: attempt to place %s at %d,%d, non-free block having %s at %d,%d",
+			mo->o->name, mo->x, mo->y, bmo->o->name, bmo->x, bmo->y);
+	}
 	linktomap(mo);
 	markmobj(mo, 1);
 }
--- a/path.c
+++ b/path.c
@@ -75,7 +75,7 @@
 	return (*row & 1ULL << 63) != 0;
 }
 
-static Mobj *
+Mobj *
 unitat(int px, int py)
 {
 	int x, y;
@@ -106,13 +106,7 @@
 markmobj(Mobj *mo, int set)
 {
 	int w, h;
-	Mobj *bmo;
 
-	if(isblocked(mo->x, mo->y, mo->o)){
-		bmo = unitat(mo->x, mo->y);
-		sysfatal("markmobj: attempt to place %s at %d,%d, non-free block having %s at %d,%d",
-			mo->o->name, mo->x, mo->y, bmo->o->name, bmo->x, bmo->y);
-	}
 	w = mo->o->w;
 	if((mo->subpx & Subpxmask) != 0 && mo->x != (mo->px + 1) / Nodewidth)
 		w++;