Commits

Anonymous committed cf2e053

Occasionally frontier SIGFPEs from trying to calculate 0 % 0. Not entirely sure why (it looks like Build is being called on CGrass that hasn't had Set() called on it yet), but it's easy enough to work around: just ignore the Build call.

Comments (0)

Files changed (1)

Terrain/CGrass.cpp

   int       world_x, world_y;
   bool      do_grass;
 
+  if (_walk.x == 0 && _walk.y == 0 && _current_distance == 0)
+    return;
+
   world_x = _origin.x + _walk.x;
   world_y = _origin.y + _walk.y;
   do_grass = CacheSurface (world_x, world_y) == SURFACE_GRASS;