Commit graph

655 commits

Author SHA1 Message Date
Al Riddoch
20f098849f 2006-08-14 Al Riddoch <alriddoch@zepler.org>
* server/CommServer.cpp: Only call idlers once every second, and
	  still only when the server is not busy of congested with network
	  traffic.
2006-08-14 09:29:17 +00:00
Al Riddoch
e5664b5a8e 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* client/ClientConnection.cpp, server/CommClient.cpp: Clarify the
	  error messages about non operation objects on the wire, and
	  use the same messages in the client.
2006-08-07 20:47:58 +00:00
Al Riddoch
a894a1b324 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/CorePropertyManager.cpp: Delete all the property
	  factories on shutdown, to keep the memory usage clean.
2006-08-07 20:02:54 +00:00
Al Riddoch
484657515c 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Rename some variables to clearer meanings.
	  Only send confirmation of subscription on entity creation if
	  the entity created is a character. Otherwise it is still created,
	  and can be manipulated, but not directly controlled by the
	  client.
2006-08-07 17:58:23 +00:00
Al Riddoch
61e42dbd17 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Only add initial inventory items if the entity
	  being created is a character. Add some comments.
2006-08-07 17:47:43 +00:00
Al Riddoch
c0f8184395 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Connection.h, server/Connection.cpp: Change disconnectObject
	  to removePlayer to make it clearer what the return value means,
	  and return a pointer to the removed object if it is a player account.

	* server/Connection.cpp: When removing an account which has been
	  logged out, remove all its characters which are not currently in
	  use from the connections list.
2006-08-07 15:57:22 +00:00
Al Riddoch
8c27d42fea 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/CommSlaveClient.cpp, server/CommSlaveClient.h: Require an
	  ID to be passed into the constructor for a slave connection.

	* server/CommSlaveListener.cpp: Generate an ID for client connections
	  to a slave server, and pass it into the CommSlaveClient constructor.
2006-08-07 14:54:55 +00:00
Al Riddoch
4f1d1a87ca 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/slave.cpp: Remove duplicate line added accidentally.
2006-08-07 14:51:36 +00:00
Al Riddoch
3895b6f067 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/CommServer.cpp: Remove FIXME and replace with comments
	  explaining the choice of value for epoll_create(). Check if
	  epoll_wait is returning the maximum events possible, so we know
	  if we should enlarge the array.
2006-08-07 14:10:52 +00:00
Al Riddoch
b43a0faf98 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/CommMDNSPublisher.cpp: Report a warning if avahi frees
	  a watch data structure, which is currently not implemented.
	  Move checks on the event type avahi requires to the callback
	  called by avahi, so it is only checked once. Ensure that no
	  events are flagged once the events have been processed.
2006-08-07 13:59:52 +00:00
Al Riddoch
e96ad598a4 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/CommListener.cpp: Report socket errors when accepting a
	  new connection.
2006-08-07 12:58:15 +00:00
Al Riddoch
f11608a9e9 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Admin.cpp: Remove obsolete FIXME.
2006-08-07 11:14:46 +00:00
Al Riddoch
43a8abceca 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/CommClient.cpp: Fully report the parent and objtype of
	  spurious objects received on the network.
2006-08-07 11:08:39 +00:00
Al Riddoch
f23d374bc1 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Report an error if a logout is received by
	  an account which is not connected.
2006-08-07 11:06:41 +00:00
Al Riddoch
d9bbee6d40 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Connection.h, server/Connection.cpp: Move the code that
	  decouples an object from the subscribed connection into its
	  own function, so the same code is invoked from two different
	  places.
2006-08-06 23:37:01 +00:00
Al Riddoch
aca1e0c161 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/CommServer.cpp: More thoroughly and accuratly report the
	  failure if epoll doesn't work.
2006-08-06 23:35:46 +00:00
Al Riddoch
0518007208 2006-08-03 Al Riddoch <alriddoch@zepler.org>
* server/server.cpp: Ensure that that world does not obtain
	  position or orientation when being restored from the database.
2006-08-03 11:18:28 +00:00
Al Riddoch
294c781dc7 2006-08-02 Al Riddoch <alriddoch@zepler.org>
* common/Use.h, common/Wield.h, common/Generic.h: Mark unused files
	  as removed from the build.

	* common/Attack.h, common/Burn.h, common/Chop.h, common/Connect.h,
	  common/Cut.h, common/Delve.h, common/Dig.h, common/Drop.h,
	  common/Eat.h, common/Monitor.h, common/Mow.h, common/Nourish.h,
	  common/Pickup.h, common/Setup.h, common/Tick.h, common/Unseen.h,
	  common/Update.h: Add class documentation to all the custom
	  properties.

	* common/DynamicProperty.h, client/ClientPropertyManager.h,
	  server/CorePropertyManager.h, server/PersistantThingFactory.h,
	  server/ScriptFactory.h, server/WorldRouter.cpp: Add documentation
	  to some places where it is missing.
2006-08-02 11:27:15 +00:00
Al Riddoch
60432449bb 2006-08-02 Al Riddoch <alriddoch@zepler.org>
* Doxyfile, client/define_world.cpp, client/define_world.h,
	  common/CustomOp.cpp, common/CustomOp.h, common/CustomOp_impl.h,
	  common/Load.h, common/Save.h, common/inheritance_impl.h,
	  common/operations.h, common/refno.h, common/utility.cpp,
	  common/utility.h, rulesets/Combat.h, rulesets/Entity_getLocation.h,
	  rulesets/Fell.h, rulesets/MemMap_methods.h, rulesets/Py_Optime.cpp,
	  rulesets/Py_Optime.h, rulesets/ThingFactory.h,
	  server/CommIdleSocket.h, server/ServerRouting_methods.h,
	  tools/Formatter.cpp, tools/Formatter.h, tools/cydbload.cpp,
	  tools/cyisoload.cpp: Make doxygen skip code that has been removed
	  and is just left in cvs for reference.
2006-08-02 10:19:03 +00:00
Al Riddoch
0d79c8300d 2006-07-31 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Don't call upper_bound in a loop
	  as it is return by value, and expensive to call.
2006-07-31 17:36:18 +00:00
Al Riddoch
e5d6d37be4 2006-07-19 Al Riddoch <alriddoch@zepler.org>
* rulesets/Thing.cpp, server/WorldRouter.cpp: Remove broadcasting
	  an appearance from Setup handlers, and put it WorldRouter when
	  the entity is added to the world, to take out the special case
	  from the Setup operation handler.
2006-07-20 23:02:39 +00:00
Al Riddoch
5dea86304c 2006-07-11 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Use the flag check to see if TO is set on
	  an operation, rather than checking if TO is empty.
2006-07-11 14:33:30 +00:00
Al Riddoch
0af4ecec9f 2006-07-10 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.h, server/EntityFactory.cpp: Improve test
	  for task classes by checking if the class parent has already been
	  installed as a class.
2006-07-10 01:45:28 +00:00
Al Riddoch
ad7eae558d 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Re-order checks for increased robustness.
	  Add more error reports.

	* server/CommMDNSPublisher.cpp: Remove a redundant FIXME.
2006-07-09 00:04:37 +00:00
Al Riddoch
b0803d1cba 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Use class number to check for delete ops.
2006-07-08 23:05:18 +00:00
Al Riddoch
01a095803f 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp, server/WorldRouter.h: Remove now obsolete
	  object list.
2006-07-08 22:53:47 +00:00
Al Riddoch
9543fc17a3 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.h, server/WorldRouter.cpp: Re-write the way
	  broadcasts are handled, so the code is cleaner, and non
	  perception operations are properlly broadcast without the
	  need to store an explicit list of all entities in the world.
2006-07-08 22:36:31 +00:00
Al Riddoch
a35479a6c5 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Re-write check for broadcast op types to
	  use numeric class number instead of string parents.
2006-07-08 22:16:04 +00:00
Al Riddoch
de48a78e09 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* rulesets/Thing.cpp: Remove undocumented FIXME.

	* server/WorldRouter.cpp: Move an assert into a better place
	  where it covers more.
2006-07-08 21:57:01 +00:00
Al Riddoch
d8b6d32803 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* rulesets/Creator.cpp, server/WorldRouter.cpp,
	  server/WorldRouter.h: Remove obsolete code to handle omnipresent
	  entities.

	* common/const.h: Remove obsolete flag enabling omnipresent
	  entities.

	* tests/consttest.cpp: Remove test for omnipresent flag.
2006-07-08 21:05:34 +00:00
Al Riddoch
87c135a6af 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* 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.
2006-07-08 20:45:10 +00:00
Al Riddoch
d55f933d8c 2006-07-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/Entity.cpp: Remove debug output.

	* server/CorePropertyManager.cpp: Remove more debug output.
2006-07-04 23:48:19 +00:00
Al Riddoch
57cb4b1a09 2006-07-03 Al Riddoch <alriddoch@zepler.org>
* common/PropertyManager.cpp: When the PropertyManager is deleted,
	  set the instance variable to 0.

	* server/EntityFactory.cpp, server/EntityFactory.h: Add a destructor
	  so the property manager can be deleted at shutdown.
2006-07-03 11:25:28 +00:00
Al Riddoch
640c3d28d7 2006-07-03 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, rulesets/Character.cpp,
	  rulesets/Entity.cpp, rulesets/Entity.h, rulesets/Food.cpp,
	  rulesets/Pedestrian.cpp, rulesets/Plant.cpp, rulesets/Py_Mind.cpp,
	  rulesets/Py_Thing.cpp, rulesets/Thing.cpp, server/WorldRouter.cpp:
	  Rename Entity members get(), set() and has() to getAttr(), setAttr()
	  and hasAttr().
2006-07-03 01:41:29 +00:00
Al Riddoch
1d53fa068f 2006-07-03 Al Riddoch <alriddoch@zepler.org>
* client/ClientPropertyManager.cpp, client/ClientPropertyManager.h:
	  A new class as a dummy property manager for the client side.
	  Never creates property objects.

	* client/client.cpp: Instantiate the client property manager
	  during client initialisation.

	* server/EntityFactory.cpp: Instatiate the server property manager
	  during server intialisation.

	* common/PropertyManager.h: Add the singletons accessor, and
	  make the addProperty member return a pointer to the property.

	* server/CorePropertyManager.h, server/CorePropertyManager.cpp:
	  Implement creating properties for server side entity objects.

	* rulesets/Entity.cpp: Use the property manager singleton to
	  create properties if a new attribute is set which is not already
	  a property, and its also not already a soft attribute.
2006-07-03 01:29:07 +00:00
Al Riddoch
852bb1d643 2006-06-30 Al Riddoch <alriddoch@zepler.org>
* FIXME, Makefile.am: Add new FIXME file which documents FIXMEs in
	  the code.

	* server/EntityFactory.cpp: Remove the terrain feature classes
	  implemented as hard coded classes.

	* data/basic.xml: Add the terrain feature classes as soft data
	  defined classes.
2006-06-30 15:11:57 +00:00
Al Riddoch
b8d4454f46 2006-06-29 Al Riddoch <alriddoch@zepler.org>
* server/CorePropertyManager.cpp: Add properties for START_INTERSECTIONS
	  and END_INTERSECTIONS.
2006-06-29 15:45:55 +00:00
Al Riddoch
aedb277897 2006-06-29 Al Riddoch <alriddoch@zepler.org>
* common/DynamicProperty.h, common/DynamicProperty_impl.h:
	  Add a second dynamic property template which can wrap any
	  property class, not just instances of Property<>.

	* server/CorePropertyManager.cpp: Install a property factory for
	  COORDS, to handle the coordinates in a line.

	* common/DynamicProperty.cpp, common/PropertyFactory.cpp: Remove
	  unnecessary template instanciations.
2006-06-29 14:57:19 +00:00
Al Riddoch
60c62e2d86 2006-06-26 Al Riddoch <alriddoch@zepler.org>
* rulesets/Entity.cpp, server/Account.cpp, server/Admin.cpp,
	  server/Connection.cpp, server/EntityFactory.h,
	  server/Persistor_impl.h, tools/cycmd.cpp:
	  Switch from using deprecated sigc++ 1.2 headers to the right
	  sigc++ 2.0 equivalents.
2006-06-26 16:49:25 +00:00
Al Riddoch
cec9814a60 2006-06-26 Al Riddoch <alriddoch@zepler.org>
* common/DynamicProperty.cpp, common/DynamicProperty.h,
	  common/DynamicProperty_impl.h: New property class for handling
	  properties or attributes added on the fly which need to store the
	  value.

	* common/PropertyFactory.cpp, common/PropertyFactory_impl.h,
	  server/CorePropertyManager.cpp: Use DynamicProperty in the
	  property factories for properties created on the fly.
2006-06-26 15:50:43 +00:00
Al Riddoch
eb64132657 2006-06-26 Al Riddoch <alriddoch@zepler.org>
* configure.ac: Add check for recent gcc versions, and turn of
	  strict aliasing on versions which have trouble with python
	  pointer casting.

	* common/PropertyFactory_impl.h, server/CorePropertyManager.cpp:
	  Return safe values from function stubs to get rid of compiler
	  warnings.
2006-06-26 15:28:43 +00:00
Al Riddoch
87505c6098 2006-06-26 Al Riddoch <alriddoch@zepler.org>
* common/PropertyFactory.cpp, common/PropertyFactory.h,
	  common/PropertyFactory_impl.h, common/PropertyManager.cpp,
	  common/PropertyManager.h: Add new classes to automate the
	  creation of property objects for known property types.

	* server/CorePropertyManager.cpp, server/CorePropertyManager.h:
	  Manager object that will coordinate creating properties
	  when they are added to entities.
2006-06-26 00:21:32 +00:00
Al Riddoch
07da807b3b 2006-06-06 Al Riddoch <alriddoch@zepler.org>
* 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.
2006-06-07 00:13:39 +00:00
Al Riddoch
4bfb14f060 2006-06-05 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp, server/CommClient.cpp, server/Account.cpp:
	  Only set refnos on ops if the client has set a serial number.

	* rulesets/Character.cpp: Simplify handling the transfer of
	  operations from client to in-game. Don't give new operations
	  serial numbers at this point.
2006-06-05 12:57:29 +00:00
Al Riddoch
99266d36fd 2006-06-05 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Only set the refno on an op if the original
	  had a serilno. Don't bother setting serialno on internal ops.
2006-06-05 12:28:14 +00:00
Al Riddoch
aade70dbb6 2006-06-01 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Add op to notify client when account object
	  is modified.
2006-06-01 10:26:34 +00:00
Al Riddoch
8031c1e470 2006-05-23 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Remove debug output.
2006-05-23 01:33:53 +00:00
Al Riddoch
5f9ea66bcc 2006-05-18 Al Riddoch <alriddoch@zepler.org>
* 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.
2006-05-18 01:43:09 +00:00
Al Riddoch
9dbb012466 2006-05-16 Al Riddoch <alriddoch@zepler.org>
* server/ExternalMind.cpp: Don't remove object from connection
	  as it may be required again, and it will be removed anyway if the
	  entity is destroyed.
2006-05-17 15:04:18 +00:00
Al Riddoch
0399017f5b 2006-05-16 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Don't remove characters from the connection
	  when they are logged out.
2006-05-16 23:11:08 +00:00