diff --git a/Content/Script/BP_CharacterBase_C.lua b/Content/Script/BP_CharacterBase_C.lua index c29b6639..ac027692 100644 --- a/Content/Script/BP_CharacterBase_C.lua +++ b/Content/Script/BP_CharacterBase_C.lua @@ -70,6 +70,10 @@ end function BP_CharacterBase_C:Destroy(Duration) UE.UKismetSystemLibrary.Delay(self, Duration) + if not self:IsValid() then + return false + end + if self.Weapon then self.Weapon:K2_DestroyActor() end diff --git a/Content/Script/Player/BP_PlayerController_C.lua b/Content/Script/Player/BP_PlayerController_C.lua index 1bf783ee..f9297aad 100644 --- a/Content/Script/Player/BP_PlayerController_C.lua +++ b/Content/Script/Player/BP_PlayerController_C.lua @@ -75,11 +75,15 @@ function BP_PlayerController_C:Fire_Released() end function BP_PlayerController_C:Aim_Pressed() - BPI_Interfaces.UpdateAiming(self.Pawn, true) + if self.Pawn then + BPI_Interfaces.UpdateAiming(self.Pawn, true) + end end function BP_PlayerController_C:Aim_Released() - BPI_Interfaces.UpdateAiming(self.Pawn, false) + if self.Pawn then + BPI_Interfaces.UpdateAiming(self.Pawn, false) + end end return BP_PlayerController_C