Show
Ignore:
Timestamp:
11/21/08 08:48:50 (17 years ago)
Author:
yumileroy
Message:

*Fix the bug that updatepacket is not sent to players.
*TODO: move creature::update to map::update. This requires that move activeobjectlist to map.

Original author: megamage
Date: 2008-11-20 20:28:17-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Creature.cpp

    r265 r266  
    18231823} 
    18241824 
     1825Unit* Creature::SelectNearestTarget(float dist) const 
     1826{ 
     1827    /*CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY())); 
     1828    Cell cell(p); 
     1829    cell.data.Part.reserved = ALL_DISTRICT; 
     1830    cell.SetNoCreate(); 
     1831 
     1832    Unit *target; 
     1833 
     1834    { 
     1835        Trinity::NearestHostileUnitInAttackDistanceCheck u_check(this, dist); 
     1836        Trinity::UnitLastSearcher<Trinity::NearestHostileUnitInAttackDistanceCheck> searcher(target, u_check); 
     1837 
     1838        TypeContainerVisitor<Trinity::UnitLastSearcher<Trinity::NearestHostileUnitInAttackDistanceCheck>, WorldTypeMapContainer > world_unit_searcher(searcher); 
     1839        TypeContainerVisitor<Trinity::UnitLastSearcher<Trinity::NearestHostileUnitInAttackDistanceCheck>, GridTypeMapContainer >  grid_unit_searcher(searcher); 
     1840 
     1841        CellLock<GridReadGuard> cell_lock(cell, p); 
     1842        cell_lock->Visit(cell_lock, world_unit_searcher, GetMap()); 
     1843        cell_lock->Visit(cell_lock, grid_unit_searcher, GetMap()); 
     1844    }*/ 
     1845    return NULL; 
     1846} 
     1847 
    18251848void Creature::CallAssistence() 
    18261849{