Commit graph

44 commits

Author SHA1 Message Date
Robert Müller 5aa9003180 Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
Robert Müller 0e4f174f78 Check for all file errors in demo player, show demo error popup
Handle the return values of all uses of the `io_read`, `io_skip` and `io_tell` functions in `CDemoPlayer`, to handle truncated demo files and other unexpected file reading and seeking errors during demo playback.

Show more detailed error message popups when demos cannot be loaded due to errors and when demo playback is stopped unexpectedly due to errors. Previously, only a generic message "Error loading demo" was shown when loading failed and no error message was shown when demo playback is stopped due to errors.
2023-10-19 21:48:04 +02:00
Robert Müller f1e74c12e9 Remove unused IDemoPlayer::GetDemoType and enum literals
We only show the string value directly in the UI instead of using the demotype enum literals. There also should not be any reason to change any logic depending on whether the current demo is a server- or client-demo.
2023-10-16 22:06:28 +02:00
Robert Müller 82d94faf28 Refactor GetDemoName using IStorage::StripPathAndExtension
The functions were effectively identical already.
2023-10-16 21:53:32 +02:00
Robert Müller a0b708a0b2 Assert that demo recording/playback are properly started/stopped
Add assertions to check that demo recording/playback is not started when already running.

Add assertions to check that demo recording/playback is stopped before the respective demo recorder/player is destroyed.
2023-10-13 20:45:22 +02:00
Robert Müller 2d4bac8c0c Ensure strings in demo header are zero-terminated and valid UTF-8
Previously, if the demo header strings did not contain zero-termination, the client would render the strings and any following non-zero memory from the demo header.

Now, demos will not be loaded, if any string in the header is not zero-terminated or not valid UTF-8.
2023-09-23 22:14:34 +02:00
Alexander Akulich f93c6c7659 IDemoPlayer: Make SetSpeedIndex() actually set index 2023-07-08 04:09:46 +03:00
Robert Müller be6862e997 Use sizeof(int32_t) instead of 4 2023-02-11 13:59:08 +01:00
Robert Müller 6800bd90a4 Fix edge cases where demo tick seeking did not work
Instead of using hardcoded tick offsets, use the current/previous/next tick values from the demo info.

This fixes seeking the next tick not working for demos where the difference between the current and the next tick was greater than 3.
2022-12-30 21:05:46 +01:00
Robert Müller c6cc45471a Allow spectator mode to be changed while demo is paused
By updating and rendering the current tick again when changing the spectator mode while the demo playback is paused.

Refactoring: Extract `IDemoPlayer::ETickOffset`, `IDemoPlayer::SeekTick` and `CMenus::DemoSeekTick`.
2022-08-28 17:52:49 +02:00
Chairn 21e64cbdcb Added external linkage instead of static const 2022-04-03 01:12:27 +02:00
Robert Müller 12699aa3e4 add functions for packing/unpacking int/unsigned using char arrays 2021-11-09 22:19:32 +01:00
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
def 0bac9f0de8 Manual preparation for cleaner clang-format
Also include what you use explicitly
2020-09-26 21:41:01 +02:00
def e36dc36b15 Fix demos header (fixes #2278)
Initially broken in 7aed6476dc
2020-06-19 10:42:19 +02:00
def 7aed6476dc Allow larger map names 2020-06-18 18:29:27 +02:00
Learath2 3784f5bea4 Use a UUID, Cleanup code and UI 2019-12-17 15:44:54 +01:00
Learath 7cdd050fee Add SHA to demos. Bump Demo Version 2019-10-14 02:27:08 +02:00
Corantin H e35951dedc demo slicing is now done in a separate task to prevent ingame freeze 2019-05-25 00:24:13 +02:00
12pm 6e880644af Add some demo player shortcuts 2019-04-15 21:08:12 +02:00
def e25d43aaf6 Extend GUI options for available demo speeds up to 64 2019-04-02 23:20:44 +02:00
def f9d9fee314 Demo browser: Show markers (fixes #329)
- Fetch Headers button
- Display Markers & Length columns
- Display footer info
- Don't rescan directory when not required
- Clean up code a bit
2019-01-09 08:25:03 +01:00
def f3e3d57a90 Always close files, cleaner demo recording, fix some other stuff 2017-07-08 13:39:20 +02:00
heinrich5991 e3f2316106 Revert "Revert "Refactor dummy input and demo filtering""
This reverts commit 187560c8c0.
2017-02-28 10:08:14 +01:00
Dennis Felsing 187560c8c0 Revert "Refactor dummy input and demo filtering"
This reverts commit 8375f4888e.
2017-02-28 08:15:35 +01:00
heinrich5991 8375f4888e Refactor dummy input and demo filtering
Remove references to src/game/ from src/engine/
2017-02-23 14:13:14 +01:00
Dennis Felsing dc18f16623 Cleanup 2016-11-07 10:19:32 +01:00
Dennis Felsing c92e10914a Refactor demo speed setting, add 1.5x speed (fixes #568) 2016-10-28 09:31:22 +02:00
def 0f5611c2f0 Add function to filter chat out of demo when slicing (fixes #382) 2016-04-27 17:05:30 +02:00
def 9ea846033b Optimization for faster server side demo recording 2014-12-02 15:44:54 +01:00
east 64810cf11c worked on CDemoEditor 2014-08-12 16:21:06 +02:00
def 378d613de9 Add tee directions 2014-04-26 21:00:14 +02:00
oy 5e090fbfed made the demoplayer support 0.6.1 based demos 2013-02-26 00:00:38 +01:00
oy fa81141110 added demo markers by Choupom. Closes #837 2012-01-10 23:13:19 +01:00
oy 9845d757ef removed file extension from the demo name in the demo player 2011-06-09 22:44:22 +02:00
oy 04a3b7be00 fixed problem with recorded demo files. Closes #570 2011-04-02 11:55:37 +02:00
oy be8f669333 added extended demo infos in the demo browser 2011-03-13 10:41:10 +01:00
oy 5c723f5d2f added info about the actual recorded demo length in the notification box 2011-03-12 18:34:16 +01:00
oy b834426548 fixed several problems with spectator view in game and demo player. Closes #83 2011-03-12 18:07:57 +01:00
Sworddragon fc9211c777 Updated copyrights 2010-11-20 21:26:06 +01:00
oy 85b9c60158 added info in the demo browser by Choupom 2010-10-09 13:27:21 +02:00
ghost 56c4081da4 Demo name is now showed while playing a demo file 2010-09-07 19:12:11 +02:00
oy 3797eba179 added demo recording button by fujnky 2010-08-09 14:14:15 +02:00
Magnus Auvinen 72c06a2589 copied refactor to trunk 2010-05-29 07:25:38 +00:00