Finding a players position

Locked
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Finding a players position

Post by nexus024 »

I am struggling with being able to find a players position in space. For instance, what I would like to do is be able to determine if a player is on the ground or in the air at a given time. Anyone have any suggestions on how to do this?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Finding a players position

Post by ^misantropia^ »

Check out PM_WalkMove() and PM_AirMove() in game/bg_pmove.c and how they are called depending on whether pml.walking is set.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Finding a players position

Post by ^misantropia^ »

Oh, and PM_GroundTrace() should explain how to actually determine if a player is airborne.
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Re: Finding a players position

Post by nexus024 »

Thanks misantropia, I will take a look at those and see what I can figure out.
Locked