mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
* tools/cycmd.cpp: Ensure that login op is flushed after it is sent.
* server/Player.cpp: Arg order of std::string.compare() is incompatable between recent libstdc++ versions. Switch back to old version, still in most common use. * rulesets/Thing.cpp: Set refno on ops handled in game. * rulesets/Python_API.cpp: Modify Entity() python constructor so that commonly used attributes from old atlas are translated to their modern equivalents. * rulesets/Py_Thing.cpp, rulesets/Py_Mind.cpp: Differentiate between previously identical error messages in several places. * rulesets/Py_Object.cpp: Rework conversion of python dict to Atlas map to be more efficient and clean. * rulesets/Py_Location.cpp: Rework setting of vector parts of location so that it can accept vectors from python in more formats, including lists and tuples. * rulesets/Creator.h, rulesets/Character.h, common/BaseEntity.h: Re-order virtual methods declarations to fit a convention. * common/stringstream.h: Hardcode use of local stringstream class, as the version provided with older libstdc++ seems to be broken. * common/database.cpp: Use the common header to pick the right stringstream implementation. * common/BaseWorld.cpp, server/Persistance.cpp: Removed unused stringstream include. * rulesets/Creator.cpp: Added extra debug output. * client/define_world.h, client/define_world.cpp, client/CommClient.h: Use CreatorClient to store Creators mind, instead of BaseMind. * client/client.cpp, client/ObserverClient.h, client/ObserverClient.cpp, client/CreatorClient.h, client/CommClient.h, client/CommClient.cpp: Modify method names to fit capitalisation conventions. * client/CreatorClient.cpp: Implement creation of in-game entities, using creator entity. * client/CommClient.cpp: Added correct client side monitoring of creator entity. * client/ClientConnection.h, client/ClientConnection.cpp: Added pending method to establish if ops are in the queue. Switched send() method so we only send ops. Add setting of serialno of sent ops, starting with an offset of 512. * client/CharacterClient.h: Removed unused member, opFound. * client/CharacterClient.cpp: Debugged sendAndWait() method. Al Riddoch <alriddoch@zepler.org>
This commit is contained in:
parent
dcc3dfa85a
commit
2fd239e63c
35 changed files with 266 additions and 112 deletions
|
|
@ -488,7 +488,7 @@ static PyObject * entity_new(PyObject * self, PyObject * args, PyObject * kwds)
|
|||
char * id = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "|s", &id)) {
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
Object::MapType omap;
|
||||
if (id != NULL) {
|
||||
|
|
@ -508,6 +508,12 @@ static PyObject * entity_new(PyObject * self, PyObject * args, PyObject * kwds)
|
|||
if ((strcmp(key, "location") == 0) && (PyLocation_Check(val))) {
|
||||
LocationObject * loc = (LocationObject*)val;
|
||||
loc->location->addToObject(omap);
|
||||
} else if (strcmp(key, "xyz") == 0) {
|
||||
omap["pos"] = PyObject_asObject(val);
|
||||
} else if ((strcmp(key, "parent") == 0) && (PyString_Check(val))) {
|
||||
omap["loc"] = Object(std::string(PyString_AsString(val)));
|
||||
} else if ((strcmp(key, "type") == 0) && (PyString_Check(val))) {
|
||||
omap["parents"] = Object::ListType(1,std::string(PyString_AsString(val)));
|
||||
} else {
|
||||
Object val_obj = PyObject_asObject(val);
|
||||
if (val_obj.GetType() == Object::TYPE_NONE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue