Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assignment of IsOwnedByPlayer in standalone. #1009

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions redalert/techno.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const char* NewName[] = {
"Fire Ant",
"Feuer-Ameise",
"Queen Ant",
"Ameisenk”nigin",
"Ameisenk�nigin",
"ATS",
"Angriffs-U-Boot",
"Tesla Tank",
Expand All @@ -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",
Expand All @@ -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,
};

Expand Down Expand Up @@ -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
}

/***********************************************************************************************
Expand Down
4 changes: 4 additions & 0 deletions tiberiandawn/techno.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
Loading