using System;

namespace SharpQuake
{
	internal class server_t
	{
		public void Clear()
		{
			this.active = false;
			this.paused = false;
			this.loadgame = false;
			this.time = 0.0;
			this.lastcheck = 0;
			this.lastchecktime = 0.0;
			this.name = null;
			this.modelname = null;
			this.worldmodel = null;
			Array.Clear(this.model_precache, 0, this.model_precache.Length);
			Array.Clear(this.models, 0, this.models.Length);
			Array.Clear(this.sound_precache, 0, this.sound_precache.Length);
			Array.Clear(this.lightstyles, 0, this.lightstyles.Length);
			this.num_edicts = 0;
			this.max_edicts = 0;
			this.edicts = null;
			this.state = server_state_t.Loading;
			this.datagram.Clear();
			this.reliable_datagram.Clear();
			this.signon.Clear();
			GC.Collect();
		}

		public server_t()
		{
			this.model_precache = new string[256];
			this.models = new model_t[256];
			this.sound_precache = new string[256];
			this.lightstyles = new string[64];
			this.datagram = new MsgWriter(1024);
			this.reliable_datagram = new MsgWriter(1024);
			this.signon = new MsgWriter(8192);
		}

		public bool active;

		public bool paused;

		public bool loadgame;

		public double time;

		public int lastcheck;

		public double lastchecktime;

		public string name;

		public string modelname;

		public model_t worldmodel;

		public string[] model_precache;

		public model_t[] models;

		public string[] sound_precache;

		public string[] lightstyles;

		public int num_edicts;

		public int max_edicts;

		public edict_t[] edicts;

		public server_state_t state;

		public MsgWriter datagram;

		public MsgWriter reliable_datagram;

		public MsgWriter signon;
	}
}
