From 3b403c63e9e4d8430bb47a82e24b86a236ead930 Mon Sep 17 00:00:00 2001 From: ksterker Date: Thu, 5 Aug 2010 22:00:54 +0200 Subject: [PATCH] FIXED object interaction code --- src/event/date.cc | 2 +- src/py-wrappers/adonthell/py_world.i | 1 + src/world/area.cc | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/event/date.cc b/src/event/date.cc index 312830d..3d96488 100644 --- a/src/event/date.cc +++ b/src/event/date.cc @@ -246,7 +246,7 @@ std::string date::format_time (const std::string & format, const u_int32 & time) // minutes of gametime case 'm': { - snprintf (str, 15, "%i", minute (time)); + snprintf (str, 15, "%02i", minute (time)); break; } // no valid format code diff --git a/src/py-wrappers/adonthell/py_world.i b/src/py-wrappers/adonthell/py_world.i index 87c6fcc..806adb0 100644 --- a/src/py-wrappers/adonthell/py_world.i +++ b/src/py-wrappers/adonthell/py_world.i @@ -49,6 +49,7 @@ using namespace world; %include "world/object.h" %include "world/coordinates.h" %include "world/moving.h" +%include "world/action.h" %include "world/character.h" %include "world/chunk.h" %include "world/chunk_info.h" diff --git a/src/world/area.cc b/src/world/area.cc index 3e736b0..e1d9174 100644 --- a/src/world/area.cc +++ b/src/world/area.cc @@ -398,7 +398,7 @@ bool area::get_state (base::flat & file) while (entity_data.next (&value, &size, &id) != base::flat::T_UNKNOWN) { // load action associated to location, if any - if ("action" == id) + if (strcmp ("action", id) == 0) { // get action id actn_id = *((const char*) value); @@ -437,7 +437,7 @@ bool area::get_state (base::flat & file) while (entity_data.next (&value, &size, &id) != base::flat::T_UNKNOWN) { // load action associated to location, if any - if ("action" == id) + if (strcmp ("action", id) == 0) { // get action id actn_id = *((const char*) value);