-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OoT] Fixed door upgrade #287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
fast64_internal/oot/oot_upgrade.py
Outdated
for obj in bpy.data.objects: | ||
if obj.type == "EMPTY" and obj.ootEmptyType == "Room" and actorObj in obj.children_recursive: | ||
transActorProp.fromRoom = obj | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't this break existing blends where the fromRoom isn't the room the empty is parented to?
I have such blends
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed now
fast64_internal/oot/oot_upgrade.py
Outdated
if "dontTransition" in transActorProp: | ||
transActorProp.isRoomTransition = transActorProp["dontTransition"] == False | ||
del transActorProp["dontTransition"] | ||
elif transActorProp.fromRoom is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the second block under an else now? (elif)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this case is most likely impossible but I thought the for loop may not find an object to set to transActorProp.fromRoom
, so if this is still None
on the block you highlighted it will raise an error (I think I should just assert this idk)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean if "dontTransition" in transActorProp:
is likely to pass if upgrading a blend
then that means transActorProp.toRoom
won't be set based on upgrading from transActorProp["roomIndex"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw which previous PR is this a fix for
PR #243 |
test blend made using fast64 9637bc4 (before #243): test_door_props.zip There are three rooms and 5 doors. "Door Actor XY" means "from room X to room Y". the ones with X==Y have "dontTransition" set. Exporting with 9637bc4 (before #243)c TransitionActorEntry test_door_props_scene_header00_transitionActors[] = {
// Wooden Door
{
/* Room & Cam Index (Front, Back) */ { 255, 0x00, 1, 0x00 },
/* Actor ID */ ACTOR_EN_DOOR,
/* Position */ { 130, -120, -406 },
/* Rotation Y */ DEG_TO_BINANG(0.000),
/* Parameters */ 0x0000
},
// Wooden Door
{
/* Room & Cam Index (Front, Back) */ { 1, 0x00, 2, 0x00 },
/* Actor ID */ ACTOR_EN_DOOR,
/* Position */ { -129, -120, -502 },
/* Rotation Y */ DEG_TO_BINANG(180.000),
/* Parameters */ 0x0000
},
// Wooden Door
{
/* Room & Cam Index (Front, Back) */ { 255, 0x00, 2, 0x00 },
/* Actor ID */ ACTOR_EN_DOOR,
/* Position */ { 119, -120, -596 },
/* Rotation Y */ DEG_TO_BINANG(0.000),
/* Parameters */ 0x0000
},
// Wooden Door
{
/* Room & Cam Index (Front, Back) */ { 0, 0x00, 1, 0x00 },
/* Actor ID */ ACTOR_EN_DOOR,
/* Position */ { -67, -120, -302 },
/* Rotation Y */ DEG_TO_BINANG(180.000),
/* Parameters */ 0x0000
},
// Wooden Door
{
/* Room & Cam Index (Front, Back) */ { 255, 0x00, 0, 0x00 },
/* Actor ID */ ACTOR_EN_DOOR,
/* Position */ { 127, -120, -173 },
/* Rotation Y */ DEG_TO_BINANG(0.000),
/* Parameters */ 0x0000
},
}; opening any door writes
in game logs opening "dontTransition" doors softlocks Link (can't move after link has passed the door) opening doors between rooms works as expected Loading blend with 84967dc (current main)props are basically not upgraded because of missing bpy import lol Loading blend with 9b17409 (from this PR, #287)props are mostly upgraded, besides "room to transition to". I believe this is a bug I commented on here #287 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
props are properly upgraded in the previous test blend and the code looks good
It was lacking a simple condition (and an import somehow)