Defender ability HUD fixed
This commit is contained in:
@@ -152,6 +152,13 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
|
||||
EntityWrapper attachment = wi.Player.FirstChildByName("ShieldAttachment");
|
||||
if (attachment.Valid()) {
|
||||
if (e.Value > 0) {
|
||||
|
||||
if(wi.Player.Valid()) {
|
||||
if(wi.Player.HasComponent("ShieldAbility")) {
|
||||
(bool&)wi.Player["ShieldAbility"]["Active"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsServer) {
|
||||
SpawnerSystem::Spawn(attachment, attachment);
|
||||
}
|
||||
@@ -214,6 +221,12 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
|
||||
} else {
|
||||
attachment.DeleteChildren();
|
||||
|
||||
if (wi.Player.Valid()) {
|
||||
if (wi.Player.HasComponent("ShieldAbility")) {
|
||||
(bool&)wi.Player["ShieldAbility"]["Active"] = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsClient) {
|
||||
EntityWrapper root = wi.FirstPersonEntity;
|
||||
if (root.Valid()) {
|
||||
|
||||
Reference in New Issue
Block a user