35 Commits

Author SHA1 Message Date
yvt
3b5d7ecf33 feat(client): randomize the starting position of a bullet tracer 2021-06-20 16:15:16 +09:00
yvt
ef2d844a97
clang-format all source files under Sources/Client 2019-08-07 23:51:05 +09:00
yvt
60fd3191c5
Remove Handle::operator T*(), discouraging conversion to raw pointers
It was replaced by `Handle::GetPointerOrNull()`. Every use of
`GetPointerOrNull` should be reviewed. Some of them were already removed.
2019-07-20 15:47:42 +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
cb89824f32
clang-format 2019-06-09 13:44:05 +09:00
teodor6140
88bcb0c8b9 Fix minimap
Don't draw other spectators.
Don't draw own spectator icon when following a player.
Fix this strange bug where everyone is white when spectating
2019-05-21 08:09:31 +03: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
38ad676a29 Fix to compile on a debug build 2017-12-29 19:29:26 +09:00
yvt
ff2b6587a1 Display MapView in the free floating camera spectating mode
Fixes #682 partially.
2017-12-29 19:06:45 +09:00
yvt
660066fc2f Rewrite the camera control logic
- Fixes #664
- Fixes #520
2017-12-05 15:42:24 +09:00
yvt
ca892698e3 Minor fixes
- Remove unnecessary `volatile`
- Replace some operations with atomic ones for soundness
- Clean up
- Avoid certain UBs
- Typo
2017-06-25 21:15:27 +09:00
yvt
93ed881449 Redesign HUDs 2017-01-09 22:56:55 +09:00
yvt
8349b4c9d8 Tracers on MapView
Fixes #139.
2017-01-09 05:00:05 +09:00
yvt
9f30e9edfc Fix #499 2017-01-08 00:17:51 +09:00
yvt
42e7d56f59 Refactor 2017-01-05 21:12:00 +09:00
yvt
a7b9909b2e Refactoring 2017-01-05 03:03:39 +09:00
Tomoaki Kawada
2eb9e35c65 Apply clang-format to all non-external source files 2016-12-03 18:23:47 +09:00
Tomoaki Kawada
6a7af96daf Refactor setting variables 2016-11-19 21:27:13 +09:00
yvt
6b1eff6726 git add map weapon icons 2015-06-20 17:14:05 +09:00
pandaro
0468f319ac Fix 2015-01-26 21:52:27 +01:00
p
64dc4a1036 Improve the minimap system ,user configurable 2015-01-24 20:59:23 +01:00
yvt
7845a35062 Fix #165 2014-03-13 01:34:50 +09:00
yvt
db88ee4703 Fixed some little bugs (thanks to Clang static analyzer) 2014-02-25 19:35:37 +09:00
yvt
bfe0af47e9 Player color of the spectating local player is now explicitly set 2013-12-25 22:00:52 +09:00
yvt
c9970c0b53 Map icon updated 2013-12-16 21:58:38 +09:00
yvt
ca88537a6b Created new renderer method which works like SetColor but only accepts an alpha pre-multiplied color value, deprecating the badly-behaved SetColor method 2013-12-09 01:00:09 +09:00
learn_more
1a42e828de ModeType instead of dynamic_cast for gamemodes (dynamic_cast is slowwww) 2013-12-07 16:58:39 +01:00
learn_more
d41b91631f fix a shitton of warnings 2013-09-20 23:03:32 +02:00
yvt
13692657e1 Merge and some refactor (ref-counting some objects) 2013-09-14 13:28:19 +09:00
yvt
f0d34ef494 added GPLv3 header 2013-08-29 11:45:22 +09:00
yvt
ad48ac6b5a Now the screen fades when large map is visible 2013-08-27 22:53:06 +09:00
yvt
1ce7d2c30a Plays sound when map is opened/closed/zoomed 2013-08-27 22:45:36 +09:00
yvt
59fc2eb82b * Large map
* Small map's size is now variable (cg_minimapSize)
2013-08-27 22:27:49 +09:00
yvt
4b049818f4 Moved minimap to top right 2013-08-25 20:44:01 +09:00
yvt
931be8cf09 From pre-0.0.3 source code 2013-08-18 16:18:06 +09:00