From 1ff5fc34c64edc42be41ac510f59965a7f7a6693 Mon Sep 17 00:00:00 2001 From: Cyp Date: Sat, 17 Jul 2010 10:47:46 +0200 Subject: [PATCH] newnet: Enable messages before calling cluster system, since messages are turned off if projectiles destroy a droid using splash damage. Backtrace identifying the problem thanks to Safety0ff. Toggling messages randomly is bad, the cluster system is bad... Two bads make a good, right? --- src/combat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/combat.c b/src/combat.c index 152fdee98..bbf20c355 100644 --- a/src/combat.c +++ b/src/combat.c @@ -494,7 +494,13 @@ float objDamage(BASE_OBJECT *psObj, UDWORD damage, UDWORD originalhp, UDWORD wea if (psObj->type == OBJ_STRUCTURE || psObj->type == OBJ_DROID) { + // Force sending messages, even if messages were turned off, since a non-synchronised script will execute here. (Aaargh!) + bool bMultiMessagesBackup = bMultiMessages; + bMultiMessages = bMultiPlayer; + clustObjectAttacked((BASE_OBJECT *)psObj); + + bMultiMessages = bMultiMessagesBackup; }