When an entity containing the respawnable property and being controlled
by an external mind is left disconnected for more than an hour the
server will enter into a state where it for each operation sent to the
entity will try to delete it. However, since it can't be deleted, and
each delete attempt actually will result in Move and Sight ops being
created, the result is a never ending build up of more and more ops,
with the end result being memory exhaustion and server crash.
All IG code should use the interface of LocatedEntity when dealing
with any entity, rather than sometimes requiring Entity. Add virtual
functions to the interface where required, and modify all other interfaces
to stop them using Entity. This makes the code way cleaner, and much better
de-coupled.
The Link reference provided is the object allowing direct communication
back to the external source of the operation. This allows us to handle
things more cleanly in some cases.
Re-organised negotiation code so it is non-blocking. Server is now
a bit less easy to attack.
* Marked files that are no longer part of the build with #error so
they never get built by accident.
Al Riddoch <alriddoch@zepler.org>
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>
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>
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>
make server operation customisable. Added comments.
* server/server.cpp, server/CommServer.h: Changed methods which
return int to returning bool if they are success/faul results.
* server/WorldRouter.cpp: Removed some unused debugging code.
Optimised heavily used code. Changed error message on
sending to a non-existant entity so that it is no longer
reported as a critical error.
* server/ServerRouting.h, server/Connection.h,
server/Connection_methods.h: inlined simple methods.
* server/Connection.cpp: Optimised frequently used code.
* server/CommClient.h: Simplified read method so it no
longer checks status redundantly.
* common/BaseEntity.h, rulesets/Thing.h, rulesets/Entity.h: Added
comments explaing purpose of classes.
* rulesets/Thing.cpp: Added detailed comments, and removed unnecessary
initialisation of some attributes.
* rulesets/PythonMindScript.cpp: Removed redundant NULL check.
* rulesets/MemMap.h: Added inlines for inlined methods.
* rulesets/Entity.h, common/BaseEntity.h: Moved seq from BaseEntity
to Entity as it does not apply to Out Of Game objects.
* rulesets/Entity.cpp: Added in stamp/seq attribute. Nade name
attribute optional.
* rulesets/Character.cpp: Simplified some op handling code
to make it more readable and hopefully faster. Added comments
explaining movement, removed unused commented out code, and
removed some unnecessary debugging code.
* common/operations.h: Explanatory comments.
* common/*.h: Re-wrote extended operations to fit in
with Atlas-C++ 0.4.2 conventions.
* common/log.*: Commented out unused logging code.
Al Riddoch <alriddoch@zepler.org>
This code will no longer build against the last release of Atlas-C++ 0.4
Please use cvs Atlas-C++ stable branch.
* 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>
begin with a lower case letter and do not contain _.
* Fixed retrieval of Account from database so that the Account
is now correctly referenced in the server object.
* common/types.h: Changed type name to make them clearer.
* rulesets/Character.h: Moved MovementInfo into its own class
file, and made it a base class, with a Pedestrian super class.
This allows different types of movement handling classes
to be used to handle things that move differently.
Al Riddoch <alriddoch@zepler.org>
script types to be cleanly dropped in.
* Re-work on server and communication related classes to use
references where they are apropriate. Code is now much more
robust.
* Huge cleanup of header files removing redundant includes.
* server/WorldRouter.h: Removed is_object_deleted because it
is broken and not used.
* server/Connection.h: Removed unused disconnect() methods.
* rulesets/Entity.*: Added new in game base class from which
all mind and object classes are derived. This removes
clutter of Thing class from mind classes.
* aiclient/*: Progress with creating AI client for mind handling.
* common/globals.*: Moved some globals out of server specific files.
* rulesets/Makefile.am: Separated rulesets code into 3 almost stand
alone packages; entities, mind and python interface code.
Acorn may well not work now, but I would apreciate it if people could
test the code on their setups. Lots of code has changed, and almost
everything is now cleaner.
Al Riddoch <alriddoch@zepler.org>
* */*: Fixed mistake in copyright statement.
* tools/cypasswd.cpp: Fixed usage message.
* tools/cycmd.cpp: Added tools for sending administrative commands
to server.
* server/server.cpp: Send terminate instruction to metaserver on
server shutdown.
Al Riddoch (alriddoch@zepler.org)
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
* 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
and shifting code around to optimise it.
* Heavy use of inlining to improve code performance.
* Added global exception handler to catch exceptions while processing
operations.
Al
* Implemented python function to deal with not being able to check
type of python objects implemented in C.
* Added method to thing for extracting location data from a
Message::Object
* More work on python references to improve leakage.
* Added flag so that python Operation object can own
the operation they point to, and thus delete it in dealloc().
* Implemented find_by_location() and find_by_type() as required in
MemMap, and corresponding python interface.
* Put in temporary work around to deal with the fact that a mind
does not know its name. Currently the mind is not able to
discover any of its bodies attributes, and I am not sure how
to solve this.
* Fixed Location and Vector3D so they use operator bool() to detect
whether they are set.
* Fixed bugs in getting parent from Location in python which caused
segfaults.
* Imported all the basic ruleset entity python scripts.
Goals now work to some extent, though nothing moves around still. The main
priority is to work out how minds inherit the attributes of their
bodies, and keep them up to date. aloril?
Al
objects in the world, mind and external minds. You can now log in, create
a character, and witness other operations in the world through receiving
sight operations.
Al
Now adding character body and mind code so mind and body abstraction can
work and communication between client and server character entity can
work. The code is not currently in any particular state, but I have not
commited for a while, so I am doing it now for security.
Al