mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
WIP: Real Fake Angles
This commit is contained in:
parent
2f098c1059
commit
7afb11c4b6
2 changed files with 17 additions and 0 deletions
|
@ -635,6 +635,21 @@ static int CG_CalcViewValues( void ) {
|
|||
|
||||
ps = &cg.predictedPlayerState;
|
||||
|
||||
/*
|
||||
vec3_t weaponorigin, weaponangles;
|
||||
CG_CalculateVRWeaponPosition(weaponorigin, weaponangles, qfalse);
|
||||
vec3_t forward, end, dir;
|
||||
AngleVectors(weaponangles, forward, NULL, NULL);
|
||||
VectorMA(weaponorigin, 2048, forward, end);
|
||||
trace_t trace;
|
||||
CG_Trace( &trace, ps->origin, NULL, NULL, end, cg.predictedPlayerState.clientNum, MASK_SOLID );
|
||||
VectorSubtract(trace.endpos, ps->origin, dir);
|
||||
VectorCopy(vr->calculated_weaponangles, vr->last_calculated_weaponangles);
|
||||
vectoangles(dir, vr->calculated_weaponangles);
|
||||
//convert to real-world angles
|
||||
vr->calculated_weaponangles[YAW] -= (cg.refdefViewAngles[YAW] - vr->last_calculated_weaponangles[YAW]);
|
||||
*/
|
||||
|
||||
//HACK!! - should change this to a renderer function call
|
||||
//Indicate to renderer whether we are in deathcam mode, We don't want sky in death cam mode
|
||||
trap_Cvar_Set( "vr_deathCam", ((ps->stats[STAT_HEALTH] <= 0) &&
|
||||
|
|
|
@ -28,6 +28,8 @@ typedef struct {
|
|||
vec3_t hmdorientation_delta;
|
||||
|
||||
vec3_t weaponangles;
|
||||
// vec3_t calculated_weaponangles;
|
||||
// vec3_t last_calculated_weaponangles;
|
||||
vec3_t weaponangles_last; // Don't use this, it is just for calculating delta!
|
||||
vec3_t weaponangles_delta;
|
||||
|
||||
|
|
Loading…
Reference in a new issue