private void CopyBulletInfoData(List <BULLET_INFO> bulletInfoList) { int dataSize = BULLET_INFO.GetDataSize(); int num = dataSize * 20; int dataSizeBytes = BULLET_INFO.GetDataSizeBytes(); int num2 = dataSizeBytes * 20; if (this.ms_Bullet_Info_Data == null) { this.ms_Bullet_Info_Data = new int[num]; } if (this.BulletInfoDataExtra_ == null) { this.BulletInfoDataExtra_ = new byte[num2]; } int num3 = bulletInfoList.get_Count(); if (num3 > 20) { num3 = 20; } for (int i = 0; i < num3; i++) { int num4 = i * dataSize; this.ms_Bullet_Info_Data[num4] = bulletInfoList.get_Item(i).location.x; this.ms_Bullet_Info_Data[num4 + 1] = bulletInfoList.get_Item(i).location.y; this.ms_Bullet_Info_Data[num4 + 2] = bulletInfoList.get_Item(i).radius; int num5 = i * dataSizeBytes; this.BulletInfoDataExtra_[num5] = (bulletInfoList.get_Item(i).bDistOnly ? 1 : 0); } if (IntPtr.Zero == this.m_tempCpyBulletDataPtr) { int num6 = num * 4; this.m_tempCpyBulletDataPtr = Marshal.AllocHGlobal(num6); } if (IntPtr.Zero == this.BulletInfoDataExtraPtr_) { this.BulletInfoDataExtraPtr_ = Marshal.AllocHGlobal(num2); } if (num3 > 0) { Marshal.Copy(this.ms_Bullet_Info_Data, 0, this.m_tempCpyBulletDataPtr, num); Marshal.Copy(this.BulletInfoDataExtra_, 0, this.BulletInfoDataExtraPtr_, num2); } GameFowManager.MemCopyBulletInfoData(num3, dataSize, this.m_tempCpyBulletDataPtr, dataSizeBytes, this.BulletInfoDataExtraPtr_); }
public void CollectExplorer(bool bForce) { GameObjMgr instance = Singleton <GameObjMgr> .instance; GameFowManager instance2 = Singleton <GameFowManager> .instance; uint num = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameInterval; uint num2 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalBullet(true); uint num3 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalBullet(false); uint num4 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalHero; this.ClearExplorerPosList(); int count = instance.GameActors.get_Count(); for (int i = 0; i < count; i++) { PoolObjHandle <ActorRoot> ptr = instance.GameActors.get_Item(i); if (ptr) { ActorRoot handle = ptr.handle; ActorTypeDef actorType = handle.TheActorMeta.ActorType; if (actorType == ActorTypeDef.Actor_Type_Hero) { if (handle.ObjID % instance2.InterpolateFrameIntervalHero != num4 && !bForce) { goto IL_191; } } else if (handle.ObjID % instance2.InterpolateFrameInterval != num && !bForce) { goto IL_191; } if (actorType != ActorTypeDef.Actor_Type_Organ && (!handle.ActorControl.IsDeadState || handle.TheStaticData.TheBaseAttribute.DeadControl)) { VInt3 vInt = new VInt3(handle.location.x, handle.location.z, 0); if (handle.HorizonMarker != null) { int[] exposedCamps = handle.HorizonMarker.GetExposedCamps(); ACTOR_INFO aCTOR_INFO = ClassObjPool <ACTOR_INFO> .Get(); aCTOR_INFO.camps = exposedCamps; aCTOR_INFO.location = handle.HorizonMarker.GetExposedPos(); this.m_explorerPosList.Add(aCTOR_INFO); } } } IL_191 :; } this.ClearExplorerBulletList(); for (int j = 1; j < 3; j++) { List <PoolObjHandle <ActorRoot> > campBullet = Singleton <GameObjMgr> .instance.GetCampBullet((COM_PLAYERCAMP)j); int count2 = campBullet.get_Count(); for (int k = 0; k < count2; k++) { PoolObjHandle <ActorRoot> ptr2 = campBullet.get_Item(k); if (ptr2) { ActorRoot handle2 = ptr2.handle; BulletWrapper bulletWrapper = handle2.ActorControl as BulletWrapper; if (0 < bulletWrapper.SightRadius) { if (!bForce) { if (bulletWrapper.GetMoveDelta() > 0) { if (handle2.ObjID % instance2.InterpolateFrameIntervalBullet(true) != num2) { goto IL_2AD; } } else if (handle2.ObjID % instance2.InterpolateFrameIntervalBullet(false) != num3) { goto IL_2AD; } } VInt3 location = new VInt3(handle2.location.x, handle2.location.z, 0); BULLET_INFO bULLET_INFO = ClassObjPool <BULLET_INFO> .Get(); bULLET_INFO.radius = bulletWrapper.SightRange; bULLET_INFO.location = location; this.m_explorerBulletList[j - 1].Add(bULLET_INFO); } } IL_2AD :; } } }