Commit graph

38 commits

Author SHA1 Message Date
bors[bot] 5e7ec64292
Merge #5486
5486: Switch to loading screen, when map creation takes too long r=def- a=Jupeyy

Same as #4941 

It doesn't directly fix the issue described in #5478, it does however not trigger it anymore. it's still a bug in our code unrelated  to this. This just triggered the UB from the issue as  `@ardadem` confirmed, SDL received a SDL_QUIT (`[2022-06-23 20:26:31][test]: sdl closed my client, but why xd`)

Now we have a confirmed case that making the window unresponsive can create weird behavior. Similar to the other pr switch to a loading screen after 500ms (this time without menu background map tho, since the menu background map calls the same code).

We really need some fancy loading screen for such situations, even tho they are rare xD

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-06-30 14:36:58 +00:00
Robert Müller 9390ae99b2 Fix OOB access when stopping a sound that has invalid samples 2022-06-26 22:43:32 +02:00
Robert Müller 525527feb7 Add IsPlaying to sounds client component 2022-06-26 22:43:32 +02:00
Jupeyy b62894dad4 Switch to loading screen, when map creation takes too long 2022-06-26 11:56:56 +02:00
Robert Müller 9b2f0fe3c4 Remove unused includes of base/tl/array.h and sorted_array.h 2022-05-26 23:42:06 +02:00
Jupeyy f7e3662cd7 Keep DDNet window responsive for loading tasks 2022-04-02 17:03:23 +02:00
def bc78ba57b9 Enable readability-inconsistent-declaration-parameter-name 2022-01-22 14:12:59 +01:00
heinrich5991 49bc150afd Refactor: Distinguish between two concepts previously called "Dummy"
On the one hand variables called "Dummy" would tell us whether the
current action refers to the currently inactive tee ("dummy"). On the
other hand, these variables could tell us whether the current action
refers to the main connection to the server, or the secondary one. The
latter use case is now renamed to "Client", with the choices
`CLIENT_MAIN`, `CLIENT_DUMMY` (and `CLIENT_CONTACT`).

Perhaps better names could be found, especially since `Client` also
refers to the engine client class in the game code.

I tried to not fix bugs unless it would complicate the code.
2022-01-21 01:54:14 +01:00
Jupeyy 26c5332dc6 Remove components pointers 2021-07-12 12:14:02 +02:00
Jupeyy a663799188 uint64 -> uint64_t, int64 -> int64_t 2021-06-24 17:19:17 +02:00
def 4327194d27 Add GUI & Game sound volume sliders
As requested by Pipou
2020-10-11 10:16:38 +02:00
def ba258d7343 Add Background music volume slider
as requested by hussainx3
2020-09-30 10:06:55 +02: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
H-M-H 7ae4b39574 made recording demos work
- videorecorder only works for recording demos now
- demoplayer was modified to allow controll over the time that passed
  in order to get perfect fps, IVideo controlls how much time passed,
  basically every rendercall sets the time to record the next frame
2019-09-30 20:48:47 +08:00
yangfl 81a39c229b Fix typo 2018-07-10 17:29:02 +08:00
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
def 6e8ada1ac8 Fix whitespaces a bit 2015-07-09 02:12:35 +02:00
def f8f8f0613e Rename "Ambient" to "Map Sound" 2014-10-23 15:53:23 +02:00
BeaR ef3b801999 Add volume slider for map sounds 2014-10-18 18:41:57 +02:00
BeaR e211c7a2b2 Ingame sound pos envelope support 2014-10-18 18:41:55 +02:00
BeaR 39f93716e0 Support replaying mapsounds 2014-10-18 18:41:52 +02:00
GreYFoX cd4ba53bae Merge branch 'master' of git://github.com/teeworlds/teeworlds into DDRace
Conflicts:
	bam.lua
	scripts/build.py
	scripts/make_release.py
	src/engine/server.h
	src/game/client/gameclient.cpp
	src/game/server/gamecontext.cpp
	src/game/server/gamecontext.h
	src/game/server/gamecontroller.cpp
	src/game/server/gamecontroller.h
	src/game/server/player.cpp
	src/game/version.h
2012-04-12 02:09:31 +02:00
oy b592d7a591 cleaned up playing of global sounds 2012-01-06 19:38:40 +01:00
GreYFoX ff696bad6c Mac Loves Cyclic Includes 2011-08-31 13:56:04 +02:00
Shereef Marzouk c6fd4a2cc5 General whitespace and tab cleanup 2011-08-11 10:59:14 +02:00
oy fdf6db5fd6 fixed that music resets on password prompt. Closes #695 2011-06-27 23:26:01 +02:00
oy 47cdd2524b do not try to play sound when it isn't enabled 2011-06-27 22:57:06 +02:00
Choupom 603071ee92 fixed data struct names 2011-06-02 17:42:30 +02:00
oy 06115dd49d added "Whitespace and line Endings cleanup" by GreYFoX 2011-04-13 20:37:12 +02:00
oy 1a5d70450f added "reimplemented menu music by teetow-the-great-teetow" by Choupom 2011-04-13 20:00:54 +02:00
oy 0bc13c91eb made cl_threadsoundloading work again 2011-02-27 17:56:03 +01:00
GreYFoXGTi 1b2703aaba Refactoring & fixed WEAPONSPEC_GUN in content.py 2011-02-12 21:18:41 +01:00
Sworddragon fc9211c777 Updated copyrights 2010-11-20 21:26:06 +01:00
oy 5156579d1d fixed sound bug when using in the editor. Closes #136 2010-09-22 00:51:32 +02:00
Magnus Auvinen 72c06a2589 copied refactor to trunk 2010-05-29 07:25:38 +00:00
Magnus Auvinen 46125d5ed7 fixed so predicted sounds and air jump effect works with demo playback 2009-01-11 15:51:43 +00:00
Magnus Auvinen b4cef60d62 fixed the remote console 2008-08-30 08:01:29 +00:00
Magnus Auvinen 0511e1152a added sound component 2008-08-29 05:34:18 +00:00