Changeset 186

Show
Ignore:
Timestamp:
02/02/07 01:38:16 (13 years ago)
Author:
exi
Message:

Last minute changes to kill_related.php, targets should now be added after destruction if they kill something with their new ship.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/kill_related.php

    r185 r186  
    144144        // dont set pods as ships for pilots we already have 
    145145        if (isset($pilots[$side][$row['ind_plt_id']])) 
    146         {continue; 
     146        { 
    147147            if ($shipc->getID() == 18 || $shipc->getID() == 2) 
    148148            { 
     
    155155        $alliance = new Alliance($row['ind_all_id']); 
    156156 
     157        // search for ships with the same id 
     158        if (isset($pilots[$side][$row['ind_plt_id']])) 
     159        { 
     160            foreach ($pilots[$side][$row['ind_plt_id']] as $id => $_ship) 
     161            { 
     162                if ($ship->getID() == $_ship['sid']) 
     163                { 
     164                    // we already got that pilot in this ship, continue 
     165                    continue 2; 
     166                } 
     167            } 
     168        } 
    157169        $pilots[$side][$row['ind_plt_id']][] = array('name' => $pilot->getName(), 'sid' => $ship->getID(), 
    158170               'spic' => $ship->getImage(32), 'aid' => $row['ind_all_id'], 'ts' => strtotime($kill->getTimeStamp()), 
     
    194206        foreach ($pilots[$side][$kill->getVictimId()] as $id => $_ship) 
    195207        { 
    196             if ($shipc->getID() == $_ship['sid']) 
     208            if ($ship->getID() == $_ship['sid']) 
    197209            { 
    198210                $pilots[$side][$kill->getVictimId()][$id]['destroyed'] = true;