View Issue Details [ Jump to Notes ] [ Related Changesets ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0006306 | Spring engine | Lua | public | 2019-09-22 16:33 | 2020-01-06 11:53 | ||||
Reporter | FLOZi | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | 104.0 +git | |||||||
Summary | 0006306: enemyID is nil in AllowUnitCloak for two script-cloaked units within min decloak distance | ||||||||
Description | With latest s44 git (available via rapid game:s44:test)... Smoke shells script-cloak units that cannot usually cloak. Two script-cloaked units next to each other are not triggering enemyID in AllowUnitCloak. 'Regular' cloaking (i.e. with unitdef cloaking tags) units work correctly. | ||||||||
Steps To Reproduce | 1. Spawn gbrrifle for your team, and another for enemy team at same location, setting both to hold fire 2. Spawn a gbrtrucksupplies and gbr3inmortar together a little distance away 3. Set the mortar to fire smoke and target the riflemen 4. Observe that the debug echo shows enemyID is nil for both of them (Debug echo gives: unitdefname, unitID, enemyID from callin, enemyID from Spring.GetUnitNearestEnemy, distance from that unit via Spring.GetUnitSeparation, and the mincloakdistance set for that unit) You may wish to compare with regular cloaking units, gbrsniper would be a suitable testing unit. Repeat step 1 with gbrsniper and observ that they function correctly as they move in and out of decloak range. | ||||||||
Additional Information | If this is some weird bug in s44 smokeshells code then I am sorry but I have hopefully investigated that and can't find why it would be. https://github.com/spring1944/spring1944/blob/master/LuaRules/Gadgets/unit_smokeshells.lua#L274 Is the relevant gadget and the line is where the debug echo is performed. You will probably note the lua errors in infolog at game start, these are to do with Strongpoint mode and are unrelated. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | Yes | ||||||||
Attached Files |
|
![]() |
|
FLOZi (reporter) 2019-09-22 18:15 |
Additionally; https://github.com/spring1944/spring1944/blob/master/LuaRules/Gadgets/unit_smokeshells.lua#L198 is where the cloak is applied, Mindecloakdistance is a constant https://github.com/spring1944/spring1944/blob/master/LuaRules/Gadgets/unit_smokeshells.lua#L14 |
Kloot (developer) 2019-09-22 19:56 Last edited: 2019-09-22 19:57 |
The reason two enemy gbrsniper's can decloak each other (enemyID!=nil) but two gbrrifle's under smoke can not (enemyID=nil) is that the smoke gadget sets sight radius for affected units to 0, which causes a query condition to fail. This has been bypassed in 1402-ge9c4ca5. |
abma (administrator) 2020-01-06 11:53 |
Fix ca1557cdee3fe4075ff9d987dfe0926a229146d6 committed to develop branch: fix 0006306, repo: spring changeset id: 11602 |
![]() |
|||
spring: develop ca1557cd
Timestamp: 2019-09-22 17:53:44 Author: rtri [ Details ] [ Diff ] |
fix 0006306 | ||
mod - rts/Game/GameHelper.cpp | [ Diff ] [ File ] | ||
mod - rts/Game/GameHelper.h | [ Diff ] [ File ] | ||
mod - rts/Lua/LuaSyncedRead.cpp | [ Diff ] [ File ] | ||
mod - rts/Sim/Units/Unit.cpp | [ Diff ] [ File ] | ||
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-09-22 16:33 | FLOZi | New Issue | |
2019-09-22 18:15 | FLOZi | Note Added: 0020146 | |
2019-09-22 19:56 | Kloot | Note Added: 0020147 | |
2019-09-22 19:57 | Kloot | Note Edited: 0020147 | View Revisions |
2019-09-22 19:57 | Kloot | Assigned To | => Kloot |
2019-09-22 19:57 | Kloot | Status | new => resolved |
2019-09-22 19:57 | Kloot | Resolution | open => fixed |
2019-09-22 19:57 | Kloot | Fixed in Version | => 104.0 +git |
2020-01-06 11:52 | Changeset attached | => spring develop ca1557cd | |
2020-01-06 11:53 | abma | Note Added: 0020287 |