Commit graph

20477 commits

Author SHA1 Message Date
bors[bot] ba0e4a44bc
Merge #4756
4756: Drop non RGBA image in skins r=def- a=Chairn

[src/game/client/components/skins.cpp](https://github.com/ddnet/ddnet/compare/master...Chairn:pr_skin?expand=1#diff-ae0c2e268081e8cb36b27c928f0daa590313583f43469bd486e63140404f360d) is using some fixed step suitable for RGBA png but it can be given a RGB which surprisingly doesn't crash it. Anyway, RGB pictures cannot be used as skins:
![image](https://user-images.githubusercontent.com/10178629/155204240-41ea5b9a-bd31-4208-abbd-47834998044c.png)


## 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: Chairn <chairn.nq@hotmail.fr>
2022-02-22 23:41:20 +00:00
Chairn c0d398df38 CheckImageFormatRGBA --> IsImageFormatRGBA 2022-02-23 00:39:31 +01:00
Chairn 0ea66bca57 Clang format 2022-02-22 20:21:43 +01:00
Chairn 76064bd1c8 Drop non RGBA images 2022-02-22 20:21:34 +01:00
bors[bot] 883c17cd2c
Merge #4741
4741: Validate variables of the snap-item base class r=def- a=Robyt3

See https://github.com/teeworlds/teeworlds/pull/2688.

Fixes 

```
/src/game/client/components/players.cpp:95:102: runtime error: index 552473416 out of bounds for type 'CCharacterInfo [64]'
    #0 0x5575323d614b in CPlayers::RenderHook(CNetObj_Character const*, CNetObj_Character const*, CTeeRenderInfo const*, int, float) /src/game/client/components/players.cpp:95
    #1 0x557532401969 in CPlayers::OnRender() /src/game/client/components/players.cpp:701
    #2 0x5575324ec369 in CGameClient::OnRender() /src/game/client/gameclient.cpp:598
    #3 0x557531bf1310 in CClient::Render() /src/engine/client/client.cpp:1179
    #4 0x557531c42a48 in CClient::Run() /src/engine/client/client.cpp:3152
    #5 0x557531ca0c1a in main /src/engine/client/client.cpp:4424
    #6 0x7f6fc51340b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #7 0x557531a3576d in _start (/build-asan/DDNet+0x1bc076d)
```

## 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: Redix <redix@hotmail.de>
2022-02-21 19:16:21 +00:00
bors[bot] 2915f4b4bd
Merge #4730
4730: Add link to doxygen generated docs hosted on wiki.ddnet.tw r=def- a=edg-l

I plan on documenting more stuff (in a manner that `@heinrich5991` is fine with it) so i think it would be great to mention it on the readme.

The docs are regenerated every 30 minutes using latest master.


Co-authored-by: Edgar <git@edgarluque.com>
2022-02-21 17:03:51 +00:00
Edgar b96379bbce
ups 2022-02-21 17:58:24 +01:00
Dennis Felsing e2c48ec47e Don't try to send messages outside of sv_max_clients (fixes# 4750) 2022-02-21 16:33:53 +01:00
Dennis Felsing cc4be4b3b1 s/errornous/erroneous/g 2022-02-21 15:54:55 +01:00
Edgar 7889b2ed77
Update README.md 2022-02-21 11:18:57 +01:00
Dennis Felsing 8787bbc2ce Fix test run instructions
As reported by ReiTW
2022-02-21 09:46:05 +01:00
bors[bot] 4581233882
Merge #4746
4746: Fix listbox item double click behavior r=def- a=Robyt3

Closes #4745.

## 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-02-20 19:24:01 +00:00
Robert Müller 9ebb85f520 Fix listbox item double click behavior 2022-02-20 19:58:24 +01:00
bors[bot] 2fd4389311
Merge #4740
4740: Update French flag (fixes #4738) r=Jupeyy a=def-

by Nouaa

Blue color was changed recently

<!-- 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-02-20 10:11:36 +00:00
bors[bot] bd30039ba9
Merge #4742
4742: Update Scottish flag (fixes #4739) r=Jupeyy a=def-

by SoulyVEVO

<!-- 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-02-20 09:55:23 +00:00
bors[bot] 4584eb1fda
Merge #4743
4743: Fix broken checkbox r=def- a=simpygirl

Fixes broken checkbox, occurs when cl_show_hook_coll_other is set to 2.

## 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: simpygirl <simpygirl@fedora.email>
Co-authored-by: def <dennis@felsin9.de>
2022-02-20 09:41:29 +00:00
def cf23a73891 Fix style 2022-02-20 10:41:06 +01:00
bors[bot] eed7f9dfe0
Merge #4744
4744: Update and improve the Swedish translations r=def- a=simpygirl

## 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: simpygirl <simpygirl@fedora.email>
2022-02-20 09:14:10 +00:00
simpygirl 7034c5c47b Update Swedish translations 2022-02-20 05:02:04 +01:00
simpygirl 4e7b82a3fd Fix broken checkbox 2022-02-20 04:04:47 +01:00
def 9033607361 Update Scottish flag (fixes #4739)
by SoulyVEVO
2022-02-20 00:40:38 +01:00
def e3fff411d8 Update French flag (fixes #4738)
by Nouaa

Blue color was changed recently
2022-02-20 00:38:06 +01:00
bors[bot] 88c8884daa
Merge #4737
4737: Refactoring of g_Config.m_SvTeam, See #4601 r=def- a=C0D3D3V

This is just a small refactoring of g_Config.m_SvTeam as requested in #4601. Makes the code a little more readable. I'm not sure if `src/game/teamscore.h` is the best place for the enum (I'm not that familiar with the codebase yet), any opinions?


## 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
- [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-02-19 23:37:47 +00:00
Redix a121a53e26 Fix validation range of m_HookedPlayer in character snap items 2022-02-19 20:08:05 +01:00
Redix 5efa50ca28 Validate variables of the snap-item base class 2022-02-19 20:08:05 +01:00
c0d3d3v eac2d731b6
Refactoring of g_Config.m_SvTeam, See #4601 2022-02-19 18:11:15 +01:00
bors[bot] 40380d088f
Merge #4713
4713: Give the condition waits proper conditions 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-02-19 12:48:40 +00:00
bors[bot] e79c166259
Merge #4697
4697: Show key presses in nameplates r=def- a=C0D3D3V


As described in [x](https://github.com/ddnet/ddnet/issues/4589) the arrows that show the key presses of the players are not visible in many situations, this is now my attempt to fix this by including the arrows in the nametags.

~~Also, I created a new option called `cl_show_direction_below` to show the arrows below the player. We can discuss whether this is useful, or whether it should simply be displayed as before only above the player.~~

## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
https://streamable.com/czk2ht
See also https://github.com/ddnet/ddnet/issues/4589
- [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
- [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-02-19 12:36:50 +00:00
c0d3d3v d43ed14897
render key presses independent of m_ClNameplates 2022-02-19 13:31:34 +01:00
bors[bot] a5b3bd9fa0
Merge #4733
4733: Fix MinGW warnings (fixes #4731) r=Jupeyy a=def-

`@Jupeyy` `@Robyt3` `@Zwelf` 

## 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-02-19 08:51:54 +00:00
bors[bot] 3f729ea2bd
Merge #4736
4736: Add live freeze graphics in switch layer (fixes #4735) r=Jupeyy 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-02-19 08:37:09 +00:00
Dennis Felsing 4de7f74dda Add live freeze graphics in switch layer (fixes #4735) 2022-02-19 00:15:09 +01:00
bors[bot] 501364cffe
Merge #4734
4734: No chat messages for live freeze r=Jupeyy a=def-

Since you have visual indication already, as suggested by fokkonaut and
Konsti

<!-- 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-02-18 17:11:17 +00:00
bors[bot] b793e1e41b
Merge #4729
4729: Add exception handling for Windows r=def- a=Jupeyy

Only tested on wine yet.

I am using https://github.com/jrfonseca/drmingw

We don't need to ship debug symbols, but need to keep a copy of DDNet.exe with debug symbols. Using addr2line works on the addresses printed by this tool.

currently crash reports go into %appdata%/Teeworlds/dumps (that dir seems to be rarely used anyway, but can also change to /crashlogs or smth)



## 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>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-02-18 13:51:58 +00:00
Dennis Felsing bc0bf4e549 No chat messages for live freeze
Since you have visual indication already, as suggested by fokkonaut and
Konsti
2022-02-18 13:02:03 +01:00
Dennis Felsing aaec807963 Disable invalid cast warning in set_exception_handler_log_file 2022-02-18 12:55:13 +01:00
Dennis Felsing ded32c4334 Fix MinGW warnings (fixes #4731) 2022-02-18 12:54:19 +01:00
Dennis Felsing a2db10d730 Set -fno-omit-frame-pointer 2022-02-18 11:53:25 +01:00
Dennis Felsing 42373ca7a2 exception_handling -> drmingw 2022-02-18 11:47:15 +01:00
Edgar 7fbcaa6d36
start document system.h with doxygen 2022-02-18 11:35:46 +01:00
Jupeyy 4330ff83cf Add exception handling for Windows 2022-02-18 11:35:06 +01:00
Edgar 2ae3adcef5
Add link to doxygen generated docs hosted on wiki.ddnet.tw 2022-02-18 11:18:35 +01:00
Dennis Felsing 2782f82141 Increase MAX_IDS to 32k (fixes #4723)
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
2022-02-17 23:36:08 +01:00
bors[bot] c8363bc96f
Merge #4719
4719: Better fix for sqlite3_expanded_sql r=Zwelf 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-02-17 10:32:11 +00:00
bors[bot] 876ac2a9ec
Merge #4720
4720: Remove obsolete ignore_convention comment r=def- a=Robyt3

I assume the `// ignore_convention` comments are obsolete as they are only used inconsistently and not being added in new code anymore. The script https://github.com/teeworlds/teeworlds/blob/master/scripts/refactor_count.py that checks for these annotations does not exist in ddnet.

## 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: Robert Müller <robert.mueller@uni-siegen.de>
2022-02-16 22:09:59 +00:00
Robert Müller 89f126cf8d Remove obsolete ignore_convention comment 2022-02-16 20:54:11 +01:00
Dennis Felsing 14e52220c0 Better fix for sqlite3_expanded_sql 2022-02-15 23:28:11 +01:00
bors[bot] 22dd3f1729
Merge #4718
4718: Updated french translations r=def- a=Chairn

Added missing french translations

## 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-02-15 22:01:10 +00:00
bors[bot] 84d896a783
Merge #4717
4717: Fix #4714 r=Zwelf a=def-

sqlite on Windows doesn't seem to have this function
<!-- 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-02-15 21:10:04 +00:00
Chairn aca3029c5b Updated french translations 2022-02-15 22:04:20 +01:00