Ejemplo n.º 1
0
 public void Clear()
 {
     this.leaf = null;
     this.leafnext = null;
     this.entity = null;
     this.entnext = null;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// R_StoreEfrags
        /// FIXME: a lot of this goes away with edge-based
        /// </summary>
        static void StoreEfrags(efrag_t ef)
        {
            while (ef != null)
            {
                entity_t pent = ef.entity;
                model_t clmodel = pent.model;

                switch (clmodel.type)
                {
                    case modtype_t.mod_alias:
                    case modtype_t.mod_brush:
                    case modtype_t.mod_sprite:
                        if ((pent.visframe != _FrameCount) && (Client.NumVisEdicts < Client.MAX_VISEDICTS))
                        {
                            Client.VisEdicts[Client.NumVisEdicts++] = pent;

                            // mark that we've recorded this entity for this frame
                            pent.visframe = _FrameCount;
                        }

                        ef = ef.leafnext;
                        break;

                    default:
                        Sys.Error("R_StoreEfrags: Bad entity type {0}\n", clmodel.type);
                        break;
                }
            }
        }
Ejemplo n.º 3
0
        // CL_Init
        public static void Init()
        {
            InitInput();
            InitTempEntities();

            if (_Name == null)
            {
                _Name = new Cvar("_cl_name", "player", true);
                _Color = new Cvar("_cl_color", "0", true);
                _ShowNet = new Cvar("cl_shownet", "0");	// can be 0, 1, or 2
                _NoLerp = new Cvar("cl_nolerp", "0");
                _LookSpring = new Cvar("lookspring", "0", true);
                _LookStrafe = new Cvar("lookstrafe", "0", true);
                _Sensitivity = new Cvar("sensitivity", "3", true);
                _MPitch = new Cvar("m_pitch", "0.022", true);
                _MYaw = new Cvar("m_yaw", "0.022", true);
                _MForward = new Cvar("m_forward", "1", true);
                _MSide = new Cvar("m_side", "0.8", true);
                _UpSpeed = new Cvar("cl_upspeed", "200");
                _ForwardSpeed = new Cvar("cl_forwardspeed", "200", true);
                _BackSpeed = new Cvar("cl_backspeed", "200", true);
                _SideSpeed = new Cvar("cl_sidespeed", "350");
                _MoveSpeedKey = new Cvar("cl_movespeedkey", "2.0");
                _YawSpeed = new Cvar("cl_yawspeed", "140");
                _PitchSpeed = new Cvar("cl_pitchspeed", "150");
                _AngleSpeedKey = new Cvar("cl_anglespeedkey", "1.5");
            }

            for (int i = 0; i < _EFrags.Length; i++)
                _EFrags[i] = new efrag_t();

            for (int i = 0; i < _Entities.Length; i++)
                _Entities[i] = new entity_t();

            for (int i = 0; i < _StaticEntities.Length; i++)
                _StaticEntities[i] = new entity_t();

            for (int i = 0; i < _DLights.Length; i++)
                _DLights[i] = new dlight_t();

            //
            // register our commands
            //
            Cmd.Add("entities", PrintEntities_f);
            Cmd.Add("disconnect", Disconnect_f);
            Cmd.Add("record", Record_f);
            Cmd.Add("stop", Stop_f);
            Cmd.Add("playdemo", PlayDemo_f);
            Cmd.Add("timedemo", TimeDemo_f);
        }
Ejemplo n.º 4
0
        public void Clear()
        {
            this.forcelink = false;
            this.update_type = 0;

            this.baseline = entity_state_t.Empty;

            this.msgtime = 0;
            this.msg_origins[0] = Vector3.Zero;
            this.msg_origins[1] = Vector3.Zero;

            this.origin = Vector3.Zero;
            this.msg_angles[0] = Vector3.Zero;
            this.msg_angles[1] = Vector3.Zero;
            this.angles = Vector3.Zero;
            this.model = null;
            this.efrag = null;
            this.frame = 0;
            this.syncbase = 0;
            this.colormap = null;
            this.effects = 0;
            this.skinnum = 0;
            this.visframe = 0;

            this.dlightframe = 0;
            this.dlightbits = 0;

            this.trivial_accept = 0;
            this.topnode = null;
        }
Ejemplo n.º 5
0
        public void Clear()
        {
            this.movemessages = 0;
            this.cmd.Clear();
            Array.Clear(this.stats, 0, this.stats.Length);
            this.items = 0;
            Array.Clear(this.item_gettime, 0, this.item_gettime.Length);
            this.faceanimtime = 0;

            foreach (cshift_t cs in this.cshifts)
                cs.Clear();
            foreach (cshift_t cs in this.prev_cshifts)
                cs.Clear();

            this.mviewangles[0] = Vector3.Zero;
            this.mviewangles[1] = Vector3.Zero;
            this.viewangles = Vector3.Zero;
            this.mvelocity[0] = Vector3.Zero;
            this.mvelocity[1] = Vector3.Zero;
            this.velocity = Vector3.Zero;
            this.punchangle = Vector3.Zero;

            this.idealpitch = 0;
            this.pitchvel = 0;
            this.nodrift = false;
            this.driftmove = 0;
            this.laststop = 0;

            this.viewheight = 0;
            this.crouch = 0;

            this.paused = false;
            this.onground = false;
            this.inwater = false;

            this.intermission = 0;
            this.completed_time = 0;

            this.mtime[0] = 0;
            this.mtime[1] = 0;
            this.time = 0;
            this.oldtime = 0;
            this.last_received_message = 0;

            Array.Clear(this.model_precache, 0, this.model_precache.Length);
            Array.Clear(this.sound_precache, 0, this.sound_precache.Length);

            this.levelname = null;
            this.viewentity = 0;
            this.maxclients = 0;
            this.gametype = 0;

            this.worldmodel = null;
            this.free_efrags = null;
            this.num_entities = 0;
            this.num_statics = 0;
            this.viewent.Clear();

            this.cdtrack = 0;
            this.looptrack = 0;

            this.scores = null;
        }