Skip to content

Conversation

Fly-Star-him
Copy link
Contributor

@Fly-Star-him Fly-Star-him commented Sep 26, 2025

#1475 #1602

Extend their logic to the structure.

Copy link

github-actions bot commented Sep 26, 2025

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

Copy link
Contributor

@Coronia Coronia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to add global toggles to control these behaviors for buildings, in case modders only want vehicles to load and unload quickly

NoQueueUpToEnter.Buildings=; default to NoQueueUpToEnter
NoQueueUpToUnload.Buildings=; default to NoQueueUpToUnload

@Coronia Coronia requested a review from CrimRecya September 28, 2025 13:43
@Fly-Star-him Fly-Star-him changed the title Amphibious/Fast access extended to structure Fast access extended to structure Sep 29, 2025

if (pObject->WhatAmI() == AbstractType::Building)
{
const auto RulesExt = RulesExt::Global();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pRulesExt and there are four same issue behind this.

Comment on lines +823 to +824
const auto pTunnel = AresHelper::CanUseAres ?
AresFunctions::GetTunnel(reinterpret_cast<void*>(pType->align_E24), pBuilding->Owner) : nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

	const auto pTunnel = AresHelper::CanUseAres
		? AresFunctions::GetTunnel(reinterpret_cast<void*>(pType->align_E24), pBuilding->Owner) : nullptr;

and there is a same issue behind this.

Comment on lines +798 to +811
DEFINE_HOOK(0x44DCB1, BuildingClass_Mi_Unload_NoQueueUpToUnload, 0x7)
{
GET(BuildingClass*, pThis, EBP);

const auto RulesExt = RulesExt::Global();

if (TechnoTypeExt::ExtMap.Find(pThis->Type)->NoQueueUpToUnload.Get(
RulesExt->NoQueueUpToUnload_Buildings.Get(RulesExt->NoQueueUpToUnload)))
{
R->EAX(0);
}

return 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still looks like unloading one by one every frame, rather than unloading all at once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I am not yet able to handle tunnel unloading in construction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants