Changeset 237 for trunk/src/game

Show
Ignore:
Timestamp:
11/19/08 13:49:31 (17 years ago)
Author:
yumileroy
Message:

[svn] DynamicObject? should only be visible for caster if it is not in distance. However, I do not think this will fix the bug that dynamic object update freezes the server.

Original author: megamage
Date: 2008-11-15 11:56:59-06:00

Location:
trunk/src/game
Files:
2 modified

Legend:

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

    r233 r237  
    1111 * This program is distributed in the hope that it will be useful, 
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414 * GNU General Public License for more details. 
    1515 * 
    1616 * You should have received a copy of the GNU General Public License 
    1717 * along with this program; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1919 */ 
    2020 
     
    7171    } 
    7272 
    73     SetUInt32Value( OBJECT_FIELD_ENTRY, spellId ); 
     73    SetEntry(spellId); 
    7474    SetFloatValue( OBJECT_FIELD_SCALE_X, 1 ); 
    7575    SetUInt64Value( DYNAMICOBJECT_CASTER, caster->GetGUID() ); 
     
    154154bool DynamicObject::isVisibleForInState(Player const* u, bool inVisibleList) const 
    155155{ 
    156     return IsInWorld() && u->IsInWorld() /*&& IsWithinDistInMap(u,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f))*/; 
     156    return IsInWorld() && u->IsInWorld()  
     157        && (IsWithinDistInMap(u,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f)) 
     158        || GetCasterGUID() == u->GetGUID()); 
    157159} 
  • trunk/src/game/ObjectAccessor.cpp

    r233 r237  
    1111 * This program is distributed in the hope that it will be useful, 
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414 * GNU General Public License for more details. 
    1515 * 
    1616 * You should have received a copy of the GNU General Public License 
    1717 * along with this program; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1919 */ 
    2020 
     
    613613            (cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord) ) 
    614614            return true; 
    615  
    616615    } 
    617616