2016-04-27 19:59:38 +00:00
|
|
|
#include "CScriptSpecialFunction.hpp"
|
|
|
|
#include "Character/CModelData.hpp"
|
|
|
|
#include "CActorParameters.hpp"
|
2016-12-19 18:27:58 +00:00
|
|
|
#include "Audio/CSfxManager.hpp"
|
2017-01-15 03:07:01 +00:00
|
|
|
#include "TCastTo.hpp"
|
2017-02-18 02:19:50 +00:00
|
|
|
#include "GameGlobalObjects.hpp"
|
|
|
|
#include "CGameState.hpp"
|
|
|
|
#include "CStateManager.hpp"
|
2016-04-27 19:59:38 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
CScriptSpecialFunction::CScriptSpecialFunction(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
2016-12-19 18:27:58 +00:00
|
|
|
const zeus::CTransform& xf, ESpecialFunction func,
|
|
|
|
const std::string& lcName, float radius, float f2, float f3, float f4,
|
|
|
|
const zeus::CVector3f& vec, const zeus::CColor& col, bool active,
|
|
|
|
const CDamageInfo& dInfo, ResId aId1, ResId aId2, ResId aId3, s16 sId1,
|
|
|
|
s16 sId2, s16 sId3)
|
2016-09-02 15:26:29 +00:00
|
|
|
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(), CActorParameters::None(),
|
|
|
|
kInvalidUniqueId)
|
2016-12-19 18:27:58 +00:00
|
|
|
, xe8_function(func)
|
|
|
|
, xec_locatorName(lcName)
|
|
|
|
, xfc_radius(radius)
|
|
|
|
, x100_(f2)
|
|
|
|
, x104_(f3)
|
|
|
|
, x108_(f4)
|
|
|
|
, x10c_(vec)
|
|
|
|
, x118_(col)
|
|
|
|
, x11c_damageInfo(dInfo)
|
|
|
|
, x170_(CSfxManager::TranslateSFXID(sId1))
|
|
|
|
, x172_(CSfxManager::TranslateSFXID(sId2))
|
|
|
|
, x174_(CSfxManager::TranslateSFXID(sId3))
|
|
|
|
, x1bc_(aId1)
|
|
|
|
, x1c0_(aId2)
|
|
|
|
, x1c4_(aId3)
|
2016-04-27 19:59:38 +00:00
|
|
|
{
|
2017-01-25 04:40:19 +00:00
|
|
|
x1e4_26_ = true;
|
2016-12-19 18:27:58 +00:00
|
|
|
if (xe8_function == ESpecialFunction::HUDTarget)
|
|
|
|
x1c8_ = {{zeus::CVector3f(-1.f), zeus::CVector3f(1.f)}};
|
|
|
|
}
|
|
|
|
|
2017-01-15 03:07:01 +00:00
|
|
|
void CScriptSpecialFunction::Accept(IVisitor& visitor)
|
|
|
|
{
|
|
|
|
visitor.Visit(this);
|
|
|
|
}
|
|
|
|
|
2016-12-19 18:27:58 +00:00
|
|
|
void CScriptSpecialFunction::Think(float, CStateManager &)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager &)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-02-11 00:52:52 +00:00
|
|
|
void CScriptSpecialFunction::PreRender(CStateManager &, const zeus::CFrustum &)
|
2016-12-19 18:27:58 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptSpecialFunction::AddToRenderer(const zeus::CFrustum &, const CStateManager &) const
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptSpecialFunction::Render(const CStateManager &) const
|
|
|
|
{
|
|
|
|
|
2016-04-27 19:59:38 +00:00
|
|
|
}
|
2017-02-18 02:19:50 +00:00
|
|
|
|
|
|
|
void CScriptSpecialFunction::SkipCinematic(CStateManager& stateMgr)
|
|
|
|
{
|
|
|
|
SendScriptMsgs(EScriptObjectState::Zero, stateMgr, EScriptObjectMessage::None);
|
|
|
|
stateMgr.SetSkipCinematicSpecialFunction(kInvalidUniqueId);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CScriptSpecialFunction::ShouldSkipCinematic(CStateManager& stateMgr) const
|
|
|
|
{
|
|
|
|
return g_GameState->SystemOptions().GetCinematicState(stateMgr.GetWorld()->IGetWorldAssetId(), GetEditorId());
|
|
|
|
}
|
|
|
|
|
2016-04-27 19:59:38 +00:00
|
|
|
}
|