All pastes #610724 Raw Edit

Miscellany

public lua v1 · immutable
·published 2007-07-09 16:38 UTC
rendered paste body
// Entity inside entityfunction Assault.Entity:EntityInsideEntity(Entity)	local Positions = {}	local Sizes = {}		// Positions		Positions[1] = self:EntityGetPosition()	Positions[2] = Entity:EntityGetPosition()		// Sizes		Sizes[1] = self:EntityGetSize()	Sizes[2] = Entity:EntityGetSize()		// Check		if (Positions[1].X > Positions[2].X) then		if (Positions[1].X < Positions[2].X + Sizes[2].W) then			if (Positions[1].Y > Positions[2].Y + Sizes[2].H) then				if (Positions[1].Y < Positions[2].Y + Sizes[2].H) then					return true				end			end		end	end		// Return false		return falseend