Fix skiddust positional scaling

This commit is contained in:
Lachlan 2020-07-04 04:30:57 +08:00
parent 84000a0add
commit e44d93f76b
1 changed files with 8 additions and 5 deletions

View File

@ -7776,11 +7776,14 @@ void P_SpawnSkidDust(player_t *player, fixed_t radius, boolean sound)
mobj_t *mo = player->mo; mobj_t *mo = player->mo;
mobj_t *particle; mobj_t *particle;
radius >>= FRACBITS; particle = P_SpawnMobjFromMobj(mo, 0, 0, 0, MT_SPINDUST);
if (radius) if (radius >>= FRACBITS)
particle = P_SpawnMobjFromMobj(mo, P_RandomRange(-radius, radius) << FRACBITS, P_RandomRange(-radius, radius) << FRACBITS, 0, MT_SPINDUST); {
else P_UnsetThingPosition(particle);
particle = P_SpawnMobjFromMobj(mo, 0, 0, 0, MT_SPINDUST); particle->x += P_RandomRange(-radius, radius) << FRACBITS;
particle->y += P_RandomRange(-radius, radius) << FRACBITS;
P_SetThingPosition(particle);
}
particle->tics = 10; particle->tics = 10;
particle->destscale = (2*mo->scale)/3; particle->destscale = (2*mo->scale)/3;