From 8eb96b231d7923532ffa8289ed2241fe56800bfe Mon Sep 17 00:00:00 2001 From: Tyler Young Date: Sun, 22 Jan 2023 20:17:02 -0500 Subject: [PATCH] Restored Close_Waypoint in Quakespasm --- source/pr_cmds.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/source/pr_cmds.c b/source/pr_cmds.c index 1f0c0f0..edd39b0 100644 --- a/source/pr_cmds.c +++ b/source/pr_cmds.c @@ -2457,6 +2457,35 @@ void Open_Waypoint (void) //} } +/* +================= +Close_Waypoint + +void Close_Waypoint (string, string, string, string, string, string, string, string) + +moto - basically a carbon copy of open_waypoint lol +================= +*/ +void Close_Waypoint (void) +{ + int i, t; + char *p = G_STRING(OFS_PARM0); + + for (i = 1; i < MAX_WAYPOINTS; i++) + { + if (waypoints[i].special[0])//no need to open without tag + { + if (!strcmp(p, waypoints[i].special)) + { + waypoints[i].open = 0; + t = 1; + } + else + continue; + } + } +} + /* ================= @@ -3253,7 +3282,7 @@ static builtin_t pr_builtin[] = Get_Next_Waypoint, // #86 PF_useprint, // #87 Get_First_Waypoint, // #88 - NULL, // #89 + Close_Waypoint, // #89 PF_tracebox, // #90 NULL, // #91 NULL, // #92