mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
engine: fix a possible crash with texel-hitscan.
Reproduced as follows (assuming all tiles have texel-hitscan for simplicity): In E2L5, shoot the opening switch with the shotgun, aiming for the border. The crash occurs because the *other*, depressed switch tile isn't yet loaded when we index into its tile storage. Dereferencing 0+small number == BAD! git-svn-id: https://svn.eduke32.com/eduke32@3364 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e4caa58cf2
commit
4a6ded3f98
1 changed files with 13 additions and 7 deletions
|
@ -11669,6 +11669,11 @@ restart_grand:
|
|||
if (intz > daz-k && intz < daz)
|
||||
{
|
||||
if (picanm[tilenum].sf&PICANM_TEXHITSCAN_BIT)
|
||||
{
|
||||
if (!waloff[tilenum])
|
||||
loadtile(tilenum);
|
||||
|
||||
if (waloff[tilenum])
|
||||
{
|
||||
// daz-intz > 0 && daz-intz < k
|
||||
int32_t xtex = mulscale16(ucoefup16, tilesizx[tilenum]);
|
||||
|
@ -11679,6 +11684,7 @@ restart_grand:
|
|||
if (*texel == 255)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
hit_set(hit, dasector, -1, z, intx, inty, intz);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue