heinrich5991
94acac91a0
Overhauled job system
...
The engine now takes `std::shared_ptr<IJob>`, this will ensure the
appropriate lifetime of the given parameters, it also allows for proper
destruction. Remove the now obsolete `IFetcher` interface and `CFetcher`
class.
Also adds some locks to `CUpdater`, previously it didn't have any locks
at all.
2017-11-23 15:47:38 +01:00
heinrich5991
7fc4a21565
Remove deprecated multi commands
...
You now have to use `/mc;` instead of `/` if you want to bind multiple
commands to one key.
2017-11-18 16:36:34 +01:00
heinrich5991
be80ccb7d6
Don't use nonstandard #pragma pack
...
It's not needed in that place anyway.
2017-11-18 00:24:44 +01:00
heinrich5991
ef0c1b266f
Fix 3 / 2
using integer division
2017-11-03 22:10:04 +01:00
bors[bot]
3fdc87047b
Merge #935
...
935: removed dead function prototype r=heinrich5991 a=ChillerDragon
2017-11-01 14:15:56 +00:00
ChillerDragon
a013a59aa6
removed dead function prototype
2017-11-01 14:57:34 +01:00
bors[bot]
5528cde5f6
Merge #869
...
869: Complete rework of the ghost and race recorder r=Learath2 a=Redix
This PR fixes a lot of issues with the ghost and race recorder, introduces a new ghost file format and implements some pretty useful features.
**A quick overview:**
- When you cross the start line multiple times, both (ghost and recorder) will only restart if it is a non-solo server
- If available, both will use the race timer to recognize the start instead of searching for the start line
- Fastcap support for both
- The recorder immediately starts when the Tee spawns, so the preparation steps (which are quite important for speedruns) will be included in the demo. If you do not cross the start-line within 20 seconds, it will stop the demo until you really start.
- Better ghost menu (colors, reloading, deleting and saving ghosts)
- The ghosts are more resistant against lags (old ones were sometimes completely useless due to small lags)
- New ghosts files are significantly smaller
- Cleanup, bugfixes..
**About the new ghost format (version 4/5):**
This format is used by Teerace for over a year now. The code for handling the binary files was moved to the engine. It includes an auto updater which creates a backup of all ghosts and converts them to the new format afterwards. The major differences from the format used by DDNet right now (version 2), are the ability to store multiple types of data, the usage of delta-encoding and a more portable header.
For whatever reason, the ghost stores values for every predicted tick, but without tick information, so lost snapshots can make them unusable. The new code uses the original values from the snapshots including ticks but it can also handle the old ones without. Since hardly any server uses the high bandwidth option this practically reduces the file size.
Like the demo recorder the ghost recorder directly stores the data to a file (every 50 snapshots) instead of writing the whole file at the end of the race. Indeed this can be changed with only a few lines if the old behavior is preferred.
The updater can handle version 2 (DDNet) and 3 (old teerace format, only slightly different from version 2) files. The updating already happens when the files are scanned for generating the list in the menu and not only when you activate them. The change from version 4 to 5 was only needed due to a bug in the implementation, the ghost loader can read both.
Some numbers about the file size: (map: hotrun, both about 30 seconds)
- Old ghost: 30.4 kB (converted: 10.7 kB)
- New ghost: 5.4 kB
**One thing about the race recorder:**
The old implementation compared the new file only with the first file it found for the particular map. The new one compares with all related demos and deletes them possibly, so that only the best demo is left. Since DDNet can also store the demos without name, this might also delete demos from other players, that you might have in your directory.
To prevent this I at least check whether the demo contains the player name if `cl_demo_name` is on.
In my opinion the better solution would be to remove `cl_demo_name` and always use the player name.
2017-10-30 20:27:10 +00:00
Redix
de1c0cf24d
Fixed several issues with the ghost (thanks to Learath2)
2017-10-28 14:23:24 +02:00
def
04820b44f8
Simplify emoji
2017-10-28 09:08:17 +02:00
Michał
ebe894faef
Fix duplicate
2017-10-28 09:08:17 +02:00
Michał
f7e64fe99e
Quick fix
2017-10-28 09:08:17 +02:00
Michał
2e353beec2
Rendering fix, better offset calculation, optimizations
2017-10-28 09:08:17 +02:00
Michał
58b0ae5fc7
Possible emoji rendering fix
2017-10-28 09:08:17 +02:00
Michał
3c3c7abd3c
Removed alias->utf replacer, added alias lookup instead, modified CEmojis class
2017-10-28 09:08:17 +02:00
Michał
07db85d806
Removed string.h, replaced some C functions with system.h ones, renamed variables
2017-10-28 09:08:17 +02:00
Michał
bb419c43b7
Linux build fix + cleanup
2017-10-28 09:08:17 +02:00
Michał
e85898a4b6
Fix includes + small clean
2017-10-28 09:08:17 +02:00
Michał
35fb1ddb41
Add emoji support
2017-10-28 09:08:17 +02:00
Jupeyy
f15f41e654
remove extension limit for tile layers
2017-10-28 02:04:53 +02:00
Savander
fa544dc0e6
Localize Date, Demo
2017-10-28 01:22:11 +02:00
Savander
b2b82eb3dd
Localize friend message
2017-10-28 01:21:32 +02:00
Jupeyy
493d2dc9d8
add speedups correctly to the border tiles, to allow them beeing
...
displayed on extended range
2017-10-28 00:52:54 +02:00
Jupeyy
863385e208
fix the code layout
2017-10-25 15:42:06 +02:00
Jupeyy
3c8f937b79
Don't draw invalid tiles
2017-10-24 20:41:11 +02:00
def
cb00a294b8
Enable gfx_opengl3 by default
2017-10-20 22:52:38 +02:00
def
02aeae416b
Infinity = no limit
2017-10-20 22:47:59 +02:00
def
2b7809befd
Switch cl_showfps 1/2
2017-10-20 22:27:53 +02:00
Redix
9289deb5c7
Stop ghost rendering when touching the start line again
2017-10-18 21:37:25 +02:00
Dennis Felsing
d6999bb726
Merge "Pull Request using OpenGL 3.3"
2017-10-18 12:49:27 +02:00
Dennis Felsing
cc9bcb5b9f
Merge pull request #900 from Learath2/dd_pr_authname
...
Reset the username on disconnect
2017-10-18 12:43:08 +02:00
heinrich5991
dfc53b48cf
Fix victim handling
2017-10-17 01:32:40 +02:00
Learath
9ae2c16235
Allow changing UsernameReq while connected
2017-10-16 20:08:39 +02:00
Learath
81135d17de
Reset the username on disconnect
2017-10-16 20:01:33 +02:00
Jupeyy
5389dd9666
fix border amount for right and bottom border lines
2017-10-14 16:37:48 +02:00
heinrich5991
525b643e18
Fix a syntax error
...
Sorry. :/
2017-10-13 16:33:23 +02:00
heinrich5991
c439b04a2d
teehistorian: Hide chat from teehistorian
...
There was a missing check that allowed chat messages to be written to
disk.
2017-10-13 16:25:26 +02:00
Learath2
4394933d6c
Merge pull request #887 from heinrich5991/pr_ddnet_async
...
Add asynchronous output system and use it for teehistorian and `dbg_msg()`s
2017-10-13 15:30:24 +02:00
heinrich5991
e989ffad78
Rename async_*
to aio_*
and add test for nondivisible buffer lengths
2017-10-13 02:48:42 +02:00
heinrich5991
8e778cd9ab
Address pull request comments
2017-10-13 02:29:18 +02:00
Jupeyy
add339d210
not needed, because of restrictions before
2017-10-11 11:18:03 +02:00
Jupeyy
1814fa8d19
make OpenGL 3.3 experimental option, and don't initialize it as default
2017-10-10 15:35:20 +02:00
Jupeyy
4fc7187a14
adjust sprite texture coordinates to respect texel offset
2017-10-10 12:20:20 +02:00
Jupeyy
966b388b0e
clamp speedup arrows images
2017-10-10 12:08:36 +02:00
heinrich5991
4d05a2379b
Make teehistorian asynchronous
2017-10-10 04:11:14 +02:00
heinrich5991
be0b52eddc
Fix teehistorian crash on startup
2017-10-10 02:39:29 +02:00
Learath2
d15dcd3c58
Merge pull request #871 from heinrich5991/ddnet_teehistorian
...
Teehistorian
2017-10-09 18:42:27 +02:00
Jupeyy
92edbf4d37
allow viewing average or current fps
2017-10-09 15:58:12 +02:00
Redix
134a79a225
Move RaceHelper to src/game/client
2017-10-06 22:13:35 +02:00
Redix
612fe15a32
Fix a possible issue with the ghost
2017-10-06 22:05:54 +02:00
Redix
d4509111d5
Clean up ghost and race recorder
2017-10-06 22:01:33 +02:00
Redix
1638f39557
Use the same ghost path everywhere
2017-09-29 23:15:47 +02:00
Redix
245afcb4b2
Fix warnings
2017-09-28 19:27:15 +02:00
Redix
2586c001b7
Use demos/auto/race for the race recorder
2017-09-28 19:14:36 +02:00
Redix
e9a0271c29
Improved ghost and race recorder file handling
2017-09-28 19:13:20 +02:00
Redix
66cc527af4
Do not restart ghost and race recorder when the race timer is turned on with /timer
2017-09-28 16:57:39 +02:00
Redix
0891ce2812
Use move instead of copy assignment operator for the ghost
2017-09-28 16:42:47 +02:00
Redix
c832beca63
Remove 30 min limit from the ghost
2017-09-28 16:02:01 +02:00
Redix
a3a82b6571
Move filename clearing function to base lib
2017-09-28 16:02:01 +02:00
Redix
d37bb5e65a
Fix ghost menu localization
2017-09-28 16:02:01 +02:00
Redix
0c6026c22e
Hide ghost menu buttons if there are no ghosts
2017-09-28 16:02:00 +02:00
Redix
0b4d629dab
Improved ghost memory management
2017-09-28 16:02:00 +02:00
Redix
216e5654e8
Added config variables for server controlled ghost and race recording
2017-09-28 16:02:00 +02:00
Redix
17f1978740
Use the race timer for the demo recorder as well
2017-09-28 16:02:00 +02:00
Redix
491cfdb93e
A few fixes in ghost and race recorder code
2017-09-28 16:02:00 +02:00
Redix
1efa8023ea
Use race timer for ghosts if available
2017-09-28 16:02:00 +02:00
Redix
4c8c546c35
Improved ghost start accuracy
2017-09-28 16:01:59 +02:00
Redix
ac234ad3ee
Write the correct player name into ghosts that are saved from menu
2017-09-28 16:01:59 +02:00
Redix
ffaa077c72
Improved ghost skin handling a bit
2017-09-28 16:01:59 +02:00
Redix
456a67fe2d
Start race recording immediately so we can also record the preparation steps
2017-09-28 16:01:59 +02:00
Redix
0721b895ae
Make sure that we have a free ghost slot for new records
2017-09-28 16:01:58 +02:00
Redix
353190588b
Disable ghost and race recorder during demo playback
2017-09-28 16:01:58 +02:00
Redix
1e845a4020
Added reload button in ghost menu
2017-09-28 16:01:58 +02:00
Redix
5b3e9e4bbf
Improved ghost file management
2017-09-28 16:01:58 +02:00
Redix
d09e825065
Use existing code for rendering the ghost
2017-09-28 16:01:58 +02:00
Redix
5cc0d16029
Reworked the race recorder
2017-09-28 16:01:57 +02:00
Redix
9e52957423
Only restart ghost and race demo on non-solo servers when crossing the start line again
2017-09-28 16:01:57 +02:00
Redix
1c377ed00f
Added Fastcap support for ghost and race demo
2017-09-28 16:01:57 +02:00
Redix
bd3e81d5e0
Use snapshot values instead of predicted ones for the ghost and also save the tick
...
This makes the ghosts more resistant against lags
2017-09-28 16:01:57 +02:00
Redix
3c8217b39c
Mark own ghost with color
2017-09-28 16:01:56 +02:00
Redix
4f57b33524
Use static array for active ghosts
...
Improve ghost file handling
2017-09-28 16:01:56 +02:00
Redix
c189678e44
Cleaned up the ghost component and made it use the ghost recorder and loader
2017-09-28 16:01:56 +02:00
heinrich5991
f16059c0b8
teehistorian: Add a couple of tests, fix uninitialized vars and asserts
2017-09-28 02:42:35 +02:00
heinrich5991
f43480aeed
Add testing infrastructure for teehistorian
2017-09-28 02:03:30 +02:00
heinrich5991
1913106f15
teehistorian: Fix a bug with implicit ticks
2017-09-27 20:15:41 +02:00
heinrich5991
be79f14e38
teehistorian: Use m_pController->m_pGameType
directly
2017-09-27 19:38:54 +02:00
Jupeyy
baa69676ea
fix warnings
2017-09-27 15:06:47 +02:00
Jupeyy
7aa547946b
more warning fixes
2017-09-27 15:01:38 +02:00
Jupeyy
463944b143
fix code pattern mistakes and warnings
2017-09-27 14:52:06 +02:00
Jupeyy
e820a36899
don't use average FPS
2017-09-27 12:21:29 +02:00
Jupeyy
6185c05be4
for tilelayers, go thorugh them layer by layer to reduce GPU overload by
...
only render visible areas
2017-09-27 12:20:23 +02:00
Jupeyy
9fd1290734
auto adjust font size for entity overlay
2017-09-27 12:19:39 +02:00
Dennis Felsing
5b05e558dc
Fix grammar (thanks noby)
2017-09-25 09:07:12 +02:00
heinrich5991
9d5ba770e9
teehistorian: Only record non-default config vars
2017-09-24 21:11:04 +02:00
def
b7f4ab4d80
Move comment
2017-09-23 22:49:01 +02:00
heinrich5991
3efa490cb7
teehistorian: Remove global buffer
...
This removes the possibility of the buffer filling up and discarding
data.
2017-09-20 02:23:28 +02:00
heinrich5991
9761e9606a
Make most user input teehistoric
...
Exclude private stuff like chat messages and votes.
2017-09-20 02:23:28 +02:00
heinrich5991
6ef9c8dbcd
First working version of teehistorian
...
teehistorian records all inputs from the players as well as the player
positions in each tick. It stores this info in a highly compressible
output format (I've achived 5x compression using xz or bz2).
2017-09-20 02:16:11 +02:00
def
03fa475b5e
Implement /pause [name] and /spec [name]
2017-09-18 19:12:01 +02:00
Redix
43f246f174
Made int packing functions safe
2017-09-17 02:36:50 +02:00
heinrich5991
42934fe102
Remove statically detectable float divisions by zero
...
This should fix the warning in MSVS.
2017-09-16 18:34:26 +02:00
heinrich5991
9911759314
Revert "Don't divide by 0"
...
This reverts commit 03faa51e28
.
Dividing floats by zero isn't undefined behavior and results in +inf or
-inf depending on the sign of the first operand.
#include <math.h>
#include <stdio.h>
#define PRINT(x) printf("%s = %f\n", #x, x)
int main()
{
PRINT(1.0 / 0.0);
PRINT(-1.0 / 0.0);
PRINT(atanf(1.0 / 0.0));
PRINT(atanf(-1.0 / 0.0));
return 0;
}
prints
1.0 / 0.0 = inf
-1.0 / 0.0 = -inf
atanf(1.0 / 0.0) = 1.570796
atanf(-1.0 / 0.0) = -1.570796
The changed function was problematic for values like (0,1), (-1,0),
(0,-1) where it always returned an angle of 0°.
2017-09-16 18:33:10 +02:00
def
03faa51e28
Don't divide by 0
2017-09-16 12:06:07 +02:00
Dennis Felsing
43d0299a45
Merge branch 'master' into pr_ddnet_fix_msvs_warnings
2017-09-16 11:17:39 +02:00
Jupeyy
fc706a820c
only check gametiles for DDNet server type
2017-09-16 03:45:24 +02:00
Jupeyy
31844d3353
set max width for custom text texture upload and fixing alignments for
...
texture updates
2017-09-15 03:01:26 +02:00
Jupeyy
5c7c09d380
fixing most wrong code pattern
2017-09-13 20:33:58 +02:00
Jupeyy
fd83d2834d
dont draw layer if our view is out of the layers range
2017-09-12 23:16:01 +02:00
Jupeyy
c437b5bb89
use 64 bit variable
2017-09-12 21:06:12 +02:00
Jupeyy
629bf2c5f9
Merge branch 'master' of https://github.com/ddnet/ddnet
2017-09-12 20:24:58 +02:00
Jupeyy
0caa70f0a1
support buffering of tile layers, draw them with the buffer objects and
...
some optimazations to border drawing
2017-09-12 20:22:18 +02:00
Jupeyy
9d2a625363
create overlay textures for entity overlays, instead of rendering glyphs
2017-09-12 20:15:37 +02:00
Jupeyy
6dc4d1e578
only allow a maximal zoom factor to make sure no bufferoverflow happens
2017-09-12 20:14:34 +02:00
Jupeyy
93138c1fba
make background class inherited from maplayers and change some things in
...
maplayers instead, so the background class can profit from buffering
2017-09-12 20:13:53 +02:00
def
73d9ad7615
Really only download ddnet-info.json at correct time
2017-09-08 22:16:00 +02:00
def
715ac673ec
Version 10.8.6
2017-09-08 22:01:51 +02:00
def
c2c453bd45
Make sending name to info.ddnet.tw optional, show dialog at start and some minor fixes
2017-09-07 20:51:46 +02:00
heinrich5991
4d96090770
Fix MSVS warnings
...
```
warning C4291: no matching operator delete found; memory will not be freed if initialization throws an exception
warning C4305: truncation from 'double' to 'float'
warning C4805: unsafe mix of type 'bool' and type 'int' in operation
```
2017-09-06 10:54:29 +02:00
def
58d1294b3c
oops
2017-09-03 23:50:27 +02:00
def
d5fc3210fd
Version 10.8.5
2017-09-03 23:46:58 +02:00
def
8b1470c31f
Revert "Merge GAME_VERSION and GAME_RELEASE_VERSION"
...
This reverts commit 5cfd779c68
.
2017-09-03 23:46:15 +02:00
def
4b39a39e10
Version 10.8.4
2017-09-03 19:30:29 +02:00
def
278c1ee198
Add Toggle ghost control ( fixes #823 )
2017-09-03 19:23:59 +02:00
def
5cfd779c68
Merge GAME_VERSION and GAME_RELEASE_VERSION
2017-09-03 18:54:43 +02:00
def
caec69abc1
RequestDDNetInfo in ingame menu too
2017-09-03 18:17:21 +02:00
def
89ed22e8d8
Introduce ddnet-info.json
...
- Single json file containing all information for the client
- Fetched from https://info.ddnet.tw/info?name=deen
- Replaces versionsrv, news, ddnet-maps.json and ddnet-ranks.json
- Servers are sorted by most popular ones for respective player
- Always stays < 100 ms response time, compared to occasional 50 s for
old ddnet-ranks.json
2017-09-03 17:42:04 +02:00
def
f2a7f5f8dd
User agent in http fetcher
2017-09-03 09:18:00 +02:00
def
0a09af4b33
str_format instead of sprintf
2017-09-03 09:01:25 +02:00
def
7b6317a5d6
buffer sizes
2017-09-03 08:53:54 +02:00
def
862e26dd08
Clean up time handling a bit
2017-09-03 08:48:21 +02:00
def
e64e59a839
semaphore instead of busy waiting in CJobPool
2017-09-02 12:30:55 +02:00
Dennis Felsing
f8b98c6366
Version 10.8.3
2017-09-01 08:01:45 +02:00
def
f5edf53fd7
Version 10.8.2
2017-08-31 23:43:00 +02:00
def
9b214db85f
Force version.ddnet.tw and update4.ddnet.tw
2017-08-31 23:28:10 +02:00
def
e36d7ce9a1
Version 10.8.1
2017-08-31 22:07:43 +02:00
def
583421b42d
Revert "fixed sprite rendering. Closes #834 "
...
This reverts commit 43af1fdb5f
.
2017-08-31 22:03:33 +02:00
def
97380494e6
Version 10.8
2017-08-31 19:24:17 +02:00
heinrich5991
659e1ff527
Merge pull request #853 from Redix/pr_ghost_time
...
Ghost and Race demo time extraction fix
2017-08-31 12:31:20 +02:00
Redix
affa3faeec
Only use integers for ghost and race demo handling
...
Ghosts still use floats internally
2017-08-31 03:22:08 +02:00
Redix
cf09b6b08b
Use -1 as invalid for time parsing functions
2017-08-31 01:13:26 +02:00
Redix
a396e40c5e
Move race helper functions to own cpp file
...
Fix some style issues
2017-08-31 00:17:16 +02:00
def
040fc9ca32
Implement right click and middle click on country and type filters
...
Right click: exclusively activate one
Middle click: reset (reenable all)
2017-08-30 22:36:39 +02:00
Redix
b6a3a42aa6
Use the time parsing functions for race demo name parsing
2017-08-30 22:10:43 +02:00
Dennis Felsing
eb2634ab0a
Merge pull request #852 from heinrich5991/pr_ddnet_fix_extractname
...
Add testing; fix, rename and test the `CEditor::ExtractName` function
2017-08-30 22:09:17 +02:00
def
a1d2ecb6de
Empty when no rank
2017-08-30 21:50:09 +02:00
Redix
f1f7e4e30b
Fix ghost and race recorder time parsing
2017-08-30 21:44:27 +02:00
def
16f3ddc5a7
Show if user has rank on map in browser (+filter)
...
UI implementation by timakro
2017-08-30 21:34:04 +02:00
Dennis Felsing
25a5eff1f8
Merge pull request #847 from heinrich5991/pr_ddnet_uncompressed_datasize
...
Rename `GetUncompressedDataSize` to `GetDataSize`
2017-08-30 16:34:02 +02:00
oy
43af1fdb5f
fixed sprite rendering. Closes #834
2017-08-30 16:32:39 +02:00
heinrich5991
22be1be389
Fix and rename the CEditor::ExtractName
function
...
Fixes #846 .
2017-08-30 13:59:42 +02:00
heinrich5991
2682480f8a
Rename GetUncompressedDataSize
to GetDataSize
...
Also rename the old `GetDataSize` to `GetFileDataSize`. `GetDataSize`
now returns the actual data size, not the data size before
decompression.
2017-08-30 08:36:17 +02:00