
if (!$gameModeAdded["MoveEditorGM"])
{
$gameModeAdded["MoveEditorGM"] = true;
$gameModeName[$nGameMode] = "MoveEditorGM";
$gameModePrintName[$nGameMode] = "MoveEditorGM";
$gameModePrintInServerList[$nGameMode] = false;
$nGameMode ++;
}


////////////////////////////////////////////////////////////////////////////////
// initialisation stuff

// called when the server loads the map
function MoveEditorGM::ServerStarted(%this)
{

   if ($debugMissionLoad)
      echo("GMServerStarted MoveEditorGM");

   $GMMissionArea = MissionArea;


   
}


///////////////////////////////////////////////////////////////////////////////
// player/client management stuff

// new client entering the game
function MoveEditorGM::ClientEnterGame(%this, %client)
{

   if ($debugMissionLoad)
      echo("GMClientEnterGame MoveEditorGM");
}

// client fully loaded
function MoveEditorGM::ClientFullyLoaded(%this, %client)
{
   if ($debugMissionLoad)
      echo("GMClientFullyLoaded MoveEditorGM");

  

   //schedule(100, 0, "toggleMoveEditor", 1);
   toggleMoveEditor(1);

}

// returns true if this client is allowed to join the match
function MoveEditorGM::CanJoinMatch(%this, %client)
{
   return false;
}

// called on a player joining the match.  Newclient indicates whether the client has been in the match before
function MoveEditorGM::JoinMatch(%this, %client, %character, %newClient, %team)
{
   
}



// called on a client dropping for any reason
function MoveEditorGM::ClientDropped(%this, %client, %reason)
{

}


// called on a client leaving the match
function MoveEditorGM::ClientLeavingMatch(%this, %client)
{
   commandToClient(%client, 'SetBottomPrintText', "Left click to continue.", -1);
}


// called on player death or client leaving the match
function MoveEditorGM::RemovePlayer(%this, %player)
{

}

// call the client and tell him what colours we want the IFFs to be
function MoveEditorGM::SendClientIFFInfo(%this, %client)
{
   commandToClient(%client, 'setIFFColours', "0 1 0", "1 0 0", "0 0 1", "0 1 1", false);
}

function MoveEditorGM::playerHasNewTarget(%this, %player, %target)
{
   
}


//////////////////////////////////////////////////////////////////
// action stuff

// called on a player-player collision
function MoveEditorGM::OnHit(%this, %hiter, %hitee, %myHitbox, %hisHitbox, %myForce, %hisForce, %myMult, %hisMult, %winner, %myV2, %hisV2)
{
   return standardHitDamage(%hiter, %hitee, %myHitbox, %hisHitbox, %myForce, %hisForce, %myMult, %hisMult, %winner, %myV2, %hisV2);
}





// called when a player is killed by an opponent
function MoveEditorGM::OnKilled(%this, %killee, %killer, %reason)
{
  
}




// called on a player's death
function MoveEditorGM::OnDeath(%this, %player)
{

}



function MoveEditorGM::playerHitItem(%this, %player, %item)
{

}

/////////////////////////////////////////////////////////////////////
// mission area stuff

// called when the player enters the MissionArea mission area struct
function MoveEditorGM::OnEnterMissionArea(%this, %player)
{
   
}

// called when the player leaves the MissionArea mission area struct
function MoveEditorGM::OnLeaveMissionArea(%this, %player)
{
  
}



////////////////////////////////////////////////////////////////////
// mission end cleanup


function MoveEditorGM::OnMissionEnded(%this)
{
   $openedMoveEditorThisSession = false;
}

////////////////////////////////////////////////////////////////////
// ball stuff

// player collides with the ball
function MoveEditorGM::PlayerHitBall(%this, %player, %hitboxID, %ball)
{
 
}