Pablo-Dallegri
bb751ebebb
Use unit inteval
2021-05-05 07:32:23 -03:00
Pablo Dallegri
e59acb67ab
Change chat beep from toggle to slider
2021-05-05 04:12:08 -03:00
yvt
b1022213f3
Merge branch 'master' into patch-modernize
2021-05-02 23:39:03 +09:00
yvt
c073c92c6a
fix(client): don't pass nullptr
to std::nan
, don't use std::nan
at all
...
`std::nan` converts a given string to a quiet NaN value in an
implementation-defined way. It accepts an empty string, but that doesn't
mean you can pass `nullptr`. Passing `nullptr` causes a segmentation
fault on Linux but does not on macOS, which I think is why I missed that
in the first place.
Actually, `std::nan` isn't even really needed here, hence I replaced it
with `NAN`.
2021-01-05 16:22:17 +09:00
yvt
4aef2bbef8
Play hit sounds only once per attack
...
Fixes #925 .
2020-12-17 00:59:09 +09:00
yvt
cb5f0d9284
fix: remove any remaining references to cg_smp
...
Fixes #923 .
2020-12-17 00:39:23 +09:00
Tomoaki Kawada
738c7e509e
Merge pull request #848 from Tuupertunut/master
...
Fixed map loading with protocol 0.76.
2020-08-06 15:21:09 +09:00
Tomoaki Kawada
5a57a5e406
Explain why we send MapCached
2020-08-06 15:19:16 +09:00
yvt
4fbe5ee5ce
Reset intels and team scores after receiving winning IntelCapture
...
This problem was originally reported in:
<https://github.com/piqueserver/piqueserver/issues/586 >
Upon receiving `IntelCapture` with `winning = 1`, the voxlap client
resets both team scores and the holding status of both teams' intels,
but OpenSpades didn't do that, resulting in a weird behavior described
in piqueserver/piqueserver#586. This commit changes OpenSpades' behavior
to be congruent with the voxlap client's behavior.
Fixes #890 .
2020-04-20 13:38:57 +09:00
hourai-dev
a0aa55b24a
Removed unnecessary call to GetHorizontalLength().
2020-04-16 12:46:13 -05:00
yvt
ada518be9d
Merge branch 'gunplayfix' of https://github.com/BR-/openspades into BR--gunplayfix
2019-12-09 00:25:36 +09:00
dtomlinson-ga
4ce8546df8
Fix typo in Player::GetVelocity()
...
Corrected GetVelocty() to GetVelocity() everywhere it occurs.
2019-11-28 22:10:38 +09:00
Anthony Som
08e792e7fa
Fix aim-down-sight sound when ammo count is zero ( #858 )
...
* Fix aim-down-sight sound when ammo count is zero
Fixes #858 .
* Delete settings.json
2019-10-08 08:51:47 +09:00
Tuupertunut
3539b4240c
Fixed map loading with protocol 0.76.
2019-09-22 21:16:05 +03:00
yvt
e4e72d7dca
ParticleSpriteEntity
: Replace Client *
with Client &
2019-08-08 01:22:01 +09:00
yvt
8d9145c6ec
SmokeSpriteEntity
: Replace Client *
with Client &
2019-08-08 01:20:26 +09:00
yvt
eece4c3251
TCGameMode
: Force bounds check
2019-08-08 01:11:59 +09:00
yvt
99489cab66
TCProgressView
: Replace Client *
with Client &
2019-08-08 01:10:28 +09:00
yvt
1a4594d9bd
Tracer
: Replace Client *
with Client &
2019-08-08 01:09:22 +09:00
yvt
066eda82df
Add bounds check
2019-08-08 01:08:12 +09:00
yvt
ef2d844a97
clang-format all source files under Sources/Client
2019-08-07 23:51:05 +09:00
yvt
b49028d822
Add const
to GameMapLoader::IsComplete
2019-07-24 19:11:36 +09:00
yvt
3b15a205ff
Replace Deque
with std::deque
...
Profiling indicated that a little time (< 10% of `ApplyBlockActions`'s
total execution time) is spent on `Deque` when a large chunk of block
is being removed. Thus even *if* this commit slows down things, the
performance impact would be insignificant.
2019-07-24 19:11:36 +09:00
yvt
d1ba2a729b
Fix to build with GCC 4.9
...
> error: invalid use of incomplete type ‘class spades::Bitmap’
2019-07-23 22:55:02 +09:00
yvt
f841c94db7
Change the return type of CreatePipeStream
to use unique_ptr
2019-07-23 22:28:56 +09:00
yvt
da7e61b25c
Change std::regex
static local variables to global
...
Removes the runtime cost caused by lazy initialization.
2019-07-23 22:25:12 +09:00
yvt
701105f916
Change the return type of file opening functions to std::unique_ptr<_>
...
This also fixes a memory leak in `MainScreenHelper::SaveFavorites`.
2019-07-23 22:14:10 +09:00
yvt
d248ac2460
Change the return type of GameMapLoader::TakeGameMap
to Handle<_>
2019-07-23 21:57:40 +09:00
yvt
5fe8b0fe18
Remove StreamHandle
...
It was functionally identical to `std::shared_ptr<IStream>`.
2019-07-23 21:57:40 +09:00
yvt
770f11a0d1
FTFont: Get rid of raw pointer
2019-07-20 17:16:09 +09:00
yvt
4c69adb972
Reformat
2019-07-20 17:13:16 +09:00
yvt
a0c9a661eb
Remove unused variables
2019-07-20 17:12:45 +09:00
yvt
0754d4e3dc
clang-format
2019-07-20 17:12:18 +09:00
yvt
e54a3ff470
FTFontSet
is no longer RefCountedObject
2019-07-20 17:10:27 +09:00
yvt
516156e39e
FTFontSet: Construct unique_ptr
earlier
...
This is a subtle change, but fixes memory leak caused by `std::list`'s
memory allocation failure.
2019-07-20 17:06:34 +09:00
yvt
b9a5d80f7b
Use Handle::New
to construct T <: RefCountedObject
...
Unless `T::T(Args...)` is inaccessible from `Handle::New`, in which case
`Handle::Handle{new T(args...), false}` should be used.
2019-07-20 17:01:04 +09:00
yvt
830db57c01
Require rvalue for Handle::Unmanage
2019-07-20 16:38:21 +09:00
yvt
b4dcec2e1c
Use make_unique
to construct unique_ptr
2019-07-20 16:34:35 +09:00
yvt
725ee9f706
Merge remote-tracking branch 'origin/master' into patch-modernize
2019-07-20 16:18:10 +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
1b67c4eff0
Turn BlockHitAction
into enum class
2019-07-20 16:03:33 +09:00
yvt
0470ca3187
ParticleSpriteEntity: Receive images via Handle<IImage>
2019-07-20 16:00:07 +09:00
yvt
6513bd0075
ParticleSpriteEntity: Use Handle
for reference counting
2019-07-20 15:57:56 +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
fae85af23d
Make stmp::optional::operator=
behave more like std::optional
...
This means the inner type's `operator=` is used whenever possible,
instead of using `T::T(const T&)` or `T::T(T&&)` all the time.
2019-07-18 16:12:44 +09:00
yvt
7b3d6bf28d
Change the return type of HotTrackedPlayer
2019-07-17 11:11:52 +09:00
yvt
9735d5855e
Change the return type of GetLocalClientPlayer
2019-07-17 11:05:21 +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
f742420187
Replace raw pointers in CorpseUpdateDispatch
with references
2019-07-17 10:46:32 +09:00