1428 Commits

Author SHA1 Message Date
David Carlier
0ce509356a sdl windows little code simplification. 2022-08-17 21:36:26 +01:00
yvt
e3aa0337ff
Merge pull request #1039 from devnexen/purify_this
Apply GCC/Clang pure attribute on a few functions
2022-08-17 23:36:35 +09:00
yvt
262039318a
Merge pull request #1025 from devnexen/download_package_manager_upd2
Abort an ongoing transfer if it's too slow. Report the reason on a libcurl error.
2022-08-17 23:29:40 +09:00
yvt
88dc428b13 refactor(gui): use Format in place of snprintf to format a message 2022-08-17 23:20:38 +09:00
David Carlier
1b8a72deae gcc/clang attribute pure usage in few places. 2022-08-14 08:36:36 +01:00
yvt
2fca03cf7f
feat: support choosing OpenAL devices (#1003) 2022-08-14 00:26:32 +09:00
David CARLIER
282c7ae031
chore(cmake): improve Xext lookup for systems other than Linux 2022-08-14 00:25:23 +09:00
yvt
2f23b8f429 refactor(gui): let SPRaise format message instead of using snprintf 2022-08-12 00:32:41 +09:00
yvt
4fee99eec9
Merge branch 'master' into openal_handling_upd 2022-08-12 00:28:07 +09:00
David CARLIER
f5cb7ab812 Adding likely/unlikely to optimise some code paths. 2022-07-23 17:42:14 +01:00
David Carlier
2c0dab7c32 Choosing the driver via a new submenu instead 2022-07-18 19:25:11 +01:00
David Carlier
981569e23d openal driver update proposal.
if we cannot have proper handle on the default, attempt
to go through to get first functionning device.
2022-07-18 19:19:25 +01:00
David Carlier
dfefa5d298 software renderer evaluates simd set in advance instead. 2022-07-09 07:18:44 +01:00
David Carlier
add7c5c60a applying some changes for the server list and connection timeout. 2022-06-25 11:20:43 +01:00
yvt
8f33b1482c
Merge pull request #1007 from devnexen/pref_gen
Use `SDL_GetPrefPath` to determine the user resource directory

`SDL_GetPrefPath` takes care of different conventions for user-specific
data paths used by some platforms, such as Haiku.
2022-06-20 00:18:00 +09:00
yvt
8f763deca2 Fix missing path separator when XDG_DATA_HOME is given
The user resource directory should be `$XDG_DATA_HOME/openspades/
Resources`, not `$XDG_DATA_HOME/openspadesResources`.
2022-06-19 23:51:51 +09:00
yvt
7e3037b1e3 Don't lie that userDataDirectory holds the value of XDG_DATA_HOME 2022-06-19 23:49:45 +09:00
yvt
a7fe1d2f72 Rename the variable xdg_data_home to userDirectory
It doesn't hold the value of `XDG_DATA_HOME` in the end, so it's
inappropriate to name it `xdg_data_home`.
2022-06-19 23:46:02 +09:00
yvt
d628dd170a Reformat 2022-06-19 23:39:22 +09:00
yvt
e658d0be71 Call SDL_free on the pointer returned by SDL_GetPrefPath 2022-06-19 23:37:59 +09:00
yvt
7bcfa32b29
Merge pull request #1010 from devnexen/vsync_submenu
Add v-sync option to the graphics settings tab
2022-06-19 21:59:36 +09:00
David Carlier
798bf661bd package manager further update.
reporting error reason, aborting if the transfer is too low.
2022-06-11 22:03:58 +01:00
David CARLIER
cc3d5e2126 angelscript fix assertion typo. 2022-05-15 19:44:34 +01:00
David CARLIER
f41fcabfaf AVX check priorities change, checking avx flag before xcr0 instead.
closes #1018
2022-05-11 17:48:09 +01:00
David Carlier
b539f2f728 V-Sync new submenu proposal.
disabled or plain mode, maybe adaptive mode can be considered at some point.
2022-04-16 15:00:30 +01:00
yvt
e6d1856b3d
Merge pull request #1002 from devnexen/download_data_adjust
Display the package manager download progress only if the progress information is available
2022-04-10 15:51:46 +09:00
yvt
826ca93ddf
Merge pull request #997 from devnexen/solarish_port
Porting for Solaris-based systems
2022-04-10 15:48:44 +09:00
David Carlier
872d6fe7b8 data directory more abstract for BSD/Haiku... 2022-04-02 15:44:15 +01:00
David Carlier
e18efdde50 download package manager update display progress only when there is download occuring 2022-03-18 05:04:17 +00:00
David Carlier
66e7ee9f8d package manager update proposal.
logging progress.
2022-02-18 19:33:41 +00:00
David Carlier
40b128abcc solaris based systems port.
V-Sync operation unsupported by the driver and pretty rudimentary grep.
mostly linkage fixes otherwise.
2022-02-13 08:56:24 +00:00
yvt
d7d467e709
Merge pull request #996 from devnexen/dflybsd_port
DragonFly BSD identification
2022-02-12 08:34:14 -08:00
yvt
db5b86a9c5
Merge pull request #993 from devnexen/avx_check_with_osxaave
Check (OS)XSAVE as well for AVX support detection
2022-02-12 08:33:40 -08:00
David Carlier
d51217e5e1 dragonflybsd identification. 2022-02-12 16:23:23 +00:00
David Carlier
9c992c6e7d checking xsave/oxsave and AVX with xgetbv instruction 2022-02-01 20:05:13 +00:00
David Carlier
454d3e2ec7 cpu AVX check: check (OS)XSAVE as well. 2022-01-13 19:49:21 +00:00
Thor Hanson
8b18025a9c Add variation in SMG ejecting brass velocity
Without this commit, the SMG's ejecting brass tends to fall unnaturally:
If the gun hasn't moved, each casing falls in the exact same trajectory
and in the exact same location.

This commit adds a small amount of random variation to each casing's
veloctiy, which looks more natural.
2022-01-09 13:55:29 -06:00
yvt
f532e85e18
Merge pull request #989 from yvt/fix-uncrouching
Fix getting stuck when uncrouching
2021-12-15 22:05:43 +09:00
yvt
c0414e9906 feat(client): remove the finite-difference velocity estimation
This velocity estimation routine has been present since the beginning of
time, but it seems that this actually does more harm than good.

Neither the vanilla client nor BetterSpades implements velocity
estimation.
2021-12-15 21:54:38 +09:00
yvt
5fa2173465
Merge pull request #960 from yvt/feat-your-tracer
Implement first-person bullet tracers
2021-12-09 21:16:52 +09:00
yvt
d31dc21048 fix(client): handle all cases correctly when uncrouching
When a player releases the "crouch" key, `Player::TryUncrouch` is
responsible for checking if uncrouching is possible and adjusting the
local player position accordingly so that the legs won't be embedded in
a ground thereafter. There are two cases in which uncrouching succeeds.
Case 1: The player is airborne, and there's room under the legs. Case 2:
There's room over the head.

The old code did not rely on `Player::TryUncrouch` for player position
readjustment. Instead, `Player::SetInput` was actually responsible for
this. Unfortunately, it did not distinguish the cases correctly. It did
check correctly whether uncrouching is possible. However, to determine
which of Case 1 and Case 2 is applicable, it only checked the player's
airborne-ness, therefore it incorrectly selected Case 1 if the player is
airborne but there's no room under the legs. This incorrect
implementation resulted in annoying bugs where a player gets stuck in a
ground if the player uncrouches just above it.
2021-12-08 20:19:46 +09:00
Rakete175
7cf405cf40 NetClient.cpp: Actually send Enhanced version packet
Currently OpenSpades doesnt send the extended version info which contains
some useful info to the server even when being told that it wants it.

This commit adds sending of the packet so servers will receive such info when
they ask for it.
2021-11-14 23:11:06 +01:00
yvt
fdba89bc14 doc(core): VoxelModel::GetOrigin is a misnomer 2021-08-15 00:54:09 +09:00
yvt
9e0403430e fix(draw): use the correct materials for models materialized by CreateModel 2021-08-15 00:54:06 +09:00
yvt
a9333424ba
Merge pull request #964 from Haxk20/patch-1
Disable recoil if not local player
2021-08-14 14:44:18 +09:00
yvt
23a74265c5
Merge pull request #969 from Haxk20/enet
Sources/ENet: Update ENet to latest version
2021-08-14 14:43:58 +09:00
yvt
ee1f8a4772 fix(client): relax the lower bound of the denominator used in numerical differentiation for velocity estimation
Improves the smoothness of non-local player movement in a server that
sends ten WorldUpdate packages for each second (i.e., 10 updates per
second).

I wouldn't dare to relax the bound further since this technique is
extremely susceptible to jitter. The server sending WorldUpdate packets
with `PACKET_FLAG_UNSEQUENCED` isn't exactly helping since that
introduces discontinuity into the received position stream, and the
denominator lower bound is the only thing that keeps the estimation from
exploding. (The packets should really be unreliable + sequenced.)
2021-08-11 23:43:36 +09:00
Haxk20
0ddf702c3b Sources/ENet: Update ENet to latest version
This commit updates the enet version from 2013 !!! to the latest commit (74cea7abf52ddd355146aeb0a4077d2b95368122)

Since 2013 there have been MANY improvements to the library
and we should absolutely use them since it can improve the gameplay.
2021-07-26 16:44:19 +02:00
yvt
4f5c2427d8 fix(client): std::deque::deque(size_t n) sets the length to n, not the capacity
Fixes #918.
2021-07-22 17:48:30 +09:00
Haxk20
b15894bd64 Player.cpp: Disable recoil if not local player
This commit completely disables any sign of recoil if
the packet is coming from a player that is not local
player.

We want to apply recoil to local player weapon
but we do not want to apply it to others as
we just want to display what was given to us
(Their client already adds recoil. If not they
are cheating)
2021-07-11 01:23:01 +02:00