minimap quickness
This commit is contained in:
parent
d80e723b94
commit
3087f9146e
3 changed files with 65 additions and 26 deletions
|
|
@ -93,8 +93,17 @@ public class WorldMap : IDisposable
|
|||
// Warmup / re-bootstrap: stitch at current position to seed the canvas
|
||||
if (needsBootstrap)
|
||||
{
|
||||
// Don't consume warmup slots on empty frames (game still loading minimap)
|
||||
if (wallCountAfter < 50)
|
||||
{
|
||||
_frameCount--;
|
||||
Log.Information("Warmup waiting for minimap ({Ms:F1}ms)", sw.Elapsed.TotalMilliseconds);
|
||||
return _position;
|
||||
}
|
||||
|
||||
StitchWithConfidence(classifiedMat, _position, boosted: true, mode: mode);
|
||||
PaintExploredCircle(_position);
|
||||
LastMatchSucceeded = true; // signal caller to update viewport
|
||||
if (_consecutiveMatchFails >= 30)
|
||||
{
|
||||
Log.Information("Re-bootstrap: mode={Mode} pos=({X:F1},{Y:F1}) frameSize={FS} walls={W} stitch={Ms:F1}ms",
|
||||
|
|
@ -471,6 +480,7 @@ public class WorldMap : IDisposable
|
|||
_position = new MapPosition(_canvasSize / 2.0, _canvasSize / 2.0);
|
||||
_frameCount = 0;
|
||||
_consecutiveMatchFails = 0;
|
||||
LastMatchSucceeded = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -520,7 +530,7 @@ public class WorldMap : IDisposable
|
|||
|
||||
_prevWallMask?.Dispose();
|
||||
_prevWallMask = null;
|
||||
// Don't force re-bootstrap — let the match find the correct position first
|
||||
_frameCount = 0; // force re-warmup with new mode's data
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue