mirror of https://github.com/DrBeef/JKXR.git
Always use right hand as saber home
This commit is contained in:
parent
74dcd955d2
commit
1968a7d8ba
|
@ -6486,20 +6486,14 @@ void WP_RunSaber( gentity_t *self, gentity_t *saber )
|
||||||
|| self->client->ps.saberEntityState == SES_RETURNING
|
|| self->client->ps.saberEntityState == SES_RETURNING
|
||||||
|| VectorCompare( saber->s.pos.trDelta, vec3_origin ) )
|
|| VectorCompare( saber->s.pos.trDelta, vec3_origin ) )
|
||||||
{//control if it's returning or just starting
|
{//control if it's returning or just starting
|
||||||
float saberSpeed = 500;//FIXME: based on force level?
|
float saberSpeed = self->client->ps.forcePowerLevel[FP_SABERTHROW] == FORCE_LEVEL_1 ? 300 : 500;
|
||||||
float dist;
|
float dist;
|
||||||
gentity_t *enemy = NULL;
|
gentity_t *enemy = NULL;
|
||||||
|
|
||||||
AngleVectors( fwdangles, forward, NULL, NULL );
|
AngleVectors( fwdangles, forward, NULL, NULL );
|
||||||
|
|
||||||
if ( self->client->ps.saberEntityDist < 100 )
|
//Always use right hand as saber home
|
||||||
{//make the saber head to my hand- the bolt it was attached to
|
|
||||||
VectorCopy( self->client->renderInfo.handRPoint, saberHome );
|
VectorCopy( self->client->renderInfo.handRPoint, saberHome );
|
||||||
}
|
|
||||||
else
|
|
||||||
{//aim saber from eyes
|
|
||||||
VectorCopy( self->client->renderInfo.eyePoint, saberHome );
|
|
||||||
}
|
|
||||||
VectorMA( saberHome, self->client->ps.saberEntityDist, forward, saberDest );
|
VectorMA( saberHome, self->client->ps.saberEntityDist, forward, saberDest );
|
||||||
|
|
||||||
if ( self->client->ps.forcePowerLevel[FP_SABERTHROW] > FORCE_LEVEL_2
|
if ( self->client->ps.forcePowerLevel[FP_SABERTHROW] > FORCE_LEVEL_2
|
||||||
|
|
Loading…
Reference in New Issue