dominus icon

Untitled

dominus | PRO | 02/14/22 04:30:25 PM UTC | 0 ⭐ | 14274 👁️ | Never ⏰ | []
Diff |

1.37 KB

|

None

|

0 👍

/

0 👎

diff --git a/effects.cc b/effects.cc
index 27c74f2a..e7208cdd 100644
--- a/effects.cc
+++ b/effects.cc
@@ -1769,6 +1769,22 @@ Fire_field_effect::Fire_field_effect(
    field = Game_object_weak(field_shared);
    field_obj->set_flag(Obj_flags::is_temporary);
    field_obj->move(t.tx, t.ty, t.tz);
+   for (int frame = 1; frame <= 5; ++frame) {
+       Game_object_shared dust_shared = gmap->create_ireg_object(224, frame);
+       Game_object *dust_obj = dust_shared.get();
+       dust = Game_object_weak(dust_shared);
+       dust_obj->set_flag(Obj_flags::is_temporary);
+       if (frame == 5)
+           dust_obj->move(t.tx, t.ty, t.tz);
+       else if (frame == 1)
+           dust_obj->move(t.tx, t.ty + 1, t.tz);
+       else if (frame == 2)
+           dust_obj->move(t.tx, t.ty - 1, t.tz);
+       else if (frame == 3)
+           dust_obj->move(t.tx - 1, t.ty, t.tz);
+       else if (frame == 4)
+           dust_obj->move(t.tx + 1, t.ty, t.tz);
+   }
    gwin->get_tqueue()->add(Game::get_ticks() + 3000 + rand() % 2000, this);
 }
 
diff --git a/effects.h b/effects.h
index da9d3bf9..00b57600 100644
--- a/effects.h
+++ b/effects.h
@@ -379,6 +379,7 @@ class Earthquake : public Time_sensitive {
  */
 class Fire_field_effect : public Special_effect {
    Game_object_weak field;     // What we create.
+   Game_object_weak dust;
 public:
    Fire_field_effect(Tile_coord const &t);
    void handle_event(unsigned long curtime, uintptr udata) override;
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎