Added custom monsters and custom items support
This commit is contained in:
parent
ac86926dc8
commit
d5107daad4
7 changed files with 82 additions and 6 deletions
|
|
@ -205,6 +205,26 @@ bool BotSupport::isPlayer (edict_t *ent) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool BotSupport::isMonster (edict_t *ent) {
|
||||
if (game.isNullEntity (ent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (~ent->v.flags & FL_MONSTER) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strncmp ("hostage", ent->v.classname.chars(), 7) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BotSupport::isItem (edict_t *ent) {
|
||||
return !!(strstr (ent->v.classname.chars(), "item"));
|
||||
}
|
||||
|
||||
bool BotSupport::isPlayerVIP (edict_t *ent) {
|
||||
if (!game.mapIs (MapFlags::Assassination)) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue