@@ -117,7 +117,7 @@ e2function void entity:takeDamage(number amount, entity attacker)
117117 if not Enabled :GetBool () then return self :throw (" Dealing damage is disabled via wire_expression2_damage_enabled" ) end
118118 if not IsValid (this ) then return self :throw (" Invalid entity!" , nil ) end
119119 if not IsValid (attacker ) then return self :throw (" Invalid attacker entity!" , nil ) end
120- if not E2Lib .isOwner (attacker ) then return self :throw (" You do not own the attacker entity!" , nil ) end
120+ if not E2Lib .isOwner (self , attacker ) then return self :throw (" You do not own the attacker entity!" , nil ) end
121121 if not WireLib .CanDamage (self .player , this ) then return self :throw (" You cannot damage this entity!" , nil ) end
122122
123123 this :TakeDamage (amount , attacker , self .entity )
@@ -127,9 +127,9 @@ e2function void entity:takeDamage(number amount, entity attacker, entity inflict
127127 if not Enabled :GetBool () then return self :throw (" Dealing damage is disabled via wire_expression2_damage_enabled" ) end
128128 if not IsValid (this ) then return self :throw (" Invalid entity!" , nil ) end
129129 if not IsValid (attacker ) then return self :throw (" Invalid attacker entity!" , nil ) end
130- if not E2Lib .isOwner (attacker ) then return self :throw (" You do not own the attacker entity!" , nil ) end
130+ if not E2Lib .isOwner (self , attacker ) then return self :throw (" You do not own the attacker entity!" , nil ) end
131131 if not IsValid (inflictor ) then return self :throw (" Invalid inflictor entity!" , nil ) end
132- if not E2Lib .isOwner (inflictor ) then return self :throw (" You do not own the inflictor entity!" , nil ) end
132+ if not E2Lib .isOwner (self , inflictor ) then return self :throw (" You do not own the inflictor entity!" , nil ) end
133133 if not WireLib .CanDamage (self .player , this ) then self :throw (" You cannot damage this entity!" , nil ) end
134134
135135 this :TakeDamage (amount , attacker , inflictor )
0 commit comments