Refactor skill spawn logic and HUD expiration, Gambler fix, Auto Lang System fix
This commit is contained in:
parent
4c333f5d15
commit
4b2bff91b1
37 changed files with 324 additions and 164 deletions
|
|
@ -84,22 +84,14 @@ namespace src.player.skills
|
|||
{
|
||||
skillInfo.CanUse = false;
|
||||
skillInfo.Cooldown = DateTime.Now;
|
||||
playerPawn.Teleport(GetSpawnVector(player));
|
||||
|
||||
var spawnpoint = SkillUtils.GetSpawnPointVector(player);
|
||||
if (spawnpoint == null) return;
|
||||
playerPawn.Teleport(spawnpoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Vector? GetSpawnVector(CCSPlayerController player)
|
||||
{
|
||||
var spawns = Utilities.FindAllEntitiesByDesignerName<SpawnPoint>(player.Team == CsTeam.Terrorist ? "info_player_terrorist" : "info_player_counterterrorist").ToList();
|
||||
if (spawns.Count != 0)
|
||||
{
|
||||
var randomSpawn = spawns[Instance.Random.Next(spawns.Count)];
|
||||
return randomSpawn.AbsOrigin;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public class PlayerSkillInfo
|
||||
{
|
||||
public ulong SteamID { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue