Commit graph

314 commits

Author SHA1 Message Date
def 9717d032ff Don't call atexit in forked process 2020-09-17 22:19:13 +02:00
QingGo b64a0ef4c6 make client able to connect ws server with ws:// 2020-09-13 09:59:10 +08:00
def 277040fc7c shell_execute: handle some failures 2020-09-11 09:47:19 +02:00
def f7b37eaf6a clang-format fixes 2020-09-10 20:16:09 +02:00
def 0f051def21 Fix cbSize for Windows 2020-09-10 20:13:01 +02:00
def 90f3199d98 Implement opening server on Windows (reading autoexec_server.log not working yet) 2020-09-10 20:13:01 +02:00
def 2cdc7d0faf Adapt 0.7 start menu
- Working Local Server button (needs fixing for Windows)
- Highlight buttons if server is running, new news is out and editor has
  unsaved changes
2020-09-10 20:13:01 +02:00
bors[bot] cbc272fd5d
Merge #2758 #2769 #2772
2758: Remove the rudimentary fuzzing since no one uses it anyway r=heinrich5991 a=def-



2769: Update front.png by Soreu r=heinrich5991 a=def-



2772: Dont predict camera position on spectator changed r=heinrich5991 a=BannZay

No reason to predict camera position in case when we just changed spectator.
But tbh I have not found a big reason to predict it at all.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Andrii <bannzay3@gmail.com>
2020-09-06 23:25:16 +00:00
bors[bot] e3cfb23f28
Merge #2742 #2745
2742: Add str_utf8_copy that trim broken utf8 sequence at the end. r=heinrich5991 a=TsFreddie

Currently this replaces `str_copy` text input and clipboard paste in chat. Many places may need the same treatments, like steam names.

![image](https://user-images.githubusercontent.com/3797859/92263741-08b8e080-eed5-11ea-84a5-b7f070ded260.png)

Test string:
abcd今天是个好日子心想的事儿都能成今天是个好日子打开了家门咱迎春风今天是个好日子心想的事儿都能成今天是个好日子打开了家门咱迎春风今天是个好日子心想的事儿都能成今天是个好日子打

2745: Update mapres by mind r=heinrich5991 a=def-

Adapted from 0.7 for new renderer. Not sure if this makes sense :D

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2020-09-06 23:12:04 +00:00
TsFreddie 6b053936c7 str_utf8_copy using str_utf8_truncate 2020-09-06 20:58:26 +01:00
TsFreddie badc49cac7 Revert "Revert & use "str_utf8_truncate" instead"
This reverts commit b045a3d6ee.
2020-09-06 20:54:57 +01:00
Jupeyy aed4293040 Prevent NULL pointer in mem_copy (fixes #2753) 2020-09-06 18:32:56 +02:00
def b7da058b76 Remove the rudimentary fuzzing since no one uses it anyway 2020-09-05 23:50:31 +02:00
TsFreddie b045a3d6ee Revert & use "str_utf8_truncate" instead 2020-09-05 00:51:39 +01:00
TsFreddie a3a363f665 C90 2020-09-04 17:48:18 +01:00
TsFreddie 92d08d07de add str_utf8_copy 2020-09-04 17:34:27 +01:00
def 7781c8826e Forbid some more whitespace and whitespace-like characters
Made sure everything from
https://en.wikipedia.org/wiki/Whitespace_character#Unicode is included
2020-08-26 16:43:47 +02:00
def 467778fc56 Satisfy old C standard
system.c:2325:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
  for(int cursor = 0, pos = 0; pos <= truncation_len && cursor < dst_size && size != cursor; cursor = str_utf8_forward(src, cursor), pos++)
2020-08-10 18:11:51 +02:00
def e2fde4d730 Fix utf8 handling in str_truncate (fixes #2533)
and rename to str_utf8_truncate since it's only used for utf8 strings
2020-08-02 18:32:42 +02:00
def f4344dc420 Use (u)int64 from system.h instead of (u)int64_t from cstdint
src/game/client/prediction/gameworld.h:62:90: error: ‘int64_t’ has not been declared
   62 |  void CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamage, int ActivatedTeam, int64_t Mask);
      |                                                                                          ^~~~~~~
2020-07-09 13:55:28 +02:00
3edcxzaq1 f30fe2b4b5 fix indentation 2020-06-29 23:07:57 +02:00
3edcxzaq1 1be3b7ead5 Suppress open_link output 2020-06-29 21:34:07 +02:00
heinrich5991 741c3a705e Revert "Fix str_format on mingw"
This reverts commit a9f6d3716c.
2020-06-29 13:48:51 +02:00
def a9f6d3716c Fix str_format on mingw
src/game/server/ddracecommands.cpp:743:39: warning: unknown conversion type character ‘l’ in format [-Wformat=]
  743 |  str_format(aBuf, sizeof(aBuf), "%s-%lld-%s.save", pSelf->Server()->GetMapName(), time_get(), pSelf->Server()->GetAuthName(pResult->m_ClientID));

See https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/
2020-06-22 14:47:40 +02:00
def 70b8bf9497 Open links in background (fixes #2292)
Only tested on Linux
2020-06-20 14:59:36 +02:00
Edgar 07f0239e01
Add Learn button which opens the ddnet wiki in the browser. 2020-06-20 13:56:02 +02:00
def a951845083 Surprise: void x(); accepts any parameter in C!
Prevents accidentally passing parameters that would then be ignored.

C++ is more reasonable, so nothing to do there.
2020-04-12 20:06:38 +02:00
def 4c00e4533c Fix type of os_is_winxp_or_lower function (fixes #2135) 2020-04-12 10:23:08 +02:00
def 598ec52892 Fix GCC 9.2.0 compilation
src/game/server/ddracechat.cpp:623:39: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
2020-02-05 08:22:04 +01:00
heinrich5991 8c4569991d Fix indentation and formatting of str_clean_whitespaces
(cherry picked from commit b9c4086382)
2020-01-19 22:38:08 +01:00
KillaBilla 75d076b3bc changed str_clean_whitespace implementation to pkoerner's one
(cherry picked from commit a9cc1e8de2)
2020-01-19 22:37:57 +01:00
KillaBilla ba1abac52f remove leading and trailing space from server name and forbit the use of multiple spaces
(cherry picked from commit a9cc1e8de2)
2020-01-19 22:28:19 +01:00
Dennis Felsing ba3b436139 Fix Websockets warning 2019-12-30 10:12:16 +01:00
Learath db5c17ce71 Avoid implementation-defined behaviour 2019-05-15 18:11:22 +02:00
def e1c9033300 Render news without STL functions (fixes #1693) 2019-05-09 21:54:56 +02:00
Dennis Felsing 00c87c121a str_num_copy -> str_truncate, as in Vanilla 0.7 2019-04-18 10:25:01 +02:00
Learath 843dc29a88 Names can include quotes :/ 2019-04-16 02:39:22 +02:00
def 94f3d97ddf Remove unmaintained Android code (fixes #1575) 2019-04-10 19:40:50 +02:00
def 0e7a514c7b Fix C90 compatibility on Windows 2019-04-09 21:58:04 +02:00
def ea6b741eb8 thread_sleep: ignore signal interruption 2019-03-24 23:14:37 +01:00
def d9804f5142 str_format: always return length of written string
Quoting the man page of vsnprintf:

RETURN VALUE
  Upon successful return, these functions  return  the  number  of  characters  printed
  (excluding the null byte used to end output to strings).

  The functions snprintf() and vsnprintf() do not write more than size bytes (including
  the terminating null byte ('\0')).  If the output was truncated due  to  this  limit,
  then  the  return  value  is the number of characters (excluding the terminating null
  byte) which would have been written to the final string  if  enough  space  had  been
  available.  Thus, a return value of size or more means that the output was truncated.
  (See also below under NOTES.)

  If an output error is encountered, a negative value is returned.

[...]

  The glibc implementation of the functions snprintf() and vsnprintf() conforms to  the
  C99  standard,  that  is, behaves as described above, since glibc version 2.1.  Until
  glibc 2.0.6, they would return -1 when the output was truncated.
2019-03-21 13:39:25 +01:00
def 1e4890c499 More error checking in system.c (fixes #1317) 2019-03-19 23:16:29 +01:00
bors[bot] d8e8a21a30 Merge #1469
1469: Don't use strtok. Close #1468 r=heinrich5991 a=Learath2

^

Co-authored-by: Learath <learath2@gmail.com>
2019-03-11 11:56:26 +00:00
Learath 9713f6c2cd Improve interface to function 2019-03-11 14:39:54 +03:00
Learath c4af290df5 Don't use strtok. Close #1468 2019-03-05 12:46:29 +03:00
def deb2494692 Don't suggest to downgrade, clean up versioning (fixes #1440) 2019-03-03 20:31:23 +01:00
Learath a46c31f356 Add a couple tests, fix #1457 2019-02-13 15:14:46 +01:00
Learath 37c67c00ad Style 2019-02-13 15:13:44 +01:00
Learath 867facfffc Forgot str_tokenize is not used now 2019-02-13 15:13:27 +01:00
Dennis Felsing 698a3f1c5a
Merge pull request #1443 from ChillerDragon/AutobanKnownBots
Add autoban depending on client version
2019-02-13 12:04:51 +01:00