summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index c2e93ca1..0c15918e 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -19,6 +19,8 @@
along with The Mana World; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ By ElvenProgrammer aka Eugenio Favalli (umperio@users.sourceforge.net)
+
*/
#include <stdio.h>
@@ -208,3 +210,17 @@ void sort() {
}
}
}
+
+/** Remove all path nodes from a being */
+void empty_path(NODE *node) {
+ if(node) {
+ PATH_NODE *temp = node->path;
+ PATH_NODE *next;
+ while(temp) {
+ next = temp->next;
+ free(temp);
+ temp = next;
+ }
+ node->path = NULL;
+ }
+}