Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2004-03-23 01:02:18 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2004-03-23 01:02:18 +0300
commit00291b5cf4a0f16ddca425b74ed30e8ac35d40e2 (patch)
tree952bb1c2f6fd8c2f34b950597ed0fa73a4ea7594 /source/gameengine/Ketsji/KX_GameActuator.cpp
parent5b90aafbd6815e29343f8e9aba9e3e20f85b3cc0 (diff)
[GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.
[SCons] Build with Solid as default when enabling the gameengine in the build process [SCons] Build solid and qhull from the extern directory and link statically against them That was about it. There are a few things that needs double checking: * Makefiles * Projectfiles * All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameActuator.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_GameActuator.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp
index b3e50359224..dcdb9b00087 100644
--- a/source/gameengine/Ketsji/KX_GameActuator.cpp
+++ b/source/gameengine/Ketsji/KX_GameActuator.cpp
@@ -113,6 +113,7 @@ bool KX_GameActuator::Update(double curtime, double deltatime)
{
STR_String exitstring = "restarting game";
m_ketsjiengine->RequestExit(KX_EXIT_REQUEST_RESTART_GAME);
+ m_ketsjiengine->SetNameNextGame(m_filename);
m_scene->AddDebugProperty((this)->GetParent(), exitstring);
}
break;
@@ -146,7 +147,7 @@ bool KX_GameActuator::Update(double curtime, double deltatime)
PyTypeObject KX_GameActuator::Type = {
PyObject_HEAD_INIT(&PyType_Type)
0,
- "KX_SceneActuator",
+ "KX_GameActuator",
sizeof(KX_GameActuator),
0,
PyDestructor,
@@ -177,9 +178,39 @@ PyParentObject KX_GameActuator::Parents[] =
PyMethodDef KX_GameActuator::Methods[] =
{
+ {"getFile", (PyCFunction) KX_GameActuator::sPyGetFile, METH_VARARGS, GetFile_doc},
+ {"setFile", (PyCFunction) KX_GameActuator::sPySetFile, METH_VARARGS, SetFile_doc},
{NULL,NULL} //Sentinel
};
+/* getFile */
+char KX_GameActuator::GetFile_doc[] =
+"getFile()\n"
+"get the name of the file to start.\n";
+PyObject* KX_GameActuator::PyGetFile(PyObject* self, PyObject* args, PyObject* kwds)
+{
+ return PyString_FromString(m_filename);
+}
+
+/* setFile */
+char KX_GameActuator::SetFile_doc[] =
+"setFile(name)\n"
+"set the name of the file to start.\n";
+PyObject* KX_GameActuator::PySetFile(PyObject* self, PyObject* args, PyObject* kwds)
+{
+ char* new_file;
+
+ if (!PyArg_ParseTuple(args, "s", &new_file))
+ {
+ return NULL;
+ }
+
+ m_filename = STR_String(new_file);
+
+ Py_Return;
+
+}
+
PyObject* KX_GameActuator::_getattr(char* attr)