Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
3.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. // nav_edit.cpp
  9. // Implementation of Navigation Mesh edit mode
  10. // Author: Michael Booth, 2003-2004
  11. #include "cbase.h"
  12. #include "nav_mesh.h"
  13. #include "cs_nav_pathfind.h"
  14. #include "cs_nav_node.h"
  15. #include "nav_colors.h"
  16. #include "Color.h"
  17. #include "tier0/vprof.h"
  18. #include "collisionutils.h"
  19. ConVar nav_show_area_info( "nav_show_area_info", "0.5", FCVAR_GAMEDLL, "Duration in seconds to show nav area ID and attributes while editing" );
  20. ConVar nav_snap_to_grid( "nav_snap_to_grid", "0", FCVAR_GAMEDLL, "Snap to the nav generation grid when creating new nav areas" );
  21. ConVar nav_create_place_on_ground( "nav_create_place_on_ground", "0", FCVAR_GAMEDLL, "If true, nav areas will be placed flush with the ground when created by hand." );
  22. #if DEBUG_NAV_NODES
  23. extern ConVar nav_show_nodes;
  24. #endif // DEBUG_NAV_NODES
  25. //--------------------------------------------------------------------------------------------------------------
  26. void EditNav_Precache(void *pUser)
  27. {
  28. CBaseEntity::PrecacheScriptSound( "Bot.EditSwitchOn" );
  29. CBaseEntity::PrecacheScriptSound( "EDIT_TOGGLE_PLACE_MODE" );
  30. CBaseEntity::PrecacheScriptSound( "Bot.EditSwitchOff" );
  31. CBaseEntity::PrecacheScriptSound( "EDIT_PLACE_PICK" );
  32. CBaseEntity::PrecacheScriptSound( "EDIT_DELETE" );
  33. CBaseEntity::PrecacheScriptSound( "EDIT.ToggleAttribute" );
  34. CBaseEntity::PrecacheScriptSound( "EDIT_SPLIT.MarkedArea" );
  35. CBaseEntity::PrecacheScriptSound( "EDIT_SPLIT.NoMarkedArea" );
  36. CBaseEntity::PrecacheScriptSound( "EDIT_MERGE.Enable" );
  37. CBaseEntity::PrecacheScriptSound( "EDIT_MERGE.Disable" );
  38. CBaseEntity::PrecacheScriptSound( "EDIT_MARK.Enable" );
  39. CBaseEntity::PrecacheScriptSound( "EDIT_MARK.Disable" );
  40. CBaseEntity::PrecacheScriptSound( "EDIT_MARK_UNNAMED.Enable" );
  41. CBaseEntity::PrecacheScriptSound( "EDIT_MARK_UNNAMED.NoMarkedArea" );
  42. CBaseEntity::PrecacheScriptSound( "EDIT_MARK_UNNAMED.MarkedArea" );
  43. CBaseEntity::PrecacheScriptSound( "EDIT_CONNECT.AllDirections" );
  44. CBaseEntity::PrecacheScriptSound( "EDIT_CONNECT.Added" );
  45. CBaseEntity::PrecacheScriptSound( "EDIT_DISCONNECT.MarkedArea" );
  46. CBaseEntity::PrecacheScriptSound( "EDIT_DISCONNECT.NoMarkedArea" );
  47. CBaseEntity::PrecacheScriptSound( "EDIT_SPLICE.MarkedArea" );
  48. CBaseEntity::PrecacheScriptSound( "EDIT_SPLICE.NoMarkedArea" );
  49. CBaseEntity::PrecacheScriptSound( "EDIT_SELECT_CORNER.MarkedArea" );
  50. CBaseEntity::PrecacheScriptSound( "EDIT_SELECT_CORNER.NoMarkedArea" );
  51. CBaseEntity::PrecacheScriptSound( "EDIT_MOVE_CORNER.MarkedArea" );
  52. CBaseEntity::PrecacheScriptSound( "EDIT_MOVE_CORNER.NoMarkedArea" );
  53. CBaseEntity::PrecacheScriptSound( "EDIT_BEGIN_AREA.Creating" );
  54. CBaseEntity::PrecacheScriptSound( "EDIT_BEGIN_AREA.NotCreating" );
  55. CBaseEntity::PrecacheScriptSound( "EDIT_END_AREA.Creating" );
  56. CBaseEntity::PrecacheScriptSound( "EDIT_END_AREA.NotCreating" );
  57. CBaseEntity::PrecacheScriptSound( "EDIT_WARP_TO_MARK" );
  58. }
  59. #ifdef CSTRIKE_DLL
  60. PRECACHE_REGISTER_FN( EditNav_Precache );
  61. #endif