// Token: 0x0600203D RID: 8253 RVA: 0x00099EB0 File Offset: 0x000980B0 public override void Shoot(Ray ray, out CmunePairList <BaseGameProp, ShotPoint> hits) { hits = null; RaycastHit raycastHit; if (this.MinProjectileDistance > 0 && Physics.Raycast(ray.origin, ray.direction, out raycastHit, (float)this.MinProjectileDistance, UberstrikeLayerMasks.LocalRocketMask)) { int num = base.Controller.NextProjectileId(); hits = new CmunePairList <BaseGameProp, ShotPoint>(1); hits.Add(null, new ShotPoint(raycastHit.point, num)); this.ShowExplosionEffect(raycastHit.point, raycastHit.normal, ray.direction, num); if (this.OnProjectileShoot != null) { this.OnProjectileShoot(new ProjectileInfo(num, new Ray(raycastHit.point, -ray.direction))); } } else { if (this._decorator) { this._decorator.ShowShootEffect(new RaycastHit[0]); } UnityRuntime.StartRoutine(this.EmitProjectile(ray)); } }
// Token: 0x06002009 RID: 8201 RVA: 0x000993A8 File Offset: 0x000975A8 public override void Shoot(Ray ray, out CmunePairList <BaseGameProp, ShotPoint> hits) { hits = null; Vector3 direction = WeaponDataManager.ApplyDispersion(ray.direction, this._view, this._supportIronSight); int projectileId = base.Controller.NextProjectileId(); RaycastHit raycastHit; if (Physics.Raycast(ray.origin, direction, out raycastHit, 1000f, (!base.Controller.IsLocal) ? UberstrikeLayerMasks.ShootMaskRemotePlayer : UberstrikeLayerMasks.ShootMask)) { HitPoint point = new HitPoint(raycastHit.point, TagUtil.GetTag(raycastHit.collider)); BaseGameProp component = raycastHit.collider.GetComponent <BaseGameProp>(); if (component) { hits = new CmunePairList <BaseGameProp, ShotPoint>(1); hits.Add(component, new ShotPoint(raycastHit.point, projectileId)); } this.Decorator.PlayImpactSoundAt(point); } else { raycastHit.point = ray.origin + ray.direction * 1000f; } if (this.Decorator) { this.Decorator.ShowShootEffect(new RaycastHit[] { raycastHit }); } base.OnHits(hits); }
// Token: 0x0600200C RID: 8204 RVA: 0x000994D4 File Offset: 0x000976D4 public override void Shoot(Ray ray, out CmunePairList <BaseGameProp, ShotPoint> hits) { Dictionary <BaseGameProp, ShotPoint> dictionary = new Dictionary <BaseGameProp, ShotPoint>(this.ShotgunGauge); HitPoint hitPoint = null; RaycastHit[] array = new RaycastHit[this.ShotgunGauge]; int projectileId = base.Controller.NextProjectileId(); int num = 1000; for (int i = 0; i < this.ShotgunGauge; i++) { Vector3 direction = WeaponDataManager.ApplyDispersion(ray.direction, this._view, false); RaycastHit raycastHit; if (Physics.Raycast(ray.origin, direction, out raycastHit, (float)num, (!base.Controller.IsLocal) ? UberstrikeLayerMasks.ShootMaskRemotePlayer : UberstrikeLayerMasks.ShootMask)) { if (hitPoint == null) { hitPoint = new HitPoint(raycastHit.point, TagUtil.GetTag(raycastHit.collider)); } BaseGameProp component = raycastHit.collider.GetComponent <BaseGameProp>(); if (component) { ShotPoint shotPoint; if (dictionary.TryGetValue(component, out shotPoint)) { shotPoint.AddPoint(raycastHit.point); } else { dictionary.Add(component, new ShotPoint(raycastHit.point, projectileId)); } } array[i] = raycastHit; } else { array[i].point = ray.origin + ray.direction * 1000f; array[i].normal = raycastHit.normal; } } this.Decorator.PlayImpactSoundAt(hitPoint); hits = new CmunePairList <BaseGameProp, ShotPoint>(dictionary.Count); foreach (KeyValuePair <BaseGameProp, ShotPoint> keyValuePair in dictionary) { hits.Add(keyValuePair.Key, keyValuePair.Value); } if (this.Decorator) { this.Decorator.ShowShootEffect(array); } base.OnHits(hits); }
// Token: 0x06002010 RID: 8208 RVA: 0x000996D8 File Offset: 0x000978D8 public override void Shoot(Ray ray, out CmunePairList <BaseGameProp, ShotPoint> hits) { Vector3 origin = ray.origin; origin.y -= 0.1f; ray.origin = origin; hits = null; float radius = 1f; int layerMask = (!base.Controller.IsLocal) ? UberstrikeLayerMasks.ShootMaskRemotePlayer : UberstrikeLayerMasks.ShootMask; float distance = 1f; RaycastHit[] array = Physics.SphereCastAll(ray, radius, distance, layerMask); int projectileId = base.Controller.NextProjectileId(); if (array != null && array.Length > 0) { hits = new CmunePairList <BaseGameProp, ShotPoint>(); float num = float.PositiveInfinity; RaycastHit hit = array[0]; foreach (RaycastHit raycastHit in array) { Vector3 rhs = raycastHit.point - ray.origin; if (Vector3.Dot(ray.direction, rhs) > 0f && raycastHit.distance < num) { num = raycastHit.distance; hit = raycastHit; } } if (hit.collider) { BaseGameProp component = hit.collider.GetComponent <BaseGameProp>(); if (component != null) { hits.Add(component, new ShotPoint(hit.point, projectileId)); } if (this._decorator) { this._decorator.StartCoroutine(this.StartShowingEffect(hit, ray.origin, this.HitDelay)); } } } else if (this._decorator) { this._decorator.ShowShootEffect(new RaycastHit[0]); } this.EmitWaterImpactParticles(ray, radius); base.OnHits(hits); }