- scriptified UseInventory and several functions using the already scriptified ones,
This commit is contained in:
parent
588ddd185b
commit
09129e0113
14 changed files with 384 additions and 436 deletions
|
|
@ -938,40 +938,6 @@ void APlayerPawn::PostBeginPlay()
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APlayerPawn :: UseInventory
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
bool APlayerPawn::UseInventory (AInventory *item)
|
||||
{
|
||||
const PClass *itemtype = item->GetClass();
|
||||
|
||||
if (player->cheats & CF_TOTALLYFROZEN)
|
||||
{ // You can't use items if you're totally frozen
|
||||
return false;
|
||||
}
|
||||
if ((level.flags2 & LEVEL2_FROZEN) && (player == NULL || player->timefreezer == 0))
|
||||
{
|
||||
// Time frozen
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Super::UseInventory (item))
|
||||
{
|
||||
// Heretic and Hexen advance the inventory cursor if the use failed.
|
||||
// Should this behavior be retained?
|
||||
return false;
|
||||
}
|
||||
if (player == &players[consoleplayer])
|
||||
{
|
||||
S_Sound (this, CHAN_ITEM, item->UseSound, 1, ATTN_NORM);
|
||||
StatusBar->FlashItem (itemtype);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APlayerPawn :: PickNewWeapon
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue