using System;
using System.Runtime.InteropServices;

namespace SharpQuake
{
	[StructLayout(LayoutKind.Sequential, Pack = 1)]
	internal class globalvars_t
	{
		public void SetParams(float[] src)
		{
			if (src.Length < 16)
			{
				throw new ArgumentException(string.Format("There must be {0} parameters!", 16));
			}
			this.parm1 = src[0];
			this.parm2 = src[1];
			this.parm3 = src[2];
			this.parm4 = src[3];
			this.parm5 = src[4];
			this.parm6 = src[5];
			this.parm7 = src[6];
			this.parm8 = src[7];
			this.parm9 = src[8];
			this.parm10 = src[9];
			this.parm11 = src[10];
			this.parm12 = src[11];
			this.parm13 = src[12];
			this.parm14 = src[13];
			this.parm15 = src[14];
			this.parm16 = src[15];
		}

		private pad_int28 pad;

		public int self;

		public int other;

		public int world;

		public float time;

		public float frametime;

		public float force_retouch;

		public int mapname;

		public float deathmatch;

		public float coop;

		public float teamplay;

		public float serverflags;

		public float total_secrets;

		public float total_monsters;

		public float found_secrets;

		public float killed_monsters;

		public float parm1;

		public float parm2;

		public float parm3;

		public float parm4;

		public float parm5;

		public float parm6;

		public float parm7;

		public float parm8;

		public float parm9;

		public float parm10;

		public float parm11;

		public float parm12;

		public float parm13;

		public float parm14;

		public float parm15;

		public float parm16;

		public v3f v_forward;

		public v3f v_up;

		public v3f v_right;

		public float trace_allsolid;

		public float trace_startsolid;

		public float trace_fraction;

		public v3f trace_endpos;

		public v3f trace_plane_normal;

		public float trace_plane_dist;

		public int trace_ent;

		public float trace_inopen;

		public float trace_inwater;

		public int msg_entity;

		public int main;

		public int StartFrame;

		public int PlayerPreThink;

		public int PlayerPostThink;

		public int ClientKill;

		public int ClientConnect;

		public int PutClientInServer;

		public int ClientDisconnect;

		public int SetNewParms;

		public int SetChangeParms;

		public static int SizeInBytes = Marshal.SizeOf(typeof(globalvars_t));
	}
}
