This commit is contained in:
2022-02-26 11:12:55 +00:00
parent 6ec0c5e23c
commit db90d361a9

View File

@@ -456,14 +456,14 @@ namespace gsc
{ {
if (ent.classnum != 0) if (ent.classnum != 0)
{ {
throw std::runtime_error("Invalid entity"); throw std::runtime_error("Invalid entity");
} }
const auto client = ent.entnum; const auto client = ent.entnum;
if (game::g_entities[client].client == nullptr) if (game::g_entities[client].client == nullptr)
{ {
throw std::runtime_error("Not a player entity"); throw std::runtime_error("Not a player entity");
} }
return {(game::g_entities[client].client->flags & 4) != 0}; return {(game::g_entities[client].client->flags & 4) != 0};