Commit Graph

269 Commits

Author SHA1 Message Date
Paul Chote
1ba7a5e59e Use MapPreview on the server. 2016-03-12 20:07:07 +00:00
Paul Chote
20e8bc249d Restore support for inline map rules. 2016-03-10 19:27:50 +00:00
Paul Chote
8017844a15 Remove LobbyDefaults from mod.yaml. 2016-03-07 21:41:13 +00:00
Paul Chote
5e59a9d1c1 Move ServerStarted notifications into the server thread. 2016-03-07 21:41:12 +00:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Alexandre Oliveira
989bf4f807 Disable 1 human versus bots games
Changed the Server.LockBots setting to Server.DisableSinglePlayer.

If the setting is enabled, and there is only one client in the server,
the game won't start.
2016-02-03 20:32:34 -02:00
Matthias Mailänder
eb9fb75d3c warn players if bots have been disabled 2016-01-21 21:25:23 +01:00
Oliver Brakmann
f89d40ee10 Merge pull request #10131 from pchote/add-join-logging
Add a server log line for player joins.
2015-11-28 15:44:59 +01:00
Paul Chote
92e6efd45c Add a server log line for player joins. 2015-11-28 10:38:47 +00:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00
Paul Chote
64498b1ea7 Fix singleplayer game latency. 2015-10-31 11:36:32 +00:00
Pavel Penev
5eaf5b5b51 Rename Session.Client.Race 2015-08-05 17:45:56 +03:00
Oliver Brakmann
4ed7a4ce8a Merge pull request #8659 from penev92/bleed_playerReference
Rename PlayerReference.Race to Faction
2015-07-14 20:15:56 +02:00
Matthias Mailänder
d9ac97a967 Merge pull request #8660 from penev92/bleed_fixServer
Fix a bug in Server
2015-07-06 08:53:02 +02:00
penev92
0648b7edaa Fix a bug in Server 2015-07-06 00:59:30 +03:00
Pavel Penev
f221a70e40 Merge pull request #8652 from Mailaender/custom-rule-warning
Added a warning about custom game rules
2015-07-06 00:32:44 +03:00
penev92
1d49c23af0 Rename PlayerReference.Race and LockRace to Faction and LockFaction 2015-07-05 23:08:49 +03:00
penev92
907265a64c Random refactoring and beautifying of Server.cs 2015-07-05 18:39:13 +03:00
penev92
502db0b462 Add logging on exception to Server.ValidateClient() 2015-07-05 18:39:10 +03:00
Matthias Mailänder
e86ff94a20 don't display game join notifications during missions 2015-07-05 17:17:14 +02:00
Matthias Mailänder
8c92839e0b warn about custom rules 2015-07-05 17:16:43 +02:00
Pavel Penev
6ed7e46162 Merge pull request #8398 from Mailaender/ping-order-nre
Fixed NREs in LobbyCommands PingFromClient
2015-06-29 01:55:54 +03:00
Matthias Mailänder
45dc314b23 print server status messages to the console 2015-06-20 16:47:32 +02:00
Matthias Mailänder
e228601a5c fix NullReferenceExceptions during client pings 2015-06-20 15:54:23 +02:00
Matthias Mailänder
edca755540 also sanitize server names 2015-05-23 15:07:18 +02:00
Matthias Mailänder
736b169319 sanitize player names 2015-05-23 15:07:13 +02:00
abcdefg30
c4a63eee30 Merge pull request #7875 from penev92/bleed_exposePlayerReferences
Add upgrade rules support for map PlayerReferences
2015-04-26 22:53:42 +02:00
penev92
2402b56da7 Reorganize PlayerReference loading to enable upgrade rules for them.
The PlayerReference definitions are now stored
as raw MiniYamlNodes in the map.
2015-04-26 23:16:20 +03:00
LunaticEdit
575b568c6a EndOfStream first chance exceptions on server
The server class reads the memory stream in a forever loop until an
EndOfStreamException occurs. This causes repeated first chance
exceptions due to EndOfStreamException. This change verifies that the
memory stream's reader position is not past the length of the memory
stream.
2015-04-13 19:09:32 -04:00
abcdefg30
63fe578ba8 Allow picking of a random subfaction 2015-03-12 21:34:23 +01:00
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
Matthias Mailänder
44cd174a8d StyleCop clean OpenRA.Game 2015-01-03 19:00:48 +01:00
asl97
d2a14842d8 avoid a busy server loop with high CPU usage
fixes #7237
2014-12-31 19:46:39 +01:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
huwpascoe
d150ea1721 Fix server freeze on client absence. 2014-09-28 16:27:40 +01:00
Matthias Mailänder
f4b3a73af6 remove duplicated "Server: ... the server" wording 2014-09-13 11:22:09 +02:00
Tiago Sousa
ce68d67f0b Disallow same/similar colors (fixes #2820) 2014-08-30 01:53:38 +01:00
Matthias Mailänder
fa2b2bea0b beautify starting unit notification when joining server
move LobbySettingsNotification into it's own ServerTrait
2014-08-17 07:39:34 +02:00
Matthias Mailänder
b382c0339f only notify when the lobby settings differ from the default 2014-08-03 09:31:25 +02:00
havok13888
65c77677d4 Inform client about changes in lobby options 2014-08-01 15:41:02 -05:00
Pavlos Touboulidis
b88b87b899 Improve game loop
Environment.TickCount was replaced with Game.RunTime that's based on
Stopwatch for increased accuracy.
2014-07-10 04:06:29 +03:00
Matthias Mailänder
1f7b0ad5d4 time limit the port forwarding if possible 2014-06-16 16:42:06 +02:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
Paul Chote
d8e5177a36 Merge pull request #5405 from RoosterDragon/min-max
Added MinBy, MaxBy, etc.
2014-06-09 17:42:01 +12:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
RoosterDragon
0ea3509ee4 Added MinBy, MaxBy, MinByOrDefault and MaxByOrDefault methods and replaced calls of the style OrderBy[Descending]().First[OrDefault]() which is not as performant. 2014-05-23 08:23:42 +01:00