mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Fixed init_shadow crash
This commit is contained in:
parent
2fea65b8ef
commit
de02ffbf71
1 changed files with 1 additions and 1 deletions
|
@ -223,7 +223,7 @@ s8 init_shadow(struct Shadow *s, f32 xPos, f32 yPos, f32 zPos, s16 shadowScale,
|
||||||
s->floorNormalY = 1.0;
|
s->floorNormalY = 1.0;
|
||||||
s->floorNormalZ = 0;
|
s->floorNormalZ = 0;
|
||||||
s->floorOriginOffset = -waterLevel;
|
s->floorOriginOffset = -waterLevel;
|
||||||
} else {
|
} else if (floorGeometry != NULL) {
|
||||||
// Don't draw a shadow if the floor is lower than expected possible,
|
// Don't draw a shadow if the floor is lower than expected possible,
|
||||||
// or if the y-normal is negative (an unexpected result).
|
// or if the y-normal is negative (an unexpected result).
|
||||||
if (s->floorHeight < -10000.0 || floorGeometry->normalY <= 0.0) {
|
if (s->floorHeight < -10000.0 || floorGeometry->normalY <= 0.0) {
|
||||||
|
|
Loading…
Reference in a new issue