2016-04-20 21:07:18 +00:00
|
|
|
#include "CScriptDock.hpp"
|
|
|
|
#include "CActorParameters.hpp"
|
|
|
|
#include "Character/CModelData.hpp"
|
|
|
|
#include "Collision/CMaterialList.hpp"
|
2016-12-22 02:48:22 +00:00
|
|
|
#include "CWorld.hpp"
|
|
|
|
#include "CStateManager.hpp"
|
2016-04-20 21:07:18 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
CMaterialList MakeDockMaterialList()
|
|
|
|
{
|
|
|
|
CMaterialList list;
|
2016-12-29 21:38:59 +00:00
|
|
|
list.Add(EMaterialTypes::Trigger);
|
|
|
|
list.Add(EMaterialTypes::Immovable);
|
|
|
|
list.Add(EMaterialTypes::AIBlock);
|
2016-04-20 21:07:18 +00:00
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
2016-09-01 09:31:18 +00:00
|
|
|
CScriptDock::CScriptDock(TUniqueId uid, const std::string &name, const CEntityInfo &info,
|
|
|
|
const zeus::CVector3f position, const zeus::CVector3f& extents, s32 dock, TAreaId area,
|
|
|
|
bool active, s32 w1, bool b1)
|
2016-04-20 21:07:18 +00:00
|
|
|
: CPhysicsActor(uid, active, name, info, zeus::CTransform(zeus::CMatrix3f::skIdentityMatrix3f, position),
|
2016-09-01 09:31:18 +00:00
|
|
|
CModelData::CModelDataNull(), MakeDockMaterialList(), zeus::CAABox(-extents * 0.5f, extents * 0.5f),
|
|
|
|
SMoverData(1.f), CActorParameters::None(), 0.3f, 0.1f),
|
2016-04-20 21:07:18 +00:00
|
|
|
x258_(w1),
|
|
|
|
x25c_dock(dock),
|
|
|
|
x260_area(area),
|
|
|
|
x264_(3)
|
|
|
|
{
|
|
|
|
x268_24_ = false;
|
|
|
|
x268_25_ = b1;
|
|
|
|
x268_26_ = false;
|
|
|
|
}
|
2016-12-22 02:48:22 +00:00
|
|
|
|
|
|
|
void CScriptDock::AreaLoaded(CStateManager & mgr)
|
|
|
|
{
|
|
|
|
SetLoadConnected(mgr, x268_25_);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptDock::SetLoadConnected(CStateManager& mgr, bool loadOther)
|
|
|
|
{
|
|
|
|
IGameArea::Dock* dock = mgr.GetWorld()->GetArea(x260_area)->DockNC(x25c_dock);
|
|
|
|
}
|
2016-04-20 21:07:18 +00:00
|
|
|
}
|