Fix original xatrix bug that made DF_QUADFIRE_DROP not work correctly

This commit is contained in:
BjossiAlfreds 2020-04-11 02:48:42 +00:00
parent 527f3d9845
commit dc38e968ff

View file

@ -1272,31 +1272,21 @@ Touch_Item(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
{
if ((((int)dmflags->value & DF_INSTANT_ITEMS) &&
(ent->item->flags & IT_INSTANT_USE)) ||
((ent->item->use == Use_Quad) &&
(((ent->item->use == Use_Quad) || (ent->item->use == Use_QuadFire)) &&
(ent->spawnflags & DROPPED_PLAYER_ITEM)))
{
if ((ent->item->use == Use_Quad) &&
(ent->spawnflags & DROPPED_PLAYER_ITEM))
if (ent->spawnflags & DROPPED_PLAYER_ITEM)
{
quad_drop_timeout_hack =
(ent->nextthink - level.time) / FRAMETIME;
}
if (ent->item->use)
{
ent->item->use(other, ent->item);
}
}
else if ((((int)dmflags->value & DF_INSTANT_ITEMS) &&
(ent->item->flags & IT_INSTANT_USE)) ||
((ent->item->use == Use_QuadFire) &&
(ent->spawnflags & DROPPED_PLAYER_ITEM)))
{
if ((ent->item->use == Use_QuadFire) &&
(ent->spawnflags & DROPPED_PLAYER_ITEM))
{
quad_fire_drop_timeout_hack =
(ent->nextthink - level.time) / FRAMETIME;
if (ent->item->use == Use_Quad)
{
quad_drop_timeout_hack =
(ent->nextthink - level.time) / FRAMETIME;
}
else if (ent->item->use == Use_QuadFire)
{
quad_fire_drop_timeout_hack =
(ent->nextthink - level.time) / FRAMETIME;
}
}
if (ent->item->use)