mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-26 18:36:42 +01:00
Throwdowns: fixes the docs review found in the kit and its services
- match.teleports lets through only the publishing plugin's own teleports, and only while its match runs (its HUD is active, or the native flag is one of its modes); it was merged across every plugin and checked no match. - A mode's timer of 0 or past an hour no longer makes its card do nothing: the native flag takes it as 1 to 3600 s. flag.begin's seconds are checked as 1 to 3600, as the flag takes them. - skater.push and hold(true) return false with a reason without the stock physics, where they were dropped unseen. - telemetry's slam and struck are news since each plugin's own last read; reading them cleared them for every plugin. - A banner or callout of a new match shows whatever serial it starts from, and a document without the slot no longer resets its serial. - SmokeyDawg58's placement no longer divides input.wheel's whole notches by WHEEL_DELTA again.
This commit is contained in:
1 parent
efeae7e07d
commit
bf693dbe5c
17 files changed
+81
-42
No files matched your search
@@ -73,10 +73,15 @@ public:
|
||||
return SkaterState{t.position, heading, t.speed, t.vertical, t.airborne, t.air_time};
|
||||
}
|
||||
// As the console's tp: refused in a session whose host has turned teleporting (and noclip) off.
|
||||
Teleport teleport(const Vec3& position, float heading) override {
|
||||
Teleport teleport(std::string_view plugin, const Vec3& position, float heading) override {
|
||||
// A throwdown mode's own moves (line-ups, recoveries, returns to the start) are the game's:
|
||||
// allowed wherever its match runs and asks for them (the kit's `match.teleports`).
|
||||
if (!session_noclip_allowed() && !throwdowns::kit::match().teleports) return Teleport::forbidden;
|
||||
// allowed while that plugin's own match runs and asks for them (the kit's `match.teleports`),
|
||||
// never for another plugin's calls.
|
||||
if (!session_noclip_allowed()) {
|
||||
const auto flag = throwdowns::kit::flag::state();
|
||||
const bool mine = flag.owned && flag.mode.size() > plugin.size() && flag.mode.starts_with(plugin) && flag.mode[plugin.size()] == '/';
|
||||
if (!throwdowns::kit::allows_teleports(plugin, mine)) return Teleport::forbidden;
|
||||
}
|
||||
return teleport_local_skater_heading(position, heading) ? Teleport::sent : Teleport::unavailable;
|
||||
}
|
||||
std::optional<Vec3> raycast(const Vec3& from, const Vec3& to) override { return local_surface_hit(from, to); }
|
||||
|
||||
Reference in new issue
Block a user