* common/const.cpp: Remove build time and date, because they almost
never get updated here.
* scripts/gen_buildid.py: New script to generate a source file
to note the build time and date.
* server/Makefile.am: Create a new file that depends on all server
sources that contains the build time and data, and will contain
the build number.
* server/ServerRouting.cpp: Add number of entities in the world
to the server info.
* common/BaseEntity.h, common/BaseEntity.cpp: Add an integer ID
member variable, and accessor, and require it to be initialised
along with string ID in constructor.
* common/const.cpp, common/const.h: Add a const for the integer value
of the world ID.
* rulesets/Area.cpp, rulesets/Area.h, rulesets/BaseMind.cpp,
rulesets/BaseMind.h, rulesets/Character.cpp, rulesets/Character.h,
rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/Food.cpp, rulesets/Food.h,
rulesets/Line.cpp, rulesets/Line.h, rulesets/MemEntity.cpp,
rulesets/MemEntity.h, rulesets/Plant.cpp, rulesets/Plant.h,
rulesets/Stackable.cpp, rulesets/Stackable.h, rulesets/Structure.cpp,
rulesets/Structure.h, rulesets/Thing.cpp, rulesets/Thing.h,
rulesets/World.cpp, rulesets/World.h: Add integer ID handling to
constructors of all in-game entity classes.
* rulesets/MemMap.cpp: Initialise integer ID of entities in the mind
map.
* rulesets/MindFactory.cpp, rulesets/MindFactory.h: Handle integer
ID when constructing mind objects.
* server/EntityFactory.cpp, server/EntityFactory.h,
server/PersistantThingFactory_impl.h: Handle integer
ID when contructing entity objects.
* server/Restoration.cpp, server/Restoration.h, server/Restorer.h,
server/Restorer_impl.h: Handle integer ID when restoring from
database.
* server/WorldRouter.cpp: Assign integer ID when constructing the
world.
* common/system.cpp, common/system.h: Add new functions for handling
encrypted password hashes with a salt, based on gcrypt rather
than openssl. Include legacy support for hashes without a salt.
* common/const.cpp: Add a salt to the default admin password.
* tests/systemtest.cpp: Modify the password tests to use the new
functions.
* server/Connection.cpp, server/Connection.h,
server/TrustedConnection.cpp, server/TrustedConnection.h:
Update the login code to use the new password functions.
* common/const.cpp, common/const.h: Git rid of bizare scheme
where each constant appears twice, debug and non-debug versions.
* rulesets/Pedestrian.cpp, rulesets/Thing.cpp,
server/WorldRouter.cpp: Fix problem where an essential call
was inside an assert, so did not happen when built in non-debug
mode.
* 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/const.cpp: Turn off persistence again by default.
* rulesets/Pedestrian.cpp: Update collision resolution to
transform velocity and orientation when parent changes.
* common/Database.cpp: Implement function for modifying array rows.
* common/const.cpp: Enable persistence for testing.
* common/terrain_utils.cpp: Implement function for updating terrain
in database after a change.
* rulesets/World.cpp, rulesets/attributes.h: Add an update flag for
terrain, and use it to indicate to the Persistor.
* rulesets/World.h: Add accessors for variables which track modified
terrain, and a function to clear them.
* server/Persistor.cpp: Implement call to function to update terrain
in database.
* server/Restoration.cpp: Ensure that if world entity is already
in database, it gets hooked up appropriatly.
* 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.
* 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.
* common/const.cpp, common/const.h: Add a const for the default
admin password hash, with a view to removing the plain text
default admin password.
* server/Persistance.cpp: Ensure that the database contains an
admin account on startup.
* common/Database.cpp: Move the call to register the ID generating
sequence out of the code for creating IG entity tables, as it is
also required by OOG entities, in particular the admin account
bootstrap.
* client/ObserverClient.cpp, client/ObserverClient.h,
client/client.cpp: Modify client so that it no longer attempts to
get account details from the database, or from a hard coded default.
It will now attempt a trusted login, or rely on password provided
by config option.
* common/BaseEntity.cpp, common/BaseEntity.h, rulesets/Character.cpp,
rulesets/Food.cpp, rulesets/Thing.cpp, rulesets/World.cpp:
Add arg to error method specifying where the error should go. Use
this arg to ensure that errors don't get broadcast.
* common/Database.cpp, common/Database.h, common/const.cpp,
server/Persistor.cpp, server/Restoration.cpp,
server/WorldRouter.cpp
Change id and loc column in entity tables to integer for
performance. Add id generator sequence to database
* common/Database.cpp, common/Database.h, server/Persistance.cpp,
server/Persistance.h: Remove old legacy world, mind and server
tables as they are no longer used.
* common/BaseEntity.cpp, common/Load.h, common/Save.h,
common/custom.cpp, common/op_switch.h, common/operations.cpp,
common/operations.h, common/types.h, rulesets/BaseMind.cpp,
rulesets/BaseMind.h, rulesets/Character.cpp, rulesets/Character.h,
server/Admin.cpp, server/Admin.h, server/server.cpp,
tools/cycmd.cpp: Remove Load and Save ops.
* rulesets/Area.cpp, rulesets/Character.cpp, rulesets/Line.cpp,
rulesets/Plant.cpp: Fix != to |= when setting update flags.
* server/CommMetaClient.cpp, server/CommMetaClient.h,
server/CommServer.cpp, server/CommServer.h, server/server.cpp:
Add mechanism for sockets to be called whenever the server
is idle, so that they do period things. Use this mechanis,
to handle sending periodic packets to the metaserver, removing
special case code from CommServer.
* common/Database.cpp, common/Database.h: Implement methods
to query database results.
* common/const.cpp, common/const.h: Add a const for the root
id.
* server/Restoration.cpp, server/Restoration.h: Start implementing
code to restore world from database.
* common/const.cpp, common/const.h, rulesets/Creator.cpp,
rulesets/Entity.cpp, rulesets/Entity.h, server/WorldRouter.cpp:
Re-work omnipresent flag so it can only work in a debug build,
and has no performance impact on the production code.
* server/ServerRouting.cpp, common/const.h, common/const.cpp: Put all
the build dependant code in const.cpp, so no other file is
dependant on config.h.
* Add a cyphesis-config script, so other programs can tell where its
installed.
* Rework many of the build files so they are cleaner.
* Fix the readline C++ sanity check.
* common/const.cpp, common/const.h: Make consts modifiable in
the debug build.
* common/op_switch.h, rulesets/Character.cpp, rulesets/Character.h:
Fix missing logout op in op switchers.
* server/Account.cpp, server/Connection.cpp: Handle logouts
a bit differently, and return the info response process
expects.
* server/CommClient.cpp: Set connection id to client ip and port.
* server/CommServer.cpp: Tighten up the way eof is handled.
* server/ServerRouting.cpp: Set lobby id.
python.
* common/const.h, common/const.cpp, rulesets/Python_API.cpp:
Removed unused consts.
* common/globals.h, common/globals.cpp, server/server.cpp:
Enable running as a daemon in the background by default.
This improves usability by removing dependance on users
session. Install signal handlers so signals cause clean
shutdown.
* tools/cycmd.cpp: If adminning server on localhost, get admin
password directly from database, instead of asking user.
Allows cycmd to be used in scripts. Ensure that exit
status accuratly reveals whether the command was sent.
* tools/cypasswd.cpp: Switch to using common/accountbase.h.
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>
* */*: Fixed mistake in copyright statement.
* tools/cypasswd.cpp: Fixed usage message.
* tools/cycmd.cpp: Added tools for sending administrative commands
to server.
* server/server.cpp: Send terminate instruction to metaserver on
server shutdown.
Al Riddoch (alriddoch@zepler.org)
* modules/Location.h: Added inRange() method which can be used
to check whether location, including bounding box, is within
given range of a given location. Changed parent member
variable to ref to fit with Atlas spec. Changed all code
related to using the term ref instead of parent so
that there is no confusion between ref for coordinates
and parent in the Atlas hierarchy.
* rulesets/Thing.cpp: Added code to move operation to check
what entities come into and out of range when entity moves.
Appearance and Disappearance operations are sent to the
moving entity with a list of the relevant entities as their
argument.
* server/WorldRouter.h/cpp: Added overloaded Look operation
handler which applies range constraints to the contains
attribute before returning.
* common/BaseEntity.h, rulesets/Thing.h, rulesets/Character.h:
Added handling of Appearance and Disappearance operations.
* server/WorldRouter.cpp: Added primitive check to broadcast
operations to avoid delivering broadcast operation to
entities out of range.
* Removed world.get_object() use from server python code, as
its use is not required.
* server/WorldRouter.h: Implemented fetching of floating point time
from the OS so movement is much smoother.
Al