mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2025-04-19 22:32:53 +00:00
chat event
This commit is contained in:
parent
26d9a2780c
commit
28c490b4e6
@ -277,6 +277,7 @@ init()
|
||||
level thread handleBots();
|
||||
level thread watchNades();
|
||||
level thread watchGameEnded();
|
||||
level thread onPlayerChat();
|
||||
|
||||
level.teambased = true;
|
||||
|
||||
@ -518,7 +519,7 @@ onDeath()
|
||||
onDisconnectPlayer()
|
||||
{
|
||||
name = self.name;
|
||||
|
||||
|
||||
self waittill( "disconnect" );
|
||||
self killTags();
|
||||
|
||||
@ -1278,3 +1279,21 @@ watchGameEnded()
|
||||
level.gameended = true;
|
||||
level notify( "game_ended" );
|
||||
}
|
||||
|
||||
/*
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user