Added support for animating resource container when harvesting
This commit is contained in:
parent
568a42bdeb
commit
f2e8a3b060
1 changed files with 7 additions and 0 deletions
|
@ -344,6 +344,10 @@ static int GatherResource(CUnit &unit)
|
|||
int i;
|
||||
int addload;
|
||||
|
||||
if (!resinfo->HarvestFromOutside && unit.Container != NULL) {
|
||||
unit.Container->SubAction = SUB_GATHER_RESOURCE;
|
||||
UnitShowAnimation(*unit.Container, unit.Container->Type->Animations->Harvest[unit.CurrentResource]);
|
||||
}
|
||||
|
||||
if (resinfo->HarvestFromOutside || resinfo->TerrainHarvester) {
|
||||
AnimateActionHarvest(unit);
|
||||
|
@ -534,6 +538,9 @@ static int StopGathering(CUnit &unit)
|
|||
source->Data.Resource.Active--;
|
||||
Assert(source->Data.Resource.Active >= 0);
|
||||
|
||||
if (!resinfo->HarvestFromOutside && source->Data.Resource.Active == 0)
|
||||
source->SubAction = 1;
|
||||
|
||||
//Store resource position.
|
||||
//source->RefsIncrease();
|
||||
//unit.Orders[0]->Arg1.Resource.Mine = source;
|
||||
|
|
Loading…
Reference in a new issue