mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-21 14:14:22 +00:00
fix: fv mpc in the tree (#2010)
tested that it now spawns in the lower path point instead. fixes #741
This commit is contained in:
@@ -613,13 +613,14 @@ void Entity::Initialize() {
|
|||||||
|
|
||||||
if (rebuildResetTime != 0.0f) {
|
if (rebuildResetTime != 0.0f) {
|
||||||
quickBuildComponent->SetResetTime(rebuildResetTime);
|
quickBuildComponent->SetResetTime(rebuildResetTime);
|
||||||
|
}
|
||||||
|
|
||||||
// Known bug with moving platform in FV that casues it to build at the end instead of the start.
|
const auto objectID = GetObjectID();
|
||||||
// This extends the smash time so players can ride up the lift.
|
// FV tree handler for when built so it sets the state to moving at the correct time
|
||||||
if (m_TemplateID == 9483) {
|
if (GetLOT() == 9483) quickBuildComponent->AddQuickBuildCompleteCallback([objectID](Entity* user) {
|
||||||
quickBuildComponent->SetResetTime(quickBuildComponent->GetResetTime() + 25);
|
auto* const entity = Game::entityManager->GetEntity(objectID);
|
||||||
}
|
if (entity) GameMessages::SendPlatformResync(entity, UNASSIGNED_SYSTEM_ADDRESS, false, 0, 1, 1, eMovementPlatformState::Moving, true);
|
||||||
}
|
});
|
||||||
|
|
||||||
const auto activityID = GetVar<int32_t>(u"activityID");
|
const auto activityID = GetVar<int32_t>(u"activityID");
|
||||||
|
|
||||||
|
|||||||
@@ -366,18 +366,19 @@ void GameMessages::SendResetMissions(Entity* entity, const SystemAddress& sysAdd
|
|||||||
|
|
||||||
void GameMessages::SendPlatformResync(Entity* entity, const SystemAddress& sysAddr, bool bStopAtDesiredWaypoint,
|
void GameMessages::SendPlatformResync(Entity* entity, const SystemAddress& sysAddr, bool bStopAtDesiredWaypoint,
|
||||||
int iIndex, int iDesiredWaypointIndex, int nextIndex,
|
int iIndex, int iDesiredWaypointIndex, int nextIndex,
|
||||||
eMovementPlatformState movementState) {
|
eMovementPlatformState movementState, bool special) {
|
||||||
CBITSTREAM;
|
CBITSTREAM;
|
||||||
CMSGHEADER;
|
CMSGHEADER;
|
||||||
|
|
||||||
|
const auto objID = entity->GetObjectID();
|
||||||
const auto lot = entity->GetLOT();
|
const auto lot = entity->GetLOT();
|
||||||
|
|
||||||
if (lot == 12341 || lot == 5027 || lot == 5028 || lot == 14335 || lot == 14447 || lot == 14449 || lot == 11306 || lot == 11308) {
|
if (lot == 12341 || lot == 5027 || lot == 5028 || lot == 14335 || lot == 14447 || lot == 14449 || lot == 11306 || lot == 11308 || lot == 9483) {
|
||||||
iDesiredWaypointIndex = (lot == 11306 || lot == 11308) ? 1 : 0;
|
iDesiredWaypointIndex = (lot == 11306 || lot == 11308) ? 1 : 0;
|
||||||
iIndex = 0;
|
iIndex = lot == 9483 ? 1 : 0;
|
||||||
nextIndex = 0;
|
nextIndex = lot == 9483 && !special ? 1 : 0;
|
||||||
bStopAtDesiredWaypoint = true;
|
bStopAtDesiredWaypoint = true;
|
||||||
movementState = eMovementPlatformState::Stationary;
|
movementState = lot == 9483 && !special ? eMovementPlatformState::Stopped : eMovementPlatformState::Stationary;
|
||||||
}
|
}
|
||||||
|
|
||||||
bitStream.Write(entity->GetObjectID());
|
bitStream.Write(entity->GetObjectID());
|
||||||
|
|||||||
@@ -103,9 +103,11 @@ namespace GameMessages {
|
|||||||
void SendPlayNDAudioEmitter(Entity* entity, const SystemAddress& sysAddr, std::string audioGUID);
|
void SendPlayNDAudioEmitter(Entity* entity, const SystemAddress& sysAddr, std::string audioGUID);
|
||||||
|
|
||||||
void SendStartPathing(Entity* entity);
|
void SendStartPathing(Entity* entity);
|
||||||
|
|
||||||
|
// special is for the FV tree platform, feature is complete if we just do that so meh
|
||||||
void SendPlatformResync(Entity* entity, const SystemAddress& sysAddr, bool bStopAtDesiredWaypoint = false,
|
void SendPlatformResync(Entity* entity, const SystemAddress& sysAddr, bool bStopAtDesiredWaypoint = false,
|
||||||
int iIndex = 0, int iDesiredWaypointIndex = 1, int nextIndex = 1,
|
int iIndex = 0, int iDesiredWaypointIndex = 1, int nextIndex = 1,
|
||||||
eMovementPlatformState movementState = eMovementPlatformState::Moving);
|
eMovementPlatformState movementState = eMovementPlatformState::Moving, bool special = false);
|
||||||
|
|
||||||
void SendResetMissions(Entity* entity, const SystemAddress& sysAddr, const int32_t missionid = -1);
|
void SendResetMissions(Entity* entity, const SystemAddress& sysAddr, const int32_t missionid = -1);
|
||||||
void SendRestoreToPostLoadStats(Entity* entity, const SystemAddress& sysAddr);
|
void SendRestoreToPostLoadStats(Entity* entity, const SystemAddress& sysAddr);
|
||||||
|
|||||||
Reference in New Issue
Block a user