Metric stacking bug fixed
This commit is contained in:
+11
-1
@@ -97,7 +97,12 @@ class MetricsHUD:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def reset(self) -> None:
|
def reset(self) -> None:
|
||||||
"""Clears text reference on environment reset."""
|
"""Removes the active debug text item so a new episode starts with a clean overlay."""
|
||||||
|
if self._text_id is not None:
|
||||||
|
try:
|
||||||
|
p.removeUserDebugItem(self._text_id, physicsClientId=self.client_id)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
self._text_id = None
|
self._text_id = None
|
||||||
|
|
||||||
|
|
||||||
@@ -134,4 +139,9 @@ class LeaderCrown:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
|
if self._text_id is not None:
|
||||||
|
try:
|
||||||
|
p.removeUserDebugItem(self._text_id, physicsClientId=self.client_id)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
self._text_id = None
|
self._text_id = None
|
||||||
Reference in New Issue
Block a user