|
|
Reporter | Beherith | |
---|
Assigned To | abma | |
---|
Priority | normal | Severity | minor | Reproducibility | always |
---|
Status | resolved | Resolution | fixed | |
---|
Product Version | 91.0 | |
---|
Target Version | | Fixed in Version | | |
---|
|
|
Summary | 0003342: [91.0.1-463] Units finished in labs have order queues overwritten |
---|
Description | Units that get orders while under construction have their order queues overwritten on construction completion by the labs rally orders iff the lab has a rally point set. If lab has no rally points/orders then they retain their orders.
|
---|
Steps To Reproduce | BA 7.72, DSD. Make a lab, build a unit, give the unit under construction a move order, give the lab a different move order. Unit will have its queue overwritten by lab on completion.
|
---|
Additional Information | Tested with /luaui disable and /luarules disable too (BA 7.72 has gadget to make sure unit doesnt get stuck in lab) |
---|
Tags | No tags attached. |
---|
|
|
Checked infolog.txt for Errors | |
---|
|
|
Attached Files |
-
mantis3342-fix.diff (834 bytes) 2012-12-05 22:18
diff --git a/rts/Sim/Units/UnitTypes/Factory.cpp b/rts/Sim/Units/UnitTypes/Factory.cpp
index 561f5b8..7dfb5da 100644
--- a/rts/Sim/Units/UnitTypes/Factory.cpp
+++ b/rts/Sim/Units/UnitTypes/Factory.cpp
@@ -436,13 +436,19 @@ void CFactory::AssignBuildeeOrders(CUnit* unit) {
}
c.PushPos(tmpPos);
- unit->commandAI->GiveCommand(c);
}
- for (CCommandQueue::const_iterator ci = newUnitCmds.begin(); ci != newUnitCmds.end(); ++ci) {
- c = *ci;
- c.options |= SHIFT_KEY;
+ if (unit->commandAI->commandQue.empty()) {
unit->commandAI->GiveCommand(c);
+
+ // copy factory orders
+ for (CCommandQueue::const_iterator ci = newUnitCmds.begin(); ci != newUnitCmds.end(); ++ci) {
+ c = *ci;
+ c.options |= SHIFT_KEY;
+ unit->commandAI->GiveCommand(c);
+ }
+ } else {
+ unit->commandAI->commandQue.push_front(c);
}
}
|
---|