-----------------------------------------------------------------------------
-- EDITOR INIT
-- Put the game into a mode to facilitate editing.

deg2rad = (360 / (3.1415927*2))

-- turn off edge of screen scrolling on the RTS cam           
ent = Entity.FindClass(Game.GetRootEntity(), "CameraRts1");
if (ent) then
    Entity.SetFloat(ent, "minX", 0);
    Entity.SetFloat(ent, "maxX", 2048);
    Entity.SetFloat(ent, "minZ", 0);
    Entity.SetFloat(ent, "maxZ", 2048);
    Entity.SetFloat(ent, "maxZoom", 400);
    Entity.SetFloat(ent, "minPitch", -2.0);
    Entity.SetBool (ent, "edgeScrollEnable", false);           
    end;

ent = Entity.FindName(Game.GetRootEntity(), "Observer0");
if (ent) then
    Entity.SetVector3(ent, "pos", 103.0, 19.0, 154.0);
    Entity.SetFloat  (ent, "pitch", 0.0);
    Entity.SetFloat  (ent, "yaw",  -5*deg2rad);
    end;
           
EntGame.BindPlayerToEntity("Observer0");
--EntGame.SetPhaseInstrMsg("");

-- Turn off some entity classes for easier editing
-- Change "Clear" to "Set" and reactivate editor to set the flags back on
--Entity.ClearClassFlag("FishSchool3",    ECF_SELECTABLE);
--Entity.ClearClassFlag("Fish3",          ECF_SELECTABLE);
--Entity.ClearClassFlag("FlowZone",       ECF_SELECTABLE);
Entity.ClearClassFlag("ParticleSpray",  ECF_SELECTABLE);
Entity.ClearClassFlag("TexturePlane",   ECF_SELECTABLE);
--Entity.ClearClassFlag("UnderwaterRays", ECF_SELECTABLE);
--Entity.ClearClassFlag("WaterPlane1",    ECF_SELECTABLE);
--Entity.ClearClassFlag("WaterRippleMgr", ECF_SELECTABLE);
