mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 05:25:01 +03:00
fix Sector Z box bug
This commit is contained in:
parent
3ae035d8e3
commit
e99e0f5e2d
@ -611,6 +611,11 @@ void SectorZ_UpdateEvents(ActorAllRange* this) {
|
||||
gActors[3].state = 2;
|
||||
|
||||
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
|
||||
#ifdef AVOID_UB
|
||||
if (gActors[i].obj.status == OBJ_FREE) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
gActors[i].aiIndex = -1;
|
||||
gActors[i].state = 3;
|
||||
}
|
||||
@ -1893,7 +1898,13 @@ void SectorZ_LoadLevelObjects(void) {
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 50, actor = &gActors[j], i = 0; i < 1000; i++) {
|
||||
if (CVarGetInteger("gSzActorFix", 0) == 1) {
|
||||
j = 47;
|
||||
} else {
|
||||
j = 50;
|
||||
}
|
||||
|
||||
for (actor = &gActors[j], i = 0; i < 1000; i++) {
|
||||
if (gLevelObjects[i].id <= OBJ_INVALID) {
|
||||
break;
|
||||
}
|
||||
@ -1911,7 +1922,7 @@ void SectorZ_LoadLevelObjects(void) {
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
actor->itemDrop = DROP_SILVER_RING;
|
||||
|
||||
if (j++ >= ARRAY_COUNT(gActors)) {
|
||||
if (j++ >= 59) {
|
||||
break;
|
||||
}
|
||||
actor++;
|
||||
|
@ -3492,12 +3492,14 @@ void Macbeth_MaRailwaySignal_Draw(MaRailwaySignal* this) {
|
||||
Vec3f frameTable[50];
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
// Lever
|
||||
Animation_GetFrameData(&D_MA_602F2E0, 0, frameTable);
|
||||
Animation_DrawSkeleton(1, D_MA_602F36C, frameTable, Macbeth_MaRailwaySignal_OverrideLimbDraw1, NULL, this,
|
||||
&gIdentityMatrix);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Animation_GetFrameData(&D_MA_602F098, 0, frameTable);
|
||||
// Base
|
||||
Animation_DrawSkeleton(1, D_MA_602F264, frameTable, Macbeth_MaRailwaySignal_OverrideLimbDraw2, NULL, this,
|
||||
&gIdentityMatrix);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
|
@ -461,6 +461,10 @@ void DrawEnhancementsMenu() {
|
||||
.tooltip = "Fixes a camera bug found in the code of the game"
|
||||
});
|
||||
|
||||
UIWidgets::CVarCheckbox("Sector Z: Spawn all actors", "gSzActorFix", {
|
||||
.tooltip = "Fixes a bug found in Sector Z, where only 10 of 12 available actors are spawned, this causes two 'Space Junk Boxes' to be missing from the level."
|
||||
});
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user