src/ai/squirrel/core.hpp
branchnoai
changeset 9394 796c684ca5b6
parent 9393 04bd925b9069
--- a/src/ai/squirrel/core.hpp	Thu Mar 15 00:01:33 2007 +0000
+++ b/src/ai/squirrel/core.hpp	Thu Mar 15 00:06:53 2007 +0000
@@ -74,8 +74,17 @@
 	 */
 	bool CreateClassInstance(const char *class_name, void *real_instance, HSQOBJECT *instance);
 
-	HSQUIRRELVM GetVM() { return this->vm; }
+	/**
+	 * Get the real-instance pointer.
+	 * @note This will only work just after a function-call from within Squirrel
+	 *  to your C++ function.
+	 */
 	static bool GetInstance(HSQUIRRELVM vm, SQUserPointer *ptr) { if (SQ_FAILED(sq_getinstanceup(vm, 1, ptr, 0))) return false; return true; }
+
+	HSQUIRRELVM GetVM() {
+#warning Please stop using this function ASAP
+		return this->vm;
+	}
 };
 
 #endif /* SQUIRREL_CORE_HPP */