mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-02-15 16:50:40 +00:00
Fix server hosted on Quest
- Clients connected to the Quest based server should be able to aim correctly now
This commit is contained in:
parent
c1b77e09fc
commit
0386398660
2 changed files with 21 additions and 6 deletions
|
@ -1300,7 +1300,8 @@ static void CG_LightningBolt( centity_t *cent, vec3_t origin ) {
|
||||||
memset( &beam, 0, sizeof( beam ) );
|
memset( &beam, 0, sizeof( beam ) );
|
||||||
|
|
||||||
// CPMA "true" lightning
|
// CPMA "true" lightning
|
||||||
if ((cent->currentState.number == cg.predictedPlayerState.clientNum) && (cg_trueLightning.value != 0)) {
|
if (cent->currentState.number == cg.predictedPlayerState.clientNum)// && (cg_trueLightning.value != 0))
|
||||||
|
{
|
||||||
vec3_t angle;
|
vec3_t angle;
|
||||||
CG_CalculateVRWeaponPosition(muzzlePoint, angle, qfalse);
|
CG_CalculateVRWeaponPosition(muzzlePoint, angle, qfalse);
|
||||||
AngleVectors(angle, forward, NULL, NULL );
|
AngleVectors(angle, forward, NULL, NULL );
|
||||||
|
|
|
@ -107,8 +107,18 @@ qboolean CheckGauntletAttack( gentity_t *ent ) {
|
||||||
|
|
||||||
// set aiming directions
|
// set aiming directions
|
||||||
vec3_t angles;
|
vec3_t angles;
|
||||||
|
if ( !( ent->r.svFlags & SVF_BOT ) &&
|
||||||
|
vr != NULL &&
|
||||||
|
(ent->client->ps.clientNum == vr->clientNum))
|
||||||
|
{
|
||||||
VectorCopy(vr->weaponangles, angles);
|
VectorCopy(vr->weaponangles, angles);
|
||||||
angles[YAW] += (ent->client->ps.viewangles[YAW] - vr->hmdorientation[YAW]);
|
angles[YAW] += ent->client->ps.viewangles[YAW] - vr->hmdorientation[YAW];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
VectorCopy( ent->client->ps.viewangles, angles );
|
||||||
|
}
|
||||||
|
|
||||||
AngleVectors (angles, forward, right, up);
|
AngleVectors (angles, forward, right, up);
|
||||||
|
|
||||||
CalcMuzzlePoint ( ent, forward, right, up, muzzle );
|
CalcMuzzlePoint ( ent, forward, right, up, muzzle );
|
||||||
|
@ -805,7 +815,9 @@ set muzzle location relative to pivoting eye
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void CalcMuzzlePoint ( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) {
|
void CalcMuzzlePoint ( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) {
|
||||||
if ( ( ent->r.svFlags & SVF_BOT ) )
|
if ( ( ent->r.svFlags & SVF_BOT ) ||
|
||||||
|
//Can't use the vr_clientinfo if this isn't the vr client
|
||||||
|
vr == NULL || (ent->client->ps.clientNum != vr->clientNum))
|
||||||
{
|
{
|
||||||
VectorCopy( ent->s.pos.trBase, muzzlePoint );
|
VectorCopy( ent->s.pos.trBase, muzzlePoint );
|
||||||
muzzlePoint[2] += ent->client->ps.viewheight;
|
muzzlePoint[2] += ent->client->ps.viewheight;
|
||||||
|
@ -867,7 +879,9 @@ void FireWeapon( gentity_t *ent ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3_t viewang;
|
vec3_t viewang;
|
||||||
if ( !( ent->r.svFlags & SVF_BOT ) && vr != NULL)
|
if ( !( ent->r.svFlags & SVF_BOT ) &&
|
||||||
|
vr != NULL &&
|
||||||
|
(ent->client->ps.clientNum == vr->clientNum))
|
||||||
{
|
{
|
||||||
VectorCopy(vr->weaponangles, viewang);
|
VectorCopy(vr->weaponangles, viewang);
|
||||||
viewang[YAW] += ent->client->ps.viewangles[YAW] - vr->hmdorientation[YAW];
|
viewang[YAW] += ent->client->ps.viewangles[YAW] - vr->hmdorientation[YAW];
|
||||||
|
|
Loading…
Reference in a new issue