Add round stages, respawn protection and match highlights

This commit is contained in:
Leshyi committed 2026-11-29 23:29:29 +05:00
1 parent b87a3770a1
commit d1c42a36b8
28 files changed
+753 -45

No files matched your search

+5
View File
@@ -8,6 +8,7 @@ export type Marker = {body: Part, label: TextLabel, origin: Vector3}
type Config = {
state: Instance, geometry: RaycastParams, sites: {Sites.Site}, startedAt: number,
marker: (Sites.Site) -> Marker, score: (Side, number) -> (), status: (string) -> (),
contribute: ((Player, string, number) -> ())?,
}
type Capture = {
step: ({Fighter}, number, number) -> (), hit: (Player, number, boolean) -> (),
@@ -221,6 +222,7 @@ function HotPoint.start(config: Config): Capture
for _, fighter in fighters do
if not isInside(fighter, site.position) then continue end
table.insert(inside, fighter)
if config.contribute then config.contribute(fighter.player, "holdSeconds", dt) end
if fighter.side == "Blue" then blue += 1 else orange += 1 end
end
local remaining = math.ceil(movesAt - now)
@@ -254,6 +256,9 @@ function HotPoint.start(config: Config): Capture
capturedSide, capturedAt = side, now
movesAt = now + COLLAPSE_SECONDS + CAPTURE_NOTICE_SECONDS + NEXT_POINT_WARNING_SECONDS
config.score(side, 1)
if config.contribute then
for player in capturers do config.contribute(player, "captures", 1) end
end
clearCapture()
publish(nil, 0, nil)
config.status("")