1.2.3.b2
This commit is contained in:
parent
0e86f54e0a
commit
98f6e65b01
98 changed files with 3391 additions and 397 deletions
|
|
@ -20,10 +20,22 @@ namespace src.player.skills
|
|||
|
||||
public static void NewRound()
|
||||
{
|
||||
decoys.Clear();
|
||||
KillAllDecoys();
|
||||
playersWithSkill.Clear();
|
||||
}
|
||||
|
||||
private static void KillAllDecoys()
|
||||
{
|
||||
foreach (var decoyIndex in decoys.Keys.ToArray())
|
||||
{
|
||||
var decoy = Utilities.GetEntityFromIndex<CDecoyProjectile>((int)decoyIndex);
|
||||
if (decoy != null && decoy.IsValid && decoy.DesignerName == "decoy_projectile")
|
||||
decoy.AddEntityIOEvent("Kill", decoy, delay: 0.1f);
|
||||
}
|
||||
|
||||
decoys.Clear();
|
||||
}
|
||||
|
||||
public static void PlayerHurt(EventPlayerHurt @event)
|
||||
{
|
||||
var victim = PlayerManager.GetPlayerEvent(@event.Userid);
|
||||
|
|
@ -45,7 +57,7 @@ namespace src.player.skills
|
|||
var attackerInfo = PlayerManager.GetPlayerByIndex((PlayerManager.GetPlayerEvent(attacker)?.Index ?? attacker.Index));
|
||||
if (attackerInfo?.Skill != skillName) return;
|
||||
|
||||
SkillUtils.TakeHealth(victim!.PlayerPawn.Value, SkillsInfo.GetValue<int>(skillName, "damageDeal"));
|
||||
SkillUtils.TakeHealth(victim!.PlayerPawn.Value, SkillsInfo.GetValue<int>(skillName, "damageDeal"), attacker, "decoy");
|
||||
}
|
||||
|
||||
public static void OnEntitySpawned(CEntityInstance entity)
|
||||
|
|
@ -94,6 +106,7 @@ namespace src.player.skills
|
|||
if (Server.TickCount % 8 != 0) return;
|
||||
|
||||
var keys = decoys.Keys.ToArray();
|
||||
if (keys.Length == 0) return;
|
||||
|
||||
foreach (var decoyIndex in keys)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue