diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 3b72e671e..d3bacccf4 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -5498,7 +5498,8 @@ static void setup_globals_sprite1(const spritetype *tspr, const sectortype *sec, globalorientation = 0; globalpicnum = tilenum; if ((unsigned)globalpicnum >= MAXTILES) globalpicnum = 0; - globalxpanning = 0; + // sprite panning + globalxpanning = (((256-spriteext[tspr->owner].xpanning)&255) * tilesizx[globalpicnum])>>8; globalypanning = 0; globvis = globalvisibility; diff --git a/polymer/eduke32/source/lunatic/test/animatesprites.con b/polymer/eduke32/source/lunatic/test/animatesprites.con index e0f57a1db..1601beea7 100644 --- a/polymer/eduke32/source/lunatic/test/animatesprites.con +++ b/polymer/eduke32/source/lunatic/test/animatesprites.con @@ -13,6 +13,9 @@ gamevar florz 0 0 gamevar florhit 0 0 gamevar pi 0 0 +gamevar doxp 0 0 +gamevar xp 0 0 + define Q 500 gamevar pdist 0 2 @@ -20,6 +23,25 @@ gamevar pdist 0 2 onevent EVENT_GAME ifactor LIZTROOP findplayer pdist + + // Test both view/wall/floor sprites for + // spriteext[].xpanning (Polymost only) + setvar doxp 0 + ifactor 937 // --- vvv --- E2L1 + setvar doxp 1 + else ifactor FEMMAG1 + setvar doxp 1 + else ifactor PIGCOP + setvar doxp 1 + else ifactor 849 // 64x24: in classic, better than nonpow2-x tile 937 + setvar doxp 1 + + ifvarn doxp 0 + { + getactor[THISACTOR].xpanning xp + addvar xp 1 + setactor[THISACTOR].xpanning xp + } endevent onevent EVENT_ANIMATESPRITES @@ -43,6 +65,7 @@ onevent EVENT_DISPLAYREST } getplayer[THISACTOR].i pi + // This blows up on C-CON: getzrange sprite[pi].x sprite[pi].y sprite[pi].z player[THISACTOR].cursectnum /*out:*/ ceilz ceilhit florz florhit /*in:*/ 128 CLIPMASK0