RM_Instance_Void.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /************************************************************************************************
  2. *
  3. * RM_Instance_Void.cpp
  4. *
  5. * Implements the CRMVoidInstance class. This class just adds a void into the
  6. * area manager to help space things out.
  7. *
  8. ************************************************************************************************/
  9. #include "../server/exe_headers.h"
  10. #include "rm_headers.h"
  11. #include "rm_instance_void.h"
  12. /************************************************************************************************
  13. * CRMVoidInstance::CRMVoidInstance
  14. * constructs a void instance
  15. *
  16. * inputs:
  17. * instGroup: parser group containing infromation about this instance
  18. * instFile: reference to an open instance file for creating sub instances
  19. *
  20. * return:
  21. * none
  22. *
  23. ************************************************************************************************/
  24. CRMVoidInstance::CRMVoidInstance ( CGPGroup *instGroup, CRMInstanceFile& instFile )
  25. : CRMInstance ( instGroup, instFile )
  26. {
  27. mSpacingRadius = atof( instGroup->FindPairValue ( "spacing", "0" ) );
  28. mFlattenRadius = atof( instGroup->FindPairValue ( "flatten", "0" ) );
  29. }
  30. /************************************************************************************************
  31. * CRMVoidInstance::SetArea
  32. * Overidden to make sure the void area doesnt continually.
  33. *
  34. * inputs:
  35. * area: area to set
  36. *
  37. * return:
  38. * none
  39. *
  40. ************************************************************************************************/
  41. void CRMVoidInstance::SetArea ( CRMAreaManager* amanager, CRMArea* area )
  42. {
  43. // Disable collision
  44. area->EnableCollision ( false );
  45. // Do what really needs to get done
  46. CRMInstance::SetArea ( amanager, area );
  47. }