mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +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);
|
AInventory *item = actor->FindInventory (info);
|
||||||
if (item != NULL)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue