Skip to content

Commit 7219a19

Browse files
authored
bugfix(veterancy): Disable audiovisual cues for ejected veteran pilots (TheSuperHackers#2643)
1 parent 4d23c78 commit 7219a19

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

Generals/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,10 @@ class GenericObjectCreationNugget : public ObjectCreationNugget
995995
DEBUG_LOG(("Object %s inherits veterancy level %d from %s",
996996
obj->getTemplate()->getName().str(), sourceObj->getVeterancyLevel(), sourceObj->getTemplate()->getName().str()));
997997
VeterancyLevel v = sourceObj->getVeterancyLevel();
998-
obj->getExperienceTracker()->setVeterancyLevel(v);
998+
999+
// TheSuperHackers @bugfix Caball009 22/04/2026 Disable audiovisual cues for a veterancy level change because this object was just created.
1000+
// Otherwise the cues would be at an incorrect position, because the object's matrix is not set yet.
1001+
obj->getExperienceTracker()->setVeterancyLevel(v, FALSE);
9991002

10001003
//In order to make things easier for the designers, we are going to transfer the unit name
10011004
//to the ejected thing... so the designer can control the pilot with the scripts.

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,10 @@ class GenericObjectCreationNugget : public ObjectCreationNugget
10101010
DEBUG_LOG(("Object %s inherits veterancy level %d from %s",
10111011
obj->getTemplate()->getName().str(), sourceObj->getVeterancyLevel(), sourceObj->getTemplate()->getName().str()));
10121012
VeterancyLevel v = sourceObj->getVeterancyLevel();
1013-
obj->getExperienceTracker()->setVeterancyLevel(v);
1013+
1014+
// TheSuperHackers @bugfix Caball009 22/04/2026 Disable audiovisual cues for a veterancy level change because this object was just created.
1015+
// Otherwise the cues would be at an incorrect position, because the object's matrix is not set yet.
1016+
obj->getExperienceTracker()->setVeterancyLevel(v, FALSE);
10141017

10151018
//In order to make things easier for the designers, we are going to transfer the unit name
10161019
//to the ejected thing... so the designer can control the pilot with the scripts.

0 commit comments

Comments
 (0)