Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sector_move_processing.php: remove references #475

Merged
merged 1 commit into from
Apr 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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