GoldenEye: Source Forums

Debriefing => Bug Reports & Fixes => Topic started by: Joe on July 07, 2013, 09:40:21 am

Title: [BUG] 4.2.3: GEUtil.Trace() Can't Ignore A Bot Unless It's Told To DetectPlayers
Post by: Joe on July 07, 2013, 09:40:21 am
Hi,

I discovered this yesterday when I was working on the new DAD mode (http://forums.geshl2.com/index.php/topic,7378.0.html) version. This won't be a problem for this version.

So this function's GEUtil.Trace() call has to use the "GEUtil.TraceOpt.PLAYER" parameter even though this trace should only be searching for the ground beneath a player:

Code: [Select]
#maxSeperationDistanceBetweenGroundAndGroundedPlayer = 8.04
def isPlayerTouchingGround(self,player):
        playersLocation = player.GetAbsOrigin()
        endV = GEUtil.VectorMA(playersLocation,GEUtil.Vector(0,0,-1),self.maxSeperationDistanceBetweenGroundAndGroundedPlayer)
        return GEUtil.Trace(playersLocation,endV,GEUtil.TraceOpt.WORLD | GEUtil.TraceOpt.PLAYER,player)

When GEUtil.Trace() fails to ignore a bot it returns nothing.