fix(quickbuild): a finished quickbuild's EnableRebuild has no duration

Live sent duration 0.0 in all 744 successful EnableRebuild (cancels
carry the time spent building, which DLU already matches); DLU sent
the reset time.

Tests get EntityManager::_addEntity/_removeEntity to make an entity
built outside CreateEntity findable, and helpers that read game
messages back out of captured packets.

Check: finish a quickbuild; the build completes, the celebrate
animation plays and the built object stays up for its usual time
before resetting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 03:09:52 -05:00
parent 44c6340294
commit 6a438ac419
6 changed files with 130 additions and 1 deletions

View File

@@ -473,7 +473,8 @@ void QuickBuildComponent::CompleteQuickBuild(Entity* const user) {
enableRebuild.bFail = false;
enableRebuild.bSuccess = true;
enableRebuild.eFailReason = eQuickBuildFailReason::NOT_GIVEN;
enableRebuild.fDuration = m_ResetTime;
// Live sent no duration on success (744 of 744); cancels carry the time spent building.
enableRebuild.fDuration = 0.0f;
enableRebuild.user = user->GetObjectID();
enableRebuild.Send(UNASSIGNED_SYSTEM_ADDRESS);
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, m_Parent->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);