2001-04-14 Al Riddoch <alriddoch@zepler.org>

* Substantial re-work of object model. Moved many attributes out
	  of BaseEntity class. Changed WoldRouter so it now handles
	  objects in terms of Entity, rather than BaseEntity.

	* Code cleanups, including removing reduntant includes, and
	  getting rid of C style comments.

	* Fixed the way attributes are handled in Set operations and
	  when merging from an Atlas::Message::Object. This fixed
	  problem with setting gender of characters.

	* rulesets/Pedestrian.*, rulesets/Movement.*: Re-named
	  Movement variables to make them clearer. Added in
	  separate handling for collisions from moving to
	  target position. Modified collision handling so
	  objects can slide next to each other.

	* rulesets/Thing.cpp, rulesets/Character.cpp: Cleaned up and
	  rationalised movement code. Much shorter, faster and
	  more compact than before.

	* Made better use of iterators throughout, eliminating unnecessary
	  lookups, and copying of data.

	* Moved all virtual functions out of header files, making
	  less work for the linker.

	* Made more use of const references to avoid the need to copy
	  data before being able to inspect it.

Al Riddoch <alriddoch@zepler.org>
This commit is contained in:
Al Riddoch 2001-04-16 16:26:44 +00:00
parent 77a6d063dd
commit 2ccfaadef3
143 changed files with 945 additions and 1024 deletions

View file

@ -13,7 +13,12 @@
#include "Thing.h"
#include "BaseMind.h"
#include <Atlas/Objects/Operation/Create.h>
#include <Atlas/Objects/Operation/Look.h>
#include <Atlas/Objects/Operation/Move.h>
#include <Atlas/Objects/Operation/Set.h>
#include <Atlas/Objects/Operation/Sight.h>
#include <Atlas/Objects/Operation/Talk.h>
#include <Atlas/Objects/Operation/Touch.h>
#include <modules/Location.h>
@ -267,14 +272,14 @@ static PyObject * location_new(PyObject * self, PyObject * args)
return NULL;
}
BaseEntity * ref_ent;
Entity * ref_ent;
if (PyWorld_Check(refO)) {
WorldObject * ref = (WorldObject*)refO;
if (ref->world == NULL) {
PyErr_SetString(PyExc_TypeError, "Parent world is invalid");
return NULL;
}
ref_ent = (BaseEntity *)ref->world;
ref_ent = (Entity *)ref->world;
} else {
ThingObject * ref = (ThingObject*)refO;
if (ref->m_thing == NULL) {