mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
- fixed Dehacked drop items.
This commit is contained in:
parent
446a24d095
commit
bdab9c2d9d
1 changed files with 6 additions and 0 deletions
|
@ -1260,15 +1260,21 @@ static int PatchThing (int thingy)
|
|||
}
|
||||
else if (linelen == 12 && stricmp(Line1, "dropped item") == 0)
|
||||
{
|
||||
val--; // This is 1-based and 0 means 'no drop'.
|
||||
if ((unsigned)val < InfoNames.Size())
|
||||
{
|
||||
FDropItem* di = (FDropItem*)ClassDataAllocator.Alloc(sizeof(FDropItem));
|
||||
|
||||
di->Next = nullptr;
|
||||
di->Name = InfoNames[val]->TypeName.GetChars();
|
||||
di->Probability = 255;
|
||||
di->Amount = -1;
|
||||
info->GetInfo()->DropItems = di;
|
||||
}
|
||||
else if (val == -1)
|
||||
{
|
||||
info->GetInfo()->DropItems = nullptr;
|
||||
}
|
||||
}
|
||||
else if (linelen == 11 && stricmp(Line1, "blood color") == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue