mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 15:11:04 +00:00
added missing null check in clipmove.
This only very rarely triggered for Blood's projectiles, no other things use this code path.
This commit is contained in:
parent
af4eaf69e3
commit
485ad27a5a
1 changed files with 3 additions and 1 deletions
|
@ -605,7 +605,8 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
DVector2 v(vec.X* inttoworld, vec.Y* inttoworld);
|
||||
sectortype* sect = §or[*sectnum];
|
||||
updatesector(v, §, rad * inttoworld);
|
||||
*sectnum = ::sectindex(sect);
|
||||
if (sect != nullptr) *sectnum = ::sectindex(sect);
|
||||
else *sectnum = -1;
|
||||
}
|
||||
|
||||
pos->X = vec.X;
|
||||
|
@ -621,6 +622,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
if (inside(fpos.X, fpos.Y, §or[clipsectorlist[j]]) == 1)
|
||||
{
|
||||
*sectnum = clipsectorlist[j];
|
||||
|
||||
return clipReturn;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue