From 35dac7a719f8f3861d311c6c1d23fcfe38896c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Mon, 18 Apr 2016 01:32:27 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20de=20la=20renum=C3=A9rotation=20de?= =?UTF-8?q?s=20joueurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor.cpp b/src/editor.cpp index 7e39a6e..e76f7ed 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -398,6 +398,8 @@ void Editor::removeObject(Object::Ptr object) { selection.begin(), selection.end(), object ), selection.end()); + Level::removeObject(object); + // si c'était un joueur, il faut renuméroter // les autres pour plus de convenance if (object->getTypeId() == Player::TYPE_ID) { @@ -406,8 +408,6 @@ void Editor::removeObject(Object::Ptr object) { getPlayers()[i]->setPlayerNumber(i); } } - - Level::removeObject(object); } void Editor::removeControlPoint(sf::Vector2f* control_point) {