From 75f2028dcc9879e912cbed9579792efa971108a9 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 14 Feb 2015 11:50:48 +0000 Subject: [PATCH] Fix an assertion failure with NETCODE=0. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@5006 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 17774a36c..792ea3c73 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7395,11 +7395,10 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo Bassert(i >= 0); + if (s->statnum != STAT_ACTOR && s->picnum == APLAYER && s->owner >= 0) { - int32_t snum = P_GetP((const spritetype *)s); - const DukePlayer_t *const ps = g_player[snum].ps; - - if (s->statnum != STAT_ACTOR && s->picnum == APLAYER && ps->newowner == -1 && s->owner >= 0) + const DukePlayer_t *const ps = g_player[P_GetP((const spritetype *)s)].ps; + if (ps->newowner == -1) { t->x -= mulscale16(65536-smoothratio,ps->pos.x-ps->opos.x); t->y -= mulscale16(65536-smoothratio,ps->pos.y-ps->opos.y); @@ -7408,13 +7407,13 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo t->z += mulscale16(smoothratio,ps->pos.z-ps->opos.z) - (ps->dead_flag ? 0 : PHEIGHT) + PHEIGHT; } - else if ((s->statnum == STAT_DEFAULT && s->picnum != CRANEPOLE) || s->statnum == STAT_PLAYER || - s->statnum == STAT_STANDABLE || s->statnum == STAT_PROJECTILE || s->statnum == STAT_MISC || s->statnum == STAT_ACTOR) - { - t->x -= mulscale16(65536-smoothratio,s->x-actor[i].bpos.x); - t->y -= mulscale16(65536-smoothratio,s->y-actor[i].bpos.y); - t->z -= mulscale16(65536-smoothratio,s->z-actor[i].bpos.z); - } + } + else if ((s->statnum == STAT_DEFAULT && s->picnum != CRANEPOLE) || s->statnum == STAT_PLAYER || + s->statnum == STAT_STANDABLE || s->statnum == STAT_PROJECTILE || s->statnum == STAT_MISC || s->statnum == STAT_ACTOR) + { + t->x -= mulscale16(65536-smoothratio,s->x-actor[i].bpos.x); + t->y -= mulscale16(65536-smoothratio,s->y-actor[i].bpos.y); + t->z -= mulscale16(65536-smoothratio,s->z-actor[i].bpos.z); } const int32_t sect = s->sectnum;