Commit graph

4973 commits

Author SHA1 Message Date
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
heinrich5991 c739aef60e Some style fixes 2018-06-19 14:28:53 +02:00
Dennis Felsing 45cf274fa9
Merge pull request #1153 from ZombieToad/patch-1
fix server browser bug
2018-06-18 09:03:44 +02:00
bors[bot] 048176d043 Merge #1155
1155: fix sv_skinstealaction r=Learath2 a=ZombieToad



Co-authored-by: ZombieToad <25847476+zombietoad@users.noreply.github.com>
2018-06-17 13:03:09 +00:00
bors[bot] 6850fa98bf Merge #1154
1154: Rename 'credit' -> 'credits' r=Learath2 a=ChillerDragon

It's named ConCredits and there are many people credited so i guess the plural is fitting better c;

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2018-06-17 12:53:18 +00:00
ZombieToad 79c3327199
fix sv_skinstealaction 2018-06-17 07:28:32 +01:00
ChillerDragon bc89e1644d Rename 'credit' -> 'credits' 2018-06-17 05:42:41 +02:00
ZombieToad 7da716e3f0
fix server browser bug
ddnet client has the server browser while online
2018-06-17 03:26:23 +01:00
ZombieToad 13722d849d
fix server browser bug
it loaded favourite servers into ddnet serverlist if you used add_favorite or remove_favorite
2018-06-17 02:47:18 +01:00
bors[bot] d52143ffd5 Merge #1151
1151: fix veto r=heinrich5991 a=ZombieToad

before if a player entered the game and stayed before start on a server with a clock over 20 mins he would get veto

Co-authored-by: ZombieToad <25847476+zombietoad@users.noreply.github.com>
2018-06-15 07:44:28 +00:00
ZombieToad 4544d02639
fix veto
before if a player entered the game and stayed before start on a server with a clock over 20 mins he would get veto
2018-06-15 00:49:09 +01:00
ZombieToad 99d0360947
fix pause messages
they were reversed
2018-06-14 22:41:28 +01:00
ZombieToad a858b7ddcd
fix /settings stuff 2018-06-14 00:33:07 +01:00
ChillerDragon 4b6133003b Fix help for showall command
current ddnet doesn't support the '/help showall' command.
This commit should fix that.
2018-06-12 00:30:21 +02:00
Dennis Felsing e72413c43b
Merge pull request #1137 from ChillerDragon/UpdateCredits
Update credits
2018-06-06 09:49:31 +02:00
Dennis Felsing 08c45ced0f
Merge pull request #1133 from ChillerDragon/ConsolePages
Add commands for switching pages in console
2018-06-06 09:48:00 +02:00
ChillerDragon 522c893812 Update credits 2018-06-06 02:40:37 +02:00
Dennis Felsing 0a7284913b
Merge pull request #1134 from ChillerDragon/DummyHammerflyFix
Fix unwanted dummy fire
2018-06-05 09:04:29 +02:00
ChillerDragon 0fe419589e All hail teeworlds convention 2018-06-04 11:16:04 +02:00
ChillerDragon 6564b93a35 Fix unwanted dummy fire
If the latest fire input and the current differ in any way it causes firing.
So if you switch dummy after hammerfly was used it causes a weaponfire.
This unwanted fireing caused many unlucky fails for me already.
So i swap the fire status on dummyswapping so the server doesn't see any difference even if hamemrfly was used.
2018-06-04 11:06:54 +02:00
ChillerDragon 8a761bfedf Add commands for switching pages in console
For now they were just hardcodet on page up and down keys.
The new command allows it to bind it for example on the f-keys for laptop users.
2018-06-03 11:48:08 +02:00
def 626de24d65 Version 11.1.9 2018-05-29 22:10:33 +02:00
Ryozuki 21d6f4f39b use cstdint also in gamecontroller.h 2018-05-29 11:38:52 +02:00
Dennis Felsing 69667d4537 Also use cstdint on non-MSVC instead of stdint.h 2018-05-29 09:15:00 +02:00
Ryozuki d539331c64 use includes first in msc in eventhandler.h 2018-05-29 09:01:35 +02:00
def 5726d5647c Version 11.1.8 2018-05-13 22:23:11 +02:00
def 59675fe63c Rate-limit /lock (fixes #1122) 2018-05-11 22:05:32 +02:00
def a7b778977a Add sv_sql_validservernames (fixes #1123) 2018-05-11 21:57:47 +02:00
def 121c3b8076 11.1.7 2018-05-09 22:07:03 +02:00
Dennis Felsing bffa406e2c Version 11.1.6 2018-05-09 09:10:46 +02:00
Dennis Felsing 05c41efcea Version 11.1.5 2018-05-07 08:29:27 +02:00
Dennis Felsing 722087ba29
Merge pull request #1091 from heinrich5991/pr_ddnet_mapbugs
Add infrastructure for preserving bugs
2018-05-07 08:27:29 +02:00
bors[bot] 00dd1be3bf Merge #1120
1120: Allows low mousesens r=heinrich5991 a=ChillerDragon

Lower minimum mousesens value to avoid confusion. Responing to GG Kid's request:
https://forum.ddnet.tw/viewtopic.php?f=45&t=5807&p=58207&hilit=mousesens#p58207

I did some testing and found no bugs... but i wonder why it was set to 5. So maybe it had some reason i don't understand so please only merge if you know what you are doing ;p

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2018-05-01 19:15:33 +00:00
ChillerDragon e31f53f651 Fix ui for low mousesens 2018-05-01 17:51:36 +02:00
ChillerDragon 4fe6a23d0c Allow low mosesens in menu 2018-05-01 17:23:14 +02:00
bors[bot] 97ce07a1ab Merge #1118
1118: Add vote_ban rcon command r=heinrich5991 a=ChillerDragon

Works the same as muteid.
Vote banned players aren't allowed to start or participate in votes.

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2018-05-01 15:04:27 +00:00
ChillerDragon d4b0ad462b Allow vote muted players to vote...
It is a feature not a bug lol. Vote muted players are still not able to call own votes but they now can vote yes or no.
2018-05-01 16:58:03 +02:00
heinrich5991 81aeb30654 Also add a console command to enable map compatibility mode 2018-05-01 12:38:33 +02:00
def 8225077d17 Explicit type conversion 2018-04-30 18:22:31 +02:00
def c594a59569 /timeout without parameter: Try to reclaim using already set timeout code 2018-04-29 16:01:01 +02:00
def 5473012a6d /showall: Only print message if state changed 2018-04-29 15:57:57 +02:00
def 6793acafc4 Allow longer server settings in editor 2018-04-27 21:36:29 +02:00
Dennis Felsing e561498617 fix... 2018-04-25 14:12:49 +02:00
Dennis Felsing 96ecbfcfa8 Add cl_show_hook_coll_always 2018-04-25 12:03:27 +02:00
ChillerDragon d6be41d7ab Fix style and imporve performance 2018-04-21 18:45:33 +02:00
ChillerDragon 32189f8485 Pointer naming convention 2018-04-19 11:51:10 +02:00
ChillerDragon c1952d3ff1 'VoteBan' -> 'VoteMute' 2018-04-19 11:49:18 +02:00
ChillerDragon 6b26751eba Fixes style and shows ban message only in console 2018-04-19 11:01:27 +02:00
ChillerDragon 835f560013 Add vote_ban rcon command 2018-04-18 19:26:49 +02:00
Edgar 2ece3f36b7
remove periods 2018-04-17 19:35:25 +02:00
Ryozuki 07bc652896 add showall message 2018-04-17 17:52:35 +02:00
def 160b4df81c Version 11.1.4 2018-04-15 20:15:13 +02:00
bors[bot] 73a65a7026 Merge #1116
1116: Don't send buffer cmds to non OpenGL 3.3 backend r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2018-04-15 18:00:54 +00:00
Jupeyy 5b4a889ae0 quad positioning to center of text 2018-04-15 19:35:56 +02:00
bors[bot] d77d18c98a Merge #1114
1114: Some text positioning r=def- a=Jupeyy

To be clear, the entity text was meant to be a bit higher, so the text of the overlay is not overwritten("FROM", "CFROM")?

Because there was -4.f added to the y coordinate. Atleast it looks pretty much the same as the old renderer now.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2018-04-11 10:27:07 +00:00
Jupeyy 8cc0de8d31 Some text positioning 2018-04-11 12:19:30 +02:00
bors[bot] 23f560f3d2 Merge #1112
1112: Fix default dyncam values r=def- a=Jupeyy

Since dyncam is disabled by default:
these are default static values.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2018-04-11 09:35:40 +00:00
Jupeyy 3118ad4069 Fix default dyncam values 2018-04-11 11:27:30 +02:00
bors[bot] 73cc3a147b Merge #1110
1110: Fix killmessage flag render r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2018-04-09 20:28:24 +00:00
Jupeyy 2a6050eaf4 use killer team not victim 2018-04-09 22:11:51 +02:00
heinrich5991 f8277267a0 Remove mem_alloc and mem_free, use standard C functions instead
Replace `mem_free` by `free`, and `mem_alloc` by `malloc` or `calloc`
(the latter one being used to allocate a zeroed array of elements,
sometimes, this makes a call to `mem_zero` superfluous).

This results in having to remove `mem_stats` which previously recorded
the number of allocations and their size that the Teeworlds code did
directly.

Remove OOM handling in `src/game/client/components/binds.cpp`.

Remove needless copying in the CSV code in
`src/game/client/components/statboard.cpp`.
2018-04-09 11:56:39 +02:00
def b504ae60fb Improve wording in moderation messages 2018-04-07 16:51:17 +02:00
Jupeyy fbaedff1e6 reset color for the gameflags 2018-04-05 20:46:22 +02:00
Dennis Felsing f426fef7f5 Version 11.1.3 2018-04-05 13:48:38 +02:00
def bd1653a91b Editor: Fix debug client crash 2018-04-04 21:41:14 +02:00
def 6d3b8f2d36 fix2 2018-04-04 20:41:05 +02:00
def 03ee53eaf1 space 2018-04-04 20:11:24 +02:00