Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 1db7721

Browse files
committed
Merge branch 'development' into 470-make-existing-build-workflows-reusable
2 parents 6999a7f + 80468eb commit 1db7721

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Entities/MOSRotating.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,11 +1146,18 @@ void MOSRotating::CreateGibsWhenGibbing(const Vector &impactImpulse, MovableObje
11461146

11471147
gibParticleClone->SetPos(m_Pos + rotatedGibOffset);
11481148
gibParticleClone->SetHFlipped(m_HFlipped);
1149-
Vector gibVelocity = rotatedGibOffset.IsZero() ? Vector(minVelocity + RandomNum(0.0F, velocityRange), 0.0F) : rotatedGibOffset.SetMagnitude(minVelocity + RandomNum(0.0F, velocityRange));
1149+
Vector gibVelocity = Vector(minVelocity + RandomNum(0.0F, velocityRange), 0.0F);
1150+
11501151
// TODO: Figure out how much the magnitude of an offset should affect spread
11511152
float gibSpread = (rotatedGibOffset.IsZero() && spread == 0.1F) ? c_PI : spread;
1152-
1153-
gibVelocity.RadRotate(gibSettingsObject.InheritsVelocity() > 0 ? impactImpulse.GetAbsRadAngle() : m_Rotation.GetRadAngle() + (m_HFlipped ? c_PI : 0));
1153+
// Determine the primary direction of the gib particles.
1154+
if (gibSettingsObject.InheritsVelocity() > 0 && !impactImpulse.IsZero()) {
1155+
gibVelocity.RadRotate(impactImpulse.GetAbsRadAngle());
1156+
} else if (!rotatedGibOffset.IsZero()) {
1157+
gibVelocity.RadRotate(rotatedGibOffset.GetAbsRadAngle());
1158+
} else {
1159+
gibVelocity.RadRotate(m_Rotation.GetRadAngle() + (m_HFlipped ? c_PI : 0));
1160+
}
11541161
// The "Even" spread will spread all gib particles evenly in an arc, while maintaining a randomized velocity magnitude.
11551162
if (gibSettingsObject.GetSpreadMode() == Gib::SpreadMode::SpreadEven) {
11561163
gibVelocity.RadRotate(gibSpread - (gibSpread * 2.0F * static_cast<float>(i) / static_cast<float>(count)));

Managers/UInputMan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,8 @@ namespace RTE {
10171017
void UInputMan::UpdateMouseInput() {
10181018
// Detect and store mouse movement input, translated to analog stick emulation
10191019
int mousePlayer = MouseUsedByPlayer();
1020-
if (mousePlayer != Players::NoPlayer) {
1020+
// TODO: Figure out a less shit solution to updating the mouse in GUIs when there are no mouse players configured, i.e. no player input scheme is using mouse+keyboard. For not just check if we're out of Activity.
1021+
if (!g_ActivityMan.IsInActivity() || mousePlayer != Players::NoPlayer) {
10211022
// Multiplying by 30 for sensitivity. TODO: Make sensitivity slider 1-50;
10221023
m_AnalogMouseData.m_X += m_RawMouseMovement.m_X * 3;
10231024
m_AnalogMouseData.m_Y += m_RawMouseMovement.m_Y * 3;

0 commit comments

Comments
 (0)