* common/Database.cpp: Improve error reporting for query errors.
* common/const.cpp, common/const.h: Add full details and comments
for enable_database option.
* common/id.h, common/id.cpp: New ID generator for use when we
are not using the Database.
* common/AtlasFileLoader.cpp, common/AtlasFileLoader.h: Generic
class for loading Atlas data from a file.
* server/Connection.cpp, server/EntityFactory.h,
server/EntityFactory.cpp, server/Persistor.cpp,
server/WorldRouter.cpp, server/server.cpp:
Implement the enable_database option by wrapping all use of database
in if statements. Rules are loaded from files instead.
* common/BaseWorld.h, server/CommServer.cpp, server/ServerRouting.cpp,
server/ServerRouting.h, server/ServerRouting_methods.h,
server/WorldRouter.cpp, server/WorldRouter.h: Clean up the way the
idle functions work, reducing the number of calls to time related
system calls.
* common/BaseEntity.cpp, common/BaseWorld.h, common/refno.h,
common/serialno.h, rulesets/Character.cpp, rulesets/Creator.cpp,
rulesets/World.h, server/Account.cpp, server/Admin.cpp,
server/Connection.cpp, server/Lobby.cpp, server/ServerRouting.h,
server/WorldRouter.cpp, server/WorldRouter.h, tests/Creatortest.cpp,
tests/Worldtest.cpp: Simplify the way operation refnos and serialnos
are handled, getting rid of some unnecessary virtual methods and
functions.
* server/WorldRouter.h, server/WorldRouter.cpp: Modify operation()
to it takes a non-const reference, thus removing the need to
copy broadcast ops to change the TO attribute.
* rulesets/Character.cpp, rulesets/EntityProperties.cpp,
rulesets/Thing.cpp: Use pre-increment in for loops.
* server/WorldRouter.cpp: Optimise inserting ops into the queue.
* server/WorldRouter.cpp: Add a note to check the code.
* rulesets/basic/mind/goals/humanoid/transaction.py: Remove debug
output.
* rulesets/basic/mind/goals/common/move.py: New goal to accompany
another person.
* rulesets/basic/mind/goals/common/misc_goal.py: Use new accompany
goal for hirelings.
* rulesets/Python_API.cpp: Fix distance_to arg checking error
message.
* rulesets/Py_Vector3D.cpp: Add square magnitude and distance checking
methods.
* server/WorldRouter.cpp: Fixe debug output to work with new
pos type.
* modules/Location.cpp: Fix one of the transforms, so distance
calculation works again.
* physics/Vector3D.h, physics/Vector3D.cpp, modules/Location.h,
modules/Location.cpp: Convert to using WFMath::Point instead of
WFMath::Vector for position.
* physics/Collision.h, physics/Collision.cpp: Update collision code
to use new pos type.
* rulesets/Py_Point3D.h, rulesets/Py_Point3D.cpp: New python
wrappers for WFMath::Point.
* rulesets/Py_Location.cpp, rulesets/Py_Vector3D.cpp,
rulesets/Python_API.cpp:
Update python wrappers to take into account new pos type.
Ensure that only apropriate functionality is available for
point and vector.
* rulesets/Character.cpp, rulesets/Entity.cpp, rulesets/Entity.h,
rulesets/Line.cpp, rulesets/Movement.cpp, rulesets/Movement.h,
rulesets/Pedestrian.cpp, rulesets/Pedestrian.h,
rulesets/Plant.cpp, rulesets/Thing.cpp, rulesets/World.cpp,
server/EntityFactory.cpp, server/WorldRouter.cpp,
server/WorldRouter.h: Update the rest of the code for new pos
type, converting all places where entity parenting is changed
to use WFMath toParentCoords() and toLocalCoords() methods,
so that orientation is handled correctly.
* tests/transformtest.cpp: New test to ensure that toParentCoords()
and toLocalCoords() perform as expected.
* tests/Creatortest.cpp, tests/Locationtest.cpp, tests/Worldtest.cpp,
tests/collisiontest.cpp, tests/emergencetest.cpp:
Update the rest of the tests.
* server/WorldRouter.cpp: Update FIXME so its clear its the same
as all the other orientation related FIXMEs.
* server/Connection.cpp: New FIXME for password based Logout which
won't work.
* common/Database.h: Add interface for an idea which may help with
terrain persistence.
* rulesets/Character.cpp, server/Account.cpp:
Add serialno assignments to character inventory creation ops,
and ops from builtin mind.
* server/WorldRouter.cpp: Remove an obsolete comment.
* common/FormattedXMLWriter.h: Add some notes about converting this
class for use with any Atlas codec.
* server/CommClient.h, server/CommIdleSocket.h, server/CommServer.cpp,
server/CommServer.h, server/CommSocket.h, server/ServerRouting.h,
server/WorldRouter.cpp:
Improve the names of some typedefs and clean up some comments.
* server/WorldRouter.h: Remove declaration of obsolete unimplemented
setSerialno() member function.
* server/WorldRouter.cpp, server/CommClient.cpp:
Clean up some error output, making sure it goes to the right place.
* common/FormattedXMLWriter.cpp, common/FormattedXMLWriter.h:
Use ostream as we are only writing, not reading. Improve comments.
* client/CreatorClient.cpp, rulesets/BaseMind.cpp,
rulesets/MemEntity.cpp, rulesets/MemEntity.h,
rulesets/MemMap.cpp, rulesets/MemMap.h, rulesets/Py_Map.cpp:
Set time on memory entities when we update them.
* common/BaseWorld.h: Make object accessor const.
* common/Database.cpp, common/Database.h, common/accountbase.cpp,
server/Connection.cpp, server/Persistance.cpp,
server/WorldRouter.cpp: Rename function to get new ID from
database to more correctly reflect its role.
* rulesets/PythonMindScript.cpp: Use get rather than getAdd
to sort out to and from of ops send to mind scripts.
* common/BaseWorld.h, rulesets/Creator.cpp, rulesets/Thing.h,
rulesets/World.cpp, server/WorldRouter.cpp, server/WorldRouter.h:
Modify the world interface to get rid of some pointless
infeffiencies.
* server/Account.cpp, server/Admin.cpp, server/Connection.cpp,
server/Lobby.cpp, server/ServerRouting.h, server/WorldRouter.cpp,
server/WorldRouter.h: Change getSerialNo to newSerialNo to make it
clear what it does.
* common/BaseEntity.h, common/BaseEntity.cpp, common/refno.h,
server/Account.cpp, rulesets/Creator.cpp, server/WorldRouter.cpp:
Move refno functions which don't need to be methods into
their own header.
* common/BaseWorld.h, common/BaseWorld.cpp, rulesets/Character.cpp,
rulesets/Creator.cpp, server/WorldRouter.cpp, server/WorldRouter.h:
Make BaseWorld no longer inherit from anything, as we were not
using this inheritance at all.
* rulesets/BaseMind.cpp: Make sure we don't delete ourself from
map.
* server/WorldRouter.h, server/WorldRouter.cpp: Add more advanced
handling for delete ops, so the response is broadcast before
it is removed.
* server/WorldRouter.cpp: Clean up a special case for TO="all" on
ops, which we now disallow. Remove a verbose tests for NULL
pointers in the world dictionary and replace with a simple assert.
* Fix bounding boxes for fir and oak scaling.
* common/globals.cpp: Default to starting at dawn.
* modules/DateTime.h: Make accessors to static vars static.
* server/WorldRouter.cpp: Handle time offest more sanely.
* server/WorldRouter.cpp: Change check in new Entity code to ensure
that entities already have valid location at this point.
* server/EntityFactory.cpp: Implement randomized starting position
in entity factory.
* server/WorldRouter.cpp: Slightly randomize starting position
of characters to avoid getting stuck.
* rulesets/mason/define_world.py: Move the world contents around a bit
to make room for larger spawn area.
* rulesets/World.cpp: Make sure we don't degfault if we get a height
outside current area of terrain.
* client/ClientConnection.cpp, client/CharacterClient.cpp:
Set an error condition if the server disconnects unexpectedly,
and thus return an error to the script causing an exit.
* rulesets/World.cpp, rulesets/World.h: Add accessor to get height
at a particular point.
* server/Account.cpp: Remove redundant check on new character
location.
* common/BaseWorld.h, server/WorldRouter.cpp, server/WorldRouter.h,
rulesets/Thing.cpp: Add new function for correcting height
of entities to ground level, and use it whenever new entities
are created, or whenever an entity moves.
* 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.cpp, common/const.h: Add constants for handling
size based visibility calculations.
* rulesets/World.cpp, server/WorldRouter.cpp: Convert op broadcast
and viewing distance to being handled by a visibility calculation
based on size and distance, rather than distance alone. Movement
appearance and disappearance is yet to be done.
* rulesets/Thing.cpp: Send an Appearance op from new entities
rather than Sight(Create).
* server/WorldRouter.cpp: Accept Appearance and Disappearance
as ops which can be broadcast.
* common/BaseWorld.h, server/CommServer.cpp, server/CommServer.h,
server/ServerRouting.cpp, server/ServerRouting.h,
server/ServerRouting_methods.h, server/WorldRouter.cpp,
server/WorldRouter.h: Modify idle to return if there are ops due
so that select can be called with zero timeout. Server now processes
op as quickly as possible and hopefully is still responsive.
* common/BaseWorld.h, server/Connection.h, server/ServerRouting.cpp,
server/ServerRouting.h, server/ServerRouting_methods.h,
server/WorldRouter.cpp, server/WorldRouter.h:
Get rid of obsolete return value, from idle functions, and
adjust WorldRouter::idle() so it only dispatches a certain
number of ops at a time.
* server/Admin.cpp: Remove debugging output for monitoring code.
* server/ExternalMind.cpp, server/ExternalMind.h: Rename member
variables to fit with convention.
* tools/cycmd.cpp: Document monitor features.
* tools/cycmd.cpp: Add new command to enable and disable server
monitoring.
* server/WorldRouter.cpp, common/BaseWorld.h: Add facility to
notify using a SigC signal each type an op is dispatched.
* server/CommClient.h, server/CommClient.cpp: Fix typo in
overridden method which meant it didn't work.
* server/Admin.h, server/Admin.cpp: Add handler for Monitor operation
which turns on and off sending all IG ops to the admin client.
* rulesets/Python_API.cpp, common/types.h, common/Generic.h,
common/BaseEntity.h: Fix Generic op so it can be used, and
clean up its use. Add an enumeration for monitor ops.
* tests/Worldtest.cpp: Update test to take account of changes
in the BaseWorld interface.
* server/WorldRouter.cpp: Report an error if an entity creation
attempt of unknown type is attempted.
* server/EntityFactory.h, server/EntityFactory.cpp: Modify
unbound rule queue so it handles multiple rules depending
on a single parent.