Commit graph

11199 commits

Author SHA1 Message Date
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] 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
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