* physics/BBox.cpp, physics/BBox.h: Add functions to cheapy
determine the bounding radius of a bounding box.
* physics/Collision.cpp: Add a coarse collision test to the beginning
of collision prediction, to avoid the full expensive test in
most cases.
* rulesets/Thing.cpp, rulesets/World.cpp, server/WorldRouter.cpp:
Delete commented out code for old range checks.
* modules/Location.h, physics/BBox.h, physics/Collision.cpp,
physics/Vector3D.h, rulesets/Entity.h: Remove obsolete math
functions for doing silly calculations with boxes.
* common/const.h: Make constants static for efficiency.
* common/const.cpp, common/const.h: Add constant minimum size for
entities without boxes.
* physics/BBox.cpp, physics/BBox.h: Move box size function into
.cpp file, and make sure of minimum size if box is not valid.
* common/const.cpp, common/const.h, common/random.h,
physics/BBox.h, physics/Collision.cpp, physics/Collision.h,
physics/Quaternion.cpp, physics/Quaternion.h, physics/Vector3D.h,
rulesets/Movement.cpp, rulesets/Plant.cpp, rulesets/Python_API.cpp,
tests/collisiontest.cpp: Update variables relating to geometry
from double to float as this is the type used internall by
WFMath.
* physics/Vector3D.cpp, physics/Quaternion.cpp, physics/Quaternion.h:
Remove legacy code.
* server/CommPSQLSocket.cpp: Reformatting.
* server/Lobby.cpp: Add some debugging messages.
* server/CommServer.cpp: Tweak select loop so that closed connections
are cleaned up as soon as they are detected.
* rulesets/World.cpp: Make demo terrain a bit more mountainous.
* Convert entire codebase over to using Atlas-C++ 0.4.90, as
start of transition to 0.6 API.
* physics/BBox.h: Fixed farPoint() so it now does return the far
point, rather than the near point.
* modules/Location.h, rulesets/Python_API.cpp: Handle NULL parent
in location.
* NPC script bug fixes.
* tools/cyloadrules.cpp, server/server.cpp,
aiclient/ClientConnection.cpp, client/ClientConnection.cpp,
common/inheritance.h: Use const iterators and references
whenever possible.
* client/CommClient.cpp, client/CreatorClient.cpp,
client/ObserverClient.cpp, client/Py_CreatorClient.cpp,
common/BaseEntity.cpp, common/BaseEntity.h,
common/types.h, rulesets/Area.cpp, rulesets/BaseMind.cpp,
rulesets/Character.cpp, rulesets/Entity.cpp,
rulesets/Food.cpp, rulesets/Line.cpp,
rulesets/MemMap.cpp, rulesets/Pedestrian.cpp,
rulesets/Plant.cpp, rulesets/Py_Mind.cpp,
rulesets/Py_Object.cpp, rulesets/Py_Thing.cpp,
rulesets/Python_API.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp,
server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
server/CommServer.cpp, server/Connection.cpp,
server/EntityFactory.cpp, server/Lobby.cpp,
server/Persistance.cpp, server/Player.cpp,
server/ServerRouting.cpp, server/WorldRouter.cpp:
Switch to using Fragment as name for Atlas::Message::Object,
to avoid name clashes on Object.
* common/BaseEntity.h: Make BaseEntity inherit from SigC::Object,
so signals and callbacks can be used, and add destroyed
signal.
* common/accountbase.h, physics/BBox.h, physics/Quaternion.h,
physics/Vector3D.h, rulesets/MemMap_methods.h,
rulesets/Movement.cpp, rulesets/Plant.h,
rulesets/Py_Operation.cpp, rulesets/PythonMindScript.cpp,
rulesets/PythonThingScript.cpp, rulesets/Script.cpp,
common/inheritance.cpp: Cleaned up Atlas::Message::Object
use, and excessive use of "using ...".
* rulesets/Movement.h, rulesets/Pedestrian.h:
Use forward declarations rather than including Move.h
* server/Account.cpp, server/Account.h, server/Connection.cpp,
server/Connection.h: Use destroyed signal to ensure references
to in game entities are removed when those entities are
destroyed. Ensure Connection is only destroyed once.
* modules/Location.cpp, modules/Location.h, physics/BBox.h,
physics/Vector3D.h, rulesets/Character.cpp, rulesets/Entity.cpp,
rulesets/MemMap.cpp, rulesets/Movement.cpp, rulesets/Pedestrian.cpp,
rulesets/Py_BBox.cpp, rulesets/Py_Location.cpp,
server/Account.cpp, server/WorldRouter.cpp:
Get rid of operator bool() in vector and related classes,
so that errors are less likely to emerge in code. Make use
of Vector3D::isZero() where apropriate.
* server/WorldRouter.cpp: Eliminate unnecessary call to opEnumerate()
and enhance debugging output.
* server/Player.cpp: Correct the use of string.compare() in older
versions of libstdc++.
* common/types.h: Added enumeration for other operations, not
handled by the core, but considered valid. Added new type
for storing mapping between operation parents and their
enumerated type.
* common/op_switch.h: Separate handling of operations known to
be invalid from operations which are valid, but not explicitly
added to the core.
* common/inheritance.h, common/inheritance.cpp, common/custom.cpp:
Provide global operation mapping where enumeration of operations
can be looked up. Install all types handled by the core, and
types known to be used in scripts.
* common/BaseEntity.h, common/BaseEntity.cpp: Add object specific
operation mapping where operation types each object is subscribed
to can be enumerated, and others are rejected. Add mechanism
so that objects can add to the mapping, this subscribing to
operations. This makes enumerating operations much cheaper, and
eliminates the overhead of handling ops an object has no interest
in.
* rulesets/Thing.h, rulesets/Thing.cpp: Add mechanism so scripts
can subscribe to operations.
* rulesets/Character.h, rulesets/Character.cpp:
Add subscription mechanism for ops going to and from
the mind.
* rulesets/BaseMind.h, rulesets/BaseMind.cpp:
Add subscription mechanism for sight and sound perception
operations sub operations, and provide an interface to it
for scripts.
* server/Connection.cpp, server/Admin.cpp, server/Account.cpp,
rulesets/World.cpp, rulesets/World.h, rulesets/Thing.cpp,
rulesets/Stackable.cpp, rulesets/Plant.cpp, rulesets/Food.cpp,
rulesets/Character.cpp, rulesets/BaseMind.cpp:
Add subscriptions to operations for all core base classes.
* rulesets/Python_API.cpp: When script is created, go through
methods, and subscribe to the operations which are handled by
them.
* rulesets/Character.cpp: When calculating orientation of a walking
character, assume it is standing upright.
* physics/Vector3D.h: Add versions of mag() and distance() which
omit the square root calculations, so that when their values
are only used for comparison, the expensive square root
calculations can be ommited. Add new version of collision
and range checking functions which provide the optimal
interface to the application. Add versions of methods which
modify this rather than creating a new operation to eliminate
wasted copies.
* physics/Quaternion.cpp: Make use of faster interface provided
by Vector3D.
* physics/BBox.h: Add new version of collision checking function
which provides optimal interface to the application.
* modules/Location.h, modules/Location.cpp: Add new functions
to optimally calculate the distance between any two entities.
* modules/Location.h: Re-write collision and range functions to
make much more optimal use of Vector3D, BBox and distance
functionality.
* rulesets/Py_Vector3D.cpp, rulesets/Pedestrian.cpp,
rulesets/Movement.cpp, rulesets/Entity.cpp, rulesets/Character.cpp:
Eliminate implicit copies from vector arithmetic.
* rulesets/Pedestrian.cpp, rulesets/MemMap.cpp, common/const.h:
Re-write code which uses magnitude of vectors to use the square
of the magnitude instead, as it is much cheaper to calculate.
Added direct support for new format bounding boxes.
* modules/Location.cpp, modules/Location.h, physics/Vector3D.h,
rulesets/Character.cpp, rulesets/Creator.cpp, rulesets/Entity.cpp,
rulesets/Movement.cpp, rulesets/Plant.cpp, rulesets/Py_Location.cpp:
Switched over to using new format bounding boxes, and re-wrote
collision code for this format, making it clearer and more
efficient at the same time.
Al Riddoch <alriddoch@zepler.org>