Commit graph

11558 commits

Author SHA1 Message Date
bors[bot] 2bd1273657
Merge #5514
5514: Update menu music state when the config variables change via console, various refactoring r=heinrich5991 a=Robyt3

Also update the background music when `snd_enable` or `snd_enable_music` change via console or bind. Closes #2911.

For this purpose, add `IsPlaying` method to engine sound and client sound component to check whether a specific sound sample is already playing.

Various refactoring in engine sound.

## 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: Robert Müller <robytemueller@gmail.com>
2022-06-30 11:07:07 +00:00
Chairn 96e9364fb0 Fix more unsafe define 2022-06-29 23:52:03 +02:00
c0d3d3v 435b7ab489
revert to send server messages for now 2022-06-29 14:46:23 +02:00
bors[bot] 1743b7ce67
Merge #5210
5210: Move ddnet character display info in ddnet character r=def- a=C0D3D3V

- I also added the default value mechanic for Net Objects that have set `validate_size=False`
- I removed the ramp value from the snap, because currently all maps use the default tuning parameters for it
- I renamed `m_FreezeTick` to `m_FreezeStart` 

- Added Extended Net Objects to the debug HUD (Also added a Headline):
![grafik](https://user-images.githubusercontent.com/14315968/175284419-3014bc06-96a0-407d-b170-15e06350caa7.png)
(out of range) is in the screenshot the old DDNetCharacterDisplayInfo

fixes #5455

## 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
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-06-29 11:35:37 +00:00
Robert Müller 4534996fbc Fix movement of envelope points with Info (Ctrl+I)
Co-authored-by: oy <tom_adams@web.de>
2022-06-28 22:25:55 +02:00
Robert Müller a765abf8e6 Merge IgnoreGrid variable declarations and definitions 2022-06-28 22:06:24 +02:00
BeaR b25c094daa Envelope preview: make last point editable 2022-06-28 19:29:09 +02:00
Robert Müller 16d9a69dd5 Print font name instead of address in log message, pFont -> font 2022-06-28 17:48:41 +02:00
Robert Müller b8d6298e29 Rename OpusFile to pOpusFile 2022-06-28 17:38:38 +02:00
Robert Müller d8e72ad862 Handle op_read errors and EOF 2022-06-28 17:38:05 +02:00
Robert Müller ac40efa263 Only apply size and color if changed, when editing multiple layers
To prevent the color of all layers from being reset to zero when changing just the size.
2022-06-27 23:20:09 +02:00
Robert Müller 70866d6d0c Fix names of SCommonPropState member variables 2022-06-27 23:20:09 +02:00
bors[bot] c231084daf
Merge #5515
5515: Include config info in help r=heinrich5991 a=def-

So it is clear what the default is

![screenshot-20220627@000811](https://user-images.githubusercontent.com/2335377/175835563-dd2abc4f-df83-43a7-bb60-7597d498aab7.png)
![screenshot-20220627@000545](https://user-images.githubusercontent.com/2335377/175835566-c983aa93-4a1d-471a-b183-1068050d196f.png)
![screenshot-20220627@000519](https://user-images.githubusercontent.com/2335377/175835569-796bcc4c-f9d2-4949-b1d5-b6dbb03be6d9.png)


## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] 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: def <dennis@felsin9.de>
2022-06-27 17:41:08 +00:00
Chairn a9ee57aeb7 Fix unsafe defines 2022-06-27 18:51:02 +02:00
Robert Müller 2e200c834d Use consistent sizeof expression for Mix calls 2022-06-27 17:55:28 +02:00
c0d3d3v 2090178c8e
Set default of cl_freezebars_alpha_inside_freeze to 0 2022-06-27 12:20:09 +02:00
c0d3d3v 59436b5e6d
Add default values to extended Net Objects 2022-06-27 01:11:19 +02:00
c0d3d3v f819afed6c
Print also extended NetObj and NetMsg Names
Show External NetObjects in Snapshot stats
2022-06-27 01:10:37 +02:00
c0d3d3v 00f28f2c8e
Unpack all 64 Parts of a splitted Snapshot 2022-06-27 01:10:37 +02:00
c0d3d3v 07cfda5593
remove rampvalue from ddnetcharacter 2022-06-27 01:10:37 +02:00
c0d3d3v df52df9d4a
move DDNetCharacterDisplayInfo to DDNetCharacter
- add default value option to NetworkValues
- rename m_FreezeTick to m_FreezeStart
2022-06-27 01:10:25 +02:00
def 4733cdc769 Abort skin downloads too (fixes #5505) 2022-06-27 00:39:00 +02:00
def b89dccab15 Include config info in help
So it is clear what the default is
2022-06-27 00:06:56 +02: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 9932bd76fb Update menu music state when the config variables change via console 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
Robert Müller b4a82b1b87 Reduce visibility of engine sound members and methods 2022-06-26 22:43:32 +02:00
Robert Müller 757d7d0068 Change m_SoundEnabled from int to bool 2022-06-26 22:43:32 +02:00
Robert Müller 82425f20d7 Handle WavpackUnpackSamples failure 2022-06-26 22:43:31 +02:00
Robert Müller a8949cb96b Fix log message context 2022-06-26 22:43:31 +02:00
Robert Müller d3e4ebf66a Simplify loop body and reduce duplicate code
It's not necessary to handle both channels separately so the loop can be simplified. The function `Int2Short` is replaced with equivalent `clamp`.
2022-06-26 22:43:31 +02:00
Robert Müller 1fb46b760c Code style: rename variable id to NextID 2022-06-26 22:43:31 +02:00
Robert Müller 4bc88712b9 Refactoring: move variable declarations in engine sound 2022-06-26 22:43:30 +02:00
Robert Müller 3db3f0af9c Code style: remove unnecessary indentation 2022-06-26 22:43:30 +02:00
Robert Müller 939c51bae1 Add IsPlaying to engine sound
To check if a specific sample is currently being played back.
2022-06-26 22:43:30 +02:00
Robert Müller 8eb1f6888d Refactoring: use CGameWorld::Clear in CGameWorld::CopyWorld 2022-06-26 12:51:17 +02:00
Robert Müller 2df4c4c668 Fix heap-use-after-free in CGameWorld::RemoveEntity
Entities have a pointer to their parent entity. If the parent entity is freed first, then freeing the child will cause access to the already freed parent.

This is fixed by adding a child pointer and clearing the child and parent pointers when either child or parent is freed.
2022-06-26 11:28:23 +02:00
bors[bot] 1e31db257f
Merge #5420
5420: Improvments for new HUD r=def- a=C0D3D3V

for testing set `#define CLIENT_VERSIONNR 16020`
Some of the changes are only available in the next version

Impressions: https://youtu.be/E770vGp4KKY

Implements a few of the recommendations from https://github.com/ddnet/ddnet/issues/5159 and Discord
- removes all player capability messages send by the server, that are now displayed in the HUD
- ~~remove `cl_ddrace_hud` and cl_show_freeze_bars~~, 
- Added option `cl_freezebars_alpha_inside_freeze` setting to change the opacity if the player is inside a freeze tile (default visible 100%)
- Added option `cl_show_jumps_indicator`
- We send now the real weapon the player is holding if he is frozen
    -> for that we added a new particle "snow flakes" or frozen flakes :D that are spawned over the tees body, to indicate he is frozen.
    -> new extras.png asset (+ corresponding asset tab, that can potentially be used for all sorts of extras for our mod, e.g. material particles, but in the future maybe also for other mods using a similar structure like it is for entities)
- stars are no longer send to new clients, because it is duplication to the freezebar, and we decided to not allow to disable it 
- also ninja stars are no longer send. They are not vanilla, and we now have a ninja bar in the new HUD.
- display target angle from 0 to 360 (looks mirrored on the x-axis to the normal trigonometry circle, but that is just how the world coordinates are) 
- dummy action display is increased in size ( but only the border margin :D not the icons. so the icons are still the same size as the icons on the left side)
- allow the server to also show old HUD elements (see https://github.com/ddnet/ddnet/pull/5427 for screenshots)


fixes #5149
fixes #198
closes #5159

fixes #2252   ~~(But not clear if we should also display the weapon, still investigating)~~
- we do no longer display a weapon inside freeze, instead we have nice freeze particles

## 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
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-06-26 07:57:33 +00:00
Dennis Felsing fc2d419050 Version 16.2 2022-06-26 09:48:01 +02:00
bors[bot] 6315af0729
Merge #5504
5504: Remove useless typedef in c++ r=Jupeyy a=Chairn

## Checklist

- [ ] 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: Chairn <chairn.nq@hotmail.fr>
2022-06-26 06:49:01 +00:00
bors[bot] 0179dfd5e2
Merge #5499
5499: Use [[fallthrough]] attribute rather than comment r=def- a=Chairn

We could even add implicit fallthrough warning, but it is triggered in external json.c

## Checklist

- [ ] 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: Chairn <chairn.nq@hotmail.fr>
2022-06-25 21:49:43 +00:00
bors[bot] c5bf24692b
Merge #5502
5502: Add missing capability for GLES backend r=def- a=Jupeyy

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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-25 21:30:11 +00:00
Chairn a3a85bee5f Remove useless typedef in c++ 2022-06-25 21:05:54 +02:00
Robert Müller 42532f3149 Use CRenderTools::RenderIcon in editor file dialog 2022-06-25 17:16:20 +02:00
Robert Müller fb91881765 Move CMenus::DoIcon to CRenderTools::RenderIcon
As this method only renders and doesn't provide an interactive element, the naming `Render` as well as the placement in `CRenderTools` fits better.

This also allows the method to be used in the editor.
2022-06-25 17:15:55 +02:00
Robert Müller 25ad47bed2 Use DoIcon for ingame player GUI icons 2022-06-25 16:57:25 +02:00
Robert Müller 87cb948166 Clamp number of demo timeline markers to valid range 2022-06-25 16:57:25 +02:00
Robert Müller 5184cf5523 Add greyed out demo icon for invalid or not loaded demos 2022-06-25 16:57:24 +02:00
Robert Müller f727199060 Render demo file icon in name column, remove DoIcon centering 2022-06-25 16:36:09 +02:00
Jupeyy eb3406c4cf Add missing capability for GLES backend 2022-06-25 16:11:04 +02:00