void ANimModCharacter::UpdateTeamColorsAllMIDs() { for (int32 i = 0; i < MeshMIDs.Num(); ++i) { UpdateTeamColors(MeshMIDs[i]); } }
void ANimModCharacter::PawnClientRestart() { Super::PawnClientRestart(); // switch mesh to 1st person view UpdatePawnMeshes(); // reattach weapon if needed SetCurrentWeapon(CurrentWeapon); // set team colors for 1st person view //The material's index that we want is 1, not 0. UMaterialInstanceDynamic* Mesh1PMID = Mesh1P->CreateAndSetMaterialInstanceDynamic(1); UpdateTeamColors(Mesh1PMID); }
void ALPlayerState::OnRep_TeamColor() { UpdateTeamColors(); }
void ALPlayerState::SetTeamNum(int32 NewTeamNumber) { TeamNumber = NewTeamNumber; UpdateTeamColors(); }
void ALPlayerState::ClientInitialize(class AController* InController) { Super::ClientInitialize(InController); UpdateTeamColors(); }
void ANimModPlayerState::SetTeam(ENimModTeam NewTeam) { Team = NewTeam; UpdateTeamColors(); }