mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- added Spleen's fix for not running 2 frames of the weapon when the player spawns.
SVN r2783 (trunk)
This commit is contained in:
parent
4ca21e8e38
commit
a0d7693f33
3 changed files with 14 additions and 2 deletions
|
@ -1345,7 +1345,10 @@ void G_PlayerReborn (int player)
|
|||
if (gamestate != GS_TITLELEVEL)
|
||||
{
|
||||
actor->GiveDefaultInventory ();
|
||||
p->ReadyWeapon = p->PendingWeapon;
|
||||
|
||||
// [Spleen] ReadyWeapon will be set when P_MovePsprites calls P_BringUpWeapon
|
||||
p->ReadyWeapon = NULL;
|
||||
//p->ReadyWeapon = p->PendingWeapon;
|
||||
}
|
||||
|
||||
//Added by MC: Init bot structure.
|
||||
|
|
|
@ -794,9 +794,15 @@ void P_SetupPsprites(player_t *player)
|
|||
{
|
||||
player->psprites[i].state = NULL;
|
||||
}
|
||||
|
||||
|
||||
// [Spleen] Let P_MovePsprites handle calling P_BringUpWeapon,
|
||||
// instead of P_SetupPsprites, to avoid raising it twice in one tic.
|
||||
/*
|
||||
// Spawn the ready weapon
|
||||
player->PendingWeapon = player->ReadyWeapon;
|
||||
P_BringUpWeapon (player);
|
||||
*/
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
|
|
@ -1103,7 +1103,10 @@ void APlayerPawn::GiveDefaultInventory ()
|
|||
if (item != NULL && item->IsKindOf (RUNTIME_CLASS (AWeapon)) &&
|
||||
static_cast<AWeapon*>(item)->CheckAmmo(AWeapon::EitherFire, false))
|
||||
{
|
||||
player->ReadyWeapon = player->PendingWeapon = static_cast<AWeapon *> (item);
|
||||
// [Spleen] ReadyWeapon will be set when P_MovePsprites calls P_BringUpWeapon
|
||||
player->PendingWeapon = static_cast<AWeapon *> (item);
|
||||
player->ReadyWeapon = NULL;
|
||||
//player->ReadyWeapon = player->PendingWeapon = static_cast<AWeapon *> (item);
|
||||
}
|
||||
}
|
||||
di = di->Next;
|
||||
|
|
Loading…
Reference in a new issue