mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +00:00
Document Pushing Player: Bg Conveyors and Climbing Slopes (#1103)
* Document pushing Player * Cleaner and better names * Tiny cleanup * Add enum to func * PR Feedback * Change conveyor to `IsFloorConveyor` * Small touchup * Attempt at better comments * Clarify comments * Clarify comment further * Fix formatting * PR Feedback
This commit is contained in:
parent
a9084ad65e
commit
04fb0ac1b1
8 changed files with 101 additions and 86 deletions
|
@ -91,11 +91,11 @@ void EnStream_SuckPlayer(EnStream* this, GlobalContext* globalCtx) {
|
|||
if (func_80B0B81C(&this->actor.world.pos, &player->actor.world.pos, &posDifference, this->actor.scale.y) != 0) {
|
||||
xzDist = sqrtf(SQ(posDifference.x) + SQ(posDifference.z));
|
||||
yDistWithOffset = player->actor.world.pos.y - (this->actor.world.pos.y - 90.0f);
|
||||
player->windDirection = RADF_TO_BINANG(Math_FAtan2F(-posDifference.x, -posDifference.z));
|
||||
player->pushedYaw = RADF_TO_BINANG(Math_FAtan2F(-posDifference.x, -posDifference.z));
|
||||
if (xzDist > 3.0f) {
|
||||
Math_SmoothStepToF(&player->windSpeed, 3.0f, 0.5f, xzDist, 0.0f);
|
||||
Math_SmoothStepToF(&player->pushedSpeed, 3.0f, 0.5f, xzDist, 0.0f);
|
||||
} else {
|
||||
player->windSpeed = 0.0f;
|
||||
player->pushedSpeed = 0.0f;
|
||||
Math_SmoothStepToF(&player->actor.world.pos.x, this->actor.world.pos.x, 0.5f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->actor.world.pos.z, this->actor.world.pos.z, 0.5f, 3.0f, 0.0f);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue