mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Fixed freeze with A_ClearOverlays.
This commit is contained in:
parent
6cf96372ba
commit
41d20fa6cf
1 changed files with 9 additions and 0 deletions
|
@ -1169,8 +1169,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ClearOverlays)
|
|||
|
||||
int count = 0;
|
||||
DPSprite *pspr = player->psprites;
|
||||
int startID = (pspr != nullptr) ? pspr->GetID() : start;
|
||||
bool first = true;
|
||||
while (pspr != nullptr)
|
||||
{
|
||||
if (pspr->GetID() == startID)
|
||||
{
|
||||
if (first)
|
||||
first = false;
|
||||
else
|
||||
break;
|
||||
}
|
||||
int id = pspr->GetID();
|
||||
|
||||
//Do not wipe out layer 0. Ever.
|
||||
|
|
Loading…
Reference in a new issue