forked from Mirrors/openclonk
fix script error in power library when a foundry (not really a consumer) is removed
parent
4e73a84d18
commit
5927e55973
|
@ -136,7 +136,9 @@ protected func Initialize()
|
|||
// a consumer anymore, it must always be unregistered from the power network.
|
||||
protected func Destruction()
|
||||
{
|
||||
UnregisterPowerRequest();
|
||||
// Only unregister if this object actually is a consumer.
|
||||
if (IsPowerConsumer())
|
||||
UnregisterPowerRequest();
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue