diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index af05c8bac..dd94c693b 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -489,14 +489,28 @@ void M32_ResetFakeRORTiles(void) void M32_DrawRoomsAndMasks(void) { + static int srchwall = -1; + VM_OnEvent(EVENT_PREDRAW3DSCREEN, -1); yax_preparedrawrooms(); drawrooms(pos.x,pos.y,pos.z,ang,horiz,cursectnum); yax_drawrooms(CallExtAnalyzeSprites, cursectnum, 0, 0); + const int osearchwall=searchwall, osearchstat=searchstat; + if (srchwall >= 0) + { + // a.m32 states 'tduprot' and 'tduplin' need searchstat to check for + // whether we've hit a sprite, but these would be only set after the + // drawmasks(). Hence this hackish workaround. + searchstat = 3; + searchwall = srchwall; + } CallExtAnalyzeSprites(0,0,0,0); + searchwall = osearchwall, searchstat=osearchstat; + drawmasks(); + srchwall = (searchstat == 3) ? searchwall : -1; M32_ResetFakeRORTiles(); #ifdef POLYMER diff --git a/polymer/eduke32/package/sdk/samples/a.m32 b/polymer/eduke32/package/sdk/samples/a.m32 index 229fe3f67..a2ba248a5 100644 --- a/polymer/eduke32/package/sdk/samples/a.m32 +++ b/polymer/eduke32/package/sdk/samples/a.m32 @@ -1121,7 +1121,7 @@ defstate respawnpreview ife showrespawn_always 0 { ifaimingsprite ife sprite[searchwall].picnum RESPAWN nullop - else break + else return } set onumtspr spritesortcnt diff --git a/polymer/eduke32/package/sdk/samples/m32script_ex.map b/polymer/eduke32/package/sdk/samples/m32script_ex.map index 87e571ee1..eb4dac189 100644 Binary files a/polymer/eduke32/package/sdk/samples/m32script_ex.map and b/polymer/eduke32/package/sdk/samples/m32script_ex.map differ diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 113f70b92..75592a09e 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -5021,7 +5021,7 @@ static void Keys3d(void) { if (ASSERT_AIMING) { - if (AIMING_AT_SPRITE && (show2dsprite[searchwall>>3]&(1<<(searchwall&7)))) + if (!eitherSHIFT && AIMING_AT_SPRITE && (show2dsprite[searchwall>>3]&(1<<(searchwall&7)))) { for (i=0; i