Skip to content

Commit

Permalink
Fix crouch Wall detection because im dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
kinsi55 committed Jan 1, 2022
1 parent 6579271 commit 8440555
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Util/BeatmapPatternDetection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static bool CheckForCrouchWalls(BeatmapData beatmapData) {
var o = (ObstacleData)bme;

// Ignore 1 wide walls on left
if(o.lineIndex == 1 && o.width == 1)
if(o.lineIndex == 0 && o.width == 1)
continue;

// Filter out fake walls, they dont drain energy
Expand All @@ -37,11 +37,11 @@ public static bool CheckForCrouchWalls(BeatmapData beatmapData) {

// Check if the other half has an active wall, which would mean there is one on both halfs
// I know this technically does not check if one of the halves is half-height, but whatever
// Extend wall lengths by 200ms so that staggered crouchwalls that dont overlap are caught
if(wallExistence[isLeftHalf ? 1 : 0] + 0.2f >= o.time)
if(wallExistence[isLeftHalf ? 1 : 0] >= o.time)
return true;

wallExistence[isLeftHalf ? 0 : 1] = Math.Max(wallExistence[isLeftHalf ? 0 : 1], o.time + o.duration);
// Extend wall lengths by 200ms so that staggered crouchwalls that dont overlap are caught
wallExistence[isLeftHalf ? 0 : 1] = Math.Max(wallExistence[isLeftHalf ? 0 : 1], o.time + o.duration + 0.2f);
}
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "BetterSongList",
"name": "BetterSongList",
"author": "Kinsi55",
"version": "0.2.7",
"version": "0.2.8",
"description": "Adds Various improvements to the Basegame Map list like Filters, a persisted state and much more",
"gameVersion": "1.18.0",
"dependsOn": {
Expand Down

0 comments on commit 8440555

Please sign in to comment.