mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 12:57:01 +02:00
Boards wear: hard landings, hits onto rails and ledges, grinding and slams wear the board of the deck in the game, kept per deck. From a fifth worn it steers lazier and its trucks go soft (the game's own physics tuning, outside multiplayer sessions only); a worn board breaks from less and, worn out, can give way under the rider. A board that broke is a new one once it is whole again, and the game's own board wear is cleared with it. A boardslide, lipslide or darkslide that comes down too hard onto a rail can snap the board, and the rider goes down with it: No Bail can now be asked for a wipeout, which goes in as a cause before the selector picks. Sounds play through XAudio2: a crack by the size of the break, metal when the board broke on metal (the material comes from the game's contact effects; which are metal is marked in play or listed by a pack), and the body's hits in a bail by how hard they land. The settings are a card on the overlay's Skater page, two rows in Mod Options and console verbs, kept in BoardBreak.settings. A deck may name itself and set its wheels wider apart in a deck.ini; Old School and Pig join the decks the feature knows.
31 lines
1.5 KiB
C++
31 lines
1.5 KiB
C++
#pragma once
|
|
#include "Extension/Multiplayer/Net/effects.h"
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace dingosdk::multiplayer {
|
|
// Skater effects on other players' skaters (native_vfx.cpp). Client thread unless said.
|
|
// Installs the hooks once; safe to call again.
|
|
void prepare_effects(std::uintptr_t base) noexcept;
|
|
// The local game's contacts since the last call, oldest first: the newest max_impacts.
|
|
std::vector<Impact> drain_impacts();
|
|
// The same contacts as the game played their effects (sparks, dust, landings), newest last, from
|
|
// the last `within_ms` milliseconds, kept apart from the drain: what a board broke on (Board Break).
|
|
// `at` is GetTickCount64's. Any thread.
|
|
struct LocalImpact {
|
|
Impact impact;
|
|
std::uint64_t at{};
|
|
};
|
|
std::vector<LocalImpact> recent_local_impacts(std::uint64_t within_ms);
|
|
// For the current PeerScope slot's skater: the game's effect for one of that player's contacts.
|
|
void play_impact(const Impact &impact) noexcept;
|
|
// For the current PeerScope slot's skater, after its outfit changed: the effects its costume
|
|
// and skateboard come with (trails, fire) are built again, as the game built them before the
|
|
// outfit was on (tick_remote_effects asks for it, every frame the player is shown).
|
|
void note_remote_outfit(std::uint64_t now) noexcept;
|
|
void tick_remote_effects(std::uint64_t now) noexcept;
|
|
void reset_effects() noexcept;
|
|
// One line for the console: what has been captured and played, and what is in the way.
|
|
std::string native_effects_status();
|
|
} // namespace dingosdk::multiplayer
|