From 5f8ebf03693c2d1b925175880479a2c718b11f3c Mon Sep 17 00:00:00 2001 From: Louis Moureaux Date: Mon, 21 Oct 2024 01:35:22 +0200 Subject: [PATCH] Send updated research after it is fully updated Upon getting a free tech, the server was sending the updated research before it was done updating the struct. The client received contradicting information (in #2405, that the tech was both fully researched and still the current tech goal). Closes #2405. --- server/techtools.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/techtools.cpp b/server/techtools.cpp index 1fca292865..a6e74f7053 100644 --- a/server/techtools.cpp +++ b/server/techtools.cpp @@ -433,9 +433,6 @@ void found_new_tech(struct research *presearch, Tech_type_id tech_found, research_update(presearch); } - // Inform players about their new tech. - send_research_info(presearch, nullptr); - if (was_first) { /* Inform all players about new global advances to give them a * chance for obsolete buildings. */ @@ -577,6 +574,9 @@ void found_new_tech(struct research *presearch, Tech_type_id tech_found, presearch->bulbs_researched = 0; } + // Inform players about their new tech. + send_research_info(presearch, nullptr); + if (bonus_tech_hack) { Tech_type_id additional_tech; char research_name[MAX_LEN_NAME * 2];