Some more minecart fixes

This commit is contained in:
MascaraSnake 2019-06-19 00:10:28 +02:00
parent c11a3010d9
commit d388547021
2 changed files with 7 additions and 3 deletions

View File

@ -1743,12 +1743,16 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
toucher->momz = toucher->tracer->momz + P_AproxDistance(toucher->tracer->momx, toucher->tracer->momy)/2;
P_ResetPlayer(player);
player->pflags &= ~PF_APPLYAUTOBRAKE;
P_SetMobjState(toucher, S_PLAY_FALL);
P_SetPlayerMobjState(toucher, S_PLAY_FALL);
P_SetTarget(&toucher->tracer->target, NULL);
P_KillMobj(toucher->tracer, toucher, special, 0);
P_SetTarget(&toucher->tracer, NULL);
player->powers[pw_carry] = CR_NONE;
P_TeleportMove(toucher, special->x, special->y, maxz);
P_UnsetThingPosition(toucher);
toucher->x = special->x;
toucher->y = special->y;
toucher->z = maxz;
P_SetThingPosition(toucher);
}
return;

View File

@ -10162,7 +10162,7 @@ static void P_MinecartThink(player_t *player)
}
}
P_SetMobjState(player->mo, S_PLAY_STND);
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
// Move player to minecart.
P_TeleportMove(player->mo, minecart->x - minecart->momx, minecart->y - minecart->momy, minecart->z + max(minecart->momz, 0) + 8*FRACUNIT);