summaryrefslogtreecommitdiff
path: root/src/resources/beingcommon.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-20 00:34:20 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-20 00:34:20 +0300
commit899d3b925ccb249de881bbc957f6e4ddc754cbbd (patch)
tree4c35a6f21d909f9bc07ed091f0c8e3cb5f700105 /src/resources/beingcommon.cpp
parent1049de4c76ac6fc85c9f7f2bd35fb62ca787aa4c (diff)
downloadmv-899d3b925ccb249de881bbc957f6e4ddc754cbbd.tar.gz
mv-899d3b925ccb249de881bbc957f6e4ddc754cbbd.tar.bz2
mv-899d3b925ccb249de881bbc957f6e4ddc754cbbd.tar.xz
mv-899d3b925ccb249de881bbc957f6e4ddc754cbbd.zip
Add function for read float and double number from xml.
Diffstat (limited to 'src/resources/beingcommon.cpp')
-rw-r--r--src/resources/beingcommon.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/beingcommon.cpp b/src/resources/beingcommon.cpp
index e2294f37d..441b1ee7c 100644
--- a/src/resources/beingcommon.cpp
+++ b/src/resources/beingcommon.cpp
@@ -231,14 +231,14 @@ bool BeingCommon::readObjectNodes(XmlNodePtrConst &spriteNode,
const std::string missileParticle = XML::getProperty(spriteNode,
"missile-particle", "");
- const float missileZ = static_cast<float>(XML::getFloatProperty(
- spriteNode, "missile-z", 32.0f));
+ const float missileZ = XML::getFloatProperty(
+ spriteNode, "missile-z", 32.0f);
const int missileLifeTime = XML::getProperty(
spriteNode, "missile-lifetime", 500);
- const float missileSpeed = static_cast<float>(XML::getFloatProperty(
- spriteNode, "missile-speed", 7.0f));
- const float missileDieDistance = static_cast<float>(
- XML::getFloatProperty(spriteNode, "missile-diedistance", 8.0f));
+ const float missileSpeed = XML::getFloatProperty(
+ spriteNode, "missile-speed", 7.0f);
+ const float missileDieDistance = XML::getFloatProperty(
+ spriteNode, "missile-diedistance", 8.0f);
currentInfo->addAttack(attackId,
spriteAction,