19 |
*/ |
*/ |
20 |
|
|
21 |
#include "items.hh" |
#include "items.hh" |
22 |
|
#include "game.hh" |
23 |
#include "object_mixins.hh" |
#include "object_mixins.hh" |
24 |
#include "display.hh" |
#include "display.hh" |
25 |
#include "sound.hh" |
#include "sound.hh" |
849 |
double range; // Range of the force |
double range; // Range of the force |
850 |
}; |
}; |
851 |
|
|
852 |
class WormHole : public Item, public tools::TimeHandler |
class WormHole : public Item, public enigma::TimeHandler |
853 |
{ |
{ |
854 |
CLONEOBJ(WormHole); |
CLONEOBJ(WormHole); |
855 |
public: |
public: |
896 |
AddSprite(display::SPRITE_EFFECT, get_center(), "ring-anim"); |
AddSprite(display::SPRITE_EFFECT, get_center(), "ring-anim"); |
897 |
double x, y; |
double x, y; |
898 |
if (double_attrib("targetx", &x) && double_attrib("targety", &y)) { |
if (double_attrib("targetx", &x) && double_attrib("targety", &y)) { |
899 |
|
play_sound("warp"); |
900 |
world::WarpActor(actor, x, y); |
world::WarpActor(actor, x, y); |
901 |
} |
} |
902 |
} |
} |