Add a rubbish experimental FPS camera view

This was SVN commit r8520.
This commit is contained in:
Ykkrosh
2010-11-01 21:40:29 +00:00
parent 1b9f198520
commit 540925aa32
3 changed files with 47 additions and 17 deletions
+7 -1
View File
@@ -308,9 +308,14 @@ CScriptVal LoadMapSettings(void* cbdata, std::wstring pathname)
void CameraFollow(void* UNUSED(cbdata), entity_id_t entityid)
{
if (g_Game && g_Game->GetView())
g_Game->GetView()->CameraFollow(entityid);
g_Game->GetView()->CameraFollow(entityid, false);
}
void CameraFollowFPS(void* UNUSED(cbdata), entity_id_t entityid)
{
if (g_Game && g_Game->GetView())
g_Game->GetView()->CameraFollow(entityid, true);
}
void SetSimRate(void* UNUSED(cbdata), float rate)
{
@@ -391,6 +396,7 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
scriptInterface.RegisterFunction<bool, &AtlasIsAvailable>("AtlasIsAvailable");
scriptInterface.RegisterFunction<CScriptVal, std::wstring, &LoadMapSettings>("LoadMapSettings");
scriptInterface.RegisterFunction<void, entity_id_t, &CameraFollow>("CameraFollow");
scriptInterface.RegisterFunction<void, entity_id_t, &CameraFollowFPS>("CameraFollowFPS");
// Development/debugging functions
scriptInterface.RegisterFunction<void, float, &SetSimRate>("SetSimRate");