Previously, the end of map transfer was detected by a number of fallible
heuristics, including checking if the map is loadable on every non-map
packet, when a timeout had been reached, or the map size given by the
server was reached. This broke in a number of scenarios, including when
an unexpected packet was sent.
Instead, we now detect the end of the map transfer when we receive a
state packet, as intended by the protocol.
This bug was introduced in ac4799abafbeb1d44d1b7166913406cd3a46b560.
This bug apparently only affected MSVC since the evaluation order of function
call parameters respect to other parameters is unspecified by the C++
specification.
Fixes#785.
This commit removes code that enables "Invalid" FP exceptions. Its
intent is unclear since it predates the git history of OpenSpades, but
it's probably for debugging.
Fixes#784.
- Overriding methods are clearly indicated with `override` keywords
- Remove redundant `virtual` keywords from destructors of subclasses
- Introduce `SPUnsupported()`, replacing most uses of
`SPNotImplemented()`, which now serves as a dynamic "TODO" marker
The global RNG state is now protected from simultaneous accesses by
employing a mutex.
Performance sensitive code requiring generation of a large number of
random numbers can utilize `LocalRNG`. This is not thread-safe but
provides a much greater throughput. `LocalRNG` is seeded by the global
RNG only at construction time.
* Add Counter for world updates per Second
This work was just done for personal testing and is probably not up to the
required code standards. Nonetheless, I have decided to send a PR as it is very
useful information and a good starting point.
* add MarkWorldUpdate method
- Fixes#681 (Pressing space while in free-camera mode does not move up).
- Fixes#678 (Have seconday fire cycle through the player list backwards
in sepctator mode).
- "Stop following a player" is bound to "R" (reload) by default.
- Add help messages displayed on the screen.