mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 04:51:41 +00:00
- Fixed: UseInventory from ACS should ignore the totally frozen property.
SVN r3415 (trunk)
This commit is contained in:
parent
10eb15fab9
commit
5564b99d3a
1 changed files with 16 additions and 1 deletions
|
@ -670,7 +670,22 @@ static bool DoUseInv (AActor *actor, const PClass *info)
|
|||
AInventory *item = actor->FindInventory (info);
|
||||
if (item != NULL)
|
||||
{
|
||||
return actor->UseInventory(item);
|
||||
if (actor->player == NULL)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue