summaryrefslogtreecommitdiffhomepage
path: root/src/l4dwarp.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-06-02 01:26:45 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-06-02 01:30:26 +0100
commit3ebe43eb75806990a402aafd5858de615d5c1cca (patch)
tree16edcb4b560520ad5225673e1a8ad45facc20c40 /src/l4dwarp.c
parent74563bfb8c506150172b9bbf73d828372add3394 (diff)
Solve the error logging situation
Diffstat (limited to 'src/l4dwarp.c')
-rw-r--r--src/l4dwarp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/l4dwarp.c b/src/l4dwarp.c
index 20f52a5..7a77427 100644
--- a/src/l4dwarp.c
+++ b/src/l4dwarp.c
@@ -20,6 +20,7 @@
#include "con_.h"
#include "engineapi.h"
+#include "errmsg.h"
#include "ent.h"
#include "gamedata.h"
#include "gametype.h"
@@ -34,7 +35,7 @@ DECL_VFUNC_DYN(void, Teleport, const struct vec3f *pos, const struct vec3f *ang,
DEF_CCMD_HERE_UNREG(sst_l4d_testwarp, "Simulate a bot warping to you",
CON_SERVERSIDE | CON_CHEAT) {
struct edict *ed = ent_getedict(con_cmdclient + 1);
- if (!ed) { con_warn("error: couldn't access player entity\n"); return; }
+ if (!ed) { errmsg_errorx("couldn't access player entity"); return; }
void *e = VCALL(ed->ent_unknown, GetBaseEntity); // is this call required?
struct vec3f *org = mem_offset(e, off_entpos);
struct vec3f *ang = mem_offset(e, off_eyeang);
@@ -50,7 +51,7 @@ DEF_CCMD_HERE_UNREG(sst_l4d_testwarp, "Simulate a bot warping to you",
bool l4dwarp_init(void) {
if (!GAMETYPE_MATCHES(L4Dx)) return false;
if (!has_off_entpos || !has_off_eyeang || !has_vtidx_Teleport) {
- con_warn("l4dwarp: missing gamedata entries for this engine\n");
+ errmsg_warnx("missing gamedata entries for this engine");
return false;
}
con_reg(sst_l4d_testwarp);