* Multiplayer Dumbfire Rollback
This creates a packet that sends the relative position and orientation info for a primary or dumbfire missle shot. The client creates this packet when firing those two types of weapons and sends it to the server. The server goes back to the frame that the client fired the weapon and quicky resimulates all the frames in-between.
This includes collision detection, restoring positions, orientations and veloicties, but not subsystem orientations.
* Address Feedback
* allow clients to send subsystem info
* Check for object number not weapon number
* Readability Adjustment
Also slightly optimizes some of the hooks because the adding/removing of hook variables should be guarded by the same if() block that controls execution.
The previous system was kind of hacky and made things a bit inflexible.
This improves that system quite a bit and also adds unit tests for the
hook variable functionality.
A bit of small cleanups in preparation of larger scale refactoring.
remove unused member heavy_collision_cm_pos of collision info struct,
which was set in several places but never used.
In this block of code, the conditions were checked with a set of four hook variables but then subsequently run with only two. This adds all four previously used variables. More importantly, it adds the hook variables with expected and user-friendly names, since 'self' and 'object' are not necessarily intuitive.
This maintains the type information which can be used for enforce
const-correctness and also for implementing more advanced ways of
handling the type information.
Applying the 'static' keyword to applicable routines both informs the
developer where the routine is likely to be used as well as allows the
compiler to perform additional optimizations.
Signed-off-by: Peter Mitsis <[email protected]>
This allows to render screen space decals into the deferred lighting
buffers no matter how complex the underlying geometry is.
Currently there is only limited support for using this in the engine.
Only weapon impact decals are supported at the moment for testing
purposes.
This introduces a new mechanism for handling bit flags. Instead of using an int (or two, or three) to write bits into, this uses the std::bitset in a wrapper class that accepts an enum class as input. This means that certain classes of errors we've had a few of in the engine, where a coder used the wrong set of flags or checked them against the wrong variable (SF_STEALTH vs SIF_STEALTH, for example) can now be detected at a compiler level rather than not at all.
This seems preferable to storing an entire mc_info object on every weapon, when the vast majority of projectiles (by the very nature of the fact that they still exist) won't have collided with anything.
On the other hand, I'm not wild about allocating and freeing memory every time a weapon collides with a ship or debris. If anyone has a better solution, I'm all ears.
This adds extra sanity checks to the Weapon Damage Decay code and also
adds a new parameter for weapons that can GAIN damage is they approach
the end of their lifetime.
This adds the $Daamge Time: and +Min Damage: entries to weapons.tbl.
These parameters are used to create damage attenuation for non-beam primary weapon.