View Single Post
Re: How to do correct movement
Old
  (#3)
SteveC
Member
 
Status: Offline
Posts: 37
Join Date: Jan 2005
Location: UK
Default Re: How to do correct movement - 09-01-2005

The most critical part to get them to turn, and move the way they are facing is to use this line of code;
Quote:

// this changes the fixangle from absolute (which isn't coded for) to none
// note: has to be run here because it doesn't work in the addbot routine?!?!?
if (pPlayerEnt->PlayerData()->fixangle!=FIXANGLE_NONE) pPlayerEnt->PlayerData()->fixangle=FIXANGLE_NONE;

As the comment says the bots by default use FIXANGLE_ABS, but the HL2 movement code isn't coded to support that type, so I change it to FIXANGLE_NONE. However I haven't worked out exactly where it needs to be changed, so I check it each frame before issuing the movement command. A bit of a bodge I know .

I think that's everything to get the correct movement, with full animation, physics interaction, and possibly ladder use.

I'll post my full code sometime tomorrow probably, just incase I've missed something.
  
Reply With Quote