From 8162d90c9427dea87223133048998d42afc7d032 Mon Sep 17 00:00:00 2001
From: lachablock <lachlanwright17@gmail.com>
Date: Fri, 26 Mar 2021 18:01:55 +1100
Subject: [PATCH] Fix LUAh_PlayerHeight returning wrong default value

---
 src/lua_hooklib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c
index 6e9b9d65c..637809fd8 100644
--- a/src/lua_hooklib.c
+++ b/src/lua_hooklib.c
@@ -1982,7 +1982,7 @@ fixed_t LUAh_PlayerHeight(player_t *player)
 	hook_p hookp;
 	fixed_t newheight = -1;
 	if (!gL || !(hooksAvailable[hook_PlayerHeight/8] & (1<<(hook_PlayerHeight%8))))
-		return 0;
+		return newheight;
 
 	lua_settop(gL, 0);
 	lua_pushcfunction(gL, LUA_GetErrorMessage);