Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ymihere03 committed May 30, 2024
1 parent 43d7f6a commit a5dfe3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/game/CAbstractPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class CAbstractPlayer : public CRealMovers {
Fixed supportTraction = 0;
Fixed supportFriction = 0;

std::deque<int> freeCamDBG;
std::deque<float> freeCamDBG;

// Hud parts:
CBSPPart *dirArrow = 0;
Expand Down
9 changes: 5 additions & 4 deletions src/game/CFreeCam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,14 @@ void CFreeCam::FrameAction() {
void CFreeCam::ControlSoundPoint(CViewParameters *vp) {
Fixed theRight[] = {FIX(-1), 0, 0};

// This hard-coded data matches the vector data used for ControlSoundPoint() in AbstractPlayer.cpp
// The matrix data from viewParams differs from the hard-coded data in a way that makes the sound not play in the correct channels
// For whatever reason, the viewParams matrix data didn't
// provide the correct vector to make the sound play in the correct channels
// so I copied the values used for the RightVector in ControlSoundPoint() in AbstractPlayer.cpp
theRight[0] = FIX3(707);
theRight[1] = 0;
theRight[2] = FIX3(707);


UpdateSoundLink(itsSoundLink, vp->fromPoint, speed, itsGame->soundTime);
gHub->SetMixerLink(itsSoundLink);
gHub->UpdateRightVector(theRight);
}
Expand All @@ -175,6 +177,5 @@ void CFreeCam::ControlViewPoint() {
vp->LookAt(vp->atPoint[0], vp->atPoint[1], vp->atPoint[2]);
vp->PointCamera();

UpdateSoundLink(itsSoundLink, vp->fromPoint, speed, itsGame->soundTime);
ControlSoundPoint(vp);
}

0 comments on commit a5dfe3f

Please sign in to comment.