93 Commits

Author SHA1 Message Date
David Carlier
2c0dab7c32 Choosing the driver via a new submenu instead 2022-07-18 19:25:11 +01:00
yvt
c1b5781752 feat(client): support specifying the muzzle and case ejection positions in the weapon skins 2021-06-20 16:15:17 +09:00
yvt
8ac141daf4 feat(draw): support linear lights 2021-06-20 16:11:39 +09:00
yvt
18f8b77c4a feat(gui): indicate the usage of a pre-release version in the startup window 2021-05-03 00:38:12 +09:00
yvt
b1022213f3 Merge branch 'master' into patch-modernize 2021-05-02 23:39:03 +09:00
YVT
d92149713a
Add a missing call to CheckError 2019-07-24 18:11:04 +09:00
yvt
eabb77fcce
Update VoxelModel
- Use `unique_ptr` instead of manually memory management
- All of its methods now perform bounds checking in release builds. The
  exception is `*Unchecked` methods.
- Use an anonymous namespace for local definitions in `VoxelModel.cpp`
- `VoxelModel::LoadKV6` methods now returns `Handle<_>` and accepts
  `IStream &`.
- Delete the copy constructor and assignment operator
- Remove debug code
2019-07-23 21:39:56 +09:00
yvt
a2eff8fda5
Update Bitmap
- Added doc comments to all of its methods.
- `Bitmap::Load` methods now returns `Handle<Bitmap>`.
- `Bitmap::Load(IStream *)` now accepts `IStream &`.
- `Bitmap::{GetPixel, SetPixel}` now perform bounds checking in release
  builds.
2019-07-23 19:31:24 +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
e6227b3361
Update IRenderer for null safety and safe memory management 2019-07-20 13:48:49 +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
ed508fadd5
Add IRenderer::ClearCache 2019-07-14 23:53:10 +09:00
yvt
5794acbc18
Register the assignment behavior of ConsoleCommandCandidate 2019-07-14 20:36:12 +09:00
yvt
1634c61512
Expose the command name autocompletion to the script 2019-07-14 19:51:30 +09:00
yvt
cacec5b470
Invoke View::ExecCommand from the console window 2019-07-14 14:59:58 +09:00
yvt
d6f5370581
Add the console window (WIP) 2019-07-14 01:38:28 +09:00
yvt
c910bd4846
Remove Mutex, replacing their uses with std::{mutex, recursive_mutex} 2019-05-25 15:00:32 +09:00
yvt
7524bb608c
Remove ModelRenderParam::unlit 2019-05-25 13:06:41 +09:00
yvt
4ffd817056
Add ModelRenderParam::{castShadow, unlit} 2019-05-25 12:10:51 +09:00
yvt
6426247f09 Use C++11 atomics in place of AngelScript's implementation
AngelScript's implementation uses now-deprecated `OSAtomicIncrement32`
and generates compiler warnings.
2018-12-31 21:57:11 +09:00
yvt
cfb972f944 Improve code quality
- 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
2018-10-13 14:43:49 +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
5948ef1a2a Exclude unknown configs in the in-game config editor
Fixes #693.
2017-12-30 21:02:36 +09:00
yvt
49cc61c573 Use more smart pointers and modern language constructs 2017-12-15 23:05:08 +09:00
yvt
13995e3c63 Fix a memory leak caused by the AngelScript binding code
Fixes #687.
2017-12-15 22:31:39 +09:00
YVT
bc979a32e1 Update Clipboard.cpp
(Hopefully) this fixes #603
2017-08-18 18:25:40 +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
8e8f2a8772 (Hopefully) fixes #577 2017-02-25 21:19:19 +09:00
yvt
2d2fbc0d9c Fix to compile with GCC 4.9 (again) 2017-01-30 01:22:27 +09:00
yvt
7272c067a7 Automatic update check
Fixes #526.
2017-01-30 01:02:40 +09:00
yvt
23e8fae9b9 Expose PackageUpdateManager to the scripting environment 2017-01-29 23:44:52 +09:00
yvt
2ad5074d9c Rename SetSoundAmbience to SetSoundEnvironment 2017-01-07 03:55:39 +09:00
yvt
7a14c39911 Enhancement to weapon sound effects 2017-01-06 04:01:10 +09:00
yvt
6be6bd3541 Fix PrimitiveArray 2017-01-05 05:29:48 +09:00
yvt
022fceedbf Fix the usage of Angelscript 2017-01-05 04:50:26 +09:00
yvt
a7b9909b2e Refactoring 2017-01-05 03:03:39 +09:00
yvt
d505bfae91 Expose “FontManager” to the scripting environment 2016-12-16 05:05:23 +09:00
YVT
5b887ddb96 Provide an option to browse the config directory (#481)
Fixes #268.
2016-12-08 04:40:33 +09:00
yvt
7c615bd259 Provide an option to reset all settings
Can be found in Startup configuration window -> Generic tab.
Fixes #360.
2016-12-08 01:29:41 +09:00
Marco Schlumpp
986e27436b
Implement simple favorite system. 2016-12-03 20:04:11 +01:00
Tomoaki Kawada
2be6524d02 Implement language switcher
Fixes #445.
2016-12-04 00:22:05 +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
VelocityRa
30d133ce31 Use better random generator 2016-11-22 23:08:35 +02: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
Tomoaki Kawada
d2debd19fe Update AngelScript to 2.31.1
This (hopefully) fixes #416.
2016-11-10 22:21:19 +09:00
Tomoaki Kawada
89748d6bc6 Reduced compiler warnings 2016-07-15 19:40:05 +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
yvt
7072e15b63 Mask write to configs from certain scripts 2015-01-24 12:44:57 +09:00
yvt
d83778ce05 Fixed to compile on MSVC 2013 2014-06-14 00:38:20 +09:00