Skip to content

Commit

Permalink
actually kill liquid that's goes up as well, in case of the sunken ci…
Browse files Browse the repository at this point in the history
…ty inverted liquid physics
  • Loading branch information
Mr-Auto committed Sep 24, 2023
1 parent 88a5e2c commit 328b443
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/game_api/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ void fix_liquid_out_of_bounds()
for (uint32_t i = 0; i < it.physics_engine->entity_count; ++i)
{
auto liquid_coordinates = it.physics_engine->entity_coordinates + i;
if (liquid_coordinates->second < 0 // y < 0
|| liquid_coordinates->first < 0 // x < 0
|| liquid_coordinates->first > g_level_max_x) // x > g_level_max_x
// no y > g_level_max_y as the entity should fall back down eventually anyway
if (liquid_coordinates->second < 0 // y < 0
|| liquid_coordinates->first < 0 // x < 0
|| liquid_coordinates->first > g_level_max_x // x > g_level_max_x
|| liquid_coordinates->second > g_level_max_y) // y > g_level_max_y
{
if (!*(it.physics_engine->unknown61 + i)) // just some bs
continue;
Expand Down

0 comments on commit 328b443

Please sign in to comment.