From 3ebe43eb75806990a402aafd5858de615d5c1cca Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 2 Jun 2022 01:26:45 +0100 Subject: Solve the error logging situation --- src/fov.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/fov.c') diff --git a/src/fov.c b/src/fov.c index 151fa2e..c090651 100644 --- a/src/fov.c +++ b/src/fov.c @@ -21,6 +21,7 @@ #include "con_.h" #include "engineapi.h" +#include "errmsg.h" #include "ent.h" #include "gametype.h" #include "hook.h" @@ -57,7 +58,8 @@ static bool find_SetDefaultFOV(struct con_cmd *fov) { } int len = x86_len(p); if (len == -1) { - con_warn("fov: find_SetDefaultFOV: unknown or invalid instruction\n"); + errmsg_errorx("unknown or invalid instruction looking for %s", + "SetDefaultFOV"); return false; } p += len; @@ -100,13 +102,13 @@ bool fov_init(bool has_ent) { real_fov_desired = fov_desired; } if (!find_SetDefaultFOV(cmd_fov)) { - con_warn("fov: couldn't find SetDefaultFOV function\n"); + errmsg_errorx("couldn't find SetDefaultFOV function"); return false; } orig_SetDefaultFOV = (SetDefaultFOV_func)hook_inline( (void *)orig_SetDefaultFOV, (void *)&hook_SetDefaultFOV); if (!orig_SetDefaultFOV) { - con_warn("fov: couldn't hook SetDefaultFOV function\n"); + errmsg_errorsys("couldn't hook SetDefaultFOV function"); return false; } -- cgit v1.2.3