Skip to content

Commit eee3973

Browse files
committed
Fixes for SP2 changes.
1 parent 41e1ca8 commit eee3973

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/bomb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void Bomb::onFixedUpdate()
4141
if (state_timer < 1)
4242
{
4343
new Explosion(getParent(), getPosition2D(), getLinearVelocity2D(), sp::Color(1, 0.8, 0.8));
44-
for(sp::Node* obj : getParent()->getChildren())
44+
for(sp::P<sp::Node> obj : getParent()->getChildren())
4545
{
4646
sp::Vector2d diff = obj->getPosition2D() - getPosition2D();
4747
double dist = diff.length();

src/levelScene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void LevelScene::loadLevel(sp::string name, bool replay, std::string replay_file
5050
level_info.trophy_mode = LevelInfo::TrophyMode::Normal;
5151

5252
for(auto obj : getRoot()->getChildren())
53-
delete obj;
53+
obj.destroy();
5454

5555
gui->getWidgetWithID("BIG_ASS_TROPHY")->hide();
5656
gui->getWidgetWithID("CAMERA_PREVIEW")->hide();

src/levelSelect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void LevelSelect::onDisable()
205205
void LevelSelect::startRandomReplay()
206206
{
207207
int index = sp::irandom(0, all_levels.size() - 1);
208-
for (LevelNode* level : all_levels)
208+
for (sp::P<LevelNode> level : all_levels)
209209
{
210210
if (index > 0)
211211
{

src/vehicle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void Vehicle::setControlState(const PlayerControlsState& control_state)
3737
float move = control_state.left.value - control_state.right.value;
3838
if (move)
3939
{
40-
for(Wheel* w : wheels)
40+
for(sp::P<Wheel> w : wheels)
4141
w->setAngularVelocity(move * 200.0);
4242
}
4343
}

0 commit comments

Comments
 (0)