Closed bigscout79 closed 12 years ago
I did not look at the code (did not have the time yet) but this might be because: if your harvester goes to the building it disapears from the map and the building animation takes over? so maybe the harvester object might still exist but is not displayed?
line 1894-1899: if (this.name == 'refinery'&& (this.status == "build"||this.status == 'unload')){ if (this.status== 'build'){ game.units.push(vehicles.add({name:'harvester',team:this.team,x:this.x+0.5, y:this.y + 2,moveDirection:14,orders:{type:'harvest',from:this}})); this.status = ""; }
You should add here || this.status=="destroyed" or something..
Now i look at it what happens if you have 2 harvesters? and it unloads in the refinery? cause here there is selected on the property name .?
//edit nvm
Good find... :)
Patched.... Similar code has been added to release refinery before selling it. Should be out on next release
Normally you don't lose the harvester when you sell the refinery.