mirror of https://github.com/AxioDL/metaforce.git
Needless copy construction avoidance
This commit is contained in:
parent
8537ea5d8d
commit
519a07b7e7
|
@ -38,7 +38,7 @@ CStateManager::CStateManager(const std::weak_ptr<CScriptMailbox>&,
|
|||
{
|
||||
x904_loaderFuncs[int(EScriptObjectType::Actor)] = ScriptLoader::LoadActor;
|
||||
x904_loaderFuncs[int(EScriptObjectType::Waypoint)] = ScriptLoader::LoadWaypoint;
|
||||
x904_loaderFuncs[int(EScriptObjectType::DoorArea)] = ScriptLoader::LoadDoor;
|
||||
x904_loaderFuncs[int(EScriptObjectType::Door)] = ScriptLoader::LoadDoor;
|
||||
x904_loaderFuncs[int(EScriptObjectType::Trigger)] = ScriptLoader::LoadTrigger;
|
||||
x904_loaderFuncs[int(EScriptObjectType::Timer)] = ScriptLoader::LoadTimer;
|
||||
x904_loaderFuncs[int(EScriptObjectType::Counter)] = ScriptLoader::LoadCounter;
|
||||
|
|
|
@ -96,7 +96,7 @@ static zeus::CAABox GetCollisionBox(CStateManager& stateMgr, TAreaId id,
|
|||
const zeus::CVector3f& extent, const zeus::CVector3f& offset)
|
||||
{
|
||||
zeus::CAABox box(-extent * 0.5f + offset, extent * 0.5f + offset);
|
||||
zeus::CTransform rot = stateMgr.GetWorld()->GetGameAreas()[id]->GetTransform().getRotation();
|
||||
const zeus::CTransform& rot = stateMgr.GetWorld()->GetGameAreas()[id]->GetTransform().getRotation();
|
||||
return box.getTransformedAABox(rot);
|
||||
}
|
||||
|
||||
|
@ -455,7 +455,7 @@ CEntity* ScriptLoader::LoadTrigger(CStateManager& mgr, CInputStream& in,
|
|||
|
||||
zeus::CAABox box(-extent * 0.5f, extent * 0.5f);
|
||||
|
||||
zeus::CTransform areaXf = mgr.GetWorld()->GetGameAreas()[info.GetAreaId()]->GetTransform();
|
||||
const zeus::CTransform& areaXf = mgr.GetWorld()->GetGameAreas()[info.GetAreaId()]->GetTransform();
|
||||
zeus::CVector3f orientedForce = areaXf.m_basis * forceVec;
|
||||
|
||||
return new CScriptTrigger(mgr.AllocateUniqueId(), *name, info, position, box, dInfo,
|
||||
|
|
|
@ -8,7 +8,7 @@ enum class EScriptObjectType
|
|||
{
|
||||
Actor = 0x00,
|
||||
Waypoint = 0x02,
|
||||
DoorArea = 0x03,
|
||||
Door = 0x03,
|
||||
Trigger = 0x04,
|
||||
Timer = 0x05,
|
||||
Counter = 0x06,
|
||||
|
|
Loading…
Reference in New Issue