summaryrefslogtreecommitdiff
path: root/indra/newview/llagentpilot.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-09-04 17:00:08 +0300
committerGitHub <noreply@github.com>2024-09-04 17:00:08 +0300
commit206bdc90de1cbb68f78df74c1b6cf6426522ef79 (patch)
tree27f2d17c397bbebc1a1071248b63dc6d33a43cb7 /indra/newview/llagentpilot.cpp
parenta65bc46b138b89200586b29fe729cbc7b0f0c8c4 (diff)
parente5bcd6f50a8247dde1121210150835d968dc214d (diff)
Merge pull request #2494 from secondlife/marchcat/b-develop
Maint B sync
Diffstat (limited to 'indra/newview/llagentpilot.cpp')
-rw-r--r--indra/newview/llagentpilot.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index ecb705ec2d..0b5198bbd3 100644
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -42,15 +42,15 @@ LLAgentPilot gAgentPilot;
LLAgentPilot::LLAgentPilot() :
mNumRuns(-1),
- mQuitAfterRuns(FALSE),
- mRecording(FALSE),
+ mQuitAfterRuns(false),
+ mRecording(false),
mLastRecordTime(0.f),
- mStarted(FALSE),
- mPlaying(FALSE),
+ mStarted(false),
+ mPlaying(false),
mCurrentAction(0),
- mOverrideCamera(FALSE),
- mLoop(TRUE),
- mReplaySession(FALSE)
+ mOverrideCamera(false),
+ mLoop(true),
+ mReplaySession(false)
{
}
@@ -145,7 +145,7 @@ void LLAgentPilot::loadXML(const std::string& filename)
Action action;
action.mTime = record["time"].asReal();
action.mType = (EActionType)record["type"].asInteger();
- action.mCameraView = record["camera_view"].asReal();
+ action.mCameraView = (F32)record["camera_view"].asReal();
action.mTarget = ll_vector3d_from_sd(record["target"]);
action.mCameraOrigin = ll_vector3_from_sd(record["camera_origin"]);
action.mCameraXAxis = ll_vector3_from_sd(record["camera_xaxis"]);
@@ -221,14 +221,14 @@ void LLAgentPilot::startRecord()
mActions.clear();
mTimer.reset();
addAction(STRAIGHT);
- mRecording = TRUE;
+ mRecording = true;
}
void LLAgentPilot::stopRecord()
{
gAgentPilot.addAction(STRAIGHT);
gAgentPilot.save();
- mRecording = FALSE;
+ mRecording = false;
}
void LLAgentPilot::addAction(enum EActionType action_type)
@@ -252,7 +252,7 @@ void LLAgentPilot::startPlayback()
{
if (!mPlaying)
{
- mPlaying = TRUE;
+ mPlaying = true;
mCurrentAction = 0;
mTimer.reset();
@@ -261,12 +261,12 @@ void LLAgentPilot::startPlayback()
LL_INFOS() << "Starting playback, moving to waypoint 0" << LL_ENDL;
gAgent.startAutoPilotGlobal(mActions[0].mTarget);
moveCamera();
- mStarted = FALSE;
+ mStarted = false;
}
else
{
LL_INFOS() << "No autopilot data, cancelling!" << LL_ENDL;
- mPlaying = FALSE;
+ mPlaying = false;
}
}
}
@@ -275,7 +275,7 @@ void LLAgentPilot::stopPlayback()
{
if (mPlaying)
{
- mPlaying = FALSE;
+ mPlaying = false;
mCurrentAction = 0;
mTimer.reset();
gAgent.stopAutoPilot();
@@ -297,8 +297,8 @@ void LLAgentPilot::moveCamera()
S32 start_index = llmax(mCurrentAction-1,0);
S32 end_index = mCurrentAction;
F32 t = 0.0;
- F32 timedelta = mActions[end_index].mTime - mActions[start_index].mTime;
- F32 tickelapsed = mTimer.getElapsedTimeF32()-mActions[start_index].mTime;
+ F32 timedelta = (F32)(mActions[end_index].mTime - mActions[start_index].mTime);
+ F32 tickelapsed = mTimer.getElapsedTimeF32()-(F32)mActions[start_index].mTime;
if (timedelta > 0.0)
{
t = tickelapsed/timedelta;
@@ -347,7 +347,7 @@ void LLAgentPilot::updateTarget()
{
LL_INFOS() << "At start, beginning playback" << LL_ENDL;
mTimer.reset();
- mStarted = TRUE;
+ mStarted = true;
}
}
}