Skip to content

Commit

Permalink
Update entity.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
marchcain authored Jan 10, 2020
1 parent 196f825 commit b1ae357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/entities/gmod_wire_expression2/core/entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ end
e2function number entity:volume()
if not validPhysics(this) then return 0 end
local phys = this:GetPhysicsObject()
return phys:GetVolume()
return phys:GetVolume() or 0
end

e2function number entity:surfaceArea()
if not validPhysics(this) then return 0 end
local phys = this:GetPhysicsObject()
return phys:GetSurfaceArea()
return phys:GetSurfaceArea() or 0
end

e2function number entity:stress()
Expand Down

0 comments on commit b1ae357

Please sign in to comment.