From 546c4ae6d3c17d23e380c5d9b0722ece858efdde Mon Sep 17 00:00:00 2001 From: Untrustedlife Date: Tue, 22 Jan 2019 12:14:24 -0600 Subject: [PATCH] game now uses all iron meshes when generating iron --- scripts/microbe_stage/setup.as | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/microbe_stage/setup.as b/scripts/microbe_stage/setup.as index 8e54fe53b49..244387cb4db 100644 --- a/scripts/microbe_stage/setup.as +++ b/scripts/microbe_stage/setup.as @@ -664,7 +664,24 @@ ObjectID createIron(CellStageWorld@ world, Float3 pos) Ogre::Degree(GetEngine().GetRandom().GetNumber(0, 360)), Ogre::Vector3(0,1,1))); renderNode.Node.setPosition(pos); - auto model = world.Create_Model(ironEntity, renderNode.Node, "iron_01.mesh"); + string mesh=""; + // There are four kinds + switch (GetEngine().GetRandom().GetNumber(0, 3)) + { + case 0: + mesh="iron_01.mesh"; + break; + case 1: + mesh="iron_02.mesh"; + break; + case 2: + mesh="iron_03.mesh"; + break; + case 3: + mesh="iron_04.mesh"; + break; + } + auto model = world.Create_Model(ironEntity, renderNode.Node, mesh); // Need to set the tint model.GraphicalObject.setCustomParameter(1, Ogre::Vector4(1, 1, 1, 1));