View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003508 | Spring engine | General | public | 2013-02-26 00:42 | 2013-02-27 03:17 |
| Reporter | abma | Assigned To | abma | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Summary | 0003508: engine should kill units having invalid death animations after some time when hp == 0 | ||||
| Description | this would disallow invulnerable units... | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
not sure if this makes sense, if its hacky to implement, then no need to do so. |
|
|
how would you decide what an invalid death animation is? |
|
|
lua crash? not existing? |
|
|
eh, be more specific please... "lua crash" can mean anything and the engine doesn't know about gadgets |
|
|
my knowledge about death animations is like zero. my idea is like that: (i hope its how it works) death animations have a lua callin: if the luacode inside this callin crashes, remove the unit. i guess thats: scripts/*.lua one of the callins... (script.Killed / script.Create / ..?) |
|
|
.Killed yes, but checking that function isn't enough (because it can spawn a thread and return early) |
|
|
the cause for this idea was: [f=0006462] Error: LuaRules::RunCallIn: error = 2, UnitCreated, [string "LuaRules/Gadgets/ai_cai.lua"]:3262: attempt to index field '?' (a nil value) stack traceback: [string "LuaRules/Gadgets/ai_cai.lua"]:3262: in function 'ProcessUnitCreated' [string "LuaRules/Gadgets/ai_cai.lua"]:3405: in function 'UnitCreated' [string "LuaRules/gadgets.lua"]:1300: in function <[string "LuaRules/gadgets.lua"]:1298> (tail call): ? and a bit later: [f=0008129] Error: LuaRules::RunCallIn: error = 2, UnitFinished, [string "LuaRules/Gadgets/ai_cai.lua"]:3390: attempt to index field '?' (a nil value) stack traceback: [string "LuaRules/Gadgets/ai_cai.lua"]:3390: in function 'UnitFinished' [string "LuaRules/gadgets.lua"]:1308: in function <[string "LuaRules/gadgets.lua"]:1306> (tail call): ? (thats Zero-K 1.1.2.12) see demo |
|
|
but yeah, thats a gadget, so i guess its not possible to implement that?! |
|
|
so what you want is for the engine to remove a unit entirely (extreme measure) if a gadget callin like UnitCreated causes an error no matter what? |
|
|
for example: https://github.com/spring/spring/blob/develop/rts/Lua/LuaHandle.cpp#L798 replace: UnitCreated() with RunUnitCallInTraceback() in all functions where first parameter is CUnit... and in RunUnitCallInTraceback do as usual, but call UnitDestroyed on error / remove the unit when it failed in UnitDestroyed. thats my idea :) if that sucks, please close this request, thanks! |
|
|
be careful not to create inconsistencies (calling UnitDestroyed directly from UnitXYZ means the engine and Lua will no longer agree on which units are present in the simulation) |
|
|
Does this idea have a purpose besides making the engine workaround broken gadgets which should be fixed game side? I don't think the engine should provide such an invasive safety net for gadget crashes because it sounds like there will be situations in which the engine triggers it's safety net when nothing bad has occurred. I don't like this change because it sounds dangerous. I may have this wrong because I don't see how UnitCreated is relevant to this. Here is something which could be done (I don't know if it is already implemented). There could be a type of Spring.DestroyUnit which does not do script.killed. |
|
|
@Kloot: thanks for explaining, sounds for me like it would lead to much more worse problems if implemented. @Google_Frog: if really needed create a new report please. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-02-26 00:42 | abma | New Issue | |
| 2013-02-26 00:44 | abma | Severity | major => feature |
| 2013-02-26 00:44 | abma | Summary | engine should kill units with have invalid death animations after some time => engine should kill units having invalid death animations after some time |
| 2013-02-26 01:55 | abma | Summary | engine should kill units having invalid death animations after some time => engine should kill units having invalid death animations after some time when hp == 0 |
| 2013-02-26 01:56 | abma | Note Added: 0009922 | |
| 2013-02-26 02:00 | Kloot | Note Added: 0009923 | |
| 2013-02-26 02:03 | abma | Note Added: 0009924 | |
| 2013-02-26 02:07 | Kloot | Note Added: 0009925 | |
| 2013-02-26 02:15 | abma | Note Added: 0009926 | |
| 2013-02-26 02:23 | Kloot | Note Added: 0009927 | |
| 2013-02-26 02:27 | abma | Note Added: 0009928 | |
| 2013-02-26 02:28 | abma | File Added: 20130226_000127_Ravaged_v2_92.0-37-g5d49df2 release.sdf.gz | |
| 2013-02-26 02:28 | abma | Note Added: 0009929 | |
| 2013-02-26 02:38 | Kloot | Note Added: 0009930 | |
| 2013-02-26 02:49 | abma | Note Added: 0009932 | |
| 2013-02-26 03:31 | Kloot | Note Added: 0009933 | |
| 2013-02-26 03:33 | Kloot | Note Edited: 0009933 | |
| 2013-02-26 11:33 | Google_Frog | Note Added: 0009939 | |
| 2013-02-27 03:17 | abma | Note Added: 0009945 | |
| 2013-02-27 03:17 | abma | Status | new => closed |
| 2013-02-27 03:17 | abma | Assigned To | => abma |
| 2013-02-27 03:17 | abma | Resolution | open => no change required |