* Slightly more papersprite stability!

* Slightly more sane Minecraft item scaling!
This commit is contained in:
toaster 2018-09-07 14:26:00 +01:00
parent d13e999c99
commit baf50a1dbf
4 changed files with 6 additions and 9 deletions

View file

@ -3008,7 +3008,7 @@ void K_DropItems(player_t *player)
if (player->mo && player->kartstuff[k_itemamount])
{
mobj_t *drop = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height/2, MT_FLOATINGITEM);
P_SetScale(drop, drop->scale>>5);
P_SetScale(drop, drop->scale>>4);
drop->destscale = (3*drop->destscale)/2;;
drop->angle = player->mo->angle + ANGLE_90;

View file

@ -445,7 +445,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_SetTarget(&special->tracer, toucher);
special->flags2 |= MF2_NIGHTSPULL;
special->destscale = mapheaderinfo[gamemap-1]->mobj_scale>>5;
special->destscale = mapheaderinfo[gamemap-1]->mobj_scale>>4;
special->scalespeed <<= 1;
special->flags &= ~MF_SPECIAL;

View file

@ -8031,7 +8031,7 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->flags2 & MF2_NIGHTSPULL)
{
if (!mobj->tracer || !mobj->tracer->health
|| mobj->scale <= mapheaderinfo[gamemap-1]->mobj_scale>>5)
|| mobj->scale <= mapheaderinfo[gamemap-1]->mobj_scale>>4)
{
P_RemoveMobj(mobj);
return;

View file

@ -1266,7 +1266,6 @@ static void R_ProjectSprite(mobj_t *thing)
if (papersprite)
{
fixed_t yscale2, cosmul, sinmul, tz2;
INT32 range;
if (ang >= ANGLE_180)
{
@ -1296,12 +1295,10 @@ static void R_ProjectSprite(mobj_t *thing)
if (max(tz, tz2) < FixedMul(MINZ, this_scale)) // non-papersprite clipping is handled earlier
return;
if (x2 > x1)
range = (x2 - x1);
else
range = 1;
if (x2 <= x1)
return;
scalestep = (yscale2 - yscale)/range;
scalestep = (yscale2 - yscale)/(x2 - x1);
// The following two are alternate sorting methods which might be more applicable in some circumstances. TODO - maybe enable via MF2?
// sortscale = max(yscale, yscale2);