This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ bool Actor::HasObjectInGroup(std::string groupName) const
608
608
609
609
void Actor::SetTeam (int team)
610
610
{
611
- SceneObject ::SetTeam (team);
611
+ MovableObject ::SetTeam (team);
612
612
613
613
// Change the Team Icon to display
614
614
m_pTeamIcon = 0 ;
Original file line number Diff line number Diff line change 13
13
14
14
#include " MovableObject.h"
15
15
16
+ #include " ActivityMan.h"
16
17
#include " PresetMan.h"
17
18
#include " SceneMan.h"
18
19
#include " ConsoleMan.h"
@@ -692,6 +693,11 @@ MovableObject::MovableObject(const MovableObject &reference):
692
693
}
693
694
*/
694
695
696
+ void MovableObject::SetTeam (int team) {
697
+ SceneObject::SetTeam (team);
698
+ if (g_ActivityMan.GetActivity ()) { g_ActivityMan.GetActivity ()->ForceSetTeamAsActive (team); }
699
+ }
700
+
695
701
// ////////////////////////////////////////////////////////////////////////////////////////
696
702
// Virtual method: GetAltitude
697
703
// ////////////////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -544,6 +544,11 @@ enum MOType
544
544
545
545
bool GetsHitByMOs () const { return m_GetsHitByMOs; }
546
546
547
+ // / <summary>
548
+ // / Sets the team of this MovableObject.
549
+ // / </summary>
550
+ // / <param name="team">The new team to assign.</returns>
551
+ void SetTeam (int team) override ;
547
552
548
553
// ////////////////////////////////////////////////////////////////////////////////////////
549
554
// Method: SetIgnoresTeamHits
Original file line number Diff line number Diff line change @@ -833,7 +833,6 @@ bool MovableMan::AddMO(MovableObject *movableObjectToAdd) {
833
833
834
834
void MovableMan::AddActor (Actor *actorToAdd) {
835
835
if (actorToAdd) {
836
- g_ActivityMan.GetActivity ()->ForceSetTeamAsActive (actorToAdd->GetTeam ());
837
836
actorToAdd->SetAsAddedToMovableMan ();
838
837
actorToAdd->CorrectAttachableAndWoundPositionsAndRotations ();
839
838
@@ -848,6 +847,7 @@ void MovableMan::AddActor(Actor *actorToAdd) {
848
847
}
849
848
850
849
m_AddedActors.push_back (actorToAdd);
850
+ // This will call SetTeam and subsequently force the team as active.
851
851
AddActorToTeamRoster (actorToAdd);
852
852
}
853
853
}
You can’t perform that action at this time.
0 commit comments