Rework pilot, fix spawnspoints location
# Updates & Fixes (v1.2.1.b4)
- Pilot (Rework): Completely rewritten jump and fuel logic. You must now double-click space to activate flying. Re-activating in mid-air is now smoother and fuel consumption is properly clamped.
- Hermit: Increased default `HealthToAdd` to 100 and adjusted reserve ammo values.
- Planter / ShortBomb: Notifications now reach all valid players regardless of life status.
- ChillOut: Removed redundant empty center-print messages.
- System & Optimization:
- Skill Detection: Faster lookups for enabled skills using the core skill list.
- Round Logic: More stable round termination using direct game rules calls.
- SkillUtils: Fixed spawn point selection bugs and memory referencing issues.
This commit is contained in:
parent
17f26a1458
commit
3954fc3af4
13 changed files with 74 additions and 46 deletions
|
|
@ -162,12 +162,12 @@ namespace src.utils
|
|||
? "info_player_counterterrorist"
|
||||
: "info_player_terrorist";
|
||||
|
||||
var spawns = Utilities.FindAllEntitiesByDesignerName<SpawnPoint>(spawnPointName).ToList();
|
||||
var spawns = Utilities.FindAllEntitiesByDesignerName<SpawnPoint>(spawnPointName).Where(s => s.IsValid && s.Enabled).ToList();
|
||||
if (spawns.Count != 0)
|
||||
{
|
||||
var randomSpawn = spawns[jRandomSkills.Instance.Random.Next(spawns.Count)];
|
||||
if (randomSpawn != null && randomSpawn.IsValid && randomSpawn.AbsOrigin != null)
|
||||
return randomSpawn.AbsOrigin;
|
||||
return new Vector(randomSpawn.AbsOrigin.X, randomSpawn.AbsOrigin.Y, randomSpawn.AbsOrigin.Z);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -415,7 +415,8 @@ namespace src.utils
|
|||
short tScore = (short)(winnerTeam == CsTeam.Terrorist ? tTeams.Score + 1 : tTeams.Score);
|
||||
|
||||
UpdateServerTeamScores(ctScore, tScore);
|
||||
TerminateRoundFunc.Invoke(jRandomSkills.Instance.GameRules.Handle, 5f, winnerTeam == CsTeam.CounterTerrorist ? RoundEndReason.BombDefused : RoundEndReason.TargetBombed, 0, 0);
|
||||
jRandomSkills.Instance.GameRules?.TerminateRound(5f, winnerTeam == CsTeam.CounterTerrorist ? RoundEndReason.BombDefused : RoundEndReason.TargetBombed);
|
||||
// TerminateRoundFunc.Invoke(jRandomSkills.Instance.GameRules.Handle, 5f, winnerTeam == CsTeam.CounterTerrorist ? RoundEndReason.BombDefused : RoundEndReason.TargetBombed, 0, 0);
|
||||
}
|
||||
|
||||
private static void UpdateServerTeamScores(short ctScore, short tScore)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue