Big Door initial animation fix

This commit is contained in:
Jack Andersen 2018-06-29 15:35:43 -10:00
parent d0af2cb4f7
commit ef1f9d564c
7 changed files with 14 additions and 9 deletions

View File

@ -314,7 +314,8 @@ bool FRME::Extract(const SpecBase &dataSpec,
"bpy.context.scene.render.engine = 'CYCLES'\n"
"bpy.context.scene.world.use_nodes = True\n"
"bpy.context.scene.render.engine = 'BLENDER_GAME'\n"
"bg_node = bpy.context.scene.world.node_tree.nodes['Background']\n",
"bg_node = bpy.context.scene.world.node_tree.nodes['Background']\n"
"bg_node.inputs[1].default_value = 0.0\n",
pakRouter.getBestEntryName(entry).c_str());
int pIdx = 0;

View File

@ -27,7 +27,8 @@ void MREA::ReadBabeDeadToBlender_1_2(hecl::blender::PyOutStream& os,
os << "bpy.context.scene.render.engine = 'CYCLES'\n"
"bpy.context.scene.world.use_nodes = True\n"
"bpy.context.scene.render.engine = 'BLENDER_GAME'\n"
"bg_node = bpy.context.scene.world.node_tree.nodes['Background']\n";
"bg_node = bpy.context.scene.world.node_tree.nodes['Background']\n"
"bg_node.inputs[1].default_value = 0.0\n";
for (atUint32 s=0 ; s<2 ; ++s)
{
atUint32 lightCount = rs.readUint32Big();

View File

@ -56,7 +56,8 @@ void MREA::ReadBabeDeadToBlender_3(hecl::blender::PyOutStream& os,
os << "bpy.context.scene.render.engine = 'CYCLES'\n"
"bpy.context.scene.world.use_nodes = True\n"
"bpy.context.scene.render.engine = 'BLENDER_GAME'\n"
"bg_node = bpy.context.scene.world.node_tree.nodes['Background']\n";
"bg_node = bpy.context.scene.world.node_tree.nodes['Background']\n"
"bg_node.inputs[1].default_value = 0.0\n";
for (atUint32 s=0 ; s<4 ; ++s)
{
atUint32 lightCount = rs.readUint32Big();

View File

@ -433,8 +433,8 @@ bool CCollidableOBBTree::AABoxCollideWithLeafMoving(const COBBTree::CLeafData& l
{
d = dOut;
const CCollisionEdge& edge = x10_tree->GetEdge(edgeIdx);
if (CMetroidAreaCollider::MovingAABoxCollisionCheck_Edge(x10_tree->GetVert(edge.GetVertIndex1()),
x10_tree->GetVert(edge.GetVertIndex2()),
if (CMetroidAreaCollider::MovingAABoxCollisionCheck_Edge(surf.GetVert(k),
surf.GetVert((k + 1) % 3),
components.x0_edges, dir, d, normal, point) &&
d < dOut)
{

View File

@ -2006,7 +2006,7 @@ CFrontEndUI::CFrontEndUI()
m->ResetGameState();
g_GameState->SetCurrentWorldId(g_ResFactory->TranslateOriginalToNew(g_DefaultWorldTag.id));
g_GameState->CurrentWorldState().SetAreaId(8);
g_GameState->CurrentWorldState().SetAreaId(26);
g_GameState->GameOptions().ResetToDefaults();
g_GameState->WriteBackupBuf();

View File

@ -29,7 +29,7 @@ CScriptDoor::CScriptDoor(TUniqueId uid, std::string_view name, const CEntityInfo
const zeus::CTransform& xf, CModelData&& mData, const CActorParameters& actParms,
const zeus::CVector3f& orbitPos, const zeus::CAABox& aabb, bool active,
bool open, bool projectilesCollide, float animLen, bool ballDoor)
: CPhysicsActor(uid, active, name, info, xf, std::move(mData), MakeDoorMaterialList(open),
: CPhysicsActor(uid, active, name, info, xf, std::move(mData), MakeDoorMaterialList(open),
aabb, SMoverData(1.f), actParms, 0.3f, 0.1f)
{
x258_animLen = animLen;
@ -65,6 +65,8 @@ zeus::CVector3f CScriptDoor::GetOrbitPosition(const CStateManager& /*mgr*/) cons
/* ORIGINAL 0-00 OFFSET: 8007E550 */
void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager &mgr)
{
if (msg == EScriptObjectMessage::Start)
printf("");
switch (msg)
{
case EScriptObjectMessage::Close:
@ -133,7 +135,7 @@ void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat
OpenDoor(uid, mgr);
break;
default:
x2a8_25_wasOpen= false;
x2a8_25_wasOpen = false;
x2a8_24_closing = true;
break;
}

View File

@ -494,7 +494,7 @@ CEntity* ScriptLoader::LoadDoor(CStateManager& mgr, CInputStream& in, int propCo
return nullptr;
CModelData mData =
CAnimRes(aParms.GetACSFile(), aParms.GetCharacter(), head.x40_scale, aParms.GetInitialAnimation(), false);
CAnimRes(aParms.GetACSFile(), aParms.GetCharacter(), head.x40_scale, 0, false);
if (collisionExtent.isZero())
aabb = mData.GetBounds(head.x10_transform.getRotation());