mirror of https://github.com/AxioDL/metaforce.git
Various movement and HUD bug fixes
This commit is contained in:
parent
1bb7e882a0
commit
1c44f8d1bc
|
@ -1,5 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
|
||||
if(APPLE AND NOT CMAKE_OSX_SYSROOT)
|
||||
# If the Xcode SDK is lagging behind system version, CMake needs this done first
|
||||
execute_process(COMMAND xcrun --show-sdk-path
|
||||
OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
project(urde)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
|
|
@ -410,7 +410,7 @@ void CPlayerState::InitializePowerUp(CPlayerState::EItemType type, u32 capacity)
|
|||
return;
|
||||
|
||||
CPowerUp& pup = x24_powerups[(u32)type];
|
||||
pup.x0_amount = zeus::clamp(u32(0), pup.x4_capacity + capacity, PowerUpMaxValues[u32(type)]);
|
||||
pup.x4_capacity = zeus::clamp(u32(0), pup.x4_capacity + capacity, PowerUpMaxValues[u32(type)]);
|
||||
pup.x0_amount = std::min(pup.x0_amount, pup.x4_capacity);
|
||||
if (type >= EItemType::PowerSuit && type <= EItemType::PhazonSuit)
|
||||
{
|
||||
|
|
|
@ -437,6 +437,8 @@ void CStateManager::SetActorAreaId(CActor& actor, TAreaId aid)
|
|||
area->GetAreaObjects()->RemoveObject(actor.GetUniqueId());
|
||||
}
|
||||
|
||||
actor.x4_areaId = aid;
|
||||
|
||||
if (aid == kInvalidAreaId)
|
||||
return;
|
||||
CGameArea* area = x850_world->GetArea(aid);
|
||||
|
@ -1825,6 +1827,13 @@ void CStateManager::ProcessInput(const CFinalInput& input)
|
|||
x870_cameraManager->ProcessInput(input, *this);
|
||||
}
|
||||
|
||||
void CStateManager::UpdateGraphicsTiming(float dt)
|
||||
{
|
||||
xf14_curTimeMod900 += dt;
|
||||
if (xf14_curTimeMod900 > 900.f)
|
||||
xf14_curTimeMod900 -= 900.f;
|
||||
}
|
||||
|
||||
void CStateManager::Update(float dt)
|
||||
{
|
||||
CElementGen::SetGlobalSeed(x8d8_updateFrameIdx);
|
||||
|
@ -1832,10 +1841,6 @@ void CStateManager::Update(float dt)
|
|||
CDecal::SetGlobalSeed(x8d8_updateFrameIdx);
|
||||
CProjectileWeapon::SetGlobalSeed(x8d8_updateFrameIdx);
|
||||
|
||||
xf14_curTimeMod900 += dt;
|
||||
if (xf14_curTimeMod900 > 900.f)
|
||||
xf14_curTimeMod900 -= 900.f;
|
||||
|
||||
xf08_pauseHudMessage = {};
|
||||
|
||||
CScriptEffect::ResetParticleCounts();
|
||||
|
|
|
@ -329,6 +329,7 @@ public:
|
|||
void SetGameState(EGameState state);
|
||||
EGameState GetGameState() const { return x904_gameState; }
|
||||
void ProcessInput(const CFinalInput& input);
|
||||
void UpdateGraphicsTiming(float dt);
|
||||
void Update(float dt);
|
||||
void UpdateGameState();
|
||||
void UpdateHintState(float dt);
|
||||
|
|
|
@ -606,7 +606,7 @@ void CBallCamera::CheckFailsafe(float dt, CStateManager& mgr)
|
|||
else
|
||||
{
|
||||
x18c_31_clearLOS = true;
|
||||
x350_obscuringMaterial = CMaterialList(EMaterialTypes::Unknown);
|
||||
x350_obscuringMaterial = CMaterialList(EMaterialTypes::NoStepLogic);
|
||||
}
|
||||
|
||||
if (!x18c_31_clearLOS)
|
||||
|
|
|
@ -149,7 +149,7 @@ private:
|
|||
float x330_clearColliderThreshold = 0.2f;
|
||||
zeus::CAABox x334_collidersAABB = zeus::CAABox::skNullBox;
|
||||
float x34c_obscuredTime = 0.f;
|
||||
CMaterialList x350_obscuringMaterial = {EMaterialTypes::Unknown};
|
||||
CMaterialList x350_obscuringMaterial = {EMaterialTypes::NoStepLogic};
|
||||
float x358_unobscureMag = 0.f;
|
||||
zeus::CVector3f x35c_splineIntermediatePos;
|
||||
TUniqueId x368_obscuringObjectId = kInvalidUniqueId;
|
||||
|
@ -158,7 +158,7 @@ private:
|
|||
float x374_splineCtrl = 0.f;
|
||||
float x378_splineCtrlRange;
|
||||
CCameraSpline x37c_camSpline;
|
||||
CMaterialList x3c8_collisionExcludeList = {EMaterialTypes::Unknown};
|
||||
CMaterialList x3c8_collisionExcludeList = {EMaterialTypes::NoStepLogic};
|
||||
bool x3d0_24_camBehindFloorOrWall : 1;
|
||||
float x3d4_elevInterpTimer = 0.f;
|
||||
float x3d8_elevInterpStart = 0.f;
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace urde
|
|||
CGameCamera::CGameCamera(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, float fovy, float znear, float zfar, float aspect,
|
||||
TUniqueId watchedId, bool disableInput, u32 controllerIdx)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_watchedObject(watchedId)
|
||||
, x12c_(xf)
|
||||
|
|
|
@ -317,7 +317,7 @@ bool CActorLights::BuildAreaLightList(const CStateManager& mgr, const CGameArea&
|
|||
std::sort(valList.begin(), valList.end(),
|
||||
[](const SLightValue& a, const SLightValue& b)
|
||||
{
|
||||
return a.x10_colorMag >= b.x10_colorMag;
|
||||
return a.x10_colorMag > b.x10_colorMag;
|
||||
});
|
||||
|
||||
if (x298_27_findShadowLight)
|
||||
|
@ -333,12 +333,12 @@ bool CActorLights::BuildAreaLightList(const CStateManager& mgr, const CGameArea&
|
|||
}
|
||||
|
||||
/* Ambient color for overflow area lights */
|
||||
zeus::CColor overflowAmbColor;
|
||||
zeus::CColor overflowAmbColor = zeus::CColor::skClear;
|
||||
|
||||
/* Averaged light for overflow area lights */
|
||||
CLight overflowLight = CLight::BuildCustom(zeus::CVector3f::skZero, zeus::CVector3f::skZero, zeus::CColor::skBlack,
|
||||
0.f, 0.f, 0.f, 0.f, 0.f, 0.f);
|
||||
zeus::CColor overflowLightColor;
|
||||
zeus::CColor overflowLightColor = zeus::CColor::skClear;
|
||||
float overflowMag = 0.f;
|
||||
|
||||
/* Max significant lights */
|
||||
|
|
|
@ -18,7 +18,7 @@ class CActorLights
|
|||
static s32 sFrameSchedulerCount;
|
||||
std::vector<CLight> x0_areaLights;
|
||||
std::vector<CLight> x144_dynamicLights;
|
||||
zeus::CColor x288_ambientColor;
|
||||
zeus::CColor x288_ambientColor = zeus::CColor::skBlack;
|
||||
TAreaId x294_aid = kInvalidAreaId;
|
||||
|
||||
union
|
||||
|
|
|
@ -398,7 +398,7 @@ void CGroundMovement::MoveGroundCollider_New(CStateManager& mgr, CPhysicsActor&
|
|||
float stepUp = player.GetStepUpHeight();
|
||||
|
||||
bool doStepDown = true;
|
||||
CMaterialList material(EMaterialTypes::Unknown);
|
||||
CMaterialList material(EMaterialTypes::NoStepLogic);
|
||||
SMoveObjectResult result;
|
||||
|
||||
if (!startingJump)
|
||||
|
@ -437,7 +437,8 @@ void CGroundMovement::MoveGroundCollider_New(CStateManager& mgr, CPhysicsActor&
|
|||
CMaterialList material2 = MoveObjectAnalytical(mgr, actor, dt, useNearList, cache, opts, result);
|
||||
CPhysicsState physStatePost = actor.GetPhysicsState();
|
||||
|
||||
if (material2.XOR({EMaterialTypes::Unknown}))
|
||||
/* NoStepLogic must be the only set material bit to bypass step logic */
|
||||
if (material2.XOR({EMaterialTypes::NoStepLogic}))
|
||||
{
|
||||
SMovementOptions optsCopy = opts;
|
||||
zeus::CVector3f postToPre = physStatePre.GetTranslation() - physStatePost.GetTranslation();
|
||||
|
@ -802,11 +803,10 @@ CMaterialList CGroundMovement::MoveObjectAnalytical(CStateManager& mgr, CPhysics
|
|||
{
|
||||
if (actor.x15c_force.canBeNormalized())
|
||||
{
|
||||
zeus::CVector3f prevForce = actor.x15c_force;
|
||||
actor.x15c_force = CGroundMovement::CollisionDamping(actor.x15c_force,
|
||||
actor.x15c_force.normalized(),
|
||||
collisionNorm, 0.f, 1.f);
|
||||
if (actor.x15c_force.z < -1000000.f)
|
||||
printf("");
|
||||
}
|
||||
if (actor.x150_momentum.canBeNormalized())
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace urde
|
|||
{
|
||||
enum class EMaterialTypes
|
||||
{
|
||||
Unknown = 0,
|
||||
NoStepLogic = 0,
|
||||
Stone = 1,
|
||||
Metal = 2,
|
||||
Grass = 3,
|
||||
|
@ -27,7 +27,7 @@ enum class EMaterialTypes
|
|||
Sand = 17,
|
||||
ProjectilePassthrough = 18,
|
||||
Solid = 19,
|
||||
Twenty = 20,
|
||||
NoPlatformCollision = 20,
|
||||
CameraPassthrough = 21,
|
||||
Wood = 22,
|
||||
Organic = 23,
|
||||
|
|
|
@ -664,6 +664,11 @@ bool CMetroidAreaCollider::MovingAABoxCollisionCheck_BoxVertexTri(const CCollisi
|
|||
{
|
||||
pointOut = float(d) * dir + point;
|
||||
normalOut = surf.GetNormal();
|
||||
if (normalOut.z > 100.f)
|
||||
{
|
||||
printf("");
|
||||
normalOut = surf.GetNormal();
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ CBooModel::CBooModel(TToken<CModel>& token, CModel* parent, std::vector<CBooSurf
|
|||
{
|
||||
u32 matId = it->m_data.matIdx;
|
||||
const MaterialSet::Material& matData = GetMaterialByIndex(matId);
|
||||
if (matData.flags.depthSorting())
|
||||
if (matData.flags.depthSorting() || matData.heclIr.m_doAlpha)
|
||||
{
|
||||
it->m_next = x3c_firstSortedSurface;
|
||||
x3c_firstSortedSurface = &*it;
|
||||
|
|
|
@ -71,13 +71,13 @@ void CGuiFrame::EnableLights(u32 lights, CBooModel& model) const
|
|||
}
|
||||
if ((lights & (1 << idx)) != 0)
|
||||
{
|
||||
const zeus::CColor& geomCol = light->GetGeometryColor();
|
||||
if (geomCol.r || geomCol.g || geomCol.b)
|
||||
{
|
||||
//const zeus::CColor& geomCol = light->GetGeometryColor();
|
||||
//if (geomCol.r || geomCol.g || geomCol.b)
|
||||
//{
|
||||
//CGraphics::LoadLight(lightId, light->BuildLight());
|
||||
lightsOut.push_back(light->BuildLight());
|
||||
CGraphics::EnableLight(lightId);
|
||||
}
|
||||
//}
|
||||
// accumulate ambient color
|
||||
ambColor += light->GetAmbientLightColor();
|
||||
}
|
||||
|
|
|
@ -33,6 +33,10 @@ CIOWin::EMessageReturn CMFGame::OnMessage(const CArchitectureMessage& msg, CArch
|
|||
bool wasInitialized = x2a_24_initialized;
|
||||
x2a_24_initialized = true;
|
||||
float dt = MakeMsg::GetParmTimerTick(msg).x4_parm;
|
||||
|
||||
/* URDE addition: this is continuously updated for animated UVs even when game paused */
|
||||
x14_stateManager->UpdateGraphicsTiming(dt);
|
||||
|
||||
switch (x1c_flowState)
|
||||
{
|
||||
case EGameFlowState::CinematicSkip:
|
||||
|
|
|
@ -825,9 +825,10 @@ void CSamusHud::UpdateHudDynamicLights(float dt, const CStateManager& mgr)
|
|||
return;
|
||||
x33c_lights->BuildAreaLightList(mgr, *mgr.GetWorld()->GetAreaAlways(playerArea), camAABB);
|
||||
for (SCachedHudLight& light : x340_hudLights)
|
||||
if ((light.x0_pos - fpCam->GetTranslation()).normalized().dot(lookDir) > 0.15707964f)
|
||||
if (!IsCachedLightInAreaLights(light, *x33c_lights))
|
||||
light.x1c_fader *= -1.f;
|
||||
if (light.x1c_fader > 0.f &&
|
||||
((light.x0_pos - fpCam->GetTranslation()).normalized().dot(lookDir) <= 0.15707964f ||
|
||||
!IsCachedLightInAreaLights(light, *x33c_lights)))
|
||||
light.x1c_fader *= -1.f;
|
||||
int negCount = 0;
|
||||
for (SCachedHudLight& light : x340_hudLights)
|
||||
if (light.x1c_fader <= 0.f)
|
||||
|
@ -835,6 +836,8 @@ void CSamusHud::UpdateHudDynamicLights(float dt, const CStateManager& mgr)
|
|||
--negCount;
|
||||
for (const CLight& light : x33c_lights->GetAreaLights())
|
||||
{
|
||||
if (negCount < 1)
|
||||
break;
|
||||
if (IsAreaLightInCachedLights(light))
|
||||
continue;
|
||||
if ((light.GetPosition() - fpCam->GetTranslation()).normalized().dot(lookDir) > 0.15707964f)
|
||||
|
@ -842,6 +845,7 @@ void CSamusHud::UpdateHudDynamicLights(float dt, const CStateManager& mgr)
|
|||
int slot = FindEmptyHudLightSlot(light);
|
||||
if (slot == -1)
|
||||
continue;
|
||||
--negCount;
|
||||
SCachedHudLight& cachedLight = x340_hudLights[slot];
|
||||
cachedLight.x0_pos = light.GetPosition();
|
||||
cachedLight.xc_color = light.GetColor();
|
||||
|
@ -856,8 +860,8 @@ void CSamusHud::UpdateHudDynamicLights(float dt, const CStateManager& mgr)
|
|||
for (SCachedHudLight& light : x340_hudLights)
|
||||
{
|
||||
if (light.x1c_fader < 0.f)
|
||||
light.x1c_fader = std::max(0.f, light.x1c_fader + dt2);
|
||||
else if (light.x1c_fader < 1.f && light.x1c_fader != 0)
|
||||
light.x1c_fader = std::min(0.f, light.x1c_fader + dt2);
|
||||
else if (light.x1c_fader < 1.f && light.x1c_fader != 0.f)
|
||||
light.x1c_fader = std::min(light.x1c_fader + dt2, 1.f);
|
||||
}
|
||||
|
||||
|
@ -879,7 +883,7 @@ void CSamusHud::UpdateHudDynamicLights(float dt, const CStateManager& mgr)
|
|||
for (int i=0 ; i<3 ; ++i)
|
||||
{
|
||||
SCachedHudLight& light = x340_hudLights[i];
|
||||
CGuiLight* lightWidget = *lightIt;
|
||||
CGuiLight* lightWidget = *lightIt++;
|
||||
zeus::CVector3f lightToCam = fpCam->GetTranslation() - light.x0_pos;
|
||||
zeus::CVector3f lightNormal = fpCam->GetTransform().buildMatrix3f() * lightToCam.normalized();
|
||||
float dist = std::max(lightToCam.magnitude(), FLT_EPSILON);
|
||||
|
|
|
@ -126,7 +126,6 @@ class CSamusHud
|
|||
u32 x2d4_totalEnergyTanks = 0;
|
||||
u32 x2d8_missileAmount = 0;
|
||||
u32 x2dc_missileCapacity = 0;
|
||||
rstl::reserved_vector<SCachedHudLight, 3> x340_lights;
|
||||
|
||||
union
|
||||
{
|
||||
|
|
|
@ -188,8 +188,7 @@ for tp in CENTITY_TYPES:
|
|||
sourcef.write('''template <class T>
|
||||
void TCastToPtr<T>::Visit(%s* p)
|
||||
{
|
||||
static_assert(sizeof(T) > 0, "TCastToPtr can not cast to incomplete type");
|
||||
static_assert(!std::is_void<T>::value, "TCastToPtr can not cast to incomplete type");
|
||||
static_assert(sizeof(T) > 0 && !std::is_void<T>::value, "TCastToPtr can not cast to incomplete type");
|
||||
ptr = reinterpret_cast<T*>(std::is_convertible<%s*, T*>::value ? p : nullptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace urde
|
|||
{
|
||||
|
||||
CEffect::CEffect(TUniqueId uid, const CEntityInfo& info, bool active, std::string_view name, const zeus::CTransform& xf)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ CFishCloud::CFishCloud(TUniqueId uid, bool active, std::string_view name, const
|
|||
float f7, float f8, float f9, float f10, float f11, float f12, float f13, u32 w2,
|
||||
const zeus::CColor& color, bool b1, float f14, CAssetId part1, u32 w3, CAssetId part2, u32 w4,
|
||||
CAssetId part3, u32 w5, CAssetId part4, u32 w6, u32 w7, bool b2, bool b3)
|
||||
: CActor(uid, active, name, info, xf, std::move(mData), {EMaterialTypes::Unknown},
|
||||
: CActor(uid, active, name, info, xf, std::move(mData), {EMaterialTypes::NoStepLogic},
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
{
|
||||
|
||||
|
|
|
@ -2016,7 +2016,7 @@ void CMorphBall::CollidedWith(TUniqueId id, const CCollisionInfoList& list, CSta
|
|||
|
||||
zeus::CVector3f vel = x0_player.GetVelocity();
|
||||
float velMag = vel.magnitude();
|
||||
EMaterialTypes wakeMaterial = EMaterialTypes::Unknown;
|
||||
EMaterialTypes wakeMaterial = EMaterialTypes::NoStepLogic;
|
||||
if (velMag > 7.f && x0_player.GetFluidCounter() == 0)
|
||||
{
|
||||
bool hitWall = false;
|
||||
|
@ -2037,7 +2037,7 @@ void CMorphBall::CollidedWith(TUniqueId id, const CCollisionInfoList& list, CSta
|
|||
}
|
||||
}
|
||||
|
||||
if (wakeMaterial == EMaterialTypes::Unknown)
|
||||
if (wakeMaterial == EMaterialTypes::NoStepLogic)
|
||||
{
|
||||
if (info.GetMaterialLeft().HasMaterial(EMaterialTypes::Floor))
|
||||
{
|
||||
|
@ -2063,7 +2063,7 @@ void CMorphBall::CollidedWith(TUniqueId id, const CCollisionInfoList& list, CSta
|
|||
tmpMaterial = EMaterialTypes::Phazon;
|
||||
|
||||
wakeMaterial = tmpMaterial;
|
||||
if (tmpMaterial != EMaterialTypes::Unknown)
|
||||
if (tmpMaterial != EMaterialTypes::NoStepLogic)
|
||||
{
|
||||
int mappedIdx = skWakeEffectMap[int(tmpMaterial)];
|
||||
if (mappedIdx == 0) // Phazon
|
||||
|
@ -2098,7 +2098,7 @@ void CMorphBall::CollidedWith(TUniqueId id, const CCollisionInfoList& list, CSta
|
|||
}
|
||||
}
|
||||
|
||||
if (wakeMaterial == EMaterialTypes::Unknown && x1c0c_wakeEffectIdx != -1)
|
||||
if (wakeMaterial == EMaterialTypes::NoStepLogic && x1c0c_wakeEffectIdx != -1)
|
||||
x1bc8_wakeEffectGens[int(wakeMaterial)]->SetParticleEmission(false);
|
||||
|
||||
x1954_isProjectile = false;
|
||||
|
|
|
@ -1762,9 +1762,6 @@ void CPlayer::ProcessInput(const CFinalInput& input, CStateManager& mgr)
|
|||
if (input.ControllerIdx() != 0)
|
||||
return;
|
||||
|
||||
if (input.PLTrigger())
|
||||
Teleport(zeus::CTransform::Translate(-73.1577f, 155.273f, 0.f), mgr, true);
|
||||
|
||||
if (x2f8_morphBallState != EPlayerMorphBallState::Morphed)
|
||||
UpdateScanningState(input, mgr, input.DeltaTime());
|
||||
|
||||
|
@ -5774,9 +5771,8 @@ float CPlayer::ForwardInput(const CFinalInput& input, float turnInput) const
|
|||
zeus::CVector3f velFlat = x138_velocity;
|
||||
velFlat.z = 0.f;
|
||||
if (x3dc_inFreeLook || x3dd_lookButtonHeld)
|
||||
if (x258_movementState != EPlayerMovementState::OnGround)
|
||||
if (std::fabs(velFlat.magnitude()) < 0.00001f)
|
||||
return 0.f;
|
||||
if (x258_movementState == EPlayerMovementState::OnGround || std::fabs(velFlat.magnitude()) < 0.00001f)
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
return zeus::clamp(-1.f, forwards - backwards * g_tweakPlayer->GetBackwardsForceMultiplier(), 1.f);
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace urde
|
|||
{
|
||||
CScriptAiJumpPoint::CScriptAiJumpPoint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
zeus::CTransform& xf, bool active, float f1)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_(f1)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ CScriptCameraHint::CScriptCameraHint(TUniqueId uid, std::string_view name, const
|
|||
float fov, float attitudeRange, float azimuthRange, float anglePerSecond,
|
||||
float clampVelRange, float f9, float elevation, float f11,
|
||||
float clampVelTime, float controlInterpDur)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId), xe8_priority(priority),
|
||||
xec_hint(overrideFlags, behaviour, minDist, maxDist, backwardsDist, lookAtOffset, chaseLookAtOffset, ballToCam,
|
||||
fov, attitudeRange, azimuthRange, anglePerSecond, clampVelRange, f9, elevation, f11, clampVelTime,
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace urde
|
|||
|
||||
CScriptCameraWaypoint::CScriptCameraWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active, float hfov, u32 w1)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_hfov(hfov)
|
||||
, xec_(w1)
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace urde
|
|||
CScriptCoverPoint::CScriptCoverPoint(TUniqueId uid, std::string_view name, const CEntityInfo &info,
|
||||
zeus::CTransform xf, bool active, u32 flags, bool crouch, float horizontalAngle, float verticalAngle, float coverTime)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(),
|
||||
CMaterialList(EMaterialTypes::Unknown), CActorParameters::None(), kInvalidUniqueId),
|
||||
CMaterialList(EMaterialTypes::NoStepLogic), CActorParameters::None(), kInvalidUniqueId),
|
||||
xe8_flags(flags),
|
||||
xf4_coverTime(coverTime)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace urde
|
|||
|
||||
CScriptDebugCameraWaypoint::CScriptDebugCameraWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, u32 w1)
|
||||
: CActor(uid, true, name, info, xf, CModelData::CModelDataNull(), {EMaterialTypes::Unknown},
|
||||
: CActor(uid, true, name, info, xf, CModelData::CModelDataNull(), {EMaterialTypes::NoStepLogic},
|
||||
CActorParameters::None(), kInvalidUniqueId), xe8_w1(w1)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ CScriptPlatform::CScriptPlatform(TUniqueId uid, std::string_view name, const CEn
|
|||
{
|
||||
CActor::SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
||||
CMaterialList(EMaterialTypes::Solid),
|
||||
CMaterialList(EMaterialTypes::NoStaticCollision, EMaterialTypes::Twenty, EMaterialTypes::Platform)));
|
||||
CMaterialList(EMaterialTypes::NoStaticCollision, EMaterialTypes::NoPlatformCollision, EMaterialTypes::Platform)));
|
||||
if (x304_treeGroupContainer)
|
||||
x314_treeGroup = std::make_unique<CCollidableOBBTreeGroup>(x304_treeGroupContainer->GetObj(), x68_material);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace urde
|
|||
|
||||
CScriptPlayerHint::CScriptPlayerHint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active, u32 priority, u32 overrideFlags)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), {EMaterialTypes::Unknown},
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), {EMaterialTypes::NoStepLogic},
|
||||
CActorParameters::None(), kInvalidUniqueId), x100_priority(priority), x104_overrideFlags(overrideFlags)
|
||||
{}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ CScriptSound::CScriptSound(TUniqueId uid, std::string_view name, const CEntityIn
|
|||
u16 soundId, bool active, float maxDist, float distComp, float startDelay, u32 minVol,
|
||||
u32 vol, u32 w3, u32 prio, u32 pan, u32 w6, bool looped, bool nonEmitter, bool autoStart,
|
||||
bool occlusionTest, bool acoustics, bool worldSfx, bool allowDuplicates, s32 pitch)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xfc_startDelay(startDelay)
|
||||
, x100_soundId(CSfxManager::TranslateSFXID(soundId))
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace urde
|
|||
CScriptSpiderBallAttractionSurface::CScriptSpiderBallAttractionSurface(
|
||||
TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, const zeus::CVector3f& scale, bool active)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), {EMaterialTypes::Unknown},
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), {EMaterialTypes::NoStepLogic},
|
||||
CActorParameters::None(), kInvalidUniqueId), xe8_scale(scale),
|
||||
xf4_aabb(zeus::CAABox(scale * -0.5f, scale * 0.5f).getTransformedAABox(xf.getRotation()))
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace urde
|
|||
{
|
||||
CScriptSpiderBallWaypoint::CScriptSpiderBallWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active, u32 w1)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_(w1)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace urde
|
|||
|
||||
CScriptTargetingPoint::CScriptTargetingPoint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -148,9 +148,10 @@ void CScriptTrigger::UpdateInhabitants(float dt, CStateManager& mgr)
|
|||
}
|
||||
else
|
||||
{
|
||||
TUniqueId tmpId = it->GetObjectId();
|
||||
xe8_inhabitants.erase(it);
|
||||
sendExited = true;
|
||||
if (mgr.GetPlayer().GetUniqueId() == it->GetObjectId() && x148_28_playerTriggerProc)
|
||||
if (mgr.GetPlayer().GetUniqueId() == tmpId && x148_28_playerTriggerProc)
|
||||
{
|
||||
x148_28_playerTriggerProc = false;
|
||||
if (x148_29_didPhazonDamage)
|
||||
|
@ -168,8 +169,9 @@ void CScriptTrigger::UpdateInhabitants(float dt, CStateManager& mgr)
|
|||
}
|
||||
else
|
||||
{
|
||||
TUniqueId tmpId = it->GetObjectId();
|
||||
xe8_inhabitants.erase(it);
|
||||
if (mgr.GetPlayer().GetUniqueId() == it->GetObjectId() && x148_28_playerTriggerProc)
|
||||
if (mgr.GetPlayer().GetUniqueId() == tmpId && x148_28_playerTriggerProc)
|
||||
{
|
||||
x148_28_playerTriggerProc = false;
|
||||
if (x148_29_didPhazonDamage)
|
||||
|
|
|
@ -13,7 +13,7 @@ CScriptVisorFlare::CScriptVisorFlare(TUniqueId uid, std::string_view name, const
|
|||
bool b1, float f1, float f2, float f3, u32 w1, u32 w2,
|
||||
const std::vector<CVisorFlare::CFlareDef>& flares)
|
||||
: CActor(uid, active, name, info, zeus::CTransform::Translate(pos), CModelData::CModelDataNull(),
|
||||
CMaterialList(EMaterialTypes::Unknown), CActorParameters::None(), kInvalidUniqueId),
|
||||
CMaterialList(EMaterialTypes::NoStepLogic), CActorParameters::None(), kInvalidUniqueId),
|
||||
xe8_flare(blendMode, b1, f1, f2, f3, w1, w2, flares)
|
||||
{
|
||||
xe6_27_renderVisorFlags = 2;
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 6edce191157151ffb97d574ebd0385ff431bdfa9
|
||||
Subproject commit 0d3f9f345c43bd85cc21945dcd62566e2701a971
|
2
specter
2
specter
|
@ -1 +1 @@
|
|||
Subproject commit 9c6ace8a130802b8f9d67f74d9d6328dd46bb868
|
||||
Subproject commit ff9755bc27083b7c3bb461a27131ec7f2b886144
|
Loading…
Reference in New Issue