@@ -447,7 +447,7 @@ void dPlayerControl_FixedUpdate(PlayerControl* __this, MethodInfo* method) {
447447 }
448448 }
449449 if (State.ChatSpam && (IsInGame () || IsInLobby ())) {
450- static float spamDelay = 0 ;
450+ static float spamDelay = 15 ;
451451 auto player = !State.SafeMode && State.playerToChatAs .has_value () ? State.playerToChatAs .validate ().get_PlayerControl () : *Game::pLocalPlayer;
452452 for (auto p : GetAllPlayerControl ()) {
453453 if (p == player || State.ChatSpamEveryone ) {
@@ -465,6 +465,25 @@ void dPlayerControl_FixedUpdate(PlayerControl* __this, MethodInfo* method) {
465465 }
466466 }
467467
468+ if (State.CrashChatSpam && (IsInGame () || IsInLobby ())) {
469+ static float spamDelay = 0 ;
470+ auto player = !State.SafeMode && State.playerToChatAs .has_value () ? State.playerToChatAs .validate ().get_PlayerControl () : *Game::pLocalPlayer;
471+ for (auto p : GetAllPlayerControl ()) {
472+ if (p == player || State.CrashChatSpam ) {
473+ if (!State.SafeMode && (State.CrashChatSpamMode == 1 || State.CrashChatSpamMode == 1 )) {
474+ auto writer = InnerNetClient_StartRpcImmediately ((InnerNetClient*)(*Game::pAmongUsClient), player->fields ._ .NetId ,
475+ uint8_t (RpcCalls__Enum::SendChat), SendOption__Enum::None, -1 , NULL );
476+ MessageWriter_WriteString (writer, convert_to_string (State.chatMessage ), NULL );
477+ InnerNetClient_FinishRpcImmediately ((InnerNetClient*)(*Game::pAmongUsClient), writer, NULL );
478+ ChatController_AddChat (Game::HudManager.GetInstance ()->fields .Chat , player, convert_to_string (State.chatMessage ), false , NULL );
479+ }
480+ else if (State.CrashChatSpamMode == 1 || State.CrashChatSpamMode == 1 ) {
481+ PlayerControl_RpcSendChatNote (player, p->fields .PlayerId , (ChatNoteTypes__Enum)2 , NULL );
482+ }
483+ }
484+ }
485+ }
486+
468487 if ((IsHost () || !State.SafeMode ) && State.ForceColorForEveryone )
469488 {
470489 static float forceColorDelay = 0 ;
0 commit comments