Sort out conveyor and push stuff for new friction

This commit is contained in:
Sryder 2017-03-10 21:51:37 +00:00
parent 603950fde3
commit 81fca118fe
2 changed files with 9 additions and 9 deletions

View file

@ -403,7 +403,7 @@ extern INT32 ceilmovesound;
// Factor to scale scrolling effect into mobj-carrying properties = 3/32.
// (This is so scrolling floors and objects on them can move at same speed.)
#define CARRYFACTOR ((3*FRACUNIT)/32)
#define CARRYFACTOR (FRACUNIT-ORIG_FRICTION)
void P_MixUp(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
INT16 starpostx, INT16 starposty, INT16 starpostz,

View file

@ -6532,8 +6532,8 @@ static void P_DoScrollMove(mobj_t *thing, fixed_t dx, fixed_t dy, INT32 exclusiv
{
thing->player->cmomx += dx;
thing->player->cmomy += dy;
thing->player->cmomx = FixedMul(thing->player->cmomx, 0xe800);
thing->player->cmomy = FixedMul(thing->player->cmomy, 0xe800);
thing->player->cmomx = FixedMul(thing->player->cmomx, ORIG_FRICTION);
thing->player->cmomy = FixedMul(thing->player->cmomy, ORIG_FRICTION);
}
}
@ -7306,8 +7306,8 @@ static inline boolean PIT_PushThing(mobj_t *thing)
{
thing->player->cmomx += tmpmomx;
thing->player->cmomy += tmpmomy;
thing->player->cmomx = FixedMul(thing->player->cmomx, 0xe800);
thing->player->cmomy = FixedMul(thing->player->cmomy, 0xe800);
thing->player->cmomx = FixedMul(thing->player->cmomx, ORIG_FRICTION);
thing->player->cmomy = FixedMul(thing->player->cmomy, ORIG_FRICTION);
}
}
else
@ -7325,8 +7325,8 @@ static inline boolean PIT_PushThing(mobj_t *thing)
{
thing->player->cmomx += FixedMul(speed, FINECOSINE(pushangle));
thing->player->cmomy += FixedMul(speed, FINESINE(pushangle));
thing->player->cmomx = FixedMul(thing->player->cmomx, 0xe800);
thing->player->cmomy = FixedMul(thing->player->cmomy, 0xe800);
thing->player->cmomx = FixedMul(thing->player->cmomx, ORIG_FRICTION);
thing->player->cmomy = FixedMul(thing->player->cmomy, ORIG_FRICTION);
}
}
}
@ -7365,8 +7365,8 @@ static inline boolean PIT_PushThing(mobj_t *thing)
{
thing->player->cmomx += tmpmomx;
thing->player->cmomy += tmpmomy;
thing->player->cmomx = FixedMul(thing->player->cmomx, 0xe800);
thing->player->cmomy = FixedMul(thing->player->cmomy, 0xe800);
thing->player->cmomx = FixedMul(thing->player->cmomx, ORIG_FRICTION);
thing->player->cmomy = FixedMul(thing->player->cmomy, ORIG_FRICTION);
}
}
}