Ignore:
Timestamp:
Feb 22, 2023, 5:48:50 PM (22 months ago)
Author:
alloc
Message:

Only run web server if game is running as server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/MapRendering/src/ModApi.cs

    r402 r406  
    77        public class ModApi : IModApi {
    88                public void InitMod (Mod _modInstance) {
    9                         ModEvents.GameShutdown.RegisterHandler (GameShutdown);
    10                         ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone);
    11 
     9                        if (ConnectionManager.Instance.IsServer) {
     10                                ModEvents.GameShutdown.RegisterHandler (GameShutdown);
     11                                ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone);
     12                        }
     13                       
    1214                        Web.ServerInitialized += _web => {
    1315                                _web.RegisterPathHandler ("/map/", new StaticHandler (
Note: See TracChangeset for help on using the changeset viewer.