mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-25 05:21:00 +00:00
Off-hand-use-gesture-savegame-fix
This commit is contained in:
parent
4127f788e8
commit
3f869386a3
3 changed files with 18 additions and 15 deletions
|
@ -9775,30 +9775,32 @@ void PM_Use( void )
|
|||
pm->ps->useTime = USE_DELAY;
|
||||
}
|
||||
|
||||
// Not added into PlayerStateBase as it affects save state
|
||||
int altUseTime = 0;
|
||||
void PM_AltUse( void )
|
||||
{
|
||||
if ( pm->ps->altUseTime > 0 )
|
||||
if ( altUseTime > 0 )
|
||||
{
|
||||
pm->ps->altUseTime -= pml.msec;
|
||||
if ( pm->ps->altUseTime < 0 )
|
||||
altUseTime -= pml.msec;
|
||||
if ( altUseTime < 0 )
|
||||
{
|
||||
pm->ps->altUseTime = 0;
|
||||
altUseTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( pm->ps->altUseTime > 0 ) {
|
||||
if ( altUseTime > 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! (pm->cmd.buttons & BUTTON_ALT_USE ) )
|
||||
{
|
||||
pm->altUseEvent = 0;
|
||||
pm->ps->altUseTime = 0;
|
||||
altUseTime = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
pm->altUseEvent = EV_USE;
|
||||
pm->ps->altUseTime = USE_DELAY;
|
||||
altUseTime = USE_DELAY;
|
||||
}
|
||||
|
||||
extern saberMoveName_t PM_AttackForEnemyPos( qboolean allowFB, qboolean allowStabDown );
|
||||
|
|
|
@ -1668,7 +1668,6 @@ public:
|
|||
//int vehicleExplodeTime; //when it will go BOOM!
|
||||
|
||||
int useTime; //not sent
|
||||
int altUseTime; //not sent
|
||||
int lastShotTime;//last time you shot your weapon
|
||||
int ping; // server to game info for scoreboard
|
||||
int lastOnGround; //last time you were on the ground
|
||||
|
|
|
@ -5996,30 +5996,32 @@ void PM_Use( void )
|
|||
pm->ps->useTime = USE_DELAY;
|
||||
}
|
||||
|
||||
// Not added into PlayerStateBase as it affects save state
|
||||
int altUseTime = 0;
|
||||
void PM_AltUse( void )
|
||||
{
|
||||
if ( pm->ps->altUseTime > 0 )
|
||||
if ( altUseTime > 0 )
|
||||
{
|
||||
pm->ps->altUseTime -= pml.msec;
|
||||
if ( pm->ps->altUseTime < 0 )
|
||||
altUseTime -= pml.msec;
|
||||
if ( altUseTime < 0 )
|
||||
{
|
||||
pm->ps->altUseTime = 0;
|
||||
altUseTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( pm->ps->altUseTime > 0 ) {
|
||||
if ( altUseTime > 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! (pm->cmd.buttons & BUTTON_ALT_USE ) )
|
||||
{
|
||||
pm->altUseEvent = 0;
|
||||
pm->ps->altUseTime = 0;
|
||||
altUseTime = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
pm->altUseEvent = EV_USE;
|
||||
pm->ps->altUseTime = USE_DELAY;
|
||||
altUseTime = USE_DELAY;
|
||||
}
|
||||
|
||||
extern int PM_AttackForEnemyPos( qboolean allowFB );
|
||||
|
|
Loading…
Reference in a new issue