diff --git a/Client/runtime/animation/animation_orders_tick.cpp b/Client/runtime/animation/animation_orders_tick.cpp index 090441f0..addaf398 100644 --- a/Client/runtime/animation/animation_orders_tick.cpp +++ b/Client/runtime/animation/animation_orders_tick.cpp @@ -105,7 +105,11 @@ void tick_animation_orders(const Frame& frame) { // with them. In the third person their view goes round the body from behind. // Not while the game's photo mode (F1) is open: its camera flies, ours held it at the eyes. const bool photo_mode = kcds::runtime::camera::photo_mode_open(); - const bool seat_look = kcds::runtime::carts::placed::local_held() && !photo_mode; + // The look stays through the climb down: the game's own view of a driver climbing off looked + // straight up until the clip ended. + const bool seat_look = (kcds::runtime::carts::placed::local_held() || + kcds::runtime::carts::placed::local_climbing_off()) && + !photo_mode; // A scripted shot and NoClip have the camera to themselves meanwhile. const bool camera_taken = kcds::runtime::camera::shot_active() || kcds::runtime::noclip::active(); // In the third person their view goes round the body from behind; under a held look only when diff --git a/Client/runtime/carts/placed_carts.cpp b/Client/runtime/carts/placed_carts.cpp index e56024e9..85e8cab8 100644 --- a/Client/runtime/carts/placed_carts.cpp +++ b/Client/runtime/carts/placed_carts.cpp @@ -1992,6 +1992,20 @@ bool local_held() { return false; } +bool local_climbing_off() { + const std::uint32_t own = installed ? natives.local_player() : 0; + if (own == 0) { + return false; + } + for (const auto& [id, cart] : carts) { + const int seat = seat_of(cart, own); + if (seat >= 0 && cart.climbing_off[std::size_t(seat)]) { + return true; + } + } + return false; +} + bool take_action(const char* action, unsigned mode) { if (!action) { return false; diff --git a/Client/runtime/carts/placed_carts.hpp b/Client/runtime/carts/placed_carts.hpp index 27225a00..ebb0df57 100644 --- a/Client/runtime/carts/placed_carts.hpp +++ b/Client/runtime/carts/placed_carts.hpp @@ -89,6 +89,9 @@ void reset(); // The local player is held on a seat: only their head and view turn, the body faces the seat's way. bool local_held(); +// The local player climbs down from their seat (the clip of the way down plays). +bool local_climbing_off(); + // A player's body (the local one or a replica) hangs from their cart's root entity while they sit // on it, as the game's own wagon riders do, and lets go of it when they climb down or leave. // Called every frame for each body.