mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-28 17:16:59 +01:00
Trainer: a large SERVER PHYSICS banner over the Sandbox page in a session that sets everyone's physics
Also for a match on the game's own physics. Before, the only word of it was a foldable card and a line beside RESET EVERYTHING. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
feb0a97c17
commit
2a85a5677d
3 files changed
+22
No files matched your search
@@ -2460,6 +2460,7 @@ void build_view() {
|
||||
next->last = s.last;
|
||||
next->editable = editable(&next->blocked);
|
||||
next->session_enforced = s.enforced;
|
||||
next->session_stock = s.competition;
|
||||
next->boosts_blocked = !s.enforced && multiplayer_session_active() && !session_boosts_allowed();
|
||||
next->rows.reserve(s.entries.size());
|
||||
for (const auto &e : s.entries) {
|
||||
|
||||
@@ -97,6 +97,7 @@ struct View {
|
||||
bool editable{}; // false while a session's host sets everyone's physics (the host's apply)
|
||||
std::string blocked; // the reason shown on locked rows
|
||||
bool session_enforced{}; // a guest where the host (or the server) sets everyone's physics
|
||||
bool session_stock{}; // a match that skates on the game's own physics (competition_stock_physics)
|
||||
bool boosts_blocked{}; // a session whose host turned boosts off: the trick extras are the game's own
|
||||
std::vector<Row> rows;
|
||||
std::vector<std::string> groups;
|
||||
|
||||
@@ -2201,6 +2201,26 @@ void trainer_page(SkateMenu &menu, const Model &model, const CallbacksV3 &callba
|
||||
bool open{};
|
||||
while (take_fold_change(id, open)) trainer_command(menu, callbacks, std::format("fold {} {}", id, open ? 1 : 0));
|
||||
}
|
||||
// A session that sets everyone's physics: said in large type over everything else, so nobody tunes a game that
|
||||
// ignores it (the owner's ask, 2026-10-24).
|
||||
if (view->session_enforced || view->session_stock) {
|
||||
const ImVec4 amber(1.0f, 0.75f, 0.3f, 1.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.35f, 0.18f, 0.0f, 0.92f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, amber);
|
||||
ImGui::BeginChild("server-physics", ImVec2(0, 0), ImGuiChildFlags_Borders | ImGuiChildFlags_AutoResizeY | ImGuiChildFlags_AlwaysUseWindowPadding);
|
||||
if (menu.heading) ImGui::PushFont(menu.heading);
|
||||
ImGui::TextColored(amber, "%s", view->session_stock ? "MATCH PHYSICS: THE GAME'S OWN" : "SERVER PHYSICS IN USE");
|
||||
if (menu.heading) ImGui::PopFont();
|
||||
ImGui::PushTextWrapPos(0.0f);
|
||||
ImGui::TextUnformatted(view->session_stock
|
||||
? "This match skates on the game's own physics for everyone. Your trainer settings, presets and boosts do "
|
||||
"nothing until the match ends; they are kept for afterwards."
|
||||
: "This multiplayer game's host or server sets everyone's physics. Your trainer settings, presets and "
|
||||
"boosts do nothing here; you skate with theirs. Your own setup comes back when you leave.");
|
||||
ImGui::PopTextWrapPos();
|
||||
ImGui::EndChild();
|
||||
ImGui::PopStyleColor(2);
|
||||
}
|
||||
// Everything that changes how the game plays, said in words. The first parts are the trainer's own; the cheats,
|
||||
// grind exits, Board Break and the game speed are ReSkate's and count all the same.
|
||||
const double speed = game_speed(model);
|
||||
|
||||
Reference in new issue
Block a user