Skip to content

Commit

Permalink
wanderer spotted some logical errors
Browse files Browse the repository at this point in the history
  • Loading branch information
snake-biscuits committed Dec 3, 2024
1 parent ccd24fb commit 7781f1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void addPropsToCmGrid(
PropData prop_data = props_data[0];
geo_set.primitive = (0x60 << 24) | (prop_data.index << 8) | (prop_data.unique_contents);
// bounds
bounds = bounds_from_minmax(props_data[0].bounds);
bounds = bounds_from_minmax(prop_data.bounds);
} else {
geo_set.num_primitives = static_cast<uint16_t>(props_data.size());
uint16_t index = static_cast<uint16_t>(r2Primitives.size());
Expand All @@ -226,7 +226,7 @@ void addPropsToCmGrid(
// per-prop primitive & bounds
uint32_t prop_primitive = (0x60 << 24) | (prop_data.index << 8) | (prop_data.unique_contents);
r2Primitives.push_back(prop_primitive);
titanfall::Bounds prop_bounds = bounds_from_minmax(props_data[0].bounds);
titanfall::Bounds prop_bounds = bounds_from_minmax(prop_data.bounds);
r2PrimitiveBounds.push_back(prop_bounds);
// expand bounds
geoSetBounds.addVector(prop_data.bounds.min);
Expand All @@ -237,7 +237,7 @@ void addPropsToCmGrid(
// get unique_contents_index of GeoSet
int unique_contents_index = 0;
for (uint32_t unique_contents : r2Contents) {
if (unique_contents != collision_flags) {
if (unique_contents == collision_flags) {
break;
}
unique_contents_index++;
Expand Down

0 comments on commit 7781f1f

Please sign in to comment.