There was a bug in the entity API, where getMotion() was pushing the
origin instead of the motion. This has been corrected. Since this is an
important bug, and because the features for this leg is finished, I'll
merge this to master.
Instead of using a massive block of case statements in serial_utility.cpp,
I've added FORMAT_* tags to SerialPacketType as a way to destinguish
between type values, at least internally. I can't believe I missed this
for so long.
I've also added a placeholder for the network API, as I was working on
that when I ran into this problem.
I need to devise a way to update the clients about changes to their
characters directly from the lua scripts. This isn't too important per se,
but the pattern will be important for the monster and trigger systems.
It seems like the project as a whole is fairly stable now. I'm prepping to
merge this into master, despite the lack of monsters ATM. Hopefully this
break hasn't affected the stability too much.
This new method rolls three otherwise similar methods together. There is
still a conditional which handles room movements separately, but it's much
smoother, and PumpPacketProximity is utilized much more.
I've also added a stub for graphical attack data via
HandleCharacterAttack()
RoomData now has monsterMgr and waypointMgr members, so that it can
compare it's characters to the monster & waypoints, etc.
RoomManager has been updated. It now has a database reference, which is
passed to the monsterMgr of new rooms. The room API also has functions
which expose these managers to lua.
This is my solution for handling inheritance via lua. The Entity class is
only a base class, so the entity API is designed to be copied from, rather
than used directly.
linit.c: It should be noted that the Entity API must always be placed
before the utilizing child APIs. I don't know about how lua handles things
internally, but I'm assuming that this is the case.
There's no real meat in the API code yet, since that's just busy-work.
Right now I feel beter about writing the connective tissue. This case
could aslo extend to the waypoint and monster APIs.
The waypoint system had some API and class methods removed for brevity.
I'm planning on giving each room it's own waypoint manager, so it can
compare it's waypoints against the characters in that room alone. If it
turns out to be a good pattern, I'll do thae same for monsters.