...
 
Commits (2)
......@@ -112,7 +112,7 @@ void CScriptActorRotate::UpdateActors(bool next, CStateManager& mgr) {
auto search = mgr.GetIdListForScript(conn.x8_objId);
for (auto it = search.first; it != search.second; ++it) {
if (const TCastToConstPtr<CActor> act = mgr.ObjectById(it->second)) {
x48_actors[it->second] = act->GetTransform().getRotation();
x48_actors.insert_or_assign(it->second, act->GetTransform().getRotation());
}
}
}
......
......@@ -15,18 +15,18 @@ CScriptSpawnPoint::CScriptSpawnPoint(TUniqueId uid, std::string_view name, const
bool defaultSpawn, bool active, bool morphed)
: CEntity(uid, info, active, name), x34_xf(xf), x64_itemCounts(itemCounts) {
#ifndef NDEBUG
x64_itemCounts[int(CPlayerState::EItemType::MorphBall)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::MorphBallBombs)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::PhazonSuit)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::ThermalVisor)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::XRayVisor)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::GrappleBeam)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::BoostBall)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::ChargeBeam)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::PowerBombs)] = 8;
x64_itemCounts[int(CPlayerState::EItemType::SpaceJumpBoots)] = 1;
x64_itemCounts[int(CPlayerState::EItemType::Missiles)] =
std::max(x64_itemCounts[int(CPlayerState::EItemType::Missiles)], u32(5));
x64_itemCounts[size_t(CPlayerState::EItemType::MorphBall)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::MorphBallBombs)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::PhazonSuit)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::ThermalVisor)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::XRayVisor)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::GrappleBeam)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::BoostBall)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::ChargeBeam)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::PowerBombs)] = 8;
x64_itemCounts[size_t(CPlayerState::EItemType::SpaceJumpBoots)] = 1;
x64_itemCounts[size_t(CPlayerState::EItemType::Missiles)] =
std::max(x64_itemCounts[size_t(CPlayerState::EItemType::Missiles)], u32(5));
#endif
x10c_24_firstSpawn = defaultSpawn;
x10c_25_morphed = morphed;
......@@ -77,8 +77,8 @@ void CScriptSpawnPoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objI
}
u32 CScriptSpawnPoint::GetPowerup(CPlayerState::EItemType item) const {
const auto idx = static_cast<int>(item);
if (item >= CPlayerState::EItemType::Max || idx < 0) {
const auto idx = static_cast<size_t>(item);
if (item >= CPlayerState::EItemType::Max) {
return x64_itemCounts.front();
}
return x64_itemCounts[idx];
......