mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-05-15 08:24:50 +00:00
Compare commits
No commits in common. "02761a101387c536bd02d62b7d2f6f4676de8ea9" and "b3967606f4793e315a212c46456631e7f42bb524" have entirely different histories.
02761a1013
...
b3967606f4
@ -207,11 +207,8 @@ init()
|
|||||||
if ( !isdefined( game[ "botWarfare" ] ) )
|
if ( !isdefined( game[ "botWarfare" ] ) )
|
||||||
{
|
{
|
||||||
game[ "botWarfare" ] = true;
|
game[ "botWarfare" ] = true;
|
||||||
game[ "botWarfareInitTime" ] = gettime();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
level.bot_inittime = gettime();
|
|
||||||
|
|
||||||
level.defuseobject = undefined;
|
level.defuseobject = undefined;
|
||||||
level.bots_smokelist = List();
|
level.bots_smokelist = List();
|
||||||
level.tbl_perkdata[ 0 ][ "reference_full" ] = true;
|
level.tbl_perkdata[ 0 ][ "reference_full" ] = true;
|
||||||
@ -265,7 +262,6 @@ init()
|
|||||||
|
|
||||||
level thread onPlayerConnect();
|
level thread onPlayerConnect();
|
||||||
level thread handleBots();
|
level thread handleBots();
|
||||||
level thread onPlayerChat();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -444,23 +440,6 @@ fixPerksAndScriptKick()
|
|||||||
self.pers[ "isBot" ] = true;
|
self.pers[ "isBot" ] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
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.
|
||||||
*/
|
*/
|
||||||
@ -478,14 +457,6 @@ 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 ( !isdefined( self.pers[ "bot_host" ] ) )
|
if ( !isdefined( self.pers[ "bot_host" ] ) )
|
||||||
{
|
{
|
||||||
self thread doHostCheck();
|
self thread doHostCheck();
|
||||||
@ -1276,21 +1247,3 @@ doFiringThread()
|
|||||||
wait 1;
|
wait 1;
|
||||||
self.bots_firing = false;
|
self.bots_firing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
When a player chats
|
|
||||||
*/
|
|
||||||
onPlayerChat()
|
|
||||||
{
|
|
||||||
for ( ;; )
|
|
||||||
{
|
|
||||||
level waittill( "say", message, player, is_hidden );
|
|
||||||
|
|
||||||
for ( i = 0; i < level.bots.size; i++ )
|
|
||||||
{
|
|
||||||
bot = level.bots[ i ];
|
|
||||||
|
|
||||||
bot BotNotifyBotEvent( "chat", "chat", message, player, is_hidden );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -252,43 +252,10 @@ start_chat_watch()
|
|||||||
case "sd":
|
case "sd":
|
||||||
self thread bot_chat_sd_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_sd_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "connection":
|
|
||||||
self thread bot_chat_connection_player_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "chat":
|
|
||||||
self thread bot_chat_chat_player_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
When another player chats
|
|
||||||
*/
|
|
||||||
bot_chat_chat_player_watch( chatstr, message, player, is_hidden, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
When a player connected
|
|
||||||
*/
|
|
||||||
bot_chat_connection_player_watch( conn, player, playername, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( conn )
|
|
||||||
{
|
|
||||||
case "connected":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "disconnected":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
start_startgame_watch
|
start_startgame_watch
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user