User Tools

Site Tools


dev:abstract_elements

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
dev:abstract_elements [2014/09/23 19:24] – [Create abstract class] tsmall1dev:abstract_elements [2014/09/23 19:35] (current) – [Create abstract class] tsmall1
Line 31: Line 31:
   MDist<R> md = MDist<R>::get();   MDist<R> md = MDist<R>::get();
   Dir d = (Dir)rand.Create(Dirs::DIR_COUNT);   Dir d = (Dir)rand.Create(Dirs::DIR_COUNT);
-  u32 maxWanderDist = Dirs::IsCorner(d) ? (R / 2) : R; 
-   
-  maxWanderDist = MAX(GetWanderDistance(), maxWanderDist); 
  
   Dirs::FillDir(wanderPt, d);   Dirs::FillDir(wanderPt, d);
  
-  wanderPt *= maxWanderDist;+  wanderPt *= Dirs::IsCorner(d) ? (GetWanderDistance() / 2) : GetWanderDistance();
  
-  if(window.GetRelativeAtom(wanderPt).GetType() == +  if(window.IsLiveSite(wanderPt))
-     Element_Empty<CC>::THE_INSTANCE.GetType())+
   {   {
-    window.SwapAtoms(wanderPt, SPoint(0, 0));+    if(window.GetRelativeAtom(wanderPt).GetType() == 
 +       Element_Empty<CC>::THE_INSTANCE.GetType()) 
 +       { 
 +         window.SwapAtoms(wanderPt, SPoint(0, 0)); 
 +       } 
 +    }
   }   }
 } }
dev/abstract_elements.1411500244.txt.gz · Last modified: 2014/09/23 19:24 by tsmall1