Duel items use args

This commit is contained in:
Sally Coolatta 2022-10-10 10:48:44 -04:00
parent 688b4fb9a9
commit 0614a8739c
3 changed files with 14 additions and 1 deletions

View file

@ -70,7 +70,7 @@ boolean K_IsDuelItem(mobjtype_t type)
boolean K_DuelItemAlwaysSpawns(mapthing_t *mt)
{
return (mt->options & MTF_EXTRA);
return !!(mt->args[0]);
}
static void K_SpawnDuelOnlyItems(void)

View file

@ -12805,6 +12805,12 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
// Duel Bomb needs init to match real map thing's angle
mobj->angle = FixedAngle(mthing->angle << FRACBITS);
Obj_DuelBombInit(mobj);
if (mthing->args[1])
{
Obj_DuelBombReverse(mobj);
}
*doangle = false;
break;
}

View file

@ -5997,6 +5997,10 @@ static void P_ConvertBinaryThingTypes(void)
else
mapthings[i].args[0] = TMP_NORMAL;
}
if (K_IsDuelItem(mobjtype) == true)
{
mapthings[i].args[0] = !!(mapthings[i].options & MTF_EXTRA);
}
}
if (mapthings[i].type >= 1 && mapthings[i].type <= 35) //Player starts
@ -6566,6 +6570,9 @@ static void P_ConvertBinaryThingTypes(void)
mapthings[i].args[2] |= TMICF_INVERTSIZE;
}
break;
case 2050: // MT_DUELBOMB
mapthings[i].args[1] = !!(mapthings[i].options & MTF_AMBUSH);
break;
case 2333: // MT_BATTLECAPSULE
mapthings[i].args[0] = mapthings[i].extrainfo;
mapthings[i].args[1] = mapthings[i].angle;