diff --git a/src/k_kart.c b/src/k_kart.c index e8b493f92..2b9d2b478 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5814,7 +5814,7 @@ void K_RepairOrbitChain(mobj_t *orbit) } // Then recount to make sure item amount is correct - if (orbit->target && orbit->target->player) + if (orbit->target && orbit->target->player && !P_MobjWasRemoved(orbit->target)) { INT32 num = 0; @@ -5831,7 +5831,7 @@ void K_RepairOrbitChain(mobj_t *orbit) prev->movedir = num; } - if (!P_MobjWasRemoved(orbit->target) && orbit->target->player->itemamount != num) + if (orbit->target && !P_MobjWasRemoved(orbit->target) && orbit->target->player->itemamount != num) orbit->target->player->itemamount = num; } } diff --git a/src/s_sound.c b/src/s_sound.c index 215786b0d..830387e3b 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1098,7 +1098,8 @@ boolean S_AdjustSoundParams(const mobj_t *listener, const mobj_t *source, INT32 if (sfxinfo->pitch & SF_OUTSIDESOUND) // Rain special case { - fixed_t x, y, yl, yh, xl, xh, newdist; + INT64 x, y, yl, yh, xl, xh; + fixed_t newdist; if (R_PointInSubsector(listensource.x, listensource.y)->sector->ceilingpic == skyflatnum) approx_dist = 0;