mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-05-14 16:04:50 +00:00
Compare commits
2 Commits
fc24a8c6b6
...
c4481626a5
Author | SHA1 | Date | |
---|---|---|---|
|
c4481626a5 | ||
|
65435391bc |
@ -181,8 +181,11 @@ init()
|
|||||||
if ( !isdefined( game[ "botWarfare" ] ) )
|
if ( !isdefined( game[ "botWarfare" ] ) )
|
||||||
{
|
{
|
||||||
game[ "botWarfare" ] = true;
|
game[ "botWarfare" ] = true;
|
||||||
|
game[ "botWarfareInitTime" ] = gettime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
level.bot_inittime = gettime();
|
||||||
|
|
||||||
thread fixGamemodes();
|
thread fixGamemodes();
|
||||||
thread onPlayerConnect();
|
thread onPlayerConnect();
|
||||||
thread bot_watch_planes();
|
thread bot_watch_planes();
|
||||||
@ -236,6 +239,23 @@ handleBots()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
When a bot disconnects.
|
||||||
|
*/
|
||||||
|
onDisconnectPlayer()
|
||||||
|
{
|
||||||
|
name = self.name;
|
||||||
|
|
||||||
|
self waittill( "disconnect" );
|
||||||
|
waittillframeend;
|
||||||
|
|
||||||
|
for ( i = 0; i < level.bots.size; i++ )
|
||||||
|
{
|
||||||
|
bot = level.bots[ i ];
|
||||||
|
bot BotNotifyBotEvent( "connection", "disconnected", self, name );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
When a bot disconnects.
|
When a bot disconnects.
|
||||||
*/
|
*/
|
||||||
@ -253,6 +273,14 @@ connected()
|
|||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
for ( i = 0; i < level.bots.size; i++ )
|
||||||
|
{
|
||||||
|
bot = level.bots[ i ];
|
||||||
|
bot BotNotifyBotEvent( "connection", "connected", self, self.name );
|
||||||
|
}
|
||||||
|
|
||||||
|
self thread onDisconnectPlayer();
|
||||||
|
|
||||||
if ( !self is_bot() )
|
if ( !self is_bot() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user