port: make sun and light glares use LOS checks

this partially fixes them, but there are still problems to iron out
This commit is contained in:
fgsfds committed 2023-08-25 17:18:02 +02:00
1 parent 87529f37c8
commit 4ab1e08129
5 files changed
+95 -26

No files matched your search

-26
View File
@@ -361,33 +361,7 @@ void schedResetArtifacts(void)
void schedUpdatePendingArtifacts(void)
{
struct artifact *artifacts = schedGetPendingArtifacts();
s32 i;
for (i = 0; i < MAX_ARTIFACTS; i++) {
struct artifact *artifact = &artifacts[i];
if (artifact->type != ARTIFACTTYPE_FREE) {
u16 *unk08 = artifact->unk08;
u16 value08 = unk08[0];
if (g_SchedSpecialArtifactIndexes[g_SchedPendingArtifactsIndex] == 1) {
u16 *unk0c = artifact->unk0c.u16p;
u16 value0c = unk0c[0];
if (value0c > value08) {
artifact->unk02 = value08;
} else {
artifact->unk02 = value0c;
}
} else {
artifact->unk02 = value08;
}
}
}
g_SchedSpecialArtifactIndexes[g_SchedPendingArtifactsIndex] = 0;
schedIncrementPendingArtifacts();
}