|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006306||Spring engine||Lua||public||2019-09-22 16:33||2019-09-22 19:57|
|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.|
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|
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
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.
|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|