chat event

This commit is contained in:
ineed bots
2024-04-26 13:34:31 -06:00
parent 825d147ea2
commit 746e10633a
2 changed files with 31 additions and 0 deletions

View File

@@ -263,6 +263,7 @@ init()
level thread onPlayerConnect();
level thread handleBots();
level thread onPlayerChat();
}
/*
@@ -1229,3 +1230,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 );
}
}
}