public override void OnStartLocalPlayer() { name = isServer ? "PlayerServer" : "PlayerClient"; thirdCam = FindObjectOfType <ThirdCam>(); thirdCam.Target = thirdCamFollowTarget; thirdCam.m_AimSettings = AimSettings.DefaultAimSettings(); //arsenal = GetComponentInChildren<Arsenal>(); arsenal.Setup(); localHealth = GetComponent <Health>(); audioListenr = gameObject.AddComponent <AudioListener>(); ikAimWeapon = GetComponent <IKAimWeapon>(); score.SetPlayerData(new MPlayerData() { displayName = string.Format("Something{0} {1} ", (isServer ? "SRVR" : "CLI"), netId), color = Color.red, netID = netId.Value, }, 0); startLocalOrNot(); StartCoroutine(GetLoadOut()); }
private void OnImageDrawing(object sender, ImageDrawingEventArgs e) { if (e.PresentationImage != null) { IOverlayGraphicsProvider graphicsProvider = e.PresentationImage as IOverlayGraphicsProvider; if (graphicsProvider != null && graphicsProvider.OverlayGraphics != null) { AimSettings aimSettings = AimSettings.Default; foreach (IGraphic overlayGraphic in graphicsProvider.OverlayGraphics) { if (overlayGraphic is AimGraphic) { AimGraphic aimGraphic = (AimGraphic)overlayGraphic; string userName = aimGraphic.UserLoginName; aimGraphic.Visible = !_displayMarkupPerUser.ContainsKey(userName) || _displayMarkupPerUser[userName]; aimGraphic.Color = aimSettings.GetAimGraphicColorForUser(userName); } } } } }
public void ClientOnSwitchedWeapon(int wIndex) { Weapon weapon = arsenal.equipedWeapon; if (weapon) { aud.clip = weapon.fireAudio.clip; } namePlate.text = string.Format("{0} (weap: {1})", playerData.displayName, arsenal.equipedSVIndex); if (isLocalPlayer) { if (weapon) { thirdCam.m_AimSettings = weapon.aimSettings; } else { thirdCam.m_AimSettings = AimSettings.DefaultAimSettings(); } } }
public Settings(string name = "dummySettings") { Name = name; Aim = new AimSettings(); Aim.Key = Keys.MButton; Aim.Mode = KeyMode.Toggle; Aim.Lock = true; Aim.FOV = 1f; Aim.Bone = 6; Aim.Predict = true; Aim.Sticky = true; Aim.VisibleOnly = true; Aim.BrokenAim = false; Aim.Enabled = true; Aim.Smoothing = new AimSmooth(); Aim.Smoothing.Enabled = false; Aim.Smoothing.Mode = SmoothMode.MaxDist; Aim.Smoothing.Scalar = 0.2f; Aim.Smoothing.PerAxis = new Vector2(0.01f, 0.01f); Trigger = new TriggerSettings(); Trigger.Enabled = true; Trigger.Key = Keys.XButton2; Trigger.Mode = KeyMode.Toggle; Trigger.Delay = 20; Trigger.Burst = new BurstSettings(); Trigger.Burst.Enabled = false; Trigger.Burst.Count = 5; Trigger.Burst.Delay = 200; Glow = new GlowSettings(); Glow.Allies = new GlowEntry(); Glow.Enemies = new GlowEntry(); Glow.C4 = new GlowEntry(); Glow.Grenades = new GlowEntry(); Glow.Weapons = new GlowEntry(); Glow.Enabled = true; Glow.Allies.Enabled = true; Glow.Enemies.Enabled = true; Glow.C4.Enabled = true; Glow.Grenades.Enabled = true; Glow.Weapons.Enabled = true; Glow.Allies.Color = new Color() { A = 1f, R = 0f, G = 0f, B = 0.7f }; Glow.Enemies.Color = new Color() { A = 1f, R = 0.9f, G = 0.1f, B = 0f }; Glow.C4.Color = new Color() { A = 0.9f, R = 1f, G = 0f, B = 0f }; Glow.Grenades.Color = new Color() { A = 0.9f, R = 1f, G = 0f, B = 0f }; Glow.Weapons.Color = new Color() { A = 0.5f, R = 0f, G = 7f, B = 0f }; ESP = new ESPSettings(); ESP.Allies = new ESPEntry(); ESP.C4 = new ESPEntry(); ESP.Chickens = new ESPEntry(); ESP.Enemies = new ESPEntry(); ESP.Grenades = new ESPEntry(); ESP.Weapons = new ESPEntry(); ESP.World = new ESPEntry(); ESP.Allies.Enabled = true; ESP.C4.Enabled = true; ESP.Chickens.Enabled = true; ESP.Enemies.Enabled = true; ESP.Grenades.Enabled = true; ESP.Weapons.Enabled = true; ESP.Allies.ShowBox = true; ESP.C4.ShowBox = true; ESP.Chickens.ShowBox = true; ESP.Enemies.ShowBox = true; ESP.Grenades.ShowBox = true; ESP.Weapons.ShowBox = true; ESP.Allies.ShowName = true; ESP.C4.ShowName = true; ESP.Chickens.ShowName = true; ESP.Enemies.ShowName = true; ESP.Grenades.ShowName = true; ESP.Weapons.ShowName = true; ESP.Allies.ShowDist = true; ESP.C4.ShowDist = true; ESP.Chickens.ShowDist = true; ESP.Enemies.ShowDist = true; ESP.Grenades.ShowDist = true; ESP.Weapons.ShowDist = true; ESP.Allies.ShowHealth = true; ESP.C4.ShowHealth = false; ESP.Chickens.ShowHealth = true; ESP.Enemies.ShowHealth = true; ESP.Grenades.ShowHealth = false; ESP.Weapons.ShowHealth = false; ESP.Allies.Color = new Color() { A = 1f, R = 0f, G = 0f, B = 0.7f }; ESP.C4.Color = new Color() { A = 0.9f, R = 1f, G = 0f, B = 0f }; ESP.Chickens.Color = Color.FromKnownColor(Color.Orange, 0.9f); ESP.Enemies.Color = new Color() { A = 1f, R = 0.9f, G = 0.1f, B = 0f }; ESP.Grenades.Color = new Color() { A = 0.9f, R = 1f, G = 0f, B = 0f }; ESP.Weapons.Color = new Color() { A = 0.5f, R = 0f, G = 7f, B = 0f }; NoRecoil = new NoRecoilSettings(); NoRecoil.Enabled = true; NoRecoil.Force = 1f; NoRecoil.ShowCrosshair = false; NoRecoil.NoRecoilSemiAuto = false; MiscAutoPistol = true; MiscBunnyHop = true; }