This is due to this bit of code being encased like this, in Combat:GetAttacked:
if self.inst.components.inventory ~= nil then if attacker ~= nil and attacker.components.planarentity ~= nil and not self.inst.components.inventory:EquipHasSpDefenseForType("planar") then attacker.components.planarentity:OnPlanarAttackUndefended(self.inst) end damage, spdamage = self.inst.components.inventory:ApplyDamage(damage, attacker, weapon, spdamage) end
OnPlanarAttackUndefended should still be called on entities without an inventory component, as that means they can't have planar defense (maybe check that the target isn't also a planar entity, which is also missing in the current iteration of the code).
Steps to Reproduce
- Have a planar entity attack an entity without an inventory component.
- Have them attack a player or some other entity with an inventory component.
- Notice how the fx doesn't play in the first case.
-
1
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now