Commit graph

69 commits

Author SHA1 Message Date
Al Riddoch
9a56dac06c 2006-10-26 Al Riddoch <alriddoch@zepler.org>
* Add RCS Id keywords to every file, for better version tracking.
2006-10-26 00:48:00 +00:00
Al Riddoch
fac57eee73 2006-01-19 Al Riddoch <alriddoch@zepler.org>
* aiclient/ClientAccount.cpp, aiclient/ClientAccount.h,
	  aiclient/ClientConnection.cpp, aiclient/ClientConnection.h,
	  aiclient/client.cpp, aiclient/client.h, client/BaseClient.cpp,
	  client/BaseClient.h, client/CharacterClient.cpp,
	  client/CharacterClient.h, client/ClientConnection.cpp,
	  client/ClientConnection.h, client/CreatorClient.cpp,
	  client/CreatorClient.h, client/ObserverClient.cpp,
	  client/ObserverClient.h, client/Py_CreatorClient.cpp,
	  client/Py_CreatorClient.h, client/client.cpp,
	  client/define_world.cpp, client/define_world.h, common/Add.h,
	  common/Affect.h, common/AtlasFileLoader.cpp,
	  common/AtlasFileLoader.h, common/Attack.h, common/BaseEntity.cpp,
	  common/BaseEntity.h, common/BaseWorld.cpp, common/BaseWorld.h,
	  common/Burn.h, common/Chop.h, common/Connect.h, common/CustomOp.cpp,
	  common/CustomOp.h, common/CustomOp_impl.h, common/Cut.h,
	  common/Database.cpp, common/Database.h, common/Delve.h, common/Dig.h,
	  common/Eat.h, common/FormattedXMLWriter.cpp,
	  common/FormattedXMLWriter.h, common/Generic.h, common/Load.h,
	  common/Monitor.h, common/Mow.h, common/Nourish.h,
	  common/OOGThing.cpp, common/OOGThing.h, common/Property.cpp,
	  common/Property.h, common/Property_impl.h, common/Save.h,
	  common/Setup.h, common/Tick.h, common/Unseen.h, common/Update.h,
	  common/Use.h, common/Wield.h, common/accountbase.cpp,
	  common/accountbase.h, common/const.cpp, common/const.h,
	  common/custom.cpp, common/debug.h, common/globals.cpp,
	  common/globals.h, common/id.cpp, common/id.h, common/inheritance.cpp,
	  common/inheritance.h, common/inheritance_impl.h, common/log.cpp,
	  common/log.h, common/newid.cpp, common/nls.h, common/op_switch.h,
	  common/operations.cpp, common/operations.h, common/random.h,
	  common/refno.h, common/serialno.cpp, common/serialno.h,
	  common/system.cpp, common/system.h, common/terrain_utils.cpp,
	  common/terrain_utils.h, common/type_utils.h, common/types.h,
	  common/utility.cpp, common/utility.h, modules/DateTime.cpp,
	  modules/DateTime.h, modules/Location.cpp, modules/Location.h,
	  modules/WorldTime.cpp, modules/WorldTime.h, physics/BBox.cpp,
	  physics/BBox.h, physics/Collision.cpp, physics/Collision.h,
	  physics/Quaternion.cpp, physics/Quaternion.h, physics/Vector3D.cpp,
	  physics/Vector3D.h, physics/VectorPol.h, rulesets/Area.cpp,
	  rulesets/Area.h, rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
	  rulesets/ArithmeticScript.cpp, rulesets/ArithmeticScript.h,
	  rulesets/BaseMind.cpp, rulesets/BaseMind.h,
	  rulesets/CalendarProperty.cpp, rulesets/CalendarProperty.h,
	  rulesets/Character.cpp, rulesets/Character.h, rulesets/Combat.cpp,
	  rulesets/Combat.h, rulesets/Container.cpp, rulesets/Container.h,
	  rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
	  rulesets/Entity.h, rulesets/EntityProperties.cpp,
	  rulesets/Entity_getLocation.h, rulesets/Fell.cpp, rulesets/Fell.h,
	  rulesets/Food.cpp, rulesets/Food.h, rulesets/Line.cpp,
	  rulesets/Line.h, rulesets/LineProperty.cpp, rulesets/LineProperty.h,
	  rulesets/MemEntity.cpp, rulesets/MemEntity.h, rulesets/MemMap.cpp,
	  rulesets/MemMap.h, rulesets/MemMap_methods.h,
	  rulesets/MindFactory.cpp, rulesets/MindFactory.h, rulesets/Missile.h,
	  rulesets/Motion.cpp, rulesets/Motion.h, rulesets/Movement.cpp,
	  rulesets/Movement.h, rulesets/Pedestrian.cpp, rulesets/Pedestrian.h,
	  rulesets/Plant.cpp, rulesets/Plant.h, rulesets/Py_BBox.cpp,
	  rulesets/Py_BBox.h, rulesets/Py_EntityWrapper.h,
	  rulesets/Py_Location.cpp, rulesets/Py_Location.h,
	  rulesets/Py_Map.cpp, rulesets/Py_Map.h, rulesets/Py_Mind.cpp,
	  rulesets/Py_Mind.h, rulesets/Py_Object.cpp, rulesets/Py_Object.h,
	  rulesets/Py_Operation.cpp, rulesets/Py_Operation.h,
	  rulesets/Py_Oplist.cpp, rulesets/Py_Oplist.h, rulesets/Py_Optime.cpp,
	  rulesets/Py_Optime.h, rulesets/Py_Point3D.cpp, rulesets/Py_Point3D.h,
	  rulesets/Py_Property.cpp, rulesets/Py_Property.h,
	  rulesets/Py_Quaternion.cpp, rulesets/Py_Quaternion.h,
	  rulesets/Py_RootEntity.cpp, rulesets/Py_RootEntity.h,
	  rulesets/Py_Statistics.cpp, rulesets/Py_Statistics.h,
	  rulesets/Py_Task.cpp, rulesets/Py_Task.h, rulesets/Py_Thing.cpp,
	  rulesets/Py_Thing.h, rulesets/Py_Vector3D.cpp,
	  rulesets/Py_Vector3D.h, rulesets/Py_World.cpp, rulesets/Py_World.h,
	  rulesets/Py_WorldTime.cpp, rulesets/Py_WorldTime.h,
	  rulesets/PythonArithmeticScript.cpp,
	  rulesets/PythonArithmeticScript.h, rulesets/PythonMindScript.cpp,
	  rulesets/PythonMindScript.h, rulesets/PythonScript.cpp,
	  rulesets/PythonScript.h, rulesets/PythonThingScript.cpp,
	  rulesets/PythonThingScript.h, rulesets/PythonWrapper.cpp,
	  rulesets/PythonWrapper.h, rulesets/Python_API.cpp,
	  rulesets/Python_API.h, rulesets/Python_Script_Utils.h,
	  rulesets/Script.cpp, rulesets/Script.h, rulesets/Stackable.cpp,
	  rulesets/Stackable.h, rulesets/Statistics.cpp, rulesets/Statistics.h,
	  rulesets/StatisticsProperty.cpp, rulesets/StatisticsProperty.h,
	  rulesets/Structure.cpp, rulesets/Structure.h, rulesets/Task.cpp,
	  rulesets/Task.h, rulesets/TaskScript.cpp, rulesets/TaskScript.h,
	  rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h,
	  rulesets/Thing.cpp, rulesets/Thing.h, rulesets/ThingFactory.cpp,
	  rulesets/ThingFactory.h, rulesets/World.cpp, rulesets/World.h,
	  rulesets/attributes.h, server/Account.cpp, server/Account.h,
	  server/Admin.cpp, server/Admin.h, server/ArithmeticFactory.cpp,
	  server/ArithmeticFactory.h, server/CommClient.cpp,
	  server/CommClient.h, server/CommIdleSocket.cpp,
	  server/CommIdleSocket.h, server/CommListener.cpp,
	  server/CommListener.h, server/CommLocalClient.cpp,
	  server/CommLocalClient.h, server/CommMDNSPublisher.cpp,
	  server/CommMDNSPublisher.h, server/CommMaster.cpp,
	  server/CommMaster.h, server/CommMetaClient.cpp,
	  server/CommMetaClient.h, server/CommPSQLSocket.cpp,
	  server/CommPSQLSocket.h, server/CommPeer.cpp,
	  server/CommPeer.h, server/CommPeerListener.cpp,
	  server/CommPeerListener.h, server/CommRemoteClient.cpp,
	  server/CommRemoteClient.h, server/CommServer.cpp,
	  server/CommServer.h, server/CommSlaveClient.cpp,
	  server/CommSlaveClient.h, server/CommSlaveListener.cpp,
	  server/CommSlaveListener.h, server/CommSocket.cpp,
	  server/CommSocket.h, server/CommUnixListener.cpp,
	  server/CommUnixListener.h, server/Connection.cpp,
	  server/Connection.h, server/Connection_methods.h,
	  server/EntityFactory.cpp, server/EntityFactory.h,
	  server/ExternalMind.cpp, server/ExternalMind.h,
	  server/Idle.cpp, server/Idle.h, server/Lobby.cpp, server/Lobby.h,
	  server/Master.cpp, server/Master.h, server/Peer.cpp, server/Peer.h,
	  server/Persistance.cpp, server/Persistance.h,
	  server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
	  server/PersistantThingFactory_impl.h, server/Persistor.cpp,
	  server/Persistor.h, server/Persistor_impl.h,
	  server/Player.cpp, server/Player.h, server/Restoration.cpp,
	  server/Restoration.h, server/Restorer.cpp, server/Restorer.h,
	  server/Restorer_impl.h, server/ScriptFactory.cpp,
	  server/ScriptFactory.h, server/ServerRouting.cpp,
	  server/ServerRouting.h, server/ServerRouting_methods.h,
	  server/SlaveClientConnection.cpp, server/SlaveClientConnection.h,
	  server/TaskFactory.cpp, server/TaskFactory.h,
	  server/TrustedConnection.cpp, server/TrustedConnection.h,
	  server/WorldRouter.cpp, server/WorldRouter.h,
	  server/server.cpp, server/server.h, server/slave.cpp,
	  tests/Areatest.cpp, tests/BaseEntitytest.cpp,
	  tests/Charactertest.cpp, tests/Containertest.cpp,
	  tests/Creatortest.cpp, tests/EntityExerciser.h,
	  tests/EntityFactorytest.cpp, tests/Entitytest.cpp,
	  tests/Foodtest.cpp, tests/IGEntityExerciser.h,
	  tests/Linetest.cpp, tests/Locationtest.cpp, tests/OOGThingtest.cpp,
	  tests/Planttest.cpp, tests/Propertytest.cpp, tests/Stackabletest.cpp,
	  tests/Structuretest.cpp, tests/Tasktest.cpp, tests/TestWorld.h,
	  tests/Thingtest.cpp, tests/WorldTimetest.cpp, tests/Worldtest.cpp,
	  tests/allOperations.h, tests/collisiontest.cpp, tests/consttest.cpp,
	  tests/distancetest.cpp, tests/emergencetest.cpp,
	  tests/inheritancetest.cpp, tests/logtest.cpp, tests/randomtest.cpp,
	  tests/systemtest.cpp, tests/transformtest.cpp,
	  tests/type_utilstest.cpp, tests/utilitytest.cpp,
	  tools/AdminClient.cpp, tools/AdminClient.h, tools/cyaddrules.cpp,
	  tools/cycmd.cpp, tools/cyconfig.cpp, tools/cyconvertrules.cpp,
	  tools/cyctrl.cpp, tools/cydbload.cpp, tools/cydumprules.cpp,
	  tools/cyisoload.cpp, tools/cyloadrules.cpp, tools/cypasswd.cpp,
	  tools/cywatchdog.cpp: Replace the copyright and license statements
	  with new versions that include disclaimer of warranty, and
	  permit distribution under later versions of the GPL.
2006-01-19 02:17:06 +00:00
Al Riddoch
e2b83394b0 2005-12-13 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Add a second const for the non-squared default
	  box size for visibility calculations.

	* modules/Location.cpp: Initialise cached box size members with
	  defaults from consts.

	* rulesets/basic/mind/goals/common/move.py: Don't remove focus
	  knowledge about item just because it has been picked up. This
	  fixes eating acorns.

	* rulesets/basic/mind/goals/common/misc_goal.py: Remove focus knowledge
	  when something is eaten.
2005-12-13 01:38:08 +00:00
Al Riddoch
ea0cc10b60 2005-11-22 Al Riddoch <alriddoch@zepler.org>
* modules/Location.h, modules/Location.cpp: Add members to store
	  box diagonal size and bounding radius.

	* tests/Locationtest.cpp: Test that the diagonal size and bounding
	  radius are updated correctly.
2005-11-22 23:31:41 +00:00
Al Riddoch
bba73b3cf6 2005-11-21 Al Riddoch <alriddoch@zepler.org>
* modules/Location.h, modules/Location.cpp: Add methods to modify
	  bbox, and to report if it has been modifed so that cached values
	  can be computed.

	* common/Property.h, common/Property_impl.h: Add a new type of
	  Property which emits a signal when modified.

	* rulesets/EntityProperties.cpp, rulesets/Entity.cpp: Implement
	  signal Property and use it for bbox, so linking its signal
	  to Location so that the necessary values can be computed after
	  modification.
2005-11-21 02:24:17 +00:00
Al Riddoch
26fbbe9d4b 2005-10-01 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp: Re-order code so that its not necessary
	  to lookup an entity that is to be moved unless we already know
	  its not the current entity.

	* rulesets/Character.cpp: Implement destination based movement when
	  the target position is specified with a different LOC to the
	  current LOC of the character.

	* modules/Location.cpp: Document the functions used to determine
	  relative distance vectors.
2005-10-01 17:34:21 +00:00
Al Riddoch
a0836a6818 2005-09-28 Al Riddoch <alriddoch@zepler.org>
* 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.
2005-09-28 23:02:50 +00:00
Al Riddoch
53ebdc74ed 2005-09-13 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp: Fix a bug where POS was being corrupted
	  whenever velocity was supposed to be set.

	* rulesets/basic/mind/goals/humanoid/mason.py: Convert ID to entity
	  before checking location.

	* rulesets/mason/mind/PigMind.py: Convert ID to entity before
	  passing location to another function.
2005-09-13 01:44:49 +00:00
Al Riddoch
9ef58988e3 2005-09-11 Al Riddoch <alriddoch@zepler.org>
* modules/Location.h, modules/Location.cpp: Remove handling of
	  LOC attribute from readFromEntity() as every use of this function
	  has differen requirements.

	* rulesets/MemMap.cpp: Implement setting LOC so that the minimum
	  of lookups in the world dictionary are required.

	* server/EntityFactory.cpp: Implement setting LOC in a much simpler
	  way, as its always uninitialised at this point.

	* client/BaseClient.cpp: Add a note that LOC is currently unhandled,
	  as there is nothing sane to do with it.
2005-09-11 01:43:29 +00:00
Al Riddoch
372ddf5271 2005-09-10 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, modules/Location.h: Add a new method to
	  read location data from an Atlas Entity.

	* rulesets/MemMap.cpp, server/EntityFactory.cpp, client/BaseClient.cpp:
	  Switch to using new function rather than Entity::getLocation.

	* rulesets/Entity.h, rulesets/Entity_getLocation.h: Remove obsolete
	  getLocation method.
2005-09-10 10:28:45 +00:00
Al Riddoch
fdd316b628 2005-08-27 Al Riddoch <alriddoch@zepler.org>
* Port whole code base to Atlas-C++ 0.6 series. Main server binary
	  now links.
2005-08-27 14:52:12 +00:00
Al Riddoch
04a1310ed6 2005-06-23 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, modules/Location.h, rulesets/Python_API.cpp:
	  Implement a function for determining the horizontal distance
	  between two locations neglecting height difference, as for
	  locations on the terrain it is not relevant.

	* rulesets/basic/mind/goals/common/move.py: Improve the coding of
	  the move_me_to_it goal, so distance determination is more effective.
	  Make distance independant of height.
	  Relax distances at which character is concidered to have arrived at
	  its destination.

	* rulesets/basic/mind/Goal.py: Modify goal so that it understands
	  that a subgoal can be unfulfilled, but still not need to take any
	  action.
2005-06-23 12:46:28 +00:00
Al Riddoch
3b4f53b09e 2005-06-05 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, modules/Location.h: Rejig flags on Location
	  so that there is one to indicate contents should be checked for
	  collision, and one to indicate contents is not a collision volume.

	* rulesets/Movement.cpp: Modify collision code to check if an
	  entity is supposed to be checked for collisions.

	* rulesets/Structure.cpp: Tweak the flag set on structures to
	  correctly show that their contents should be checked for collision.

	* data/mason.xml: Make ploughed field into an area, and sort
	  out its bbox to be the right size.
2005-06-05 20:33:56 +00:00
Al Riddoch
bc3e37e8a3 2005-04-21 Al Riddoch <alriddoch@zepler.org>
* modules/Location.h, modules/Location.cpp: Start adding the
	  additional fields required for comeplex movement. Acceleration
	  and angular velocity added first.
2005-04-21 01:57:16 +00:00
Al Riddoch
299efcafdc 2004-12-03 Al Riddoch <alriddoch@zepler.org>
* client/BaseClient.cpp, client/BaseClient.h,
	  client/CharacterClient.cpp, client/CharacterClient.h,
	  client/ClientConnection.cpp, client/ClientConnection.h,
	  client/CreatorClient.cpp, client/CreatorClient.h,
	  client/Py_CreatorClient.cpp, common/BaseEntity.cpp,
	  common/BaseEntity.h, common/BaseWorld.h, common/custom.cpp,
	  common/inheritance.cpp, common/inheritance.h,
	  common/inheritance_impl.h, common/op_switch.h, common/type_utils.h,
	  common/types.h, common/utility.cpp, common/utility.h,
	  modules/Location.cpp, 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/EntityProperties.cpp, rulesets/Entity_getLocation.h,
	  rulesets/Food.cpp, rulesets/Food.h, rulesets/MemMap.cpp,
	  rulesets/MemMap.h, rulesets/Missile.h, rulesets/Pedestrian.cpp,
	  rulesets/Plant.cpp, rulesets/Plant.h, rulesets/Py_Mind.cpp,
	  rulesets/Py_Object.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Operation.h, rulesets/Py_Thing.cpp,
	  rulesets/PythonMindScript.h, rulesets/PythonScript.h,
	  rulesets/PythonThingScript.h, rulesets/Python_API.cpp,
	  rulesets/Script.cpp, rulesets/Script.h, rulesets/Stackable.cpp,
	  rulesets/Stackable.h, rulesets/Thing.cpp, rulesets/Thing.h,
	  rulesets/World.cpp, rulesets/World.h,
	  server/Account.cpp, server/Account.h server/Admin.cpp, server/Admin.h,
	  server/CommClient.cpp, server/Connection.cpp, server/Connection.h,
	  server/EntityFactory.cpp, server/EntityFactory.h, server/Lobby.cpp,
	  server/Lobby.h, server/Persistance.cpp, server/Persistance.h,
	  server/Persistor.cpp, server/Player.cpp, server/Player.h,
	  server/ServerRouting.cpp, server/ServerRouting.h,
	  server/TrustedConnection.cpp, server/TrustedConnection.h,
	  server/WorldRouter.cpp, server/WorldRouter.h, tests/Areatest.cpp,
	  tests/Charactertest.cpp, tests/Creatortest.cpp,
	  tests/EntityExerciser.h, tests/Entitytest.cpp, tests/Foodtest.cpp,
	  tests/IGEntityExerciser.h, tests/Linetest.cpp, tests/Planttest.cpp,
	  tests/Stackabletest.cpp, tests/Structuretest.cpp, tests/Thingtest.cpp,
	  tests/Worldtest.cpp, tests/allOperations.h, tests/inheritancetest.cpp,
	  tests/utilitytest.cpp, tools/cycmd.cpp:
	  Modify the entity interface so that all Operation methods
	  take references to RootOperation, as its cleaner, and requires
	  less nasty casts. Clean up operations in headers generally.
2004-12-03 14:49:13 +00:00
Al Riddoch
64c3645645 2004-11-18 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp: Add some checks and error reporting that
	  prevent a segfault when distance_to is used in the mind code.
2004-11-18 18:15:13 +00:00
Al Riddoch
b8ad4d9678 2004-11-17 Al Riddoch <alriddoch@zepler.org>
* modules/Location.h, modules/Location.cpp, rulesets/Entity.h:
	  Finally remove the getXyz() implementation, this getting
	  rid of absolute coords entirely.
2004-11-17 16:09:06 +00:00
Al Riddoch
25b857aa98 2004-11-04 Al Riddoch <alriddoch@zepler.org>
* cyphesis.spec.in: Ensure rpm spec correctly obsoletes the old
	  mason and service rpms.

	* modules/Location.cpp: Get rid of accidentally commited change
	  that screws up orientation.

	* rulesets/Character.cpp: Provide more info about ops which
	  have TO set incorrectly.

	* rulesets/MemMap.cpp: Don't set TO on look ops from memory.

	* rulesets/basic/mind/NPCMind.py: Don't set TO on tick ops
	  from the mind.
2004-11-04 21:04:01 +00:00
Al Riddoch
e13826d573 2004-11-04 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp: Add notes, and a check to ensure that
	  ops from the mind don't have TO set.

	* rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/humanoid/mason.py: Don't set TO or FROM
	  on goals from the mind.
2004-11-04 17:42:40 +00:00
Al Riddoch
e36c693654 2004-11-02 Al Riddoch <alriddoch@zepler.org>
* common/Property.cpp: Add required type checks to property set
	  methods.

	* modules/Location.cpp: Don't send LOC attribute when the
	  pointer is NULL.

	* rulesets/EntityProperties.cpp: Add a Property specialisation
	  for list of IDs.

	* rulesets/MemMap.cpp: Fix the memory code to use the correct
	  PARENTS attribute rather than type, which is not an Atlas
	  attribute.

	* tests/IGEntityExerciser.h: Add debugging output to attribute
	  checks.
2004-11-02 17:20:34 +00:00
Al Riddoch
16d99772d2 2004-10-23 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp: Ensure that orientation is not used
	  when its invalid.

	* rulesets/Py_Mind.cpp, rulesets/Py_Thing.cpp: Assert that the
	  return value of getXyz() is valid.

	* rulesets/mason/define_world.py: Add a test function to add
	  a deer and a chicken.
2004-10-23 20:01:56 +00:00
Al Riddoch
ce8f62d539 2004-10-11 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, modules/Location.h: Add new function for
	  usefully calculating the distance vector of another entity.

	* tests/distancetest.cpp: Update test to check new distance
	  function.

	* rulesets/Python_API.cpp: Make the new distance vector function
	  available to python rather than the relative postion function.

	* rulesets/basic/mind/Knowledge.py, rulesets/basic/mind/NPCMind.py:
	  Ensure that Knowledge really does handle arbitrary triples.

	* rulesets/basic/mind/goals/common/misc_goal.py: Add new version
	  of transaction goal for transactions for hirelings.

	* rulesets/basic/mind/goals/humanoid/transaction.py: Complete
	  the implementation of the trigger goal for hirelings.

	* rulesets/mason/define_world.py: Move the mercenaries closer to
	  origin for debugging.
2004-10-11 01:04:27 +00:00
Al Riddoch
8a11b05290 2004-10-03 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, physics/Collision.cpp, rulesets/Character.cpp,
	  rulesets/Entity.cpp, rulesets/Movement.cpp, rulesets/Movement.h,
	  rulesets/Pedestrian.cpp: Make sure orientation is not used if it
	  is not valid.
2004-10-03 03:32:16 +00:00
Al Riddoch
64f959a28b 2004-09-24 Al Riddoch <alriddoch@zepler.org>
* modules/Location.h, modules/Location.cpp: Remove obsolete
	  broken distance functions.
2004-09-24 15:10:45 +00:00
Al Riddoch
bae8cf60ca 2004-09-24 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, modules/Location.h: Improve algorithm
	  of distance function to handle corner cases, and add a second
	  interface so that both scalar distance and relative position
	  can be found.

	* tests/distancetest.cpp: Update tests to test for cases where
	  distance to or from an entity directly below.
2004-09-23 23:38:23 +00:00
Al Riddoch
0d1e865046 2004-09-23 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, modules/Location.h: Add new improved
	  function to measure the distance between two entities.

	* tests/distancetest.cpp: New test for new distance measuring
	  function.
2004-09-23 22:09:45 +00:00
Al Riddoch
4855fc9bc1 2004-09-20 Al Riddoch <alriddoch@zepler.org>
* 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.
2004-09-20 17:07:45 +00:00
Al Riddoch
68ab5f7fc8 2004-09-20 Al Riddoch <alriddoch@zepler.org>
* 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.
2004-09-20 10:16:04 +00:00
Al Riddoch
b256b30d90 2004-08-24 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, common/BaseEntity.cpp,
	  common/BaseEntity.h, modules/Location.cpp, modules/Location.h,
	  rulesets/Area.cpp, rulesets/Area.h, rulesets/Character.cpp,
	  rulesets/Character.h, rulesets/Entity.cpp, rulesets/Entity.h,
	  rulesets/Line.cpp, rulesets/Line.h, rulesets/MemMap.cpp,
	  rulesets/Pedestrian.cpp, rulesets/Plant.cpp, rulesets/Plant.h,
	  rulesets/Py_Mind.cpp, rulesets/Py_Object.cpp, rulesets/Py_Thing.cpp,
	  rulesets/Python_API.cpp, rulesets/Stackable.cpp,
	  rulesets/Stackable.h, rulesets/Thing.cpp, rulesets/World.cpp,
	  rulesets/World.h, server/Account.cpp, server/Account.h,
	  server/Admin.cpp, server/Connection.cpp, server/Lobby.cpp,
	  server/Lobby.h, server/Player.cpp, server/Player.h,
	  server/ServerRouting.cpp, server/ServerRouting.h,
	  tests/Areatest.cpp, tests/Entitytest.cpp, tests/Foodtest.cpp,
	  tests/Linetest.cpp, tests/Planttest.cpp, tests/Stackabletest.cpp,
	  tests/Structuretest.cpp, tests/Thingtest.cpp, tests/Worldtest.cpp:
	  Replace addToObject() with addToMessage() throughout.

	* server/Account.cpp, server/Lobby.cpp: Use BaseEntity::addToMessage().

	* server/Player.cpp: Make adding character types attribute to Message
	  more efficient.
2004-08-24 21:05:06 +00:00
Al Riddoch
96f13800c8 2004-08-07 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.cpp, common/BaseEntity.h, common/BaseWorld.h,
	  common/Database.cpp, common/Database.h, common/FormattedXMLWriter.cpp,
	  common/FormattedXMLWriter.h, common/accountbase.cpp,
	  common/accountbase.h, common/custom.cpp, common/inheritance.cpp,
	  common/inheritance.h, common/operations.h, common/type_utils.h,
	  common/utility.cpp, common/utility.h, modules/Location.cpp,
	  modules/Location.h, rulesets/Area.cpp, rulesets/Area.h,
	  rulesets/BaseMind.cpp, rulesets/Character.cpp, rulesets/Character.h,
	  rulesets/Creator.cpp, rulesets/Entity.cpp, rulesets/Entity.h,
	  rulesets/Entity_getLocation.h, rulesets/Food.cpp, rulesets/Line.cpp,
	  rulesets/Line.h, rulesets/MemMap.cpp, rulesets/MemMap.h,
	  rulesets/Pedestrian.cpp, rulesets/Plant.cpp, rulesets/Plant.h,
	  rulesets/Py_Mind.cpp, rulesets/Py_Object.cpp, rulesets/Py_Object.h,
	  rulesets/Py_Operation.cpp, rulesets/Py_Thing.cpp,
	  rulesets/Python_API.cpp, rulesets/Stackable.cpp, rulesets/Stackable.h,
	  rulesets/Thing.cpp, rulesets/World.cpp, rulesets/World.h,
	  server/Account.cpp, server/Account.h, server/Admin.cpp,
	  server/Admin.h, server/CommClient.cpp, server/CommClient.h,
	  server/CommListener.cpp, server/CommListener.h,
	  server/CommLocalClient.cpp, server/CommLocalClient.h,
	  server/CommMetaClient.h, server/CommPSQLSocket.h,
	  server/CommRemoteClient.cpp, server/CommRemoteClient.h,
	  server/CommServer.cpp, server/CommServer.h, server/CommSocket.cpp,
	  server/CommSocket.h, server/CommUnixListener.cpp,
	  server/CommUnixListener.h, server/Connection.cpp,
	  server/Connection.h, server/EntityFactory.cpp,
	  server/EntityFactory.h, server/Lobby.cpp, server/Lobby.h,
	  server/Persistance.cpp, server/Persistance.h,
	  server/PersistantThingFactory.h, server/Persistor.cpp,
	  server/Player.cpp, server/Player.h, server/Restorer.h,
	  server/Restorer_impl.h, server/ServerRouting.cpp,
	  server/ServerRouting.h, server/TrustedConnection.cpp,
	  server/TrustedConnection.h, server/WorldRouter.cpp,
	  server/WorldRouter.h: Convert code to using Atlas Message
	  typedefs as found in Atlas-C++ 0.6 to aid conversion later.
2004-08-16 14:26:47 +00:00
Al Riddoch
6e05de8c79 2004-06-11 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp: Get rid of dependency on Entity.

	* Fix up the tests.
2004-06-11 12:27:19 +00:00
Al Riddoch
6a5fe8171e 2004-06-11 Al Riddoch <alriddoch@zepler.org>
* modules/Location.h, modules/Location.cpp: Clean up constructors
	  and interface to check whether bbox is solid.

	* rulesets/Area.cpp, rulesets/Movement.cpp, rulesets/Structure.h,
	  rulesets/Structure.cpp: Update to modified Location API.

	* rulesets/World.cpp: Fix misuse of implicit construction.
2004-06-11 11:09:44 +00:00
Al Riddoch
51bb33a1f3 2003-10-16 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, physics/Collision.cpp, physics/Collision.h,
	  physics/Vector3D.h: Move recently developed collision code into
	  module of its own, and give functions a new name.

	* tests/collisiontest.cpp: Update test accordingly.
2003-10-16 16:45:16 +00:00
Al Riddoch
654ae5fa5d 2003-10-15 Al Riddoch <alriddoch@zepler.org>
* physics/Vector3D.h: Clean up collision code, and add work in
	  progress on function to predict collision between point and
	  plane.

	* modules/Location.cpp: Clean up methods and placeholder for new
	  oriented box prediction code.
2003-10-15 00:06:49 +00:00
Al Riddoch
0fbfc771ad 2003-08-07 Al Riddoch <alriddoch@zepler.org>
* 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.
2003-08-07 23:03:26 +00:00
Al Riddoch
0468869ee1 2003-07-18 Al Riddoch <alriddoch@zepler.org>
* Migrate maths code to wfmath. Compiles and links, but lots has been
	  commented out.
2003-07-18 00:43:53 +00:00
Al Riddoch
f3f73897e3 2003-05-03 Al Riddoch <alriddoch@zepler.org>
* server/Restoration.cpp: Send restored entities a setup op, so the
	  AI gets initialised as if the entity had just been created.

	* Clean up member variable names.

	* rulesets/mason/mind/SkelMind.py: Get skeleton to recognise
	  settlers.
2003-05-03 19:52:41 +00:00
Al Riddoch
096b4d898d 2003-03-21 Al Riddoch <alriddoch@zepler.org>
* modules/Location.h, modules/Location.cpp: Change location
	  member names to fit the Atlas attributes they map to, and
	  make it clear they are members.
2003-03-21 10:48:17 +00:00
Al Riddoch
15ef748518 2003-03-07 Al Riddoch <alriddoch@zepler.org>
* Use " instead of < when including application headers.

	* Re-work the interface between server and worldrouter objects
	  so that the are less tied together, and more flexible.
2003-03-07 00:22:12 +00:00
Al Riddoch
4dcfac66b5 2002-05-10 Al Riddoch <alriddoch@zepler.org>
* 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.
2002-05-10 21:20:14 +00:00
Al Riddoch
ebf8fac14c 2002-05-10 Al Riddoch <alriddoch@zepler.org>
* physics/Quaternion.h: Added required comparison operators, and
	  get rid of operator bool, to ensure that no implicit conversion
	  happens where it shouldn't. Add operator required for debugging
	  Quaternion.

	* modules/Location.cpp: Use new isValid() method instead of
	  relying on operator bool.

	* rulesets/Movement.h, rulesets/Pedestrian.cpp, rulesets/Pedestrian.h:
	  Fix up interface for genFaceOperation() so it works the right
	  way round, and orientation is not actually set until the Move
	  op is genuinly dispatched.

	* rulesets/Character.cpp: Add clearer debugging output.
	  Fix up handling orientation in move ops from mind, and generate
	  the move ops for simple change in orientation correctly.
2002-05-10 18:52:08 +00:00
Al Riddoch
e491d6995a 2002-03-12 Al Riddoch <alriddoch@zepler.org>
* server/server.cpp, rulesets/Python_API.cpp, rulesets/Line.cpp,
	  modules/Location.cpp, client/CreatorClient.cpp:
	  Removed some obsolete comments.

	* server/WorldRouter.h, server/WorldRouter.cpp: Add member to
	  deliver operation to known entity. Make use if it to avoid
	  having to recurse in operation() when broadcasting. Ensure
	  that the container of new entities is managed from here.

	* rulesets/Thing.cpp: Tell world to create new entities at the
	  same position as the creator if no other info is provided.
	  Do not attempt to handle setting up the default containership
	  of entity once created, as this is always handled by the
	  WorldRouter from now on.

	* rulesets/Py_World.cpp: Implement getting time info from world.

	* rulesets/Py_Location.cpp: Implement handling of the orientation
	  attribute from python.

	* rulesets/MemMap.cpp: Update comments about unimplemented code.

	* rulesets/Creator.cpp: Check for string.empty() instead of "".

	* rulesets/BaseMind.cpp: Remove reference python code.
	  Cleanly handle and delete operations returned when savinf mind state.

	* client/CharacterClient.cpp: Move delete to the right place.
2002-03-12 18:08:56 +00:00
Al Riddoch
83c53f06c6 2002-03-11 Al Riddoch <alriddoch@zepler.org>
* 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.
2002-03-11 18:24:19 +00:00
Al Riddoch
30bd136e35 * common/database.h: Add function to query database path for
error reporting.

	* server/server.cpp: Added check to database initialisation so
	  that an error opening the databases is reported with explanation,
	  or logged as apropriate, and startup is aborted.

	* phyics/Quaternion.h: Added quaternion class for represening rotation.

	* modules/Location.cpp, modules/Location.h: Removed face attribute and
	  replaced with orientation which is a quaternion.

	* rulesets/Character.cpp: Modified code which handles the direction
	  of movement, and how this affects the character rotation so it
	  now uses orientation.

	* rulesets/Entity.cpp: Switch attribute checks from face to
	  orientation.

	* rulesets/Movement.h, rulesets/Pedestrian.cpp: Modify movement
	  code so that orientation used instead of face.

	* rulesets/Py_Location.cpp: Removed support for obsolete and
	  unused rotation attriute from python code.

	* rulesets/Thing.cpp: Modified attriute handling to use orientation
	  instead of face.

Al Riddoch  <alriddoch@zepler.org>
2001-12-14 16:40:38 +00:00
Al Riddoch
90ec47ab1e * physics/BBox.h, rulesets/Py_BBox.h, rulesets/Py_BBox.cpp:
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>
2001-11-30 14:35:59 +00:00
Al Riddoch
4de50bb822 * Cleaned up auto* build files. Added more updated info to README.
* modules/Location.cpp: Removed redundant includes.

	* rulesets/mason/define_world.py: Drop in copy of Acorn world.

	* server/WorldRouter.cpp: Removed double delete of gameWorld.

	* server/server.cpp: Modified comments about segfault in Python
	  shutdown, as this has now been eliminated.

Al Riddoch  <alriddoch@zepler.org>
2001-11-10 15:20:58 +00:00
Al Riddoch
a44ee6f86d * BUGS: Note that C++ version of client currently does not work.
* TODO: Update on important issues which allow easy DOS attacks.

	* client/ClientConnection.cpp, client/ClientConnection.h:
	  Cleaned up unused code from ClientConnection class.

	* client/client.cpp: Removed monitoring section of client
	  so it simply exits once the world is initialised.

	* rulesets/basic/mind/goals/humanoid/werewolf.py:
	  Started work on dynamic goals for playing werewolf.

	* rulesets/werewolf/define_world.py: Added in the mayor, who runs
	  werewolf games.

	* common/BaseEntity.h: Made id of entity private, and implemented
	  accessors.

Al Riddoch  <alriddoch@zepler.org>
2001-09-13 15:21:16 +00:00
Al Riddoch
d64f5712a7 * server/Account.cpp: Fixed setting name of characters startup coin
objects.

	* modules/Location.cpp: Added bounding median to attributes sent
	  using Atlas.

	* common/BaseEntity.cpp: Always set the id on an entity.

Al Riddoch  <alriddoch@zepler.org>
2001-07-23 10:43:56 +00:00
Al Riddoch
1930946950 * server/server.cpp, server/ServerRouting.h, server/ServerRouting.cpp,
server/CommServer.h: Added support for server "name" which
	  defaults to the hostname of the server machine, but is
	  customisable in the config. This can be used in preference to
	  IP address when doing lookups with the metaserver.

	* server/Lobby.h, server/ServerRouting.h, server/Account.h,
	  server/Account.cpp, rulesets/Stackable.h, rulesets/Stackable.cpp,
	  rulesets/Python_API.cpp, rulesets/Py_Object.cpp, rulesets/Plant.cpp,
	  rulesets/Pedestrian.cpp, rulesets/Entity.h, rulesets/Entity.cpp,
	  rulesets/Character.h, rulesets/Character.cpp, common/BaseEntity.h,
	  common/BaseEntity.cpp: Modied asObect() and addToObject()
	  methods to make them more efficient.

	* modules/Location.h, modules/Location.cpp: Removed old obsolete
	  Message::Object based addToObject() method.

	* rulesets/Thing.cpp: Optimised apperance/disappearance code.

Al Riddoch  <alriddoch@zepler.org>
2001-07-16 17:52:23 +00:00
Al Riddoch
72740adfb9 * server/server.cpp: Cleaned up loading of config files, so that
an invalid installation is reported more clearly, and more
	  usefully.

	* rulesets/acorn/world/objects/animals/Pig.py: Fixed creating ham in
	  the right place.

	* rulesets/Movement.cpp: Fixed leaving containers so that if the		  initial collision with parnet bounding box is missed, character
	  does not get stuck.

	* rulesets/EntityFactory.h: Cleanup code is now cleaner.

	* rulesets/EntityFactory.cpp: Removed unecessary varconf dependancy
	  in rulesets code.

	* rulesets/Character.cpp: Allow move ops from mind with no loc set.

	* physics/Vector3D.h: Included check for inTime so that if entering
	  time is in the future, this is detected.

	* modules/Location.cpp, modules/Location.h: Provided method
	  to add location to a map.

Al Riddoch  <alriddoch@zepler.org>
2001-07-12 16:10:41 +00:00