View Issue Details

IDProjectCategoryView StatusLast Update
0005906Spring engineGeneralpublic2018-02-24 12:59
ReporterGoogle_Frog Assigned ToKloot  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version104.0 +git 
Summary0005906: 104.0.1-255-g20c73b0 maintenance cloakTimeout is ignored
DescriptionUnits decloak when they fire or build but they recloak almost instantly. I could track reload times and resource usage in AllowUnitCloak but, as far as I am aware, cloakTimeout is still supposed to be implemented by the engine for the actions that decloak units by default.
Additional Informationhttps://youtu.be/OMdy5Gp_jLM

function gadgetHandler:AllowUnitCloak(unitID, enemyID)
  for _,g in ipairs(self.AllowUnitCloakList) do
    if (not g:AllowUnitCloak(unitID, enemyID)) then
      Spring.Utilities.UnitEcho(unitID, "AUC False")
      return false
    end
  end
      Spring.Utilities.UnitEcho(unitID, "AUC True")

  return true
end
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Kloot

2018-02-23 14:23

developer   ~0018844

Last edited: 2018-02-23 14:25

"as far as I am aware, cloakTimeout is still supposed to be implemented by the engine for the actions that decloak units by default."

nope, it became obsolete with the AllowUnitDecloak callin added right after AllowUnitCloak.

Google_Frog

2018-02-23 23:27

reporter   ~0018845

AllowUnitDecloak seems to stop being called when I start returning false from AllowUnitCloak. Here is what happens:
 * Unit is initially idle and cloaked.
 * Unit fires, triggering AllowUnitDecloak. I set recloakFrame[unitID] = currentFrame + DEFAULT_DECLOAK_TIME.
 * I return false from AllowUnitCloak because recloakFrame[unitID] > currentFrame.
 * AllowUnitDecloak stops being called, so recloakFrame[unitID] is unchanged.
 * After a few seconds recloakFrame[unitID] < currentFrame so I return true from AllowUnitCloak.

The result is a unit that flickers cloak while firing every DEFAULT_DECLOAK_TIME instead of every slow update. AllowUnitDecloak needs to be called for all decloak events as long as the unit is trying to cloak (i.e. it is calling AllowUnitCloak). Otherwise I am back to tracking reload times.

Google_Frog

2018-02-23 23:31

reporter   ~0018846

https://github.com/ZeroK-RTS/Zero-K/commit/ba0634b6cfbd5911fba59012580927fa50da3251

Kloot

2018-02-24 12:58

developer   ~0018849

Fix e5d03289c4f54324fe7e8764c5bc8568839ab3c1 committed to develop branch: fix 0005906, repo: spring changeset id: 9727

Kloot

2018-02-24 12:59

developer   ~0018850

Fix fe3b8ed763855d60ab8c43bc612c2f60bb474d83 committed to maintenance branch: fix 0005906, repo: spring changeset id: 9728

Issue History

Date Modified Username Field Change
2018-02-23 13:58 Google_Frog New Issue
2018-02-23 14:23 Kloot Note Added: 0018844
2018-02-23 14:25 Kloot Note Edited: 0018844
2018-02-23 19:58 Kloot Assigned To => Kloot
2018-02-23 19:58 Kloot Status new => resolved
2018-02-23 19:58 Kloot Resolution open => no change required
2018-02-23 23:27 Google_Frog Status resolved => feedback
2018-02-23 23:27 Google_Frog Resolution no change required => reopened
2018-02-23 23:27 Google_Frog Note Added: 0018845
2018-02-23 23:31 Google_Frog Note Added: 0018846
2018-02-23 23:31 Google_Frog Status feedback => assigned
2018-02-24 12:58 Kloot Changeset attached => spring develop e5d03289
2018-02-24 12:58 Kloot Note Added: 0018849
2018-02-24 12:58 Kloot Status assigned => resolved
2018-02-24 12:58 Kloot Resolution reopened => fixed
2018-02-24 12:59 Kloot Changeset attached => spring maintenance fe3b8ed7
2018-02-24 12:59 Kloot Note Added: 0018850