forked from Ports/perfect_dark
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:
1 parent
87529f37c8
commit
4ab1e08129
5 files changed
+95
-26
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user