mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-13 14:10:42 +00:00
- added missing MBF21 Dehacked keys "blood color" and "dropped item".
This commit is contained in:
parent
854e11a9de
commit
dfd51ec6d5
1 changed files with 33 additions and 0 deletions
|
@ -68,6 +68,8 @@
|
|||
#include "actorptrselect.h"
|
||||
#include "g_levellocals.h"
|
||||
|
||||
extern TArray<PalEntry> TranslationColors;
|
||||
|
||||
void JitDumpLog(FILE *file, VMScriptFunction *func);
|
||||
|
||||
// [SO] Just the way Randy said to do it :)
|
||||
|
@ -1273,6 +1275,37 @@ static int PatchThing (int thingy)
|
|||
{
|
||||
info->meleerange = DEHToDouble(val) - 20; // -20 is needed because DSDA subtracts it in P_CheckMeleeRange, while GZDoom does not.
|
||||
}
|
||||
else if (linelen == 12 && stricmp(Line1, "dropped item") == 0)
|
||||
{
|
||||
if ((unsigned)val < InfoNames.Size())
|
||||
{
|
||||
FDropItem* di = (FDropItem*)ClassDataAllocator.Alloc(sizeof(FDropItem));
|
||||
|
||||
di->Name = InfoNames[val]->TypeName.GetChars();
|
||||
di->Probability = 255;
|
||||
di->Amount = -1;
|
||||
info->GetInfo()->DropItems = di;
|
||||
}
|
||||
}
|
||||
else if (linelen == 11 && stricmp(Line1, "blood color") == 0)
|
||||
{
|
||||
static const unsigned int bloodcolor[] = {
|
||||
0, // 0 - Red (normal)
|
||||
0xffcccccc, // 1 - Grey
|
||||
0xff63af57, // 2 - Green
|
||||
0xff6357af, // 3 - Blue
|
||||
0xffffd300, // 4 - Yellow
|
||||
0xff333333, // 5 - Black
|
||||
0xffff30ff, // 6 - Purple
|
||||
0xffffffff, // 7 - White
|
||||
0xffff8000, // 8 - Orange
|
||||
};
|
||||
|
||||
if (val < 0 || val > 8) val = 0;
|
||||
unsigned color = bloodcolor[val];
|
||||
info->BloodColor = color;
|
||||
info->BloodTranslation = val == 0? 0 : TRANSLATION(TRANSLATION_Blood, CreateBloodTranslation(color));
|
||||
}
|
||||
else if (linelen == 10 && stricmp(Line1, "MBF21 Bits") == 0)
|
||||
{
|
||||
uint32_t value = 0;
|
||||
|
|
Loading…
Reference in a new issue