Advertisement
Guest User

Untitled

a guest
Nov 7th, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. BEFORE:
  2.  
  3. void Client::removeNode(v3s16 p)
  4. {
  5. std::map<v3s16, MapBlock*> modified_blocks;
  6.  
  7. try
  8. {
  9. m_env.getMap().removeNodeAndUpdate(p, modified_blocks);
  10. }
  11. catch(InvalidPositionException &e)
  12. {
  13. }
  14.  
  15. // add urgent task to update the modified node
  16. addUpdateMeshTaskForNode(p, false, true);
  17.  
  18. for(std::map<v3s16, MapBlock * >::iterator
  19. i = modified_blocks.begin();
  20. i != modified_blocks.end(); ++i)
  21. {
  22. addUpdateMeshTaskWithEdge(i->first);
  23. }
  24. }
  25.  
  26. AFTER:
  27.  
  28. void Client::removeNode(v3s16 p)
  29. {
  30. std::map<v3s16, MapBlock*> modified_blocks;
  31.  
  32. try
  33. {
  34. m_env.getMap().removeNodeAndUpdate(p, modified_blocks);
  35. }
  36. catch(InvalidPositionException &e)
  37. {
  38. }
  39.  
  40. for(std::map<v3s16, MapBlock * >::iterator
  41. i = modified_blocks.begin();
  42. i != modified_blocks.end(); ++i)
  43. {
  44. addUpdateMeshTask(i->first, false, false);
  45. }
  46. // add urgent task to update the modified node
  47. addUpdateMeshTaskForNode(p, false, true);
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement