537 Commits

Author SHA1 Message Date
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
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
989fc1e211
Remove out-dated comment 2019-07-17 10:30:36 +09:00
yvt
abcf65d536
Add clearsfxcache console command 2019-07-15 00:08:02 +09:00
yvt
ed508fadd5
Add IRenderer::ClearCache 2019-07-14 23:53:10 +09:00
yvt
a9561991c3
Add savemap console command 2019-07-14 22:29:15 +09:00
yvt
d6f5370581
Add the console window (WIP) 2019-07-14 01:38:28 +09:00
yvt
b02ad53109 Add View::RunFrameLate
`IRenderer::{FrameDone, Flip}` are now called in `RunFrameLate` instead.
This makes it possible to create a `View` wrapping another `View` to
insert a new 2D drawing pass, which is necessary to render the system
console.
2019-07-14 00:29:36 +09:00
yvt
cb89824f32
clang-format 2019-06-09 13:44:05 +09:00
YVT
c2677c0465
Merge pull request #832 from otzade/fix-minimap
Fix minimap
2019-06-09 13:43:05 +09:00
otzade
fabb3bd0ba Draw cursor inside block differently 2019-05-25 20:12:16 +03:00
otzade
aeeca9331e Some more changes..
Cursor made emissive, unshaded
Yellow cursor is back, but less opaque
2019-05-25 17:11:55 +03:00
otzade
a1def7e762 Merge branch 'master' into block 2019-05-25 13:19:59 +03:00
yvt
31a153e711 Add "ghost" rendering
This commit adds new model rendering options
`ModelRenderParam::{ghost, opacity}`.

> Specifies that the model is not an actual object in the virtual world, 
> thus does not affect the shading of other objects and does not appear
> in a mirror.
> ...
> In exchange, it allows the use of an opacity value other than `1`.
2019-05-25 18:56:41 +09:00
yvt
f75f55f33d
FallingBlock: Use the default material ID for generated VoxelModels 2019-05-25 15:42:51 +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
2ae2288034
Documentate 2019-05-25 12:39:06 +09:00
yvt
44f5dff416
Coding style: Initialize fields using default member initializers 2019-05-25 12:30:27 +09:00
yvt
b10c943eed
Harden the model custom color check 2019-05-25 12:18:32 +09:00
yvt
4ffd817056
Add ModelRenderParam::{castShadow, unlit} 2019-05-25 12:10:51 +09:00
teodor6140
ab9521c6ff Some changes
Yellow cursor no longer visible, only shows at the ends of an !active block line
Normal block cursor is the one with the corners only
Solid frame cursor is used when making a line, the corners-only one doesn't look good on lines
2019-05-24 21:10:52 +03:00
teodor6140
843f1434e5 Make lines thinner (1/24) 2019-05-24 18:49:45 +03:00
teodor6140
2e3a433dab Use model for block cursor 2019-05-24 17:28:38 +03: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
53a7820ff8
Merge pull request #828 from NotAFile/extinfo-support
Add support for ExtInfo Packet
2019-05-20 00:23:23 +09:00
yvt
672c9b7718
Update comment style 2019-05-20 00:22:24 +09:00
yvt
6f59b7e3fd
clang-format 2019-05-20 00:18:56 +09:00
notafile
6e24902324 Remove accidental line, add comment 2019-05-19 17:07:57 +02:00
NotAFile
a3e4810a18 Add support for ExtInfo Packet 2019-05-19 16:29:22 +02:00
admiral general salam
cf3ba37b6e
Highlight own name in scoreboard 2019-05-19 17:06:53 +03:00
yvt
cf2ecb4342
Apply temporal smoothing on the progress bar 2019-05-19 17:20:50 +09:00
yvt
720be50ff4
Show additional info (estimated remaining time, etc.) when loading map 2019-05-19 17:08:09 +09:00
yvt
bb51d1fe20
Fix to build with GCC 4.9 2019-05-19 16:51:27 +09:00
yvt
cd3304ef24
Display a progress bar when receiving a map
Replaces the old useless "num-bytes-loaded/16777216" message with a
real progress bar.
2019-05-19 16:25:39 +09:00
yvt
97ed5d46ad
Fix several small issues
- `GameMapLoader` did not start the decoding thread.
- `StreamHandle::operator=` caused SEGV for null handles.
- `PipeReader` prematurely stopped outputting data.
2019-05-19 16:13:21 +09:00
yvt
1a2287201d
Add GameMapLoader 2019-05-19 15:51:40 +09:00
yvt
94dbd30bb6
Add onProgress parameter to GameMap::Load 2019-05-19 13:50:07 +09:00
yvt
80972e1661 Reimplement GameMap::Load using RandomAccessAdaptor
It no longer reads all data from the input stream in advance, allowing
streamed parsing.
2019-05-19 13:26:29 +09:00
yvt
f19469f6fe clang-format 2019-05-19 13:03:35 +09:00
yvt
ac6bc01617 Make the movement of the flashlight non-rigid
Like the one in Metro 2033. Should have no negative effect on gameplay.
2019-05-05 23:32:57 +09:00
yvt
157219eb45 Remove a redundant include 2019-05-05 23:30:24 +09:00