- Fixed: The correct player class was not remembered when the menu had both
a player class selection menu and an episode menu. - Fixed: AddToConsole could write outside its working buffer. - Fixed: 0 was no longer recognized as placeholder for 'no state' in A_Chase. - Fixed: When picking up weapons the code did not check if it should switch away from weak weapons. SVN r1332 (trunk)
This commit is contained in:
parent
a66eb7f8c3
commit
37d056c041
8 changed files with 73 additions and 16 deletions
|
|
@ -680,6 +680,31 @@ AWeapon *APlayerPawn::PickNewWeapon (const PClass *ammotype)
|
|||
return best;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APlayerPawn :: CheckWeaponSwitch
|
||||
//
|
||||
// Checks if weapons should be changed after picking up ammo
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void APlayerPawn::CheckWeaponSwitch(const PClass *ammotype)
|
||||
{
|
||||
if (!player->userinfo.neverswitch &&
|
||||
player->PendingWeapon == WP_NOCHANGE &&
|
||||
(player->ReadyWeapon == NULL ||
|
||||
(player->ReadyWeapon->WeaponFlags & WIF_WIMPY_WEAPON)))
|
||||
{
|
||||
AWeapon *best = BestWeapon (ammotype);
|
||||
if (best != NULL && (player->ReadyWeapon == NULL ||
|
||||
best->SelectionOrder < player->ReadyWeapon->SelectionOrder))
|
||||
{
|
||||
player->PendingWeapon = best;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APlayerPawn :: GiveDeathmatchInventory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue