chat event

This commit is contained in:
ineed bots
2024-04-26 13:38:16 -06:00
parent 582268aa3c
commit 755541e8d2
2 changed files with 31 additions and 0 deletions
+19
View File
@@ -283,6 +283,7 @@ init()
level thread watchScrabler();
level thread handleBots();
level thread onPlayerChat();
}
/*
@@ -1329,3 +1330,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 );
}
}
}