예제 #1
0
파일: Server.cs 프로젝트: maesse/CubeHags
            public int timeResidual; // <= 1000 / sv_frame->value

            #endregion Fields

            #region Constructors

            public server_t()
            {
                for (int i = 0; i < 1024; i++)
                {
                    svEntities[i] = new svEntity_t(i);
                }
            }
예제 #2
0
        void AddEntToSnapshot(svEntity_t svEnt, sharedEntity gEnt, List<int> eNums)
        {
            // if we have already added this entity to this snapshot, don't add again
            if (svEnt.snapshotCounter == sv.snapshotCounter)
                return;

            svEnt.snapshotCounter = sv.snapshotCounter;

            // if we are full, silently discard entities
            if (eNums.Count > 1024)
            {
                Common.Instance.WriteLine("Snapshot is full");
                return;
            }

            eNums.Add(gEnt.s.number);
        }
예제 #3
0
파일: Server.cs 프로젝트: maesse/CubeHags
 sharedEntity GEntityForSvEntity(svEntity_t svEnt)
 {
     return sv.gentities[svEnt.id];
 }