
Originally Posted by
xmitti
I am having trouble setting client angles when host, I'm not sure if it's possible I would think it's the same as setting origin.
Code
typedef void(__cdecl* SetClientOrigin_t)(playerstate_t *playerState_s, const float *origin);
static SetClientOrigin_t SetClientOrigin; - works fine
typedef void(__cdecl* SetAngle_t)(gentity_t *ent, const float *angle);
static SetAngle_t SetAngle; - set angles works perfectly for all entities
typedef void(__cdecl* SetClientAngle_t)(playerstate_t *playerState_s, const float *angle);
static SetClientAngle_t SetClientAngle; - doesn't work at all, works for ents however little confused.
Anyone have any ideas? is there another way to accomplish this anyone knows of? I was pretty confident it would work the same way as setting a client origin as above, suppose I was incorrect
I was doing it entirely wrong thank you to shark for pointing out that there are different functions for setting entity angles and client view angles.
In the quake sdk you can see that I was too lazy to look and just assumed it worked the same as origin.
In ClientSpawn your player has it's origin set then calls SetClientViewAngle to set your angle when you spawn in.
typedef void(__cdecl* SetClientViewAngle_t)(gentity_t *ent, const float *angle);
SetClientViewAngle_t SetClientViewAngle = (SetClientViewAngle_t)0x4FA740;