From db894846ba3595467f349f31c3795fe6cf4ed093 Mon Sep 17 00:00:00 2001 From: OmniBlade Date: Wed, 19 Jun 2024 10:54:26 +0100 Subject: [PATCH] Fix assignment of IsOwnedByPlayer in standalone. Fixes a number of standalone MP bugs where code assumes IsOwnedByPlayer only refers to the local machine player. --- redalert/techno.cpp | 14 +++++++++----- tiberiandawn/techno.cpp | 4 ++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/redalert/techno.cpp b/redalert/techno.cpp index 0c2b0120..8c733079 100644 --- a/redalert/techno.cpp +++ b/redalert/techno.cpp @@ -162,7 +162,7 @@ const char* NewName[] = { "Fire Ant", "Feuer-Ameise", "Queen Ant", - "Ameisenk”nigin", + "Ameisenk�nigin", "ATS", "Angriffs-U-Boot", "Tesla Tank", @@ -188,7 +188,7 @@ const char* NewName[] = { "Scout Ant", "Fourmi de Reconnaissance", "Warrior Ant", - "Fourmi GuerriŠre", + "Fourmi Guerri�re", "Fire Ant", "Fourmi Lance-Flammes", "Queen Ant", @@ -204,11 +204,11 @@ const char* NewName[] = { "Stavros", "Stavros", "F-A Longbow", - "HAA (H‚licoptŠre d'Assaut Avanc‚)", + "HAA (H�licopt�re d'Assaut Avanc�)", "Civilian Specialist", - "Sp‚cialiste Civil", + "Sp�cialiste Civil", "Alloy Facility", - "Usine M‚tallurgique", + "Usine M�tallurgique", NULL, }; @@ -683,11 +683,15 @@ TechnoClass::TechnoClass(RTTIType rtti, int id, HousesType house) // IsOwnedByPlayer = (PlayerPtr == House); // Added for multiplayer changes. ST - 4/24/2019 10:40AM IsDiscoveredByPlayerMask = 0; +#ifdef REMASTER_BUILD if (Session.Type == GAME_NORMAL) { IsOwnedByPlayer = (PlayerPtr == House); } else { IsOwnedByPlayer = House->IsHuman; } +#else + IsOwnedByPlayer = (PlayerPtr == House); +#endif } /*********************************************************************************************** diff --git a/tiberiandawn/techno.cpp b/tiberiandawn/techno.cpp index 59bf7f8c..532a1dcd 100644 --- a/tiberiandawn/techno.cpp +++ b/tiberiandawn/techno.cpp @@ -916,11 +916,15 @@ TechnoClass::TechnoClass(HousesType house) // Added for multiplayer changes. ST - 4/24/2019 10:40AM IsDiscoveredByPlayerMask = 0; +#ifdef REMASTER_BUILD if (GameToPlay == GAME_NORMAL) { IsOwnedByPlayer = (house == PlayerPtr->Class->House); } else { IsOwnedByPlayer = House->IsHuman; } +#else + IsOwnedByPlayer = (PlayerPtr == House); +#endif /* ** There is a chance that a vehicle will be a "lemon".