Translate wire ttl into (bPersistent, LifeTime) pair UE's DrawDebug* * helpers expect. ttl > 0: bPersistent=true, lifetime=ttl (auto-expires). * ttl == -1: bPersistent=true, lifetime=-1 (kept until clear_markers). * ttl == 0 or missing: bPersistent=false, lifetime=-1 (single frame). */
| 1090 | * ttl == -1: bPersistent=true, lifetime=-1 (kept until clear_markers). |
| 1091 | * ttl == 0 or missing: bPersistent=false, lifetime=-1 (single frame). */ |
| 1092 | void ReadTtl(const TSharedPtr<FJsonObject>& Req, bool& bOutPersistent, float& OutLifetime) |
| 1093 | { |
| 1094 | double Ttl = 0.0; |
| 1095 | Req->TryGetNumberField(TEXT("ttl"), Ttl); |
| 1096 | if (Ttl > 0.0) |
| 1097 | { |
| 1098 | bOutPersistent = true; |
| 1099 | OutLifetime = (float)Ttl; |
| 1100 | } |
| 1101 | else if (Ttl < 0.0) |
| 1102 | { |
| 1103 | bOutPersistent = true; |
| 1104 | OutLifetime = -1.0f; |
| 1105 | } |
| 1106 | else |
| 1107 | { |
| 1108 | bOutPersistent = false; |
| 1109 | OutLifetime = -1.0f; |
| 1110 | } |
| 1111 | } |
| 1112 | |
| 1113 | TSharedPtr<FJsonObject> HandleDrawMarker(const TSharedPtr<FJsonObject>& Req) |
| 1114 | { |
no outgoing calls
no test coverage detected