5429 Commits

Author SHA1 Message Date
UnknownShadow200
38aed212f7 Add a bit more documentation for physics, and use more appropriate access modifiers 2022-07-19 22:55:59 +10:00
UnknownShadow200
f571c82eb1 Move Heartbeats to separate scheduler (Thanks 123DMWM) 2022-07-18 21:06:31 +10:00
UnknownShadow200
c37ee13926 Make /restart work with .NET core on Linux 2022-07-17 13:16:29 +10:00
UnknownShadow200
0f2c0c0af4 Make listen-ip server option harder to find by moving it from Server to Other group
Multiple occasions where this option has been changed by users to e.g. server's IP, even though this is usually unnecessary because 0.0.0.0 already specifies to listen on all network interfaces - although this wasn't explained to the end user
2022-07-16 13:33:54 +10:00
UnknownShadow200
c75a9a92fc Make /sinfo all processes CPU usage work on macOS, fixes #712 2022-07-16 12:25:35 +10:00
UnknownShadow200
02509ef3b9 Rewrite 'all processes CPU usage' in /sinfo to not use performance counters, addresses #712
Fixes /sinfo not working on Linux when using .NET core
2022-07-16 11:13:10 +10:00
UnknownShadow200
d8da8b6d13 Make /compload work with plugins too 2022-07-14 21:42:35 +10:00
UnknownShadow200
702520d354 Allow authentication service verified users to kick existing connected user even when name verification mode is off 2022-07-13 19:06:23 +10:00
UnknownShadow200
0b7df6c506 Disconnect unsupported Classic+ client mod with better message 2022-07-12 19:39:46 +10:00
UnknownShadow200
7453633525 Mppass can be used for /pass at login when it isn't used for username authentication 2022-07-11 20:46:13 +10:00
UnknownShadow200
a314ab0be0 Fix train gradual movement bias towards 0,0 (Fixes #709, thanks rdebath) 2022-07-10 21:23:56 +10:00
UnknownShadow200
c5f077c274 Database.DeleteTable should do nothing if table doesn't exist instead of throwing an error 2022-07-09 08:37:13 +10:00
UnknownShadow200
5a6d3b690a Truncate long errors returned by Discord (Thanks 123DMWM)
This sometimes happens when Discord returns a full <html> response instead of usual error JSON in the event of an internal server error
2022-07-08 17:20:26 +10:00
UnknownShadow200
2477ed74c3 Fix /whitelist disable enabling whitelist instead (Thanks SpicyCombo) 2022-06-27 18:07:56 +10:00
UnknownShadow200
975bcb835a ZS: Allow setting custom round/infection start countdown time
Also enable /baninfo and /rankinfo (and theroetically any custom mod commands that choose to do so) to be used in MBs, without the additional restriction that moderation commands previously always required
2022-06-25 20:31:54 +10:00
UnknownShadow200
ec2b9b2024 Release 1.9.4.1 1.9.4.1 2022-06-24 07:57:13 +10:00
UnknownShadow200
6dba848a7a Attempt to authenticate via mppass first even when name verification is disabled 2022-06-23 21:38:29 +10:00
UnknownShadow200
454c8c8d45 Fix bots with ridiculously extremely large model scales (e.g. 3.3 x 10^38) failing to load (Thanks 123DMWM)
Unfortunately, this also tended to results in the bots list being wiped/cleared when it was subsequently saved

This was caused by the JSON parser not properly handling numbers in exponential notation, that has been fixed now
2022-06-22 23:11:34 +10:00
UnknownShadow200
5477be732e Minorly optimise packet handling 2022-06-22 19:19:25 +10:00
UnknownShadow200
a1a7704d06 Fix issues where /sinfo CPU usage either showed misleading values or didn't work at all
Windows: It didn't divide by core count, so displayed value was typically 2x - 4x value in task manager
mono: Always returned 0.00%
.NET core: Not implemented on Linux and would throw PlatformNotSupportedException there

Now uses GetCurrentProcess().TotalProcessor instead to show CPU usage measured over last second, and also average since /sinfo was first run
2022-06-18 16:13:52 +10:00
UnknownShadow200
28dec59bba Simplify /sinfo slightly and make its appearance more like /info
Removed console state and changed position update from 'X every millisecond to X times/second'
2022-06-17 08:28:01 +10:00
UnknownShadow200
683887978e Discord: Limit status updates to at most once every 0.5 seconds 2022-06-15 20:06:47 +10:00
UnknownShadow200
56f5eb5e24 Fix very rare case where Zones would disappear when level was saved (Thanks 123DMWM) 2022-06-13 09:29:39 +10:00
UnknownShadow200
c605027f66 Make discord bot player count in status message always equal number of players that will appear in .who
Previously status message player count just counted number of non-hidden players. However it's possible for a player to be hidden, yet still be visible to guest ranked players - e.g. with /ohide
2022-06-11 22:39:44 +10:00
UnknownShadow200
4ea13c2146 Move Ping field to IGameSession 2022-06-11 22:10:47 +10:00
UnknownShadow200
ad68660649 Make //reference work most of the time when compiling with .NET core 2022-06-11 16:42:21 +10:00
UnknownShadow200
eb41330637 Get .NET core compilation to work, probably 2022-06-11 15:29:00 +10:00
UnknownShadow200
e4b0c60270 Get .NET core compiler to actually run 2022-06-11 14:45:44 +10:00
UnknownShadow200
e1a521e37b WIP on C# compiler support for .NET core build 2022-06-11 13:31:33 +10:00
UnknownShadow200
088bcebb8a Add .NET core/5/6 compiling instructions 2022-06-11 10:13:15 +10:00
UnknownShadow200
88c5c1dac3 Linux: Fix rare case where GUI would crash at startup (mostly when using standalone builds compiled with mkbundle)
This happened due to two factors:

1) the standalone build would show a message box warning because it couldn't change the current/working directory
2) the gui schedules InitServerTask to run on the background thread. This in turn will eventually call Server.Start on the background thread, which in turn will call Logger.Log(..) which in turn calls back to Window.LogMessage

Note that the UI can only be updated from the main/UI thread. Normally this wouldn't cause any issues, because LogMessage checked whether 'InvokeRequired' returned true or not - if it did, then LogMessage scheduled the message to be logged later on the main/UI thread by using BeginInvoke.

However, it was rarely possible that due to thread scheduling, the call to LogMessage from the background thread would be run *before* the main window control handle had finished being created.
And unexpectedly, 'InvokeRequired' would return *false* if the main window handle hadn't been created yet - and hence the background thread would attempt to directly update UI controls with catastrophic consequences. Sometimes this worked, but other times it would cause the app to SIGABRT and crash in X11 somewhere, usually in X11Keyboard:XCreateFontSet

So to workaround this I made the following changes:
1) failing to set working/current directory doesn't show a warning message box popup anymore
2) LogMessage doesn't check 'InvokeRequired' anymore and just always calls BeginInvoke to schedule the message logging on the main/UI thread

So in the most of the rare cases when this issue even happened, it shouldn't occur anymore now. However, the underlying issue still isn't completely solved.. if you change the code to show a message box before the main window, you'll still rarely end up with the main window being a black box with X11
2022-06-06 23:11:24 +10:00
UnknownShadow200
6ddca94b54 Discord: Fix being able to send presence update before bot has identified, which could rarely happen and thus cause the discord bot to get disconnected with websocket close code 4003 2022-06-03 23:18:06 +10:00
UnknownShadow200
3344b18c5c Fix alts message sometimes showing to lower ranked players while hidden (Thanks Venk)
Also make /info extra permission slightly more generic
2022-06-02 18:18:02 +10:00
UnknownShadow200
5df9c88d1b Fix frozen players not getting /summoned (and /tp, /portal etc) (Thanks BlitzK) 2022-05-30 18:02:00 +10:00
UnknownShadow200
ef9449d7b0 Remove Visual Basic references in /compile and /cmdcreate
Although still documented on the wiki, I decided to simplify in-game help by removing it because

1) basically none of the current public command/plugin ecosystem uses visual basic
2) even when mono-complete is installed, you don't get a Visual Basic compiler (still need to install another package for it)
2022-05-28 17:08:18 +10:00
UnknownShadow200
4cefdc2bf1 Add /whitelist enable/disbale to turn on/off whitelisted only mode (Thanks SpicyCombo) 2022-05-26 23:33:49 +10:00
UnknownShadow200
10a91128d7 Make GUI work with mkbundle 2022-05-26 22:48:33 +10:00
UnknownShadow200
eae64acf20 Make /fliphead usable without ZS running 2022-05-26 18:51:29 +10:00
UnknownShadow200
9a869297b2 Combine SqlQuery into IDatabaseBackend 2022-05-25 22:44:41 +10:00
UnknownShadow200
7952de48d3 Auto unloading of levels by game round ending and moving to a different level shouldn't still message operators saying the level was unloaded
Also fix GUI enabled/disabled logging options being wrongly controlled by 'file logging' instead of 'console logging' server option
2022-05-24 22:48:23 +10:00
UnknownShadow200
f0eaca68a5 Make ClassicProtocol not dependant on ZSGame for checking whether a player needs to have their head flipped when the target player's client doesn't support custom models 2022-05-24 12:12:32 +10:00
UnknownShadow200
b5909cc1a2 Prevent console from trying to generate levels over 2 GB in size 2022-05-21 23:25:35 +10:00
UnknownShadow200
f2b8ef5e43 Fix ipv4 mapped ipv6 addresses not triggering IP connection spam blocking
Since MCGalaxy only supports ipv4 connections by default this won't affect majority of servers
2022-05-21 09:19:08 +10:00
UnknownShadow200
da78b98006 Improve /compile help and move /pcompile into /compile, also add shortcut /br for /brush 2022-05-16 23:16:24 +10:00
UnknownShadow200
a9c39eec7c Improve CmdCreate creation and help text 2022-05-15 18:56:02 +10:00
UnknownShadow200
f0005c754d WIP splitting up scripting into dll scripting and source code compiling 2022-05-15 18:47:41 +10:00
UnknownShadow200
3096e355d3 Fix backup summary messages in /restore, /museum etc showing plain level name instead of coloured level name 2022-05-15 18:34:34 +10:00
UnknownShadow200
abc458aaca Change /sinfo to show total number of levels too, also bump default max players count from 12 to 16 2022-05-14 23:56:12 +10:00
UnknownShadow200
1d4445b240 Make /time use yyyy-mm-dd format, as well as /server backup db 2022-05-11 23:20:41 +10:00
UnknownShadow200
7e0ff9a89d Flatgrass theme should generate grass layer at middle layer of map, instead of one layer above it (Thanks fizzwhiz) 2022-05-08 20:36:23 +10:00