summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being.cpp5
-rw-r--r--src/defaults.cpp5
-rw-r--r--src/listener.h2
-rw-r--r--src/variabledata.h6
4 files changed, 12 insertions, 6 deletions
diff --git a/src/being.cpp b/src/being.cpp
index e8007948..1061cf36 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -215,8 +215,9 @@ void Being::setDestination(int dstX, int dstY)
Position dest = mMap->checkNodeOffsets(getCollisionRadius(), getWalkMask(),
dstX, dstY);
- Path thisPath = mMap->findPixelPath(mPos.x, mPos.y, dest.x, dest.y,
- getCollisionRadius(), getWalkMask());
+ Path thisPath = mMap->findPixelPath((int) mPos.x, (int) mPos.y,
+ dest.x, dest.y,
+ getCollisionRadius(), getWalkMask());
if (thisPath.empty())
{
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 9be5971d..c08fb357 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -35,6 +35,11 @@ VariableData* createData(int defData)
return new IntData(defData);
}
+VariableData* createData(double defData)
+{
+ return new FloatData(defData);
+}
+
VariableData* createData(float defData)
{
return new FloatData(defData);
diff --git a/src/listener.h b/src/listener.h
index 25b388a0..db7b3221 100644
--- a/src/listener.h
+++ b/src/listener.h
@@ -31,7 +31,7 @@ namespace Mana
class Listener
{
public:
- ~Listener();
+ virtual ~Listener();
void listen(const std::string &channel);
diff --git a/src/variabledata.h b/src/variabledata.h
index 4f58c1fd..f73ebab2 100644
--- a/src/variabledata.h
+++ b/src/variabledata.h
@@ -72,14 +72,14 @@ private:
class FloatData : public VariableData
{
public:
- FloatData(float value) { mData = value; }
+ FloatData(double value) { mData = value; }
- float getData() const { return mData; }
+ double getData() const { return mData; }
int getType() const { return DATA_FLOAT; }
private:
- float mData;
+ double mData;
};
class BoolData : public VariableData