Fixed bug 645194: oil tanker disappears when it builds a oil platform
This commit is contained in:
parent
45fe4f673a
commit
df90d1595b
1 changed files with 9 additions and 9 deletions
|
@ -531,15 +531,6 @@ void HandleActionBuilt(CUnit *unit)
|
|||
unit->Frame = 0;
|
||||
}
|
||||
|
||||
if (type->GivesResource) {
|
||||
// Set to Zero as it's part of a union
|
||||
memset(&unit->Data, 0, sizeof(unit->Data));
|
||||
// Has StartingResources, Use those
|
||||
if (type->StartingResources) {
|
||||
unit->ResourcesHeld = type->StartingResources;
|
||||
}
|
||||
}
|
||||
|
||||
if ((worker = unit->Data.Built.Worker)) {
|
||||
// Bye bye worker.
|
||||
if (type->BuilderLost) {
|
||||
|
@ -565,6 +556,15 @@ void HandleActionBuilt(CUnit *unit)
|
|||
}
|
||||
}
|
||||
|
||||
if (type->GivesResource) {
|
||||
// Set to Zero as it's part of a union
|
||||
memset(&unit->Data, 0, sizeof(unit->Data));
|
||||
// Has StartingResources, Use those
|
||||
if (type->StartingResources) {
|
||||
unit->ResourcesHeld = type->StartingResources;
|
||||
}
|
||||
}
|
||||
|
||||
unit->Player->Notify(NotifyGreen, unit->X, unit->Y,
|
||||
_("New %s done"), type->Name.c_str());
|
||||
if (unit->Player == ThisPlayer) {
|
||||
|
|
Loading…
Add table
Reference in a new issue