Skip to content

Commit

Permalink
Merge pull request #321 from Hoikas/refresh-fov
Browse files Browse the repository at this point in the history
RefreshFOV Camera Command
  • Loading branch information
Hoikas committed Apr 12, 2013
2 parents 06dd899 + 1142d8d commit a8b667c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp
Expand Up @@ -1370,6 +1370,11 @@ bool plVirtualCam1::MsgReceive(plMessage* msg)
}
}
}
else
if (pCam->Cmd(plCameraMsg::kRefreshFOV))
{
Refresh();
}
}
plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg);
if (pRefMsg )
Expand Down
8 changes: 8 additions & 0 deletions Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp
Expand Up @@ -373,3 +373,11 @@ bool cyCamera::IsStayInFirstPerson()
}
return false;
}

void cyCamera::RefreshFOV()
{
plCameraMsg* pMsg = new plCameraMsg();
pMsg->SetSender(fSender);
pMsg->SetCmd(plCameraMsg::kRefreshFOV);
pMsg->Send(fTheCam);
}
2 changes: 1 addition & 1 deletion Sources/Plasma/FeatureLib/pfPython/cyCamera.h
Expand Up @@ -114,7 +114,7 @@ class cyCamera

virtual void SetAspectRatio(float aspectratio) { plVirtualCam1::SetAspectRatio(aspectratio); }
virtual float GetAspectRatio() const { return plVirtualCam1::GetAspectRatio(); }
virtual void RefreshFOV() { plVirtualCam1::Refresh(); }
virtual void RefreshFOV();
};


Expand Down
1 change: 1 addition & 0 deletions Sources/Plasma/NucleusLib/pnMessage/plCameraMsg.h
Expand Up @@ -207,6 +207,7 @@ class plCameraMsg : public plMessage
kNonPhysOn,
kNonPhysOff,
kResetPanning,
kRefreshFOV,
kNumCmds
};

Expand Down

0 comments on commit a8b667c

Please sign in to comment.