Advertisement
dominus

Untitled

Feb 14th, 2022
1,398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.37 KB | None | 0 0
  1. diff --git a/effects.cc b/effects.cc
  2. index 27c74f2a..e7208cdd 100644
  3. --- a/effects.cc
  4. +++ b/effects.cc
  5. @@ -1769,6 +1769,22 @@ Fire_field_effect::Fire_field_effect(
  6.     field = Game_object_weak(field_shared);
  7.     field_obj->set_flag(Obj_flags::is_temporary);
  8.     field_obj->move(t.tx, t.ty, t.tz);
  9. +   for (int frame = 1; frame <= 5; ++frame) {
  10. +       Game_object_shared dust_shared = gmap->create_ireg_object(224, frame);
  11. +       Game_object *dust_obj = dust_shared.get();
  12. +       dust = Game_object_weak(dust_shared);
  13. +       dust_obj->set_flag(Obj_flags::is_temporary);
  14. +       if (frame == 5)
  15. +           dust_obj->move(t.tx, t.ty, t.tz);
  16. +       else if (frame == 1)
  17. +           dust_obj->move(t.tx, t.ty + 1, t.tz);
  18. +       else if (frame == 2)
  19. +           dust_obj->move(t.tx, t.ty - 1, t.tz);
  20. +       else if (frame == 3)
  21. +           dust_obj->move(t.tx - 1, t.ty, t.tz);
  22. +       else if (frame == 4)
  23. +           dust_obj->move(t.tx + 1, t.ty, t.tz);
  24. +   }
  25.     gwin->get_tqueue()->add(Game::get_ticks() + 3000 + rand() % 2000, this);
  26.  }
  27.  
  28. diff --git a/effects.h b/effects.h
  29. index da9d3bf9..00b57600 100644
  30. --- a/effects.h
  31. +++ b/effects.h
  32. @@ -379,6 +379,7 @@ class Earthquake : public Time_sensitive {
  33.   */
  34.  class Fire_field_effect : public Special_effect {
  35.     Game_object_weak field;     // What we create.
  36. +   Game_object_weak dust;
  37.  public:
  38.     Fire_field_effect(Tile_coord const &t);
  39.     void handle_event(unsigned long curtime, uintptr udata) override;
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement