projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced Ref and RefCounter with std::shared_ptr<>
[supertux.git]
/
src
/
badguy
/
darttrap.cpp
diff --git
a/src/badguy/darttrap.cpp
b/src/badguy/darttrap.cpp
index
3885cb6
..
1fb822e
100644
(file)
--- a/
src/badguy/darttrap.cpp
+++ b/
src/badguy/darttrap.cpp
@@
-97,7
+97,7
@@
DartTrap::fire()
py += MUZZLE_Y;
SoundManager::current()->play("sounds/dartfire.wav", get_pos());
py += MUZZLE_Y;
SoundManager::current()->play("sounds/dartfire.wav", get_pos());
- Sector::current()->add_object(
new Dart
(Vector(px, py), dir, this));
+ Sector::current()->add_object(
std::make_shared<Dart>
(Vector(px, py), dir, this));
state = IDLE;
sprite->set_action(dir == LEFT ? "idle-left" : "idle-right");
}
state = IDLE;
sprite->set_action(dir == LEFT ? "idle-left" : "idle-right");
}