stefan, regarding the view angles.
I don't set them in the HPB_bot2 WriteUsercmd() function. You will probably want to change that code. Instead of this...
Code:
buf->WriteOneBit( 0 ); // viewangles[0]
buf->WriteOneBit( 0 ); // viewangles[1]
buf->WriteOneBit( 0 ); // viewangles[2]
...try this...
Code:
EDIT: Doooh!!!! The last one is only 8 bits...
buf->WriteOneBit( 1 );
buf->WriteBitAngle( cmd->viewangles[ 0 ], 16 );
buf->WriteOneBit( 1 );
buf->WriteBitAngle( cmd->viewangles[ 1 ], 16 );
buf->WriteOneBit( 1 );
buf->WriteBitAngle( cmd->viewangles[ 2 ], 8 );
...where "viewangles" is the array of angles (I assume in degrees 0-360, but I don't know why they allow 16 bits).
The gameclients->ProcessUsercmds() eventually calls CBasePlayer :: PlayerRunCommand() which does this...
Code:
if ( pl.fixangle == FIXANGLE_NONE)
{
VectorCopy ( ucmd->viewangles, pl.v_angle );
}
Since fixangle should normally be 0 (FIXANGLE_NONE) it should be copying the viewangles from your bot cmd into the Player's viewangles variable.
EDIT: When I do this, the bot's don't turn their bodies, but the DO move in a different direction each time the YAW changes in the viewangles. Perhaps the bot's model rendering isn't being handled properly somewhere (your client doesn't know which way they are really facing), so you see them as facing one direction, but they are really facing a completely different direction (Half-Life1 bots had this problem initially too). It should be easy to tell which way they are facing by setting the pitch to zero and have them shoot their weapons every second or so and see which way the bullets go!
botman