View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002800 | Spring engine | Lua | public | 2011-12-01 20:48 | 2012-06-24 18:07 |
| Reporter | oRRoSpike | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | won't fix | ||
| Product Version | 84.0 | ||||
| Summary | 0002800: Spring.GiveOrderToUnit cann't be called | ||||
| Description | The method Spring.GiveOrderToUnit cann't be called in the Methods UnitCreated and UnitDestroyed. The reason which I found was to exclude recursion. But thats is more or less not true. My preferred code means is unitCreated and the UnitDefId is a Builder help an other Builder. Here is Spring.GiveOrderToUnit used. Here is no recursion to find. After thinking a time about a recursion*, i can not find a behavior of the game that a UnitCreated/UnitDestroyed is called with the same unitId * I know what recursion is if C# Senior == me then To understand recursion you should understand recursion | ||||
| Additional Information | look at http://springrts.com/phpbb/viewtopic.php?t=24728&p=463494 There is only one difference, i get no error message, only the code is not executed | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
What happens is probably that one GiveOrderToUnit issued a build order, that in turn triggered UnitCreated. Therefore GiveOrderToUnit means recursion. This is hard to fix and I don't think we will do it. At least I have no other explanation, the engine source code seems correct wrt these recursion checks. |