Ignore:
Timestamp:
2013-07-23 19:11:27 (6 years ago)
Author:
dezhidki
Message:

Puut lisätty, woodcutter toimii.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Ai/Orders/OrderMove.cs

    r4581 r4590  
    1313        private float x, z; 
    1414        private int ppi = 0; 
     15        private bool excludeEndSolidness; 
     16        private float stopDistance; 
    1517 
    16         public OrderMove(float x, float z) 
     18        public OrderMove(float x, float z, float stopDistance = 2.0F, bool excludeEndSolidness = false) 
    1719        { 
     20            this.stopDistance = stopDistance; 
     21            this.excludeEndSolidness = excludeEndSolidness; 
    1822            this.x = x; 
    1923            this.z = z; 
     
    2327        { 
    2428            base.Initialize(mob); 
    25             mob.PathFinder.InitializePathFinder((int)(mob.X / Viewport.TILESIZE), (int)(mob.Z / Viewport.TILESIZE), (int)(x / Viewport.TILESIZE), (int)(z / Viewport.TILESIZE)); 
     29            mob.PathFinder.InitializePathFinder((int)(mob.X / Viewport.TILESIZE), (int)(mob.Z / Viewport.TILESIZE), (int)(x / Viewport.TILESIZE), (int)(z / Viewport.TILESIZE), excludeEndSolidness); 
    2630            return this; 
    2731        } 
     
    6266            get 
    6367            { 
    64                 return (mob.DistanceTo(x, z) < 2.0F) || !mob.PathFinder.CanFindPath; 
     68                return (mob.DistanceTo(x, z) < stopDistance) || !mob.PathFinder.CanFindPath; 
    6569            } 
    6670        } 
Note: See TracChangeset for help on using the changeset viewer.