forked from Mirrors/openclonk
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
parent
ee0917d7e8
commit
66adf0f72c
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue