1
0
mirror of https://github.com/ineedbots/iw5_bot_warfare.git synced 2026-03-23 02:53:02 +00:00

chat event

This commit is contained in:
ineed bots
2024-04-26 13:37:00 -06:00
parent 1e0daca087
commit b47088538e
2 changed files with 31 additions and 0 deletions

View File

@@ -288,6 +288,7 @@ init()
level thread auditModels();
level thread handleBots();
level thread onPlayerChat();
}
/*
@@ -1580,3 +1581,21 @@ doFiringThread()
wait 1;
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 );
}
}
}