1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 14:37:44 +00:00

Fix instance rotation and sastasha workaround

This commit is contained in:
Rushi 2022-02-15 02:27:18 +01:00
commit 4d9717ed46
2 changed files with 10 additions and 2 deletions

View file

@ -3,6 +3,7 @@
#include <Manager/RNGMgr.h>
#include <Actor/EventObject.h>
#include <Actor/Player.h>
#include <Actor/BNpc.h>
using namespace Sapphire;
@ -165,7 +166,7 @@ public:
nullptr, getId() );
}
// TODO: set Seq3
// TODO: set Seq3 and SeqFinish
// Pick up key and progress duty
if( eobj.getName() == "Captainsquarterskey" )
@ -212,6 +213,10 @@ public:
void onLeaveTerritory( InstanceContent& instance, Entity::Player& player ) override
{
// TODO: Set seq properly once bosses work
if( instance.getDirectorVar( 0 ) == Seq4 )
instance.setVar( 0, SeqFinish );
if( instance.getDirectorVar( 0 ) != SeqFinish )
return;

View file

@ -469,7 +469,10 @@ void Sapphire::InstanceContent::onBeforePlayerZoneIn( Sapphire::Entity::Player&
if( m_pEntranceEObj != nullptr )
{
player.setRot( m_pEntranceEObj->getRot() );
if( rect )
player.setRot( Util::eulerToDirection( { rect->header.transform.rotation.x, rect->header.transform.rotation.y, rect->header.transform.rotation.z } ) );
else
player.setRot( PI );
player.setPos( m_pEntranceEObj->getPos() );
}
else if( rect )