Example #1
0
 public function setCheckpointSide(Neuron_GameServer_Map_Location $location, Dolumar_Underworld_Models_Side $side)
 {
     $currentside = $this->getCheckpointSide($location);
     $time = 0;
     if (isset($currentside)) {
         // Only change if side is different
         if (!$currentside->equals($side)) {
             $time = $this->getTimeSinceLastCheckpointSide($location);
             Dolumar_Underworld_Mappers_CheckpointMapper::set($this->getMission(), $location, $side);
             $this->onChangeCheckpointSide($location, $currentside, $side, $time);
         }
     } else {
         Dolumar_Underworld_Mappers_CheckpointMapper::set($this->getMission(), $location, $side);
         $this->onChangeCheckpointSide($location, null, $side, $time);
     }
 }