2
0
mirror of https://github.com/rehlds/metamod-r.git synced 2025-01-06 03:55:45 +03:00
metamod-r/metamod/src/utils.cpp

22 lines
436 B
C++
Raw Normal View History

#include "precompiled.h"
bool is_yes(const char* str)
{
2016-07-26 19:31:47 +03:00
return !Q_strcmp(str, "true") || !Q_strcmp(str, "yes") || !Q_strcmp(str, "1");
}
bool is_no(const char* str)
{
2016-07-26 19:31:47 +03:00
return !Q_strcmp(str, "false") || !Q_strcmp(str, "no") || !Q_strcmp(str, "0");
}
char* ENTITY_KEYVALUE(edict_t* entity, char* key)
{
2016-07-26 19:31:47 +03:00
return INFOKEY_VALUE(GET_INFOKEYBUFFER(entity), key);
}
const char* LOCALINFO(char* key)
{
2016-07-26 19:31:47 +03:00
return ENTITY_KEYVALUE(NULL, key);
}