- Fixed: UseInventory from ACS should ignore the totally frozen property.

SVN r3415 (trunk)
This commit is contained in:
Randy Heit 2012-03-09 01:56:37 +00:00
parent 10eb15fab9
commit 5564b99d3a
1 changed files with 16 additions and 1 deletions

View File

@ -669,9 +669,24 @@ static bool DoUseInv (AActor *actor, const PClass *info)
{ {
AInventory *item = actor->FindInventory (info); AInventory *item = actor->FindInventory (info);
if (item != NULL) if (item != NULL)
{
if (actor->player == NULL)
{ {
return actor->UseInventory(item); return actor->UseInventory(item);
} }
else
{
int cheats;
bool res;
// Bypass CF_TOTALLYFROZEN
cheats = actor->player->cheats;
actor->player->cheats &= ~CF_TOTALLYFROZEN;
res = actor->UseInventory(item);
actor->player->cheats |= (cheats & CF_TOTALLYFROZEN);
return res;
}
}
return false; return false;
} }