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

[svn] Improve TargetedMovement? (TODO: let mob find "near angle" rather than "random angle").
Delete a repeated check in instance canenter().
Fix some spell targets.
Add some sunwell spell sql.
Fix Magtheridons earthquake. (TODO: need to find out why soul transfer has no effect when casted by mobs)
Let Brutallus dual wield. Enable burn (still no script effect).
Quick fix for shadowmoon valley illidan quest crash (wait for author's fix).

Original author: megamage
Date: 2008-10-31 21:42:00-05:00

Files:
1 modified

Legend:

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

    r138 r141  
    15331533        UpdateGroundPositionZ(x,y,z); 
    15341534} 
    1535  
    1536 void WorldObject::GetRandomContactPoint( const WorldObject* obj, float &x, float &y, float &z, float distance2dMin, float distance2dMax ) const 
    1537 { 
    1538         float object_size = obj->GetObjectSize();//here we use object_size to determine the angle offset, the bigger object the smaller angle offset, then this makes mob move naturally in visual. 
    1539         //let assume 12.0f is the max size for object to have 0 angle offset. 
    1540         float angle_offset_ratio = 1 - object_size/12.0f; 
    1541         if (angle_offset_ratio < 0.05) angle_offset_ratio = 0.05; 
    1542         // angle to face `obj` to `this`plus a random angle offset(from -90 degree to 90 degree)*angle_offset_ratio using distance from distance2dMin to distance2dMax includes size of `obj` 
    1543         GetNearPoint(obj,x,y,z,object_size,distance2dMin+(distance2dMax-distance2dMin)*rand_norm(), GetAngle( obj ) + (M_PI/2 - M_PI * rand_norm()) * angle_offset_ratio); 
    1544 }