From a31ad485e4dd74610bf22ca90f259180d4b6b1c2 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 24 Jan 2015 22:20:58 -0600 Subject: [PATCH] Convert Entity::CastToClient to Log.Out --- zone/entity.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/entity.cpp b/zone/entity.cpp index b080cdf3c..c8471d9a4 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -74,15 +74,15 @@ Entity::~Entity() Client *Entity::CastToClient() { if (this == 0x00) { - std::cout << "CastToClient error (nullptr)" << std::endl; + Log.Out(Logs::General, Logs::Error, "CastToClient error (not client)"); return 0; } -#ifdef _EQDEBUG + if (!IsClient()) { - std::cout << "CastToClient error (not client?)" << std::endl; + Log.Out(Logs::General, Logs::Error, "CastToClient error (not client)"); return 0; } -#endif + return static_cast(this); }