By default we don't want to use binreloc for setting the paths
dynamically. Instead this can be enabled through the command line
argument "--cyphesis:dynamicpaths=true".
We don't envision cyphesis will be distributed as a binreloc package
much. Using a container format such as Docker seems more plausible.
This is needed in order for types to work. Note that we currently can't
handle dynamically changing rules; we get all rules up front. This will
have to do for now though.
The idea is that the aiclient runs in a separate process and handles all
AI functionality.
This is done by having a "possession" client which recieves possession
requests from the server, and spawns new AI clients for each request.
In some cases you want to store property data for each instance. Often
you'll use member data on the entities themselves for this. But in some
cases you don't want to bloat the entity class with data for seldomly
used properties.
In these cases you can instead use the PropertyInstanceState class, and
keep a static instance of this per property.
When a signal is caught we want to exit from the boost::asio loop.
However, we can't do this by pusing another handler onto the io_service,
since this will involve a malloc call, and this can cause a deadlock (if
the signal handler is invoked from within a malloc call).
Therefore we instead need to use the signal_set functionality of
boost::asio, which guarantees that signal handling is done without
issue.
When a player controlled entity is deleted, and the player currently
isn't controlling it, it's placed in limbo. When the player once more
connects and start controlling it, the entity is respawned.
This prevents the world from being littered by inactive player
characters.
Instead of the root entity always being the default one (for new
entities being created etc.) we now can specify another entity which is
the default one.
When reporting the segfault we can't allocate any memory, since the
stack might have become corrupted. Using std::string allocates memory,
so we'll opt for the lower level fprintf().
Inquiries into the monitors, that is variables that
have a monitor attached to them, can be done on a
individual key, rather than getting the entire
lot and parsing them.
Since the streambuf instance will be invalidated by anything written to
it while it's being sent using an async call we need to use multiple
streambuf instances.
Since we're targetting the latest LTS release of Ubuntu as a nice
baseline, and that currently only supports 1.46, we need to remove the
nice steady_timer code. For now.
This commit should probably be reverted once a newer version of Ubuntu
LTS is available.
Don't keep the time in field, updated only at poll requests. Instead
calculate it when it's needed.
This fixes an old bug where all client movements were slightly
incorrect. The time was only recalculated at WorldRouter::poll calls. However,
when polling for IO the process waited up to 100 milliseconds. That
meant that any client received operation would get an on average 50
milliseconds offset in it's registered time. The result of this was that
most Move operations would be slightly incorrect, resulting in jerky
movement.
Since some properties are class properties without any state we need to
add a "remove" method to call, rather than putting cleanup logic in the
destructor.