Browse Source

Merge pull request #321 from Hoikas/refresh-fov

RefreshFOV Camera Command
Adam Johnson 12 years ago
parent
commit
a8b667ca1e
  1. 5
      Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp
  2. 8
      Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp
  3. 2
      Sources/Plasma/FeatureLib/pfPython/cyCamera.h
  4. 1
      Sources/Plasma/NucleusLib/pnMessage/plCameraMsg.h

5
Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp

@ -1370,6 +1370,11 @@ bool plVirtualCam1::MsgReceive(plMessage* msg)
} }
} }
} }
else
if (pCam->Cmd(plCameraMsg::kRefreshFOV))
{
Refresh();
}
} }
plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg); plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg);
if (pRefMsg ) if (pRefMsg )

8
Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp

@ -373,3 +373,11 @@ bool cyCamera::IsStayInFirstPerson()
} }
return false; return false;
} }
void cyCamera::RefreshFOV()
{
plCameraMsg* pMsg = new plCameraMsg();
pMsg->SetSender(fSender);
pMsg->SetCmd(plCameraMsg::kRefreshFOV);
pMsg->Send(fTheCam);
}

2
Sources/Plasma/FeatureLib/pfPython/cyCamera.h

@ -114,7 +114,7 @@ public:
virtual void SetAspectRatio(float aspectratio) { plVirtualCam1::SetAspectRatio(aspectratio); } virtual void SetAspectRatio(float aspectratio) { plVirtualCam1::SetAspectRatio(aspectratio); }
virtual float GetAspectRatio() const { return plVirtualCam1::GetAspectRatio(); } virtual float GetAspectRatio() const { return plVirtualCam1::GetAspectRatio(); }
virtual void RefreshFOV() { plVirtualCam1::Refresh(); } virtual void RefreshFOV();
}; };

1
Sources/Plasma/NucleusLib/pnMessage/plCameraMsg.h

@ -207,6 +207,7 @@ public:
kNonPhysOn, kNonPhysOn,
kNonPhysOff, kNonPhysOff,
kResetPanning, kResetPanning,
kRefreshFOV,
kNumCmds kNumCmds
}; };

Loading…
Cancel
Save