* common/const.h: Remove obsolete config option to disable
range checks and calculations.
* client/ObserverClient.cpp, rulesets/Movement.cpp,
server/Admin.cpp, tools/AdminClient.h, tools/cycmd.cpp:
Remove const.h from files which no longer require it.
* rulesets/Python_API.cpp: Remove python bindings for obsolete
constants.
* rulesets/Thing.cpp, rulesets/World.cpp, server/WorldRouter.cpp:
Remove obsolete rotten code for handling sight without ranges.
* tests/consttest.cpp: Remove tests for removed constants.
* common/BaseEntity.cpp, rulesets/Character.cpp, rulesets/Creator.cpp,
server/Account.cpp, server/Admin.cpp, server/Connection.cpp,
server/Lobby.cpp, server/WorldRouter.cpp: Don't bother with serial
numbers on ops generated inside the server. They just leak and upset
clients.
* common/BaseWorld.h, rulesets/Creator.cpp, rulesets/World.cpp,
server/WorldRouter.cpp, server/WorldRouter.h, tests/TestWorld.h:
Pass perceptive entities to the world by pointer rather than
by ID, avoiding a lookup in the dictionary.
* server/WorldRouter.cpp: Add mode "relative" to be specified only
on new entities that indicates that the entity's height is specified
relative to the terrain surface.
* rulesets/mason/define_world.py: Specify the stockade stakes
are all embedded 1 metre into the ground, and increase the base
height by 2 metres to make the stockade look more convincing.
* server/WorldRouter.cpp: When entity creation cannot get a new ID,
fail cleanly.
* server/Idle.h: Clean up header, and correct copyright date.
* server/CommPSQLSocket.cpp: Implement eof() method to check the
connection is still okay.
* server/CommPSQLSocket.cpp, server/IdlePSQLConnector.cpp,
server/IdlePSQLConnector.h: Add class stub which will try and
re-establish connection to the RDBMS once lost.
* common/BaseWorld.h, rulesets/Character.cpp,
server/EntityFactory.cpp, server/EntityFactory.h,
server/TaskFactory.h, server/WorldRouter.cpp,
server/WorldRouter.h: Specify the target base type that a given
task is valid for, and provide target type when activating a task.
* data/mason.xml: Add target base types to most task rules.
* rulesets/mason/world/tasks/Combat.py: Fix the copyright date.
* rulesets/mason/world/tasks/Sharpen.py: Proof of concept task
for turning logs into stakes.
* common/BaseWorld.h, server/WorldRouter.h, server/WorldRouter.cpp:
Add interface to allow world entities to activate tasks based on
tool use operations.
* server/EntityFactory.h, server/EntityFactory.cpp: Add method which
createa a new task in response to an activation request.
* rulesets/Character.cpp: When a character uses a tool, use the
tool type and operation to activate a task if one is available.
* common/BaseWorld.h: Add factory method for new tasks to the world
interface.
* rulesets/Character.cpp: Use world interface to create combat
task, rather than using EntityFactory directly.
* server/WorldRouter.h, server/WorldRouter.cpp: Implement the
new task method in the core world object.
* rulesets/Creator.cpp: When an op is being source routed by an admin
client, find its target and insert it into the world using the
target so it appears to be from the target, rather than using
the "cheat" marker.
* server/WorldRouter.cpp: Remove check for FROM=="cheat", and
simplify setting FROM on ops. Use flags to check for FUTURE_SECONDS.
* server/WorldRouter.cpp: Fix height correction calculation inversion.
* data/mason.xml: Make houses inherit from structure so it is possible
to go in and out.
* common/Database.cpp, common/Database.h, common/id.h, common/id.cpp:
Make newId() functions return the integer value.
* common/newid.cpp: Break newId out into its own file, and make
it handle whether or not the database should issue IDs.
* server/Connection.cpp, server/Persistance.cpp,
server/WorldRouter.cpp, server/server.cpp: Simply generating IDs
by just using the newId() function, and use its return value.
* client/BaseClient.cpp, common/BaseWorld.cpp, common/id.cpp,
common/id.h, rulesets/MemMap.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, server/Persistance.cpp,
server/Restoration.cpp, server/WorldRouter.cpp, server/server.cpp:
Add intgerId() function to convert ID strings to integers, and
check the conversion went okay.
* common/types.h, server/Persistance.h, common/BaseWorld.h,
common/BaseWorld.cpp, server/WorldRouter.cpp:
Switch core world map to reference by integer ID rather than string.
Add version of getEntity() which converts from string to integer
automatically.
* rulesets/Character.cpp, rulesets/Thing.cpp, rulesets/World.cpp,
server/EntityFactory.cpp,
Use getEntity() when looking up an entity, so that conversion of
ID from string to integer is automatic.
* rulesets/BaseMind.cpp, rulesets/MemMap.cpp, rulesets/MemMap.h:
Switch to using integer IDs in MemMap's core mapping.
* server/Account.cpp, server/Account.h: Switch a few function
parameters to use integer ID values, making the code cleaner.
* server/Account.cpp, server/Admin.cpp, server/Persistance.cpp:
Handle string ID to integer conversions as required.
* 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.
* server/WorldRouter.cpp: Cache value of std::list::end() to avoid
expensive return by value in every loop iteration. Add some comments
about obsolete getoperationFromQueue() function.
* server/WorldRouter.h, server/WorldRouter.cpp: Add a second op
queue for ops which do not have a time specified, so it is
cheaper to add ops to the queue if they are to be dispatched
immediatly.
* rulesets/Entity.h: Add an assert to ensure reference counting
is bug free.
* server/WorldRouter.cpp: When delivering ops, check if the op
is to the same entity it is from, which avoids looking up
the ID in the world dictionary.
* modules/Location.cpp, modules/Location.h:
Add const accessors for location data, in preparation for
adding cached collision data which must be updated every
time data is modified.
* physics/Collision.cpp, rulesets/Character.cpp, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/MemMap.cpp, rulesets/Movement.cpp,
rulesets/Pedestrian.cpp, rulesets/Plant.cpp,
rulesets/Py_Location.cpp, rulesets/Thing.cpp, rulesets/World.cpp,
server/Account.cpp, server/EntityFactory.cpp, server/Persistor.cpp,
server/Persistor_impl.h, server/Restorer_impl.h,
server/WorldRouter.cpp, tests/Locationtest.cpp:
Use the const accessors whenver reading data from Location.
* 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.
* rulesets/Entity.cpp: Update copyright date.
* rulesets/BaseMind.cpp, rulesets/Entity_getLocation.h,
rulesets/Entity.h, rulesets/MemMap.cpp, rulesets/MemMap.h,
rulesets/Py_Map.cpp, server/EntityFactory.cpp,
server/EntityFactory.h, server/WorldRouter.cpp,
client/BaseClient.cpp, client/CreatorClient.cpp:
Change various methods to pass entity information
around as RootEntity rather than MapType.
* rulesets/Py_Operation.cpp: Decref operations correctly when the
Python object wrapping them is deleted.
* rulesets/mason/define_world.py: Add a simple single entity
test function.
* server/WorldRouter.cpp: Make sure orientation is not used
un-initialised when correcting height.
* common/AtlasFileLoader.cpp, common/Database.cpp,
common/FormattedXMLWriter.cpp, common/Property.cpp,
common/accountbase.cpp, rulesets/Character.cpp,
rulesets/Entity_getLocation.h, rulesets/MemMap.cpp,
rulesets/Pedestrian.cpp, rulesets/Plant.cpp,
rulesets/Py_Object.cpp, rulesets/Thing.cpp,
server/Admin.cpp, server/Connection.cpp, server/EntityFactory.cpp,
server/WorldRouter.cpp, tools/AdminClient.cpp, tools/cycmd.cpp,
tools/cyconvertrules.cpp: After an Element has been checked
with isFoo(), it is more efficient to get its value using Foo()
rather than asFoo() which repeats the check.
* client/CharacterClient.cpp: Add some debug output, and fix a bug
which ignored all replies to client ops.
* server/WorldRouter.cpp: Fix a bug in OpQueEntry which stored
a smart pointer reference rather than really storing the
smart pointer.
* server/TrustedConnection.cpp, server/TrustedConnection.h:
Fix the fingerprint of virtual verifyCredentials() member
function so it correctly overrides the one in Connection.
* server/WorldRouter.cpp: Fix a problem where entities contained by
other entities had their height adjusted incorrectly.
* rulesets/basic/world/objects/elements/Fire.py: Allow fires to be
moved.
* rulesets/Python_API.cpp: Add constructor for BBox.
* data/mason.xml: Add a torch. Add burn_speed attributes to a
bunch more entity classes.
* rulesets/mason/world/objects/tools/Torch.py: Script for torch.
* server/WorldRouter.cpp: Add support for fixed mode.
* rulesets/mason/define_world.py: Increase terrain area a little, move
boundary into mountains, sea. Move forests around so they are not
in the river.
* rulesets/Pedestrian.cpp: Remove some debug output.
* server/WorldRouter.cpp: Tweak the order of dispatch.
* cyphesis.spec.in: Clean up the dependencies in the spec.
* configure.ac: Increment version to 0.3.11.
* NEWS: Update news item.
* Makefile.am: Fix rule that tweaks temp dir prefix so it works
when destination directory is overriden.
* Release 0.3.11
* modules/Location.h, rulesets/Pedestrian.cpp, rulesets/Thing.cpp,
server/WorldRouter.cpp: Store the last movement update time
in location, so it can be used for interpolation elsewhere.
Don't yet update it in the main Move code is this causes movement
jitter.
* common/BaseWorld.h, server/WorldRouter.cpp, server/WorldRouter.h:
Modify world interface so it takes a string mode when adjusting
the height of entities. Handle floating and swimming entities
accordingly.
* rulesets/Thing.cpp: Change the order in which mode is checked
so it is available when adjusting height.
* rulesets/mason/define_world.py: Randomise height of fish, so they
look more like they are swimming.
* server/PersistantThingFactory.h, PersistantThingFactory_impl.h,
server/PersistantThingFactory.cpp: Add ForbiddenThingFactory
for entity classes that need persistence, but can't be instantiated
through the normal channels.
* server/EntityFactory.cpp: Use ForbiddenThingFactory for World.
* server/WorldRouter.cpp: Correct error message for entity
creation failure to include "forbidden" as a possible cause.
* server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
server/Connection.cpp: Don't set refno on unicast OOG ops,
instead set them at the interface with the client in one
place.
* server/WorldRouter.cpp: Modify setting refno on IG ops so its
now only set on unicast responses.
* rulesets/Creator.cpp: Set refno on responses direct ops from creator
clients more manually.
* common/BaseEntity.cpp: Only set refno on unicast error ops.
* common/refno.h: Disable as this file is no longer used.
* common/BaseWorld.h, rulesets/Character.cpp, rulesets/Py_World.cpp,
rulesets/PythonThingScript.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, server/EntityFactory.cpp,
server/Restoration.cpp, server/WorldRouter.cpp, server/WorldRouter.h:
Rename some functions in the World interface so they make more
sense.
* rulesets/Entity.cpp, rulesets/Entity.h: Add destroyed flag to
Entity so we can tell if its no longer in the world.
* server/WorldRouter.cpp: Cut down the special case handling of
delete ops as we can now broadcast ops from entities that
have been removed from the world.
* rulesets/Entity.cpp, rulesets/Entity.h, rulesets/Thing.cpp,
server/WorldRouter.cpp: Increment reference count on parent
entity when a child has a reference to it.
* server/WorldRouter.cpp: Re-write broadcast code to remove the
need for looking up by ID, and instead use the reference
to the sending entity which is now available.
* server/WorldRouter.h, server/WorldRouter.cpp: Change operation()
to take a reference to the entity the op is from. Re-work
main idle loop to pas the entity to operation, and handle
the op queue more efficiently.
* common/BaseWorld.h, rulesets/Entity.h, rulesets/MemMap.cpp,
server/Account.cpp, server/WorldRouter.cpp, server/WorldRouter.h:
Use reference count functions to handle deleting entities.
Modify main op queue to hold a reference to the entity the op
is from. Fix up arg naming conventions in WorldRouter.