Commit graph

8001 commits

Author SHA1 Message Date
Robert Müller fc93ba0539 Remove unused DoButtonLogic pText argument 2022-05-14 00:26:15 +02:00
Robert Müller ca091d87b2 Support nesting editboxes, pickers and scrollbars in clipping areas 2022-05-13 21:39:25 +02:00
Robert Müller 1e8278ca95 Smooth clipping when scrolling in controls settings 2022-05-13 21:38:02 +02:00
Robert Müller 8c7cdb5936 Rename UiDoGetButtons to DoSettingsControlsButtons 2022-05-13 21:38:01 +02:00
Robert Müller 60347fde1a Use MouseHovered instead of clipping manually 2022-05-13 21:38:01 +02:00
Robert Müller 7bda9d4118 Fix variable spelling CheckAble -> Checkable 2022-05-13 20:46:54 +02:00
Robert Müller 8d12529f1e Move variable declaration 2022-05-13 20:46:54 +02:00
Robert Müller cae2b49ed6 Reuse MouseInside variable 2022-05-13 20:46:54 +02:00
Robert Müller 0f6572ebf6 Rename static variables ButtonUsed -> s_ButtonUsed 2022-05-13 20:46:54 +02:00
Robert Müller 6241c8483d Use bool instead of int with MouseInside 2022-05-13 20:46:50 +02:00
Robert Müller a248822ea5 Add CUI:MouseHovered and MouseInsideClip 2022-05-13 20:24:10 +02:00
Robert Müller 1855b4aea1 Support nested CUI clipping regions 2022-05-13 20:20:04 +02:00
bors[bot] d87edb9b41
Merge #5089
5089: Render tees in skin selector with default emote r=def- a=sjrc6

suggested in https://github.com/ddnet/ddnet/issues/5057
works for player and dummy

![image](https://user-images.githubusercontent.com/22122579/167973498-bccaac07-756e-4e59-a19d-66d3e24542d0.png)

## Checklist

- [x] Tested the change ingame
- [x] 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: Tater <Mr.Potatooh@gmail.com>
2022-05-13 08:24:15 +00:00
heinrich5991 0c2bb5a549 Fix /practice chat responses and a few others
Fixes #5087.
2022-05-13 09:14:05 +02:00
Tater b6a9389fe8 Render tees in skin selector with default emote 2022-05-12 17:17:19 -05:00
Robert Müller a1d092be27 Replace remaining usage of base/tl/string with std::string 2022-05-07 00:17:29 +02:00
Robert Müller dee7393555 Remove unused includes of base/tl/string.h 2022-05-07 00:02:43 +02:00
Robert Müller 3e1cfcd306 Store localized strings in a CHeap instead of using tl/string.h 2022-05-07 00:02:43 +02:00
Robert Müller e2a049f0ca Mark methods as const 2022-05-06 23:24:58 +02:00
Dennis Felsing b42fad604e Rules are chat responses too
Thanks to bencie for report
2022-05-06 00:12:03 +02:00
bors[bot] 14927684eb
Merge #5060
5060: Only output messages intended for chat to the user of a chat command r=def- a=heinrich5991

Fixes #5052.

The problem seems to be that there are two different concepts tangled up
in console/logging. One is actual logging as in other programs. The
other is "responses to the user of the command that was just entered",
like for rcon or chat commands. This issue isn't fixed by this commit.

## 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: heinrich5991 <heinrich5991@gmail.com>
2022-05-01 15:01:02 +00:00
Robert Müller cc9ed7e9d3 Add margins to demo slice popup, decrease error font size, UI scaling 2022-05-01 12:03:56 +02:00
Robert Müller f4642472b2 Remove redundant parameters which are overridden later 2022-05-01 11:40:26 +02:00
Robert Müller a1614e4709 Use Margin instead of both VMargin and HMargin 2022-05-01 11:40:21 +02:00
Robert Müller e291a3a70c Move variable declaration 2022-05-01 11:38:58 +02:00
heinrich5991 d5f8bc2783 Only output messages intended for chat to the user of a chat command
Fixes #5052.

The problem seems to be that there are two different concepts tangled up
in console/logging. One is actual logging as in other programs. The
other is "responses to the user of the command that was just entered",
like for rcon or chat commands. This issue isn't fixed by this commit.
2022-05-01 11:18:22 +02:00
heinrich5991 4061069b73 Remove unused chat response variables 2022-05-01 11:18:22 +02:00
bors[bot] 567aeb7d9e
Merge #5049
5049: do not release the hooks if you swap r=C0D3D3V a=C0D3D3V

Needs more testing, but first test looks good
https://streamable.com/ypra11

## Checklist

- [x] Tested the change ingame
- [x] 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
- [ ] 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-04-30 20:09:20 +00:00
c0d3d3v a289503411
remove duplicate HOOK_RETRACTED assignment 2022-04-30 21:41:13 +02:00
c0d3d3v eae74fe91e
do not send swap request notification to complete team 0 2022-04-30 21:24:25 +02:00
c0d3d3v 808526bdd8
make swap messages more personal 2022-04-30 12:16:38 +02:00
c0d3d3v 0ea811f70e
do not release the hooks if you swap 2022-04-30 10:21:38 +02:00
Edgar 4b25f8d63e
fix tooltips rendering when they shouldn't, fixes #5035 2022-04-30 10:05:28 +02:00
Dennis Felsing 1376dc2aa7 Revert "Get rid of optional, not available on Debian9 build"
This reverts commit 4e3d5c5626.

Should work again with clang++-7 and libc++-7. See
2534d627ac
2022-04-30 01:01:39 +02:00
Robert Müller da44ecd6eb Fix flashing colors in console when scrolling up continuously 2022-04-29 17:51:10 +02:00
bors[bot] ca4b6222da
Merge #5013
5013: Unify logging infrastructure between `IConsole` and `dbg_msg` r=def- a=heinrich5991

This makes the "black console window" less important on Windows (or
anywhere else, for that matter), lets you see logs from other threads in
the f1 console, and removes the distinction between `IConsole::Print`
and `dbg_msg`.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-04-29 14:17:07 +00:00
Jupeyy 53cb36bbe7 Fix wrong quad offset for (not caused by transparent) flushes 2022-04-29 15:51:25 +02:00
heinrich5991 fa4bcd5ec0 Unify logging infrastructure between IConsole and dbg_msg
This makes the "black console window" less important on Windows (or
anywhere else, for that matter), lets you see logs from other threads in
the f1 console, and removes the distinction between `IConsole::Print`
and `dbg_msg`.
2022-04-29 15:21:26 +02:00
bors[bot] 98bf721587
Merge #4726 #4727 #4728 #4880 #5022
4726: Display super with "super" string in scoreboard (fixes #4724) r=heinrich5991 a=def-

instead of showing the number 64

Alternative to https://github.com/ddnet/ddnet/pull/4725

<!-- 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)


4727: Increase MAX_IDS to 32k (fixes #4723) r=heinrich5991 a=def-

Not sure I like it, otherwise we have to edit Game City.

Maybe we should fail this in map editor already instead of allowing to
create a map which requires > MAX_IDS

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

## 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)


4728: Implement shields that remove specific weapon (fixes #4572) r=heinrich5991 a=def-

Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display (see screenshot), maybe someone can
quickly spot what I'm doing wrong

<img width="898" alt="Screenshot 2022-02-18 at 00 50 14" src="https://user-images.githubusercontent.com/2335377/154591108-d89cb475-daaf-4a6a-9748-17160a1e71a2.png">

## Checklist

- [x] Tested the change ingame
- [x] 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)


4880: Add mysql to github workflow in ubuntu 20.04 r=heinrich5991 a=def-

<!-- 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)


5022: Use std::clamp r=heinrich5991 a=def-

Not sure if we want to, there are some easy functions like this we could
take from stdlib now

<!-- 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: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-04-29 00:30:17 +00:00
Dennis Felsing 6a7c7ff4cc Use std::gcd 2022-04-28 17:01:53 +02:00
Jupeyy b8da817716 Return the quad offset of the first added quad, when adding new quads 2022-04-28 16:50:18 +02:00
Dennis Felsing 298287fb4e Implement shields that remove specific weapon (fixes #4572)
Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display, maybe someone can
quickly spot what I'm doing wrong
2022-04-28 16:49:32 +02:00
Dennis Felsing 15b8dc8d64 Remove dots in tooltip texts 2022-04-28 16:46:18 +02:00
Dennis Felsing 3ca86ee128 Display super with "super" string in scoreboard (fixes #4724)
instead of showing the number 64
2022-04-28 16:40:20 +02:00
def 487abbe1b7 Enable swapping in team 0 2022-04-28 16:35:46 +02:00
bors[bot] a8b842277a
Merge #5019
5019: remove cl_predict_ddrace r=heinrich5991 a=C0D3D3V

Since most of the predict code is only ddrace relevant anyway, I would suggest removing the cl_predict_ddrace option instead of checking if m_WorldConfig.m_PredictDDRace is set everywhere ddrace stuff is predicted. 

in case of conflicts with physics from other mods, the check on m_WorldConfig.m_PredictDDRace must however be implemented in the appropriate places (for example for the freeze and unfreeze functions). But since there are currently no conflicts apparently, this is sufficient for now.

fixes the bug I reported here: https://discord.com/channels/252358080522747904/293493549758939136/968114944878989363

`@trml`  what do you think about this?

## 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-04-28 12:34:04 +00:00
bors[bot] 6cce22d056
Merge #4813 #4905
4813: Don't allow infinite shotgun bounce (fixes #4809) r=heinrich5991 a=def-

I hope this kind of physic isn't used anywhere, I couldn't trigger it without being stuck in wall.

## 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)


4905: Fix move_sqlite (fixes #4902) r=heinrich5991 a=def-

<!-- 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: def <dennis@felsin9.de>
2022-04-28 12:11:05 +00:00
c0d3d3v 1a162c08be
remove unnecessary loop over the possible modifier combinations 2022-04-28 08:45:25 +02:00
bors[bot] e3eeec762d
Merge #4997
4997: Add option to change default eyes when joining server r=def- a=sjrc6

Risky Feat suggested this idea to me, I also thought it was good so I implemented it. 

If you press one of the eyes in the settings it will change which eyes you get when you join a server.

It saves a separate variable for dummy/player.

It will also change your eyes anytime you press one of them, but only if you are playing as the same Tee whose eyes you are trying to change. If someone could figure out the best way to make it change the opposite Tees eyes as well that would be nice but I don't think it's necessary. 

It also changes the "Your Skin:" Tee eyes on the left if you have one selected. 

I had to change the cl_run_on_join code a bit, I tested and I don't think it should ever break anything but it might be good for someone to double check. 

![image](https://user-images.githubusercontent.com/22122579/163762410-ec7aa67d-6417-433d-8707-e21cda2bcd5f.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: Tater <Mr.Potatooh@gmail.com>
2022-04-27 07:42:59 +00:00
bors[bot] 3d183fc16d
Merge #5027
5027: Fix tooltip locations after window resize (fixes #5026) r=edg-l a=def-

<!-- 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: Dennis Felsing <dennis@felsin9.de>
2022-04-27 06:05:59 +00:00