forked from 0ad/0ad
Deposit resources when garrisoned in a dropsite. Patch by MattDoerksen. Fixes #1124.
This was SVN commit r11571.
This commit is contained in:
parent
388d77f37d
commit
ba17009767
@ -1430,6 +1430,17 @@ var UnitFsmSpec = {
|
||||
if (cmpGarrisonHolder.Garrison(this.entity))
|
||||
{
|
||||
this.isGarrisoned = true;
|
||||
|
||||
// Check if we are garrisoned in a dropsite
|
||||
var cmpResourceDropsite = Engine.QueryInterface(target, IID_ResourceDropsite);
|
||||
if (cmpResourceDropsite)
|
||||
{
|
||||
// Dump any resources we can
|
||||
var dropsiteTypes = cmpResourceDropsite.GetTypes();
|
||||
var cmpResourceGatherer = Engine.QueryInterface(this.entity, IID_ResourceGatherer);
|
||||
cmpResourceGatherer.CommitResources(dropsiteTypes);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user