Classic rotatesprite: fix second assertion failure documented in prev. commit.

git-svn-id: https://svn.eduke32.com/eduke32@3755 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-05-12 18:51:32 +00:00
parent 9defc473c1
commit 995d679b28

View file

@ -7407,14 +7407,14 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
by += (uint32_t)yv*(y1-oy); oy = y1; by += (uint32_t)yv*(y1-oy); oy = y1;
// Assertion fails with DNF mod: in mapster32, // Assertion would fail with DNF mod without (uint32_t) below: in mapster32,
// set dt_t 3864 (bike HUD, 700x220) // set dt_t 3864 (bike HUD, 700x220)
// set dt_z 16777216 // set dt_z 16777216
// <Increase yxaspect by pressing [9]> <-- CRASH! // <Increase yxaspect by pressing [9]> <-- CRASH!
// (It also fails when wrecking the bike in-game by driving into a wall.) // (It also fails when wrecking the bike in-game by driving into a wall.)
Bassert(bx >= 0); // Bassert(bx >= 0);
bufplce[xx] = (bx>>16)*ysiz+bufplc; bufplce[xx] = ((uint32_t)bx>>16)*ysiz+bufplc;
vplce[xx] = by; vplce[xx] = by;
y1ve[xx] = y1; y1ve[xx] = y1;
y2ve[xx] = y2-1; y2ve[xx] = y2-1;