Skip to content

Commit

Permalink
Merge pull request #475 from hemberger/remove-references
Browse files Browse the repository at this point in the history
sector_move_processing.php: remove references
  • Loading branch information
hemberger authored Apr 30, 2018
2 parents 5967b9e + 2398373 commit 3908ca2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions engine/Default/sector_move_processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
if (in_array($player->getAccountID(), Globals::getHiddenPlayers())) {
//update plot
if ($player->hasPlottedCourse()) {
$path =& $player->getPlottedCourse();
$path = $player->getPlottedCourse();
if ($path->getNextOnPath() == $var['target_sector']) {
$path->followPath($sector->getWarp() == $var['target_sector']);
$player->setPlottedCourse($path);
Expand Down Expand Up @@ -53,15 +53,15 @@

// If you bump into mines in the sector you are trying to leave...
if ($player->getLastSectorID() != $var['target_sector']) {
$sectorForces =& $sector->getForces();
$sectorForces = $sector->getForces();
Sorter::sortByNumMethod($sectorForces,'getMines',true);
$mine_owner_id = false;
foreach($sectorForces as &$forces) {
foreach ($sectorForces as $forces) {
if(!$mine_owner_id && $forces->hasMines() && !$player->forceNAPAlliance($forces->getOwner())) {
$mine_owner_id = $forces->getOwnerID();
break;
}
} unset($forces);
}
// set last sector
$player->setLastSectorID($var['target_sector']);

Expand All @@ -84,7 +84,7 @@

// check if this came from a plotted course from db
if ($player->hasPlottedCourse()) {
$path =& $player->getPlottedCourse();
$path = $player->getPlottedCourse();
if ($path->getNextOnPath() == $var['target_sector']) {
$path->followPath($sector->getWarp() == $var['target_sector']);
$player->setPlottedCourse($path);
Expand All @@ -96,8 +96,8 @@
}

// log action
$targetSector =& SmrSector::getSector($player->getGameID(), $var['target_sector']);
$player->actionTaken('WalkSector', array('Sector' => &$targetSector));
$targetSector = SmrSector::getSector($player->getGameID(), $var['target_sector']);
$player->actionTaken('WalkSector', array('Sector' => $targetSector));

// send scout msg
$sector->leavingSector($player,MOVEMENT_WALK);
Expand Down Expand Up @@ -129,15 +129,15 @@
// send scout msgs
$sector->enteringSector($player,MOVEMENT_WALK);

$sectorForces =& $sector->getForces();
$sectorForces = $sector->getForces();
$mine_owner_id = false;
Sorter::sortByNumMethod($sectorForces,'getMines',true);
foreach($sectorForces as &$forces) {
foreach ($sectorForces as $forces) {
if(!$mine_owner_id && $forces->hasMines() && !$player->forceNAPAlliance($forces->getOwner())) {
$mine_owner_id = $forces->getOwnerID();
break;
}
} unset($forces);
}

// If you bump into mines while entering the target sector...
if ($mine_owner_id) {
Expand Down

0 comments on commit 3908ca2

Please sign in to comment.