Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2020-11-09 00:00:00Z and 2020-11-10 00:00:00Z
Avatar
also, not gonna lie but the y coordinate increasing as you descend is giving me a mindfuck everytime I have to deal with it ^^
Avatar
is there any reason a proper modern compiler shouldn't give a warning for if(...);?
Avatar
my VS add-on apparently doesn't πŸ˜…
Avatar
Eh it is completely valid C and C++
Avatar
should still give a warning
13:12
especially if an indented block follows
13:12
(I think clang warns)
13:14
#include <stdio.h> int main(int argc, char **argv) { if(argc < 2); { fprintf(stderr, "Usage: program PARAM\n"); return 1; } return 0; }
13:14
$ gcc -Wall -Wextra a.c a.c: In function β€˜main’: a.c:4:14: warning: suggest braces around empty body in an β€˜if’ statement [-Wempty-body] 4 | if(argc < 2); | ^ a.c:4:2: warning: this β€˜if’ clause does not guard... [-Wmisleading-indentation] 4 | if(argc < 2); | ^~ a.c:5:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the β€˜if’ 5 | { | ^ a.c:3:27: warning: unused parameter β€˜argv’ [-Wunused-parameter] 3 | int main(int argc, char **argv) { | ~~~~~~~^~~~
13:15
$ clang -Wall -Wextra a.c a.c:4:14: warning: if statement has empty body [-Wempty-body] if(argc < 2); ^ a.c:4:14: note: put the semicolon on a separate line to silence this warning a.c:3:27: warning: unused parameter 'argv' [-Wunused-parameter] int main(int argc, char **argv) { ^ 2 warnings generated.
πŸ‘ 1
Avatar
How to add more than 16 Max clients?
Avatar
πŸ˜… well there are currently 64 max clients, 16 ingame
15:19
Ddnet servers have more than 16 players
Avatar
you set max clients to 64 and max ingame players to 64
Avatar
in protocol.h you have enum values MAX_CLIENTS=64, MAX_PLAYERS=16,
15:22
change the latter to 64 (edited)
15:22
but I think that would still cause some network issues, wouldn't it? @jxsl13
Avatar
sv_player_slots
15:23
sv_max_clients
15:25
it
Avatar
If i change that
15:25
I receive an version error (edited)
Avatar
uh, MAX_CLIENTS and MAX_PLAYERS should be there? forking an outdated build?
Avatar
Discord rip
Avatar
anyway, I guess the scoreboard is able to handle 64 players with the "x other players" entry
Avatar
you might want to hard code the nethash, I guess
15:26
but careful.
15:27
version.h somewhere, iirc
15:36
hmm
15:37
@Zatline it might feel more merge-y if the top wave fades out, don't you think?
Avatar
"I wonder why my code doesn't work"
me after a long day at work and programming for teeworlds: if abs(force) >= 5: do_stuff() why does it not work? Oh right
16:49
let's recode teeworlds in python
16:49
the game will blitz through all the frames! (edited)
Exported 40 message(s)