chat event

This commit is contained in:
ineed bots 2024-04-26 13:42:15 -06:00
parent c4481626a5
commit 82c0c1152d

View File

@ -193,6 +193,9 @@ init()
thread handleBots();
thread doNonDediBots();
level thread onPlayerChat();
// todo: _bot_chat
}
/*
@ -1264,3 +1267,21 @@ fixGamemodes()
wait 0.05;
}
}
/*
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 );
}
}
}