From f8eb6cf2f40904c4b06eaed5732ecf455ab0bb1b Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sat, 17 Apr 2021 20:39:15 +0300 Subject: [PATCH] Update Main.cpp --- module/Main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/Main.cpp b/module/Main.cpp index 9b344a15..d76953a1 100644 --- a/module/Main.cpp +++ b/module/Main.cpp @@ -425,6 +425,11 @@ static void OnPlayerNameChange(int32_t player_id, const char * old_name, const c // ------------------------------------------------------------------------------------------------ static void OnPlayerStateChange(int32_t player_id, vcmpPlayerState old_state, vcmpPlayerState new_state) { + // Look for changes + if (old_state == new_state) + { + return; // Nothing changed! + } // Attempt to forward the event try { @@ -472,6 +477,11 @@ static void OnPlayerStateChange(int32_t player_id, vcmpPlayerState old_state, vc // ------------------------------------------------------------------------------------------------ static void OnPlayerActionChange(int32_t player_id, int32_t old_action, int32_t new_action) { + // Look for changes + if (old_action == new_action) + { + return; // Nothing changed! + } // Attempt to forward the event try {