diff --git a/Blocks3D.exe.manifest b/Blocks3D.exe.manifest
index b1d3158..f0723ff 100644
--- a/Blocks3D.exe.manifest
+++ b/Blocks3D.exe.manifest
@@ -5,6 +5,7 @@
+
diff --git a/Blocks3D.vcproj b/Blocks3D.vcproj
index 3655040..39295b9 100644
--- a/Blocks3D.vcproj
+++ b/Blocks3D.vcproj
@@ -694,6 +694,14 @@
+
+
+
+
@@ -702,6 +710,128 @@
RelativePath=".\src\source\DataModelV3\LevelInstance.cpp"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1007,6 +1145,34 @@
RelativePath=".\src\include\DataModelV3\LevelInstance.h"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
setMessage(winMessage);
- //DataModel->toggleRun();
+ DataModelInstance* DataModel = parentDataModel; //If level parent gets changed to something other than Datamodel it could cause nasty data corruption bugs
+ DataModel->setMessage(winMessage.getValue());
+ DataModel->toggleRun();
}
void LevelInstance::loseCondition()
{
- //DataModelInstance* DataModel = (DataModelInstance*)getParent();
- //DataModel->setMessage(loseMessage);
- //DataModel->toggleRun();
+ DataModelInstance* DataModel = parentDataModel;
+ DataModel->setMessage(loseMessage.getValue());
+ DataModel->toggleRun();
}
void LevelInstance::pauseCondition()
{
- //DataModelInstance* DataModel = (DataModelInstance*)getParent();
- //DataModel->toggleRun();
+ DataModelInstance* DataModel = parentDataModel;
+ DataModel->toggleRun();
}
void LevelInstance::drawCondition()
{
- //DataModelInstance* DataModel = (DataModelInstance*)getParent();
- //DataModel->toggleRun();
+ DataModelInstance* DataModel = parentDataModel;
+ DataModel->toggleRun();
}
void LevelInstance::Step(SimTime sdt)
diff --git a/src/source/DataModelV3/SelectionService.cpp b/src/source/DataModelV3/SelectionService.cpp
index e1d42a6..9fe4306 100644
--- a/src/source/DataModelV3/SelectionService.cpp
+++ b/src/source/DataModelV3/SelectionService.cpp
@@ -99,7 +99,7 @@ void SelectionService::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, V
//Y
Draw::box(c.toWorldSpace(Box(Vector3(from.x + offsetSize, from.y - offsetSize + 0.2, from.z + offsetSize), Vector3(from.x - offsetSize, to.y + offsetSize - 0.2, from.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(to.x + offsetSize, from.y - offsetSize + 0.2, from.z + offsetSize), Vector3(to.x - offsetSize, to.y + offsetSize - 0.2, from.z - offsetSize))), rd, outline, Color4::clear());
- Draw::box(c.toWorldSpace(Box(Vector3(to.x + offsetSize, from.y - offsetSize + 0.2, to.z + offsetSize), Vector3(to.x - offsetSize, to.y + offsetSize-0.1, to.z - offsetSize))), rd, outline, Color4::clear());
+ Draw::box(c.toWorldSpace(Box(Vector3(to.x + offsetSize, from.y - offsetSize + 0.2, to.z + offsetSize), Vector3(to.x - offsetSize, to.y + offsetSize-0.2, to.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(from.x + offsetSize, from.y - offsetSize + 0.2, to.z + offsetSize), Vector3(from.x - offsetSize, to.y + offsetSize - 0.2, to.z - offsetSize))), rd, outline, Color4::clear());
//Z