mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- fixed: Voxels with scaled to 0 caused a division by zero crash.
This commit is contained in:
parent
0648ef693f
commit
5ddee98e70
1 changed files with 5 additions and 0 deletions
|
@ -2751,6 +2751,11 @@ void R_DrawVoxel(const FVector3 &globalpos, FAngle viewangle,
|
|||
// Also do some magic voodoo scaling to make them the right size.
|
||||
daxscale = daxscale / (0xC000 >> 6);
|
||||
dayscale = dayscale / (0xC000 >> 6);
|
||||
if (daxscale <= 0 || dayscale <= 0)
|
||||
{
|
||||
// won't be visible.
|
||||
return;
|
||||
}
|
||||
|
||||
angle_t viewang = viewangle.BAMs();
|
||||
cosang = FLOAT2FIXED(viewangle.Cos()) >> 2;
|
||||
|
|
Loading…
Reference in a new issue