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");
|
EntityWrapper attachment = wi.Player.FirstChildByName("ShieldAttachment");
|
||||||
if (attachment.Valid()) {
|
if (attachment.Valid()) {
|
||||||
if (e.Value > 0) {
|
if (e.Value > 0) {
|
||||||
|
|
||||||
|
if(wi.Player.Valid()) {
|
||||||
|
if(wi.Player.HasComponent("ShieldAbility")) {
|
||||||
|
(bool&)wi.Player["ShieldAbility"]["Active"] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (IsServer) {
|
if (IsServer) {
|
||||||
SpawnerSystem::Spawn(attachment, attachment);
|
SpawnerSystem::Spawn(attachment, attachment);
|
||||||
}
|
}
|
||||||
@@ -214,6 +221,12 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
|
|||||||
} else {
|
} else {
|
||||||
attachment.DeleteChildren();
|
attachment.DeleteChildren();
|
||||||
|
|
||||||
|
if (wi.Player.Valid()) {
|
||||||
|
if (wi.Player.HasComponent("ShieldAbility")) {
|
||||||
|
(bool&)wi.Player["ShieldAbility"]["Active"] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (IsClient) {
|
if (IsClient) {
|
||||||
EntityWrapper root = wi.FirstPersonEntity;
|
EntityWrapper root = wi.FirstPersonEntity;
|
||||||
if (root.Valid()) {
|
if (root.Valid()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user