Commit graph

4939 commits

Author SHA1 Message Date
Dennis Felsing 2b1df782d3 Version 11.3 2018-07-24 08:03:02 +02:00
bors[bot] e571dc8d93 Merge #1200
1200: Share libcurl resources across requests r=def- a=heinrich5991

Use the libcurl-share interface to share DNS cache and connections
between different requests.

If compiled with OpenSSL, libcurl can only be safely used from multiple
threads for OpenSSL >= 1.1.0, but this problem is not newly introduced
by this commit: According to libcurl-thread(3):

>OpenSSL <= 1.0.2 the user must set callbacks.
>
>https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION
>
>https://curl.haxx.se/libcurl/c/opensslthreadlock.html

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2018-07-19 09:15:10 +00:00
Edgar ee756f2b1a
apparently 0 is used and NULL not... 2018-07-17 19:25:38 +02:00
Edgar ef4505e96d
we don't use nullptr in tw code 2018-07-17 19:24:10 +02:00
Ryozuki 4d7e493391 another style fix 2018-07-16 18:57:33 +02:00
Ryozuki 9cf0a60e3a remove useles brackets 2018-07-16 00:53:36 +02:00
Ryozuki 97ecd62214 fix timakro review 2018-07-16 00:43:54 +02:00
Tim Schumacher a3a4d4f519
Fix teleport rifle "backtracking" logic, now pretty sure about this 2018-07-15 23:33:49 +02:00
Tim Schumacher ea68ef201f
Initialize m_TeleGunTeleport to false 2018-07-15 23:03:30 +02:00
Tim Schumacher bbcc9aca0c Fix stopper teleport gun bug 2018-07-15 12:02:48 +02:00
Ryozuki 890c3a511e remove unused telegun function 2018-07-15 10:22:04 +02:00
Ryozuki b811d18422 make laser telegun use the new function 2018-07-15 10:22:03 +02:00
Ryozuki 2bee4a9807 remove comments and stuff that shouldn't be there 2018-07-15 10:22:02 +02:00
Ryozuki c074fdd30f fix all known bugs 2018-07-15 10:22:01 +02:00
Ryozuki 747946b291 fix style a bit 2018-07-15 10:22:00 +02:00
Ryozuki 50c84a60f7 add teleport gun/grenade/laser 2018-07-15 10:21:59 +02:00
Learath2 e2314a33c8 Let the receiver decide instead 2018-07-12 12:58:33 +02:00
Learath2 5a5c563a20 Require DNSBL check on /modhelp 2018-07-12 12:50:27 +02:00
heinrich5991 8d04e7e5e1 Share libcurl resources across requests
Use the libcurl-share interface to share DNS cache and connections
between different requests.

If compiled with OpenSSL, libcurl can only be safely used from multiple
threads for OpenSSL >= 1.1.0, but this problem is not newly introduced
by this commit: According to libcurl-thread(3):

>OpenSSL <= 1.0.2 the user must set callbacks.
>
>https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION
>
>https://curl.haxx.se/libcurl/c/opensslthreadlock.html
2018-07-11 20:17:21 +02:00
yangfl 81a39c229b Fix typo 2018-07-10 17:29:02 +08:00
bors[bot] 1cebe615dd Merge #1195
1195: Fix votespec on /pause (Fixes #1193) r=heinrich5991 a=ChillerDragon

I also thought about using a `` if (str_find(m_aVoteCommand, "set_team"))`` in front of the pause reset.
But then i thought its ok to unpause the VoteVictim every time.

I didn't test but i could belive that this can cause some unwanted unpause for a player with the id of the last VoteVictim on a server type vote for example. Thats why i also reset the ``m_VoteVictim`` to -1 to avoid this.

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2018-07-10 07:26:08 +00:00
ChillerDragon 819ae338d8 Improved pause fix (thanks to heinrich5991) 2018-07-10 00:08:57 +02:00
ChillerDragon e9807fe47c Fix votespec on /pause (Fixes #1193) 2018-07-08 04:39:36 +02:00
heinrich5991 925aff21d4 Fix all the header guards and adjust the script a little 2018-07-06 16:11:38 +02:00
bors[bot] 7c3e4e7f09 Merge #1187
1187: fix projectiles not rendering on mods based on ddnet r=heinrich5991 a=ZombieToad

for some reason the client doesnt render extrainfo projectiles if the gamemode wasnt ddnet

Co-authored-by: ZombieToad <25847476+zombietoad@users.noreply.github.com>
2018-07-06 12:27:33 +00:00
ChillerDragon 0ebf7b614d Oop! forgot one 2018-07-06 11:37:33 +02:00
ChillerDragon 4e9eac432c Better button id for dummy settings (thanks to deen) 2018-07-06 11:24:57 +02:00
ZombieToad 93cb1d8479 oops missed 1 2018-07-04 04:44:35 +01:00
ZombieToad 712fca8adc fixes
thnx to Hey, Fuck you!
2018-07-04 04:35:06 +01:00
ZombieToad 5e723f6199 fix projectiles not rendering on mods based on ddnet
for some reason the client doesnt render extrainfo projectiles if the gamemode wasnt ddnet
2018-07-04 04:19:36 +01:00
def af2d86765c Version 11.2.1 2018-06-30 09:49:42 +02:00
heinrich5991 c07412b6c8 By default, don't embed vanilla images
Previously, when you added an image to the map in the editor, it would
start off as embedded, i.e. included in the map file. This does not make
sense for vanilla images as every client has those.

That's why we now only mark non-vanilla images as external by default.
2018-06-29 23:28:49 +02:00
Dennis Felsing 9e9a344197 Version 11.2 2018-06-27 08:32:21 +02:00
Dennis Felsing 2adff3eca8
Merge pull request #1136 from heinrich5991/pr_ddnet_sha256
Use more secure hash function for map downloads
2018-06-27 08:15:19 +02:00
Dennis Felsing 079322899f
Merge pull request #1173 from ZombieToad/patch-3
fix Pain weapons bug
2018-06-27 08:08:13 +02:00
def 89ca2cfe8b Allow some key binds in editor when GUI is hidden 2018-06-26 22:51:43 +02:00
def daf83470cc Add cl_nameplates_own for demo recording 2018-06-26 22:30:28 +02:00
def 38767df2a4 Update credits 2018-06-26 21:19:17 +02:00
ZombieToad 4d2ee25bfb
fix Pain weapons bug
https://cdn.discordapp.com/attachments/293493549758939136/461236206131478538/PainWeaponBug.gif

because I'm new to coding it took me 2 hours to find this bug. I spent a while looking at the POWERUP_ARMOR and RemoveNinja() code wondering why it didn't work.

this bug is funny to some players so maybe you don't want to fix it. i wont mind because it was a challange for me to find it
2018-06-26 19:45:40 +01:00
Piepow 9f61424860 Fix pain emote immunity with jetpack 2018-06-25 21:11:22 -04:00
Pavel Titov e0ee4ffe8a Fixed dyncam 2018-06-25 15:34:31 +03:00
heinrich5991 ca8fcc823c Use more secure hash function for map downloads
SHA256 was chosen because it is reasonably standard, the file names
don't explode in length (this rules out SHA512) and it is supported by
basically all versions of OpenSSL (this rules out SHA512/256 and SHA3).

The protocol is changed in a backward compatible way: The supporting
server sends the SHA256 corresponding to the map in the `MAP_DETAILS`
message prior to sending the `MAP_CHANGE` message. The client saves the
SHA256 obtained from the `MAP_DETAILS` message until the next
`MAP_CHANGE` message.

For servers not supporting this protocol, the client falls back to
simply opening maps like in the previous scheme.

Remove the `map_version` tool, it is not being used and would have been
a little bit effort to update.

Use the OpenSSL implementation of SHA256 if it is supported, otherwise
fall back to a public domain one.

Fix #1127.
2018-06-24 17:04:50 +02:00
heinrich5991 125377bf2d Use <stdint.h> instead of <cstdint> 2018-06-24 17:00:21 +02:00
bors[bot] ebb9481857 Merge #1157 #1160
1157: Add a way to call for external moderator help r=Learath2 a=heinrich5991

This is done by HTTP POSTing to a location specified by
`sv_modhelp_url`. We also provide a `src/modhelp/server.py` which can
use theses POSTs to forward them to Discord servers.

The POST contains a JSON object payload, with the keys `"port"` which
contains the server port, `"player_id"` which contains the calling
player's client ID, `"player_name"` which contains the calling player's
nick and `"message"` which is the user-specified message.

Make JSON-escaping function public, add tests and fix bugs uncovered by
these tests.

Supersedes #1129.

1160: Fix warning about incompatible function pointers r=Learath2 a=heinrich5991

This comes at the cost of one allocation per started thread. This should
be okay because we're about to invoke a syscall anyway.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2018-06-24 14:12:48 +00:00
heinrich5991 7b76208431 Use m_ModhelpTick to store the last modhelp action
This addresses @Learath2's comment.
2018-06-24 11:15:16 +02:00
heinrich5991 57e26450b2 Unify spelling of Modhelp
Since the command name is `/modhelp` it should be written `Modhelp` in
camel case.
2018-06-24 11:03:18 +02:00
heinrich5991 cdffd7616f More style fixes 2018-06-24 09:57:30 +02:00
heinrich5991 e5e05081a7 Make port and client ID integers on /modhelp POST 2018-06-23 19:39:38 +02:00
heinrich5991 56876c7516 Add information about whether a moderator is present to the /modhelp POST 2018-06-23 19:38:27 +02:00
heinrich5991 36694d3852 Add a way to call for external moderator help
This is done by HTTP POSTing to a location specified by
`sv_modhelp_url`. We also provide a `src/modhelp/server.py` which can
use theses POSTs to forward them to Discord servers.

The POST contains a JSON object payload, with the keys `"port"` which
contains the server port, `"player_id"` which contains the calling
player's client ID, `"player_name"` which contains the calling player's
nick and `"message"` which is the user-specified message.

Make JSON-escaping function public, add tests and fix bugs uncovered by
these tests.

Supersedes #1129.
2018-06-19 23:27:35 +02:00