~colbyhub/pocket_dust

75e6d6cbe7336d4dbe97686a4694fd89d55e73c3 — colbyhub 4 months ago 87ee2c4
Fix water from not spawning
1 files changed, 2 insertions(+), 1 deletions(-)

M src/main.c
M src/main.c => src/main.c +2 -1
@@ 356,7 356,7 @@ particle_t* update_water(uint8_t x, uint8_t y) {
  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT) {
    if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_AIR_ID &&
        get_particle_material_id(get_particle(x - 1, y + 1)) != MATERIAL_WATER_ID &&
        get_particle_material_id(get_particle(x + 1, y - 1)) != MATERIAL_WATER_ID && 
        get_particle_material_id(get_particle(x + 1, y - 1)) != MATERIAL_WATER_ID &&
          y < CANVAS_HEIGHT - 1
          ) {
      new_position.y = y + 1;


@@ 399,6 399,7 @@ particle_t* update_water(uint8_t x, uint8_t y) {
        ) {
      new_position.x = x + 1;
    }
    move_particle(x, y, new_position.x, new_position.y);

    // Extinguish fire
    if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_FIRE_ID) {