24 Commits

Author SHA1 Message Date
yvt
e6227b3361
Update IRenderer for null safety and safe memory management 2019-07-20 13:48:49 +09:00
yvt
3916a39713
Replace raw pointers in Corpse::Corpse with references 2019-07-17 10:43:25 +09:00
yvt
5db97f7f10
clang-format 2019-07-17 00:31:22 +09:00
yvt
7c3a39e639
Modernize
- Replaced raw pointers with references or smart pointers. Nullable
  references are represented by `stmp::optional<const T&>`. (There are
  many raw pointers still remaining. They should be replaced at some
  point.)
- Added class template specializations `stmp::optional<T &>` and
  `stmp::optional<const T&>`.
- Fixed `stmp::optional`'s various behaviors
- `World::{players, playerPersistents}` are now `std::array`.
- More uses of `stmp::optional` to clarify the semantics
- Renamed `PlayerThrownGrenade` to `PlayerThrewGrenade`
- Replaced old-style `for` loops with range based ones
- Deleted `Player`'s default constructors and `operator =`
- Deleted `TCGameMode`'s default constructor and `operator =`
- Deleted `CTFGameMode`'s default constructor and `operator =`
- Replaced `static_cast` with `dynamic_cast` for down-casting
- `RefCountedObject::operator*()` no longer requires non-constness to
  return `T &`.
- Replaced the uses of `std::vector::operator[]` with `std::vector::at`
  for bounds checking.
- Made some methods of `GameMap` `const`.
- Added some null checks.
2019-07-17 00:31:00 +09:00
yvt
c7fb662f77 Remove dead code 2018-12-31 21:35:37 +09:00
yvt
30e49b68aa Implement thread-local random number generator 2018-09-18 22:18:54 +09:00
yvt
585cbfce1c Improve random number generation
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.
2018-09-17 23:48:38 +09:00
yvt
a853a58631 Remove corpses after respawn on a certain game mode
Fixes #145.
2017-09-03 16:56:01 +09:00
Tomoaki Kawada
ebd79c0099 Change #include style
All `#include`s to other subsystem now use angle brackets, e.g., `#include <Core/Math.h>`.
2016-12-03 18:49:07 +09:00
Tomoaki Kawada
2eb9e35c65 Apply clang-format to all non-external source files 2016-12-03 18:23:47 +09:00
Tomoaki Kawada
18f3e81fd1 Convert space indentations to tabs 2016-11-20 19:13:00 +09:00
Tomoaki Kawada
6a7af96daf Refactor setting variables 2016-11-19 21:27:13 +09:00
YVT
f1f88d3e18 Fix to compile with MSVC 2015 2016-11-18 04:44:57 -08:00
willismonroe
fc557aeb10 use std::isnan
This fixed the build on Linux for me.
2016-07-01 19:54:17 -07:00
Samuel Walladge
0ac59fdbae fixed isnan not declared 2016-03-07 09:37:15 +10:30
yvt
d1533f6181 Improved corpse’s stability, and added corpse debug mode 2013-11-18 22:48:47 +09:00
learn_more
c196350cc4 Merge branch 'master' of https://github.com/yvt/openspades into develop
more warnings
2013-09-20 23:11:12 +02:00
learn_more
d41b91631f fix a shitton of warnings 2013-09-20 23:03:32 +02:00
yvt
521a9d96b0 Merge branch 'master' of https://github.com/yvt/openspades 2013-09-13 01:33:57 +09:00
yvt
e377355d2b Corpse: angular momentum conservation 2013-09-13 01:33:51 +09:00
yvt
3e60e1b846 Update corpse behavior 2013-09-13 00:46:59 +09:00
yvt
e262eb35b4 Updated corpse behavior (correct initial velocity, and more damp in water) 2013-09-13 00:32:07 +09:00
yvt
f0d34ef494 added GPLv3 header 2013-08-29 11:45:22 +09:00
yvt
931be8cf09 From pre-0.0.3 source code 2013-08-18 16:18:06 +09:00