mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-02-15 08:40: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 ) );
|
||||
|
||||
// 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;
|
||||
CG_CalculateVRWeaponPosition(muzzlePoint, angle, qfalse);
|
||||
AngleVectors(angle, forward, NULL, NULL );
|
||||
|
|
|
@ -106,9 +106,19 @@ qboolean CheckGauntletAttack( gentity_t *ent ) {
|
|||
int damage;
|
||||
|
||||
// set aiming directions
|
||||
vec3_t angles;
|
||||
VectorCopy(vr->weaponangles, angles);
|
||||
angles[YAW] += (ent->client->ps.viewangles[YAW] - vr->hmdorientation[YAW]);
|
||||
vec3_t angles;
|
||||
if ( !( ent->r.svFlags & SVF_BOT ) &&
|
||||
vr != NULL &&
|
||||
(ent->client->ps.clientNum == vr->clientNum))
|
||||
{
|
||||
VectorCopy(vr->weaponangles, angles);
|
||||
angles[YAW] += ent->client->ps.viewangles[YAW] - vr->hmdorientation[YAW];
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorCopy( ent->client->ps.viewangles, angles );
|
||||
}
|
||||
|
||||
AngleVectors (angles, forward, right, up);
|
||||
|
||||
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 ) {
|
||||
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 );
|
||||
muzzlePoint[2] += ent->client->ps.viewheight;
|
||||
|
@ -867,7 +879,9 @@ void FireWeapon( gentity_t *ent ) {
|
|||
}
|
||||
|
||||
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);
|
||||
viewang[YAW] += ent->client->ps.viewangles[YAW] - vr->hmdorientation[YAW];
|
||||
|
|
Loading…
Reference in a new issue