Commit graph

62 commits

Author SHA1 Message Date
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Alistair Riddoch
c6bd3094c5 Use C++ std::sqrt for efficiency 2011-04-27 19:46:13 +01:00
Al Riddoch
74d94e71a0 2009-01-12 Al Riddoch <alriddoch@googlemail.com>
* physics/Vector3D.h: Use sqrtf to ensure efficient use of floats.
2009-01-12 07:08:19 +00:00
Al Riddoch
3f96b21a6a 2009-01-11 Al Riddoch <alriddoch@googlemail.com>
* physics/Vector3D.h, physics/Vector3D.cpp: Move a bunch of inline
	  functions in the header to be non-inline in the body. Use
	  the forward declaraions in wfmath/const.h instead of having to
	  include the full headers.

	* rulesets/Motion.cpp, rulesets/Motion.h, rulesets/Movement.h,
	  rulesets/Py_Point3D.h, rulesets/Py_Vector3D.h: Include wfmath
	  headers as required.
2009-01-11 17:43:10 +00:00
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
a8e2338c44 2005-09-10 Al Riddoch <alriddoch@zepler.org>
* physics/Vector3D.h: When constructing a vector or point from
	  a std::vector, set its valid flag.
2005-09-10 01:10:58 +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
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
50f17694f1 2004-05-14 Al Riddoch <alriddoch@zepler.org>
* 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.
2004-05-14 00:35:59 +00:00
Al Riddoch
b0a4dd4447 2004-05-11 Al Riddoch <alriddoch@zepler.org>
* physics/Vector3D.h, physics/BBox.h: Strip out obsolete collision
	  code.
2004-05-11 11:14:16 +00:00
Al Riddoch
60ffa51795 2003-10-30 Al Riddoch <alriddoch@zepler.org>
* common/const.h, common/const.cpp: Add constant for square
	  sight range.

	* physics/Vector3D.h, physics/Vector3D.cpp: Move distance
	  function into .cpp file.
2003-10-30 02:28:17 +00:00
Al Riddoch
8b764a710d 2003-10-29 Al Riddoch <alriddoch@zepler.org>
* 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.
2003-10-29 01:39:09 +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
0a4ca52a98 2003-10-15 Al Riddoch <alriddoch@zepler.org>
* physics/BBox.h, physics/Vector3D.h: Remove historical vector
	  and bbox classes.
2003-10-15 18:14:55 +00:00
Al Riddoch
22db788d51 2003-10-15 Al Riddoch <alriddoch@zepler.org>
* physics/Vector3D.h: Clean up notes, and implement collision
	  prediction function.
2003-10-15 00:36:33 +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
b584b32964 2003-09-08 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, client/Py_CreatorClient.h,
	  rulesets/Py_BBox.cpp, rulesets/Py_BBox.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_Quaternion.cpp, rulesets/Py_Quaternion.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/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
	  rulesets/Python_API.cpp:
	  Clean up python API code, with decent names for types,
	  decent error reporting, and making the more paranoid checks
	  only present in debug build.

	* common/BaseEntity.cpp, common/BaseEntity.h, server/Account.cpp:
	  Remove pointless method setRefnoOp, and put it in the body as
	  an inline method.

	* common/BaseEntity.h, common/BaseWorld.cpp, common/Setup.h,
	  common/Tick.h, common/operations.h, common/custom.cpp,
	  common/types.h, common/utility.cpp, common/utility.h,
	  modules/Location.h, physics/Vector3D.h, rulesets/BaseMind.cpp,
	  rulesets/Script.h, server/EntityFactory.h:
	  Clean up the dependency trees using more forward declarations.

	* common/inheritance.cpp, common/inheritance.h:
	  Move most of the implementation into the .cpp file as its
	  not suited to inlining.

	* rulesets/MemMap.cpp, rulesets/MemMap.h, rulesets/MemMap_methods.h:
	  Move contents of MemMap_methods.h into the .cpp file, as it is
	  not suited to inlining, and remove the file from the build.
2003-09-07 23:38:32 +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
241e8fd5af 2003-07-18 Al Riddoch <alriddoch@zepler.org>
* physics/BBox.h, physics/Quaternion.cpp, physics/Quaternion.h,
	  physics/Vector3D.h: Some cleanups.
2003-07-18 22:55:04 +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
b995597aec 2002-12-22 Al Riddoch <alriddoch@zepler.org>
* physics/Quaternion.h, physics/Vector3D.h: Add accessors to
	  allow direct modification of coordinates.

	* server/Persistor_impl.h: Remove duplicate attribute handler.

	* server/Restoration.cpp: And in the final code for loading
	  restored entities from database.

	* server/Restoration.h, server/Restorer.h,
	  server/Restorer_impl.h: Implement handler that populate
	  member variables of entity objects from database
	  structures.

	* server/ServerRouting.h: Make WorldRouter reference public.

	* server/WorldRouter.cpp, server/WorldRouter.h: Slight
	  modification to addObject(Entity *) to allow restored
	  objects to be added as well as new ones.
2002-12-22 02:29:21 +00:00
Al Riddoch
bc7ccd5d04 2002-10-02 Al Riddoch <alriddoch@zepler.org>
* physics/Vector3D.h: Cleaned up arithmetic operators.

	* Clarified rpm descriptions.

	* Big changes to make README more accurate and readable.
2002-10-02 10:29:12 +00:00
Al Riddoch
00199f8aa6 2002-07-27 Al Riddoch <alriddoch@zepler.org>
* 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.
2002-07-28 13:34:58 +00:00
Al Riddoch
07a7543461 2002-07-14 Al Riddoch <alriddoch@zepler.org>
* ALL: Cleaned up headers into correct order.

	* common/log.h, common/log.cpp: Write some logging code which
	  handles message of different types using syslog or standard
	  error, depending on whether we are running as a daemon.

	* ALL: Switched to using log() for all output.
2002-07-14 21:04:50 +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
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
d4d586d470 2002-03-07 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.h, server/WorldRouter.cpp, rulesets/Thing.cpp,
	  rulesets/Entity.h, rulesets/Entity.cpp, common/types.h,
	  common/BaseWorld.h: Switched to using sets instead of lists
	  for contains, and other data structore for performance.

	* rulesets/Line.cpp: Added debugging.

	* rulesets/MemMap.cpp, rulesets/MemMap.h, rulesets/MemMap_methods.h:
	  Switch to using vectors instead of lists for performance.
2002-03-07 16:02:43 +00:00
Al Riddoch
1cc1c5c416 2002-03-06 Al Riddoch <alriddoch@zepler.org>
* server/Routing.h: Map dictionary function more robust.

	* rulesets/Pedestrian.cpp: Increased debugging output.

	* rulesets/Character.cpp: Ensure it is handled if no move
	  op is created.

	* physics/Vector3D.h: Ensure operator!= is implemented as
	  compiler cannot be relied upon to use operator== instead.

	* common/inheritance.h, common/Database.cpp: ISO C++ fixes.
2002-03-06 19:40:55 +00:00
Al Riddoch
d19f2bc16f 2002-02-18 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.h:
	  Private un-implemented copy constructor and assignment operator,
	  so slicing won't occur.

	* physics/Vector3D.h:
	  Switched collision detection with parent so only the case where
	  the subject is completely clear of the object is checked for.

	* rulesets/Creator.cpp:
	  Implemented differentiation between priveleged in-game ops, and
	  normal in-game ops.

	* rulesets/Movement.cpp:
	  Increased verbosity of debugging output.

	* rulesets/Pedestrian.cpp:
	  Correctly implemented target based movement with changing containers.
2002-02-18 02:20:38 +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
56dcbd9486 * server/Lobby.cpp: Removed debugging output.
* server/Account.cpp: Added handling of private chat.

	* physics/Vector3D.h: Added more operators for efficient arithmetic
	  with vectors.

	* Added basis for mason ruleset.

Al Riddoch  <alriddoch@zepler.org>
2001-11-08 00:49:16 +00:00
Al Riddoch
0246eb22c3 * server/WorldRouter.h, server/Connection.h, rulesets/Pedestrian.h,
rulesets/Movement.h, rulesets/MemMap.h, physics/Vector3D.h,
	  modules/WorldTime.h, modules/Location.h, modules/DateTime.h,
	  common/Generic.h, common/BaseWorld.h: Ensure that single argument
	  constructors are explicit, so we don't get any naughty implicit
	  type conversion going on.

	* server/CommClient.h: Added an operation dump feature for debugging.

Al Riddoch  <alriddoch@zepler.org>
2001-10-28 20:21:28 +00:00
Al Riddoch
dcc3dfa85a * server/server.cpp, server/CommClient.h, client/ClientConnection.h,
tools/cycmd.cpp: Switched to using skstream library for socket
	  comms instead of hand rolled fstream based version.

	* ALL FILES: Fixed use of std namespace throughout all code.

This server is now ISO C++ compliand and builds with gcc 3.0.

Al Riddoch  <alriddoch@zepler.org>
2001-08-14 17:52:50 +00:00
Al Riddoch
3969bffbfe * common/inheritance.cpp, common/inheritance.h: Added code to store
atlas object inheritance tree.

	* server/Connection.cpp: Added code to allow client to query
	  atlas object inheritance using get ops.

	* example/client/InheritanceClient.*: Added example client which
	  queries the inheritance tree of the server.

	* rulesets/MemMap.h, rulesets/Py_Map.cpp: Made hooks lists private,
	  and added methods to access them.

	* server/Account.cpp, server/Lobby.h: Added correct handling of OOG
	  look ops when looking at own characters, other accounts, or the
	  lobby.

	* server/ServerRouting.h: Added function to generate serial numbers
	  for operations.

	* server/WorldRouter.cpp: Assign genuine serial number to all
	  in game operations as they are pulled off the queue.

	* Cleaned up header file multiple inclusion checks for uniqueness,
	  and made sure of ISO compliant use of std::string.

Al Riddoch  <alriddoch@zepler.org>
2001-08-02 14:27:06 +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
Al Riddoch
2c4a2036d3 * tools/cydbload.cpp: Added parameter handling so any file can
be loaded into the database.

	* tools/cycmd.cpp: Cleaned up usage and help functions.

	* tools/cyisoload.cpp: Cleaned up usage(), and made sure build
	  completes okay if libraries are missing, and missing
	  functionality is reported to the user.

	* server/server.cpp: Added config options that specifies that
	  the contents of the db should loaded on server startup. Cleaned
	  up some debug code.

	* server/WorldTime.cpp, server/WorldRouter.cpp,
	  server/Connection.cpp, rulesets/Structure.h,
	  rulesets/Python_API.cpp, rulesets/Py_WorldTime.cpp,
	  rulesets/Movement.cpp, rulesets/Entity.cpp,
	  physics/Vector3D.h, common/persistance.cpp,
	  common/database.h, common/database.cpp: Removed output either
	  to debug mode, or removed altogether.

	* common/BaseEntity.h, common/BaseEntity.cpp: Removed redundant header
	  includes.

	* server/ServerRouting.cpp, common/persistance.h,
	  common/persistance.cpp: Modified admin account function names it
	  fit convention.

	* module/Location.h: Fixed collision detection so that entities
	  with velocity set to 0 still get checked.

	* rulesets/Entity.cpp, rulesets/Thing.cpp, rulesets/Character.cpp,
	  rulesets/BaseMind.cpp, rulesets/Creator.cpp,
	  rulesets/ExternalMind.cpp, rulesets/Food.cpp, rulesets/MemMap.cpp,
	  rulesets/Movement.cpp, rulesets/Pedestrian.cpp, rulesets/Plant.cpp,
	  rulesets/Py_Location.cpp, rulesets/Py_*.cpp, rulesets/World.cpp:
	  Removed unnecessary #includes.

Al Riddoch  <alriddoch@zepler.org>
2001-06-04 11:22:27 +00:00
Al Riddoch
a303326964 * Changed many return statements to match convention.
* rulesets/Thing.cpp: Tweaked ranges code in movement to cut
	  down CPU time used.

	* common/BaseEntity.cpp: Re-ordered opEnumerate so that most
	  frequently used ops are detected soonest.

	* modules/WorldTime.h/.cpp: Moved WorldTime to modules directory.

Al Riddoch  <alriddoch@zepler.org>
2001-04-17 10:14:20 +00:00
Al Riddoch
2ccfaadef3 2001-04-14 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>
2001-04-16 16:26:44 +00:00
Al Riddoch
77a6d063dd * common/BaseEntity.*: Changed addToObject to take reference
instead of pointer.

	* physics/Vector3D.h: Re-ordered functions to allow correct inlining.
	  Changed member names to correct convention.

	* rulesets/MemMap.cpp,rulesets/MemMap_methods.h: Re-ordered function
	  to allow inlining, and moved non-inlinable functions into .cpp file.

	* Changed new operation initialisation to be done at construction
	  time instead of imediatly after construction for performance
	  reasons.

	* server/WorldTime.*: Modified member names for convention, and
	  moved non-inlineable function to .cpp file.

Al Riddoch  <alriddoch@zepler.org>
2001-04-12 11:13:06 +00:00
Al Riddoch
563107b595 * physics/Vector3D.h: Changed boundary condition of inBox() from
when part of entity leaves box to when the whole entity leaves the
	  box.

	* basic.vconf: Make tent use the structure base class.

	* client/define_world.py: Add bounding box to tent.

	* tools/cycmd.cpp: Added password entry.

	* server/Admin.cpp: Added "stat" admin command, to get server
	  details.

	* server/CommClient.h: Fixed include dependencies.

	* common/persistance.cpp: Added findAccount() method for systems
	  without db3.

	* rulesets/Thing.cpp: Added sending Apperance and Disappearance
	  operations to static entities when another entity moves out
	  of sight.

	* rulesets/Character.cpp: Added check to make sure an entity does
	  not collide with itself.

	* rulesets/Thing.cpp: Added check to make sure entity does not move
	  inside itself.

	* rulesets/Py_Location.cpp: Modified python location.copy() method
	  so that only the position and velocity is copied. This should
	  bounding boxes getting set on things which should not have them.

	* rulesets/Character.cpp: Added return statement to movement
	  handling, so move ops without arguments are not handled.

Al Riddoch (alriddoch@zepler.org)
2001-03-22 11:12:38 +00:00
Al Riddoch
60b256e670 * physics/Vector3D.h: Detect leaving time of bounding box, even if
entity is not yet in it.

	* modules/Location.h, modules/Location.cpp: Added get_xyz() to
	  find absolute coordinates.

	* modules/Location.h: Added true location based range checking.

	* servers/WorldRouter.cpp: Implemented new location based range
	  checking so that operations that take place inside buildings are
	  range checked properly.

	* servers/WorldRouter.cpp: Re-wrote id generation code to be a bit
	  more robust.

Al Riddoch (alriddoch@zepler.org)
2001-03-20 13:42:13 +00:00
Al Riddoch
e1536ff339 * physics/Vector3D.h: Corrected variable name convention error in
inTime() function.

	* rulesets/Character.cpp: Detect what if entity has already left
	  refs bounding box.

	* basic.vconf: Made sty use the Structure base class.

Al Riddoch (alriddoch@zepler.org)
2001-03-19 15:59:18 +00:00
Al Riddoch
6d651d4511 * modules/Location.h, physics/Vector3D.h: Added collision checking
functions to work out when an entity inside a box will hit the
	  outside.

	* rulesets/Character.cpp: Added check in collision code to see when
	  entity will leave the bouding box of its current parent.

Al Riddoch (alriddoch@zepler.org)
2001-03-19 12:24:08 +00:00
Al Riddoch
291621d9e8 * watchdog/*.c: Corrected C++ style comments in c code.
* */*: 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)
2001-03-16 11:38:14 +00:00
Al Riddoch
d839c45152 * rulesets/Py_Location.cpp: Added bbox and bmedian attributes of
location object to python wrappers.

	* rulesets/Character.cpp: Added initialisation of bounding box
	  median for characters.

	* modules/DateTime.*: Added configurability to date so that
	  each period of time has definable number of divisions. Default
	  is as per real world calendar restricted to 30 day months.

	* Added Fire operation handling to Thing class, so that any entity
	  with a burn_speed attribute will burn.

	* Added Food C++ base class, which implements cooking.

	* Altered the semantics of the Eat/Fire/Nourish operations so
	  multiple arguments are no longer required. from is used to
	  determine the other entity involved.

	* Added the beginnings of an astronomy system, but not yet used
	  anywhere.

	* Added appearance handling to BaseMind and Memory.

	* Added sequence no to all entities, which is incremented each time
	  a move or set operation is received. sequence no "seq" is included
	  in args of Appearance operations.

	* Moved functionality from Animal python base class into Character
	  C++ base class. This much improves the performance of modelling
	  animals, and means that player characters, and NPCs get hungry and
	  need to eat. Reduced the speed at which animals consume energy
	  so they don't starve quite as quickly.

	* Added collision prediction functions that handle both entities
	  having velocity.

	* Added combine functionality to Stackable. Divide comes next.
	  Once functional, this will become the base class for any items
	  which will commonly be used as stacks.

Al
2001-03-07 11:49:43 +00:00
Al Riddoch
3a5e4e56c0 * Changed oplist to use std::vector. Recoded and re-optimised use
of oplist to take advantage of vector's best performance.

	* Modified OP_SWITCH macros to improve speed, and made it inlinable.

	* Cleaned up python interface code to improve compile and link time.

	* Moved custom operation definitions in one header file per class
	  to improve modularity and compile time.

	* Modified boundingbox handling so it now uses size and median.

	* Added collision check and inbox member function to Vector3D class.

	* Added collision prediction and checking to Location and Vector3D
	  classes.

	* Added collision prediction into MovementInfo class.

	* Modified Thing::operator[] so that static attributes can be handled
	  and added Thing::set() which must be used to modify attributes.

	* Added collision resolution so characters can no longer walk through
	  each other.

	* Moved weight attribute to being static attribute of Thing, so it
	  can be much more easily handled in movement code.

Al
2001-02-26 14:41:10 +00:00
Al Riddoch
e7eb28366c * all file: Added copyright statement
Al
2001-01-26 16:38:23 +00:00
Al Riddoch
959ba0128d 2001-01-24 Al Riddoch <ajr@ecs.soton.ac.uk>
* Throughout entire code base:
	  Removed all obsolete code and commented out code relating to porting
	  from python. Removed interim data types bad_type and None. Added
	  const throughout where apropriate. Change various flags to bool
	  type. Removed unused members.

	* Added TODO list.

Al
2001-01-24 15:45:58 +00:00