Do not use strstr()
This commit is contained in:
parent
da275733bc
commit
7da58623be
3 changed files with 5 additions and 5 deletions
|
|
@ -222,7 +222,7 @@ bool BotSupport::isMonster (edict_t *ent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BotSupport::isItem (edict_t *ent) {
|
bool BotSupport::isItem (edict_t *ent) {
|
||||||
return !!(strstr (ent->v.classname.chars(), "item"));
|
return strncmp (ent->v.classname.chars (), "item", 4) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BotSupport::isPlayerVIP (edict_t *ent) {
|
bool BotSupport::isPlayerVIP (edict_t *ent) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue