public static void Start(Entity player, Settings.UserSettings.Visuals visuals, Settings.UserSettings.VisColors visColors) { if (!visuals.DisplayTeam && player.isTeam) { return; } var GlowObjectPtr = Memory.Read <int>(Memory.Client + Offsets.dwGlowObjectManager); var glowSettings = new GlowSettings(true, true, visuals.FullBloom); var glowColor = new GlowColor(); if (visuals.PseudoChams) { if (player.isTeam) { glowColor = visColors.Team_Chams.toGlow(); player.renderColor = visColors.Team_Chams.toRender(); } else { glowColor = visColors.Enemy_Chams.toGlow(); player.renderColor = visColors.Enemy_Chams.toRender(); } } else { if (player.isTeam) { if (player.Visible) { glowColor = visColors.Team_Glow_Visible.toGlow(); } else { glowColor = visColors.Team_Glow_Hidden.toGlow(); } } else { if (player.Visible) { glowColor = visColors.Enemy_Glow_Visible.toGlow(); } else { glowColor = visColors.Enemy_Glow_Hidden.toGlow(); } } } Memory.Write(GlowObjectPtr + player.GlowIndex * 0x38 + 0x4, glowColor); Memory.Write(GlowObjectPtr + player.GlowIndex * 0x38 + 0x24, glowSettings); if (visuals.PseudoChams) { Memory.Write(GlowObjectPtr + player.GlowIndex * 0x38 + 0x2C, 1); } }
public static GlowColor toGlow(this Color c) { var g = new GlowColor(); g.r = c.R / 255f; g.g = c.G / 255f; g.b = c.B / 255f; g.a = c.A / 255f; return(g); }
public static void Start() { int GlowObjectPtr = Memory.Read <int>(Memory.client + Offsets.dwGlowObjectManager); visuals = Settings.userSettings.VisualSettings; visColors = Settings.userSettings.VisualColors; glowSettings = new GlowSettings(true, true, visuals.FullBloom); if (!Local.InGame) { return; } if (!visuals.Enabled) { return; } if (!visuals.Glow && !visuals.PseudoChams) { return; } foreach (Entity player in EntityList.List) { if (!visuals.DisplayTeam && player.isTeam) { continue; } GlowColor glowColor = new GlowColor(); if (visuals.PseudoChams) { if (player.isTeam) { glowColor = visColors.Team_Chams.toGlow(); player.renderColor = visColors.Team_Chams.toRender(); } else { glowColor = visColors.Enemy_Chams.toGlow(); player.renderColor = visColors.Enemy_Chams.toRender(); } } else { if (player.isTeam) { if (!visuals.DisplayTeam) { continue; } if (player.Visible) { glowColor = visColors.Team_Glow_Visible.toGlow(); } else { glowColor = visColors.Team_Glow_Hidden.toGlow(); } } else { if (player.Visible) { glowColor = visColors.Enemy_Glow_Visible.toGlow(); } else { glowColor = visColors.Enemy_Glow_Hidden.toGlow(); } } } Memory.Write <GlowColor>(GlowObjectPtr + (player.GlowIndex * 0x38 + 0x4), glowColor); Memory.Write <GlowSettings>(GlowObjectPtr + (player.GlowIndex * 0x38 + 0x24), glowSettings); if (visuals.PseudoChams) { Memory.Write <int>(GlowObjectPtr + (player.GlowIndex * 0x38 + 0x2C), 1); } } }
public static void Add(int index, GlowColor color, GlowSettings settings) { ToGlow[index] = true; GlowColors[index] = color; GlowSettings[index] = settings; }