mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-06-28 07:01:49 +00:00
level.bots
This commit is contained in:
@ -94,6 +94,8 @@ init()
|
||||
level.botPushOutDist = 30;
|
||||
|
||||
level.smokeRadius = 255;
|
||||
|
||||
level.bots = [];
|
||||
|
||||
level.bots_nonfullautoguns = [];
|
||||
level.bots_nonfullautoguns["barrett"] = true;
|
||||
@ -360,6 +362,16 @@ watchScrabler()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
When a bot disconnects.
|
||||
*/
|
||||
onDisconnect()
|
||||
{
|
||||
self waittill("disconnect");
|
||||
|
||||
level.bots = array_remove(level.bots, self);
|
||||
}
|
||||
|
||||
/*
|
||||
Called when a player connects.
|
||||
*/
|
||||
@ -388,6 +400,9 @@ connected()
|
||||
self thread maps\mp\bots\_bot_internal::connected();
|
||||
self thread maps\mp\bots\_bot_script::connected();
|
||||
|
||||
level.bots[level.bots.size] = self;
|
||||
self thread onDisconnect();
|
||||
|
||||
level notify("bot_connected", self);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user