mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-06-11 21:28:25 -04:00
CrowdControl additions & improvements (#5104)
* CrowdControl additions & improvements
* Update after dev merge
* clang format
* Revert "clang format"
This reverts commit 1be5ad18f5.
* clang format
This commit is contained in:
+10
-2
@@ -1284,8 +1284,16 @@ void Actor_UpdatePos(Actor* actor) {
|
||||
}
|
||||
|
||||
void Actor_UpdateVelocityXZGravity(Actor* actor) {
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speedXZ;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speedXZ;
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
uint8_t inCutscene = player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER ||
|
||||
player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE ||
|
||||
player->stateFlags2 & PLAYER_STATE2_CRAWLING;
|
||||
f32 speedModifier = 1.0f;
|
||||
if (actor->id == ACTOR_PLAYER && !inCutscene) {
|
||||
speedModifier = GameInteractor_MovementSpeedMultiplier();
|
||||
}
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speedXZ * speedModifier;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speedXZ * speedModifier;
|
||||
|
||||
actor->velocity.y += actor->gravity;
|
||||
if (actor->velocity.y < actor->minVelocityY) {
|
||||
|
||||
Reference in New Issue
Block a user