Fix #1969: Lorry does not eject contents by default

Instead, the lorry asks a container whether it should eject its contents. This is done via the callback LorryEjectionOnEntrance(object lorry) in the object that is being entered.
The old callback NoLorryEjection(object lorry) is obsolete.
install-platforms
Mark 2017-12-31 16:14:04 +01:00
parent ee0917d7e8
commit 66adf0f72c
1 changed files with 4 additions and 2 deletions

View File

@ -185,10 +185,12 @@ protected func Entrance(object container)
{
// Only in buildings
if (container->GetCategory() & (C4D_StaticBack | C4D_Structure))
// Not if the building prohibits this action.
if (!container->~NoLorryEjection(this))
// Only if the building requests this action.
if (container->~LorryEjectionOnEntrance(this))
{
// Empty lorry.
container->GrabContents(this);
}
}