38 Commits

Author SHA1 Message Date
yvt
ef2d844a97
clang-format all source files under Sources/Client 2019-08-07 23:51:05 +09:00
yvt
6e262ea6ec
Add stmp::make_unique
This template function is a polyfill of `std::make_unique`, which is
unavailable in GCC 4.9 (should we even be supporting this old thing?).
2019-07-20 16:17:10 +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
980b484c32
Instantly wrap Corpse with std::unique_ptr after construction
Note: IIRC `make_unique` isn't supported by some of the targeted
compilers.
2019-07-17 10:49:33 +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
203528a769 Add a hotkey to expand the chat log
Closes #744.
2019-01-01 14:47:40 +09:00
Davi
358800f260 Flashlight fixes: dead players and spectators may no longer toggle the flashlight, spectating other players while dead will keep your flashlight off 2018-07-15 16:07:34 -03:00
Godwhoa
474f5cbf69 Fix input for ThirdPersonLocal
Closes: #717
2018-02-19 23:48:53 +05:30
yvt
28cd9a3c87 clang-format 2017-12-29 20:49:10 +09:00
yvt
77dfedb533 Fix #678 for real 2017-12-29 20:35:32 +09:00
yvt
336d476e8d Attempt to enable follow cam when no one's there no longer leaves you in an invalid state 2017-12-29 20:34:31 +09:00
yvt
2f5a21be1e Prevent a dead player from being first-person spectated
Fixes #679.
2017-12-29 20:15:23 +09:00
yvt
4bd819adcd Fix spectator display and keyboard input
- 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.
2017-12-29 20:06:49 +09:00
yvt
660066fc2f Rewrite the camera control logic
- Fixes #664
- Fixes #520
2017-12-05 15:42:24 +09:00
NotAFile
266d141e04 First person enhancements (#656)
* only switch first-person mode while spectating

closes #655

* use first person view for first-person spectating

* don't spectate specators; refactor
2017-09-17 14:15:06 +09:00
yvt
fb6b0ae838 Change default input parameters to (approximately?) match the original 2017-02-20 03:12:10 +09:00
yvt
a7b9909b2e Refactoring 2017-01-05 03:03:39 +09:00
yvt
97247057b2 Fix #242 2017-01-04 23:27:50 +09:00
yvt
2ecbd554b4 Support Ogg Opus audio files (.opus) on macOS 2016-12-18 00:45:17 +09:00
yvt
2046afd660 Fix #487 2016-12-17 22:19:54 +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
6593371254 use std::isnan
This fixed building on Linux (Ubuntu 16.04) for me.
2016-07-01 19:51:38 -07:00
Samuel Walladge
0ac59fdbae fixed isnan not declared 2016-03-07 09:37:15 +10:30
Chameleonhider
39a7c74fa6 Pressing sprint doesn't stop anymore from using tool / weapon
Pressing sprint key used to prevent using tool/weapon. Now sprint key
must be pressed together with movement keys (while not crouching) to
prevent you from using tool/weapon.
2016-02-11 10:43:55 +02:00
yvt
f4c4f52254 Adjusted auto-focus 2015-06-20 17:15:01 +09:00
yvt
40f8be07c0 Realistic camera focal control mode
Set `cg_manualFocus` to `1` to use it. By default, mouse wheel adjusts the focal length, and pressing mouse wheel button enables auto-focus.
2015-06-20 17:10:26 +09:00
Way, No
a637e177e3 added first person view 2014-12-17 01:17:03 +10:00
Dennis Barzakovsky
18d4a6d7ec yvt/openspades#243: fix usage of comma key 2014-04-24 15:03:01 +03:00
yvt
11a6e9d802 Update sounds 2014-03-22 01:37:14 +09:00
yvt
fee4b486b6 #168 2014-03-13 01:44:58 +09:00
yvt
cf8d4f3cb0 Alerts 2014-03-11 03:42:04 +09:00
yvt
a600236b76 Merge branch 'master' of https://github.com/learn-more/openspades into learn-more-master
Conflicts:
	Sources/Client/Client.cpp
2014-03-09 23:16:20 +09:00
yvt
2599d14900 Refactor 2014-03-09 21:43:38 +09:00