V 0.5.10
This commit is contained in:
@@ -8,7 +8,6 @@ SCR_PlayerController {
|
||||
}
|
||||
}
|
||||
SCR_VoiceRangeController "{68D6FBA83607BC45}" {
|
||||
m_iCurrentRange 10
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -91,15 +91,20 @@ class SCR_VoiceRangeController: ScriptComponent {
|
||||
SCR_VONController vonContr = SCR_VONController.Cast(GetOwner().FindComponent(SCR_VONController));
|
||||
if (!vonContr) return;
|
||||
|
||||
// Finde heraus, welche Komponente wir basierend auf den Metern brauchen
|
||||
typename compType = SCR_VoNNormal;
|
||||
if (m_iCurrentRange <= 15) compType = SCR_VoNWhispering;
|
||||
else if (m_iCurrentRange >= 50) compType = SCR_VoNLoud;
|
||||
|
||||
SCR_VoNComponent newVonComp = SCR_VoNComponent.Cast(player.FindComponent(compType));
|
||||
if (newVonComp) {
|
||||
// Nur wechseln, wenn sich die Stufe WIRKLICH ändert (verhindert unnötige Updates)
|
||||
if (vonContr.GetVONComponent() == newVonComp) return;
|
||||
|
||||
// Komponente sanft wechseln OHNE den Toggle (behält Push-to-Talk und Mute-Status bei!)
|
||||
vonContr.SetVONComponent(newVonComp);
|
||||
vonContr.SetVONProximityToggle(false);
|
||||
vonContr.SetVONProximityToggle(true);
|
||||
|
||||
Print("GTG Voice: VON-Stufe gewechselt zu: " + compType.ToString(), LogLevel.WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user