exec("./LightBeam.cs");
exec("./LightWalkWay.cs");
exec("./MediumFloor.cs");

$DeployableMask = $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticShapeObjectType | $TypeMasks::PlayerObjectType| $TypeMasks::ForceFieldObjectType;
$DeployViewDistance = 5000;

function GameBase::EyeRay(%player) {
	%cplayer = %player + 1;
	%start = %cplayer.getEyePoint();
	%vec = %cplayer.geteyeVector();
	%end = VectorAdd(%start,VectorScale(%vec,$DeployViewDistance));
	%exclude = %player SPC %cplayer;
	return castRay(%start,%end,$DeployableMask,%exclude);
}