Commit graph

11283 commits

Author SHA1 Message Date
c0d3d3v 55671e483a
fix windows server crash on client spawn 2022-05-27 19:21:43 +02:00
Robert Müller 31930951f0 Only allow buttons to be become hot while the mouse is not pressed 2022-05-27 19:07:56 +02:00
Robert Müller 910f01cbf2 Fix ingame menu buttons when mouse is held ingame and released in menu 2022-05-27 19:07:56 +02:00
Jupeyy d7cdc14819 Don't ever skip any frame 2022-05-27 17:54:58 +02:00
Robert Müller a0a0fa1322 Fix ingame menu buttons when mouse is held and released ingame 2022-05-27 17:45:30 +02:00
Robert Müller 6a72c5c38b Fix clang-analyzer-cplusplus.NewDelete (Use of memory after it is freed) 2022-05-27 16:41:14 +02:00
Robert Müller a2465605df Remove base/tl/range.h 2022-05-27 16:36:40 +02:00
Robert Müller f9d49bd53e Remove base/tl/allocator.h 2022-05-27 16:36:40 +02:00
Robert Müller 47098daa42 Remove base/tl/algorithm.h 2022-05-27 16:36:40 +02:00
Robert Müller ca309d6ef8 Remove base/tl/array.h 2022-05-27 16:36:39 +02:00
Robert Müller 0c69495522 Use std::vector instead of array in editor 2022-05-27 16:36:39 +02:00
Robert Müller 3f8fb732a3 Use std::vector<CKey> instead of array 2022-05-27 16:31:18 +02:00
Robert Müller c6e195a399 Use std::vector<CNameBan> instead of array 2022-05-27 16:31:18 +02:00
Robert Müller 4a023342b7 Use std::vector<CName> instead of array, adjust variable name 2022-05-27 16:31:18 +02:00
Robert Müller ce54a0d075 Use std::vector<CMenuImage> instead of array 2022-05-27 16:31:18 +02:00
Robert Müller 24ad383211 Use std::vector<CSourceQueueEntry> instead of array 2022-05-27 16:31:18 +02:00
Robert Müller d3eb9d6fe7 Use std::vector<std::string> instead of array 2022-05-27 16:31:18 +02:00
Robert Müller 0f097a0490 Use std::vector<char *> instead of array in gamecontext 2022-05-27 12:13:30 +02:00
Robert Müller 80103888ea Use std::vector<char *> instead of array in config_store 2022-05-27 12:13:30 +02:00
Robert Müller b9c52f7e31 Use SetActiveItem(nullptr) instead of SetActiveItem(0) 2022-05-27 11:59:14 +02:00
Robert Müller 2b02bd449b Prevent lock of UI
Co-authored-by: oy <tom_adams@web.de>
2022-05-27 11:53:05 +02:00
bors[bot] 7348bf4d56
Merge #5246
5246: Use std::vector instead of sorted_array, remove base/tl/sorted_array.h r=def- a=heinrich5991

This replaces all usages of `sorted_array` with `std::vector`. This requires the following general changes:

- `add_unsorted` is replaced with `push_back`.
- `add` is replaced with `push_back` and subsequent `sort` or `stable_sort` must be ensured.
  - In some cases, immediately sorting the entire list after adding an item was unavoidable. Previously items were added at the correct position, which was O(N) because all items after the inserted one had to be moved in any case.
- `sort_range` is replaced with `sort` or `stable_sort`.
- `size` returns a `size_t` instead of `int`, so to fix sign comparison warnings, casts are added where necessary or types of loop variables are changed to `size_t` where possible. For-each loops are also used where possible / where required by clang-tidy.
- `find_binary` is replaced with `std::equal_range`. This can only find items of the same type, so some wrappers, that only have the relevant fields set, need to be created for searching.

In terms of behavior, this should not change anything, except maybe `CLocalizationDatabase` for the better. As far as I understand it, at lot of the code there was not doing anything. It assumes that binary search can return a range of multiple entries, but the equality/comparison function is based on hash and context hash. This means that any item in this range will match the given hash and context hash already, so all of the following checks are redundant. I changed this to first do a lookup with the hash and context hash and if that fails do another lookup with the default context hash.

I have also already replaced `base/tl/array.h` with `std::vector`, removing all of `base/tl` except `threading.h`. I'll make a separate PR later because this caused a lot more changes especially in the editor that I first want to test and review myself.

Naming of `array`/`sorted_array`/`std::vector` variables was rather inconsistent (sometimes prefix `a` or `l` is used), so ~~I chose to not use any prefix for all new `std::vector`s~~ heinrich5991 left them as-is.

## 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-05-27 08:51:55 +00:00
bors[bot] 61c81fa0f2
Merge #5240
5240: Fix crash when graphics init failed (fixes #5237) r=heinrich5991 a=def-

## 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: Dennis Felsing <dennis@felsin9.de>
2022-05-26 22:17:15 +00:00
Robert Müller de1de5e7bd Use emplace_back for CFriendItem 2022-05-27 00:14:07 +02:00
Robert Müller 476af1286d Use emplace_back for CCommand, fix member variable names 2022-05-27 00:13:26 +02:00
Robert Müller d0b5d096f5 Use emplace_back for CString 2022-05-27 00:03:13 +02:00
Robert Müller bea74f3d4f Remove base/tl/sorted_array.h 2022-05-27 00:03:13 +02:00
Robert Müller a76cdb254e Use std::vector<CDownloadSkin> instead of sorted_array 2022-05-27 00:03:13 +02:00
Robert Müller 0859da7e6a Use std::vector<CSkin> instead of sorted_array 2022-05-27 00:03:13 +02:00
Robert Müller ae8f5e87c7 Use std::vector<CNameIndexed> instead of sorted_array 2022-05-27 00:03:13 +02:00
Robert Müller 5cc76d286f Use std::vector<CGhostItem> instead of sorted_array 2022-05-27 00:03:13 +02:00
Robert Müller b24f318450 Use std::vector<CFriendItem> instead of sorted_array 2022-05-27 00:03:13 +02:00
Robert Müller de23bf912d Use std::vector<CString> instead of sorted_array, improve string search 2022-05-27 00:03:13 +02:00
Robert Müller 359093cab8 Use std::vector<CDemoItem> instead of sorted_array 2022-05-27 00:03:13 +02:00
Robert Müller 96c97d5bb7 Use std::vector for assets menu list items instead of sorted_array 2022-05-26 23:49:30 +02:00
Robert Müller 2ea0c49f8b Use std::vector<CCommand> instead of sorted_array 2022-05-26 23:49:30 +02:00
Robert Müller 662cb58132 Use std::vector<CFilelistItem> instead of sorted_array 2022-05-26 23:49:30 +02:00
Robert Müller 0032f6f2c2 Use std::vector<CCountryFlag> instead of sorted_array 2022-05-26 23:49:27 +02:00
Robert Müller 295c395c8c Use std::vector<CUISkin> instead of sorted_array 2022-05-26 23:47:37 +02:00
Robert Müller 97dd8105fd Use std::vector<CLanguage> instead of sorted_array 2022-05-26 23:42:06 +02:00
Robert Müller 9dece943e7 Use std::vector<CMapNameItem> instead of sorted_array 2022-05-26 23:42:06 +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
bors[bot] 0648f22d7a
Merge #5236
5236: Don't enable colors when stdout is redirected to a file (fixes #5233) r=heinrich5991 a=def-

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


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-05-26 21:24:38 +00:00
bors[bot] e63b8e2bb5
Merge #5183
5183: render allways the nameplate of a specchar (or the real player) r=def- a=C0D3D3V

fokkonaut uses spec chars in addition to normal players in his mod, so the names should also be displayed in addition to the player name

## 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
- [ ] 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-05-26 21:06:19 +00:00
bors[bot] 74b94b3e71
Merge #5245
5245: disable dragger beams soon, not only every 150ms r=def- a=C0D3D3V

The check whether a dragger is active, I somehow forgot in the dragger beams. Sorry! Actually, I should have noticed this during testing. But when I tested Fall into the Future today, it seemed strange to me (already at the first part). I should have noticed it when I tested it. I have compared that in any case with 15.9.1 and looked at the code again and saw that there the check is made every tick.


## 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-05-26 20:47:48 +00:00
c0d3d3v 62c99515d5
disable dragger beams soon, not only every 150ms 2022-05-26 19:49:51 +02:00
trml 2402edcb8a Remove predicted character from gameworld before calling base class destructor 2022-05-26 19:08:46 +02:00
Dennis Felsing ac2657bfce Fix crash when graphics init failed (fixes #5237) 2022-05-26 13:04:39 +02:00
Dennis Felsing d2e9a78483 Don't enable colors when stdout is redirected to a file (fixes #5233) 2022-05-26 12:32:24 +02:00
bors[bot] 3b81157013
Merge #5231
5231: Fix windows crash r=def- a=C0D3D3V

Fixes #5226

I tested it in a Windows VM.
`@sjrc6` is it correct that `TempCore` is this way zero initialized, can you check that maybe in the debugger? I do not want to change the behaviour, even tho the core is read in two lines later with `TempCore.ReadCharacter(pCharacter);`

## 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
- [ ] 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-05-26 08:57:22 +00:00
c0d3d3v 62cad6ba51
use value initialization in Evolve lambda 2022-05-26 08:26:27 +02:00
c0d3d3v cf03ada052
revert to SetHookedPlayer in ReadCharacterCore 2022-05-26 07:45:34 +02:00
Dennis Felsing 68bcd21eff asan+ubsan clean 2022-05-26 01:22:14 +02:00
Dennis Felsing 604142da3a Try other fix for tautological 2022-05-26 00:37:33 +02:00
Dennis Felsing 3a231b07e1 Fix new Obj-C deprecation warnings
src/macos/server.mm:74:29: warning: 'NSOKButton' is deprecated: first deprecated in macOS 10.10 [-Wdeprecated-declarations]
                        if([openDlg runModal] != NSOKButton)
                                                 ^~~~~~~~~~
                                                 NSModalResponseOK
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPanel.h:51:5: note: 'NSOKButton' has been explicitly marked deprecated here
    NSOKButton API_DEPRECATED_WITH_REPLACEMENT("NSModalResponseOK", macos(10.0,10.10)) = NSModalResponseOK,
    ^
src/macos/server.mm:90:14: warning: 'NSTitledWindowMask' is deprecated: first deprecated in macOS 10.12 [-Wdeprecated-declarations]
                styleMask: NSTitledWindowMask
                           ^~~~~~~~~~~~~~~~~~
                           NSWindowStyleMaskTitled
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:885:32: note: 'NSTitledWindowMask' has been explicitly marked deprecated here
static const NSWindowStyleMask NSTitledWindowMask API_DEPRECATED_WITH_REPLACEMENT("NSWindowStyleMaskTitled", macos(10.0,10.12)) = NSWindowStyleMaskTitled;
                               ^
src/macos/server.mm:91:5: warning: 'NSClosableWindowMask' is deprecated: first deprecated in macOS 10.12 [-Wdeprecated-declarations]
                | NSClosableWindowMask
                  ^~~~~~~~~~~~~~~~~~~~
                  NSWindowStyleMaskClosable
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:886:32: note: 'NSClosableWindowMask' has been explicitly marked deprecated here
static const NSWindowStyleMask NSClosableWindowMask API_DEPRECATED_WITH_REPLACEMENT("NSWindowStyleMaskClosable", macos(10.0,10.12)) = NSWindowStyleMaskClosable;
                               ^
src/macos/server.mm:92:5: warning: 'NSMiniaturizableWindowMask' is deprecated: first deprecated in macOS 10.12 [-Wdeprecated-declarations]
                | NSMiniaturizableWindowMask
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
                  NSWindowStyleMaskMiniaturizable
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:887:32: note: 'NSMiniaturizableWindowMask' has been explicitly marked deprecated here
static const NSWindowStyleMask NSMiniaturizableWindowMask API_DEPRECATED_WITH_REPLACEMENT("NSWindowStyleMaskMiniaturizable", macos(10.0,10.12)) = NSWindowStyleMaskMiniaturizable;
                               ^
4 warnings generated.
2022-05-26 00:37:33 +02:00
Zwelf 93ece6f090 Only record swap in teehistorian if active 2022-05-25 19:35:37 +02:00
bors[bot] 1ca4220adf
Merge #5222
5222: Fix crash because of hooks on non ddnet server r=def- a=C0D3D3V

Reported by `@Ясно` Понятно 
on non ddnet server, this code gets run to detect strong-weak ids:
6a5673aa04/src/game/client/gameclient.cpp (L2540-L2541)
which causes a crash because this CCharacterCore is not bound to a gameworld 
the check for m_pWorld failed because m_pWorld is fill of random data
ac15943e85/src/game/gamecore.cpp (L625)
So I would also like to initialize it with a nullpointer 

## 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-05-25 15:51:43 +00:00
c0d3d3v a5cf35576d
init m_pWorld with nullptr 2022-05-25 17:42:44 +02:00
c0d3d3v 6a5673aa04
fix crash on non ddnet server if hook is in view 2022-05-25 17:33:59 +02:00
bors[bot] ac15943e85
Merge #5218
5218: do not snap dragger beam, if the target is out of reach r=def- a=C0D3D3V

fixes #5216

## 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-05-25 15:08:27 +00:00
bors[bot] 00c167148d
Merge #5194
5194: Revert Ellipsis (alternative to #5193) r=heinrich5991 a=def-

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


Co-authored-by: def <dennis@felsin9.de>
2022-05-25 14:46:16 +00:00
c0d3d3v 82a0354f97
do not dragger beam snap, if the target is out of reach 2022-05-25 16:43:05 +02:00
Dennis Felsing 049a249944 Crash fix (fixes #5217) 2022-05-25 16:28:00 +02:00
Chairn 0076edf499 Remove useless setting 2022-05-25 00:12:38 +02:00
bors[bot] 03f95108b4
Merge #5063
5063: Reworked Draggers and Turrets AND show always hooks if they are in the field of view  r=def- a=C0D3D3V

Fixes #3622, #4723 #4798 and #5054

Here you can find a comparison video with 16.0.3: https://youtu.be/bYwLB1cEMI8

This now also includes the changes from https://github.com/ddnet/ddnet/pull/4980 
So please also see my monologue here: https://github.com/ddnet/ddnet/pull/4980

Physic that got changed by this PR:
- Solo players are not included in the calculation of the next team players to the dragger/turrets. This does not affect any map.
- Turrets get switched correctly if players are solo
- Plasma bullets fired by turrets on solo player only explode for solo players and the other way around (except if they unsolo)
- Plasma bullets can no longer be intercepted by other teams 
- Turrets can shot now independently at the speed of sv_plasma_per_sec for  every team and every solo player


This should be tested by some more players before it get merged!

This reduces the use of snap id's tested here: https://youtu.be/G3nVtdH0--Q 
from 16000 to 69
test with the new dragger: https://youtu.be/mzNrDHP7HQs
I did not add the terminal of the server because you basically see no change in the used snap ids 
The videos are with cl_predict off

Comparison of the new turrets: https://streamable.com/8us8lk
left old turrets, right the new ones

We should delete ranks on (that where made after 13 Jun 2019):
https://ddnet.tw/maps/Increase-32-Your-32-Speed
https://ddnet.tw/maps/Fall-32-into-32-the-32-Future
https://ddnet.tw/maps/turboSeks

## 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
- [only on 3 maps] 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-05-24 18:26:08 +00:00
bors[bot] c929ef44e9
Merge #5204
5204: Fix pos1 only scrolling up one page in console r=heinrich5991 a=Robyt3

Holding down the pos1 key will still make the console text flash though.

Fixing that would require to first calculate the total number of pages in a separate pass before rendering the current page.

## 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-05-23 18:13:43 +00:00
Robert Müller 0c518baef4 Fix pos1 only scrolling up one page in console 2022-05-23 19:24:56 +02:00
heinrich5991 c93658f929 Make sure we don't accidentally initialize libcurl in a thread 2022-05-23 17:21:27 +02:00
heinrich5991 76ed324b66 Call HttpInit in server
Otherwise `curl_global_init` would be called from the first
`curl_easy_init`, but `curl_global_init` isn't threadsafe.

Fixes #5195.
2022-05-23 17:20:45 +02:00
c0d3d3v bf2d3d59ff
do not render freezebar if you are not freezed 2022-05-23 12:12:46 +02:00
bors[bot] 064dc2c0c5
Merge #5196
5196: Break early out of loop r=heinrich5991 a=ChillerDragon



Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2022-05-23 07:31:34 +00:00
bors[bot] 847454f3be
Merge #5189
5189: Fix 0 byte malloc in register.cpp (fixes #5187) 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-05-23 07:15:54 +00:00
ChillerDragon e54f0ee97b Break early out of loop 2022-05-23 08:32:00 +02:00
def 76efcc616b Fix 0 byte malloc in register.cpp (fixes #5187) 2022-05-23 00:24:22 +02:00
def 0c8bf5c3aa Revert "Ellipsis at end in scoreboard and hud"
This reverts commit f278399bd1.
2022-05-22 23:04:32 +02:00
def 590eb2c5d1 Revert "Render full text when it still fits"
This reverts commit c4bcf3d628.
2022-05-22 23:01:00 +02:00
c0d3d3v 60a95c6e4e
mark virtual methods in dragger_beam as overwritten 2022-05-22 22:01:07 +02:00
c0d3d3v 5175734432
Iterate over m_AttachedPlayers instead of MAX_CLIENTS 2022-05-22 21:59:52 +02:00
c0d3d3v f07d773492
Add a set of Players that are attached to a Tee 2022-05-22 21:59:51 +02:00
c0d3d3v 71c9a49776
revert to double explotion plasma bullets if the bullet hits obstacle
and player at the same time
2022-05-22 21:59:51 +02:00
c0d3d3v 9180fa70e4
revert change of dragger range 2022-05-22 21:59:50 +02:00
c0d3d3v 8d644d0638
Snap characters also when a hook is attached to them that is in the field of view 2022-05-22 21:59:49 +02:00
c0d3d3v c251b3d37c
fix server options in comments 2022-05-22 21:59:49 +02:00
c0d3d3v 8fc34ae7b9
Add Comments with Specifications to Turrets and Dragger
- Make Plasma Bullets explode only once if they hit a character and a
  obstacle
- Make turrets fire speed independend from teams and solo players
- Make draggers keep dragging the same tee, also if a closer tee exist
2022-05-22 21:59:48 +02:00
c0d3d3v ab37f95bb4
Do not clip players with hook in the field of view 2022-05-22 21:59:48 +02:00
c0d3d3v d64445d983
Rework Turrets
- Make the code look similar to the code of the draggers
- Make correct switching for solo players, as described here: https://github.com/ddnet/ddnet/pull/4980
- Remove NetworkClipping Bug
- Added intentionally the "Feature" to only explode at one tee
- Make plasma bullets only explode for solo tees if they are solo, not
  for the rest of the team
2022-05-22 21:59:47 +02:00
c0d3d3v 917d12e26c
use TeamMask() instead of Teams()->TeamMask(...) in projectile.cpp and laser.cpp 2022-05-22 21:59:47 +02:00
c0d3d3v 459a845373
use TeamMask() instead of Teams()->TeamMask(...) 2022-05-22 21:59:46 +02:00
c0d3d3v b8cbd8120c
Add ProximityRadius of a tee to the dragger range 2022-05-22 21:59:46 +02:00
c0d3d3v b5166f4048
Simplification of NetworkClippedLine 2022-05-22 21:59:45 +02:00
c0d3d3v 0a6902acae
Optimization of the closest_point_on_line function 2022-05-22 21:59:44 +02:00
c0d3d3v 87893ceca7
Move MapScreenToGroup from 3 classes to render.cpp; Rename MapscreenToWorld to MapScreenToWorld 2022-05-22 21:59:43 +02:00
c0d3d3v b751a2e098
Reworked Draggers 2022-05-22 21:59:33 +02:00
bors[bot] 344eeaf8aa
Merge #5192
5192: Add missing nanosecond conversions r=def- a=Jupeyy

fixes #5191

## 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-05-22 18:27:57 +00:00
bors[bot] 85ce4fc0a8
Merge #5185
5185:  Fix pickups moving on their own (fixes #5137) r=C0D3D3V a=def-

Supersedes #5181 

Objects should be initialized fully, otherwise they are super easy to misuse and get weird undefined behavior that happens rarely.

## 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: def <dennis@felsin9.de>
2022-05-22 14:32:21 +00:00
Jupeyy 2677949e58 Add missing nanosecond conversions 2022-05-22 16:08:11 +02:00
Jupeyy 1e6df0c7a9 Lower max allowed FSAA on OpenGL 2022-05-22 14:42:21 +02:00
def 3116494f6e Fix some uninitialized variables, found with valgrind 2022-05-22 12:18:49 +02:00
def c4377bb7d9 Always initialize vec2/3/4
Because no tools can detect it uninitialized well, tried Memory
Sanitizer (needs all libs including libc++ compiled with it), valgrind
(only detects in LTO build), compiler warnings. Might be related to
unions.
2022-05-22 12:18:32 +02:00
bors[bot] 1738b0d51b
Merge #5032
5032: Make input handling teehistorian friendly r=def- a=Zwelf

Makes input handling more reproducible during respawn. Still WIP, because I haven't tested this particular patch (only a different one with the same effect).

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
  - [x] swap
  - [x] using timeout protection
  - [x] reconnecting
  - [x] respawning
  - [x] chat keeps movement
  - [x] pause keeps movement
- [x] 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: Zwelf <zwelf@strct.cc>
2022-05-22 09:57:44 +00:00