CoverSpotNode.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : LevelEdit *
  23. * *
  24. * $Archive:: /Commando/Code/Tools/LevelEdit/CoverSpotNode.cpp $*
  25. * *
  26. * Author:: Patrick Smith *
  27. * *
  28. * $Modtime:: 9/13/01 9:44a $*
  29. * *
  30. * $Revision:: 15 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #include "stdafx.h"
  36. #include "coverspotnode.h"
  37. #include "coverattackpointnode.h"
  38. #include "sceneeditor.h"
  39. #include "collisiongroups.h"
  40. #include "persistfactory.h"
  41. #include "editorchunkids.h"
  42. #include "preset.h"
  43. #include "chunkio.h"
  44. #include "nodemgr.h"
  45. #include "coverspotinfopage.h"
  46. #include "nodeinfopage.h"
  47. #include "positionpage.h"
  48. #include "editorpropsheet.h"
  49. #include "cover.h"
  50. #include "modelutils.h"
  51. #include "soldier.h"
  52. #include "presetmgr.h"
  53. //////////////////////////////////////////////////////////////////////////////
  54. // Persist factory
  55. //////////////////////////////////////////////////////////////////////////////
  56. SimplePersistFactoryClass<CoverSpotNodeClass, CHUNKID_NODE_COVER_SPOT> _CoverSpotNodePersistFactory;
  57. //////////////////////////////////////////////////////////////////////////////
  58. // Save/load constants
  59. //////////////////////////////////////////////////////////////////////////////
  60. enum
  61. {
  62. CHUNKID_VARIABLES = 0x05260946,
  63. CHUNKID_BASE_CLASS
  64. };
  65. enum
  66. {
  67. VARID_REQUIRES_CROUCH = 0x01,
  68. VARID_ATTACK_POINT,
  69. };
  70. //////////////////////////////////////////////////////////////////////////////
  71. // Constants
  72. //////////////////////////////////////////////////////////////////////////////
  73. static const Vector3 LINE_OFFSET (0, 0, 0.2F);
  74. //////////////////////////////////////////////////////////////////////////////
  75. // Static member initialization
  76. //////////////////////////////////////////////////////////////////////////////
  77. PhysClass * CoverSpotNodeClass::_TheCollisionObj = NULL;
  78. int CoverSpotNodeClass::_InstanceCount = 0;
  79. //////////////////////////////////////////////////////////////////////////////
  80. //
  81. // CoverSpotNodeClass
  82. //
  83. //////////////////////////////////////////////////////////////////////////////
  84. CoverSpotNodeClass::CoverSpotNodeClass (PresetClass *preset)
  85. : m_PhysObj (NULL),
  86. m_RequiresCrouch (false),
  87. m_GameCoverSpot (NULL),
  88. NodeClass (preset)
  89. {
  90. _InstanceCount ++;
  91. return ;
  92. }
  93. //////////////////////////////////////////////////////////////////////////////
  94. //
  95. // CoverSpotNodeClass
  96. //
  97. //////////////////////////////////////////////////////////////////////////////
  98. CoverSpotNodeClass::CoverSpotNodeClass (const CoverSpotNodeClass &src)
  99. : m_PhysObj (NULL),
  100. m_RequiresCrouch (false),
  101. m_GameCoverSpot (NULL),
  102. NodeClass (NULL)
  103. {
  104. _InstanceCount ++;
  105. *this = src;
  106. return ;
  107. }
  108. //////////////////////////////////////////////////////////////////////////////
  109. //
  110. // ~CoverSpotNodeClass
  111. //
  112. //////////////////////////////////////////////////////////////////////////////
  113. CoverSpotNodeClass::~CoverSpotNodeClass (void)
  114. {
  115. Free_Attack_Points ();
  116. Remove_From_Scene ();
  117. MEMBER_RELEASE (m_PhysObj);
  118. //
  119. // Free the collision object when all instances have gone away
  120. //
  121. _InstanceCount --;
  122. if (_InstanceCount == 0) {
  123. MEMBER_RELEASE (_TheCollisionObj);
  124. }
  125. return ;
  126. }
  127. //////////////////////////////////////////////////////////////////////////////
  128. //
  129. // Initialize
  130. //
  131. // Note: This may be called more than once. It is used as an 'initialize'
  132. // and a 're-initialize'.
  133. //
  134. //////////////////////////////////////////////////////////////////////////////
  135. void
  136. CoverSpotNodeClass::Initialize (void)
  137. {
  138. MEMBER_RELEASE (m_PhysObj);
  139. //
  140. // Create the camera render object
  141. //
  142. RenderObjClass *render_obj = ::Create_Render_Obj ("COVERSPOT");
  143. WWASSERT (render_obj != NULL);
  144. if (render_obj != NULL) {
  145. // Create the new physics object
  146. m_PhysObj = new DecorationPhysClass;
  147. //
  148. // Configure the physics object with information about
  149. // its new render object and collision data.
  150. //
  151. m_PhysObj->Set_Model (render_obj);
  152. m_PhysObj->Set_Transform (Matrix3D(1));
  153. m_PhysObj->Set_Collision_Group (EDITOR_COLLISION_GROUP);
  154. m_PhysObj->Peek_Model ()->Set_User_Data ((PVOID)&m_HitTestInfo, FALSE);
  155. m_PhysObj->Set_Transform (m_Transform);
  156. ::Set_Model_Collision_Type (m_PhysObj->Peek_Model (), COLLISION_TYPE_0);
  157. // Release our hold on the render object pointer
  158. MEMBER_RELEASE (render_obj);
  159. }
  160. if (_TheCollisionObj == NULL) {
  161. //
  162. // Create the collision physics object
  163. //
  164. PresetClass *preset = PresetMgrClass::Find_Preset ("Walk-Thru");
  165. if (preset != NULL && preset->Get_Definition () != NULL) {
  166. //
  167. // Load the assets for this preset and get its definition
  168. //
  169. preset->Load_All_Assets ();
  170. SoldierGameObjDef *definition = (SoldierGameObjDef *)preset->Get_Definition ();
  171. //
  172. // Create the collision physics object
  173. //
  174. SoldierGameObj *game_obj = new SoldierGameObj;
  175. game_obj->Init (*definition);
  176. MEMBER_ADD (_TheCollisionObj, game_obj->Peek_Physical_Object ());
  177. game_obj->Set_Delete_Pending ();
  178. }
  179. }
  180. return ;
  181. }
  182. ////////////////////////////////////////////////////////////////
  183. //
  184. // Get_Factory
  185. //
  186. ////////////////////////////////////////////////////////////////
  187. const PersistFactoryClass &
  188. CoverSpotNodeClass::Get_Factory (void) const
  189. {
  190. return _CoverSpotNodePersistFactory;
  191. }
  192. /////////////////////////////////////////////////////////////////
  193. //
  194. // Save
  195. //
  196. /////////////////////////////////////////////////////////////////
  197. bool
  198. CoverSpotNodeClass::Save (ChunkSaveClass &csave)
  199. {
  200. csave.Begin_Chunk (CHUNKID_BASE_CLASS);
  201. NodeClass::Save (csave);
  202. csave.End_Chunk ();
  203. csave.Begin_Chunk (CHUNKID_VARIABLES);
  204. WRITE_MICRO_CHUNK (csave, VARID_REQUIRES_CROUCH, m_RequiresCrouch);
  205. //
  206. // Save the list of cover point attack positions
  207. //
  208. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  209. CoverAttackPointNodeClass *attack_point = m_AttackPointNodes[index];
  210. if (attack_point != NULL) {
  211. Matrix3D tm = attack_point->Get_Transform ();
  212. WRITE_MICRO_CHUNK (csave, VARID_ATTACK_POINT, tm);
  213. }
  214. }
  215. csave.End_Chunk ();
  216. return true;
  217. }
  218. /////////////////////////////////////////////////////////////////
  219. //
  220. // Load
  221. //
  222. /////////////////////////////////////////////////////////////////
  223. bool
  224. CoverSpotNodeClass::Load (ChunkLoadClass &cload)
  225. {
  226. while (cload.Open_Chunk ()) {
  227. switch (cload.Cur_Chunk_ID ()) {
  228. case CHUNKID_BASE_CLASS:
  229. NodeClass::Load (cload);
  230. break;
  231. case CHUNKID_VARIABLES:
  232. Load_Variables (cload);
  233. break;
  234. }
  235. cload.Close_Chunk ();
  236. }
  237. SaveLoadSystemClass::Register_Post_Load_Callback (this);
  238. return true;
  239. }
  240. ///////////////////////////////////////////////////////////////////////
  241. //
  242. // Load_Variables
  243. //
  244. ///////////////////////////////////////////////////////////////////////
  245. bool
  246. CoverSpotNodeClass::Load_Variables (ChunkLoadClass &cload)
  247. {
  248. //
  249. // Loop through all the microchunks that define the variables
  250. //
  251. while (cload.Open_Micro_Chunk ()) {
  252. switch (cload.Cur_Micro_Chunk_ID ()) {
  253. READ_MICRO_CHUNK (cload, VARID_REQUIRES_CROUCH, m_RequiresCrouch);
  254. case VARID_ATTACK_POINT:
  255. {
  256. //
  257. // Read the attack points transfrom from the chunk
  258. //
  259. Matrix3D tm;
  260. cload.Read (&tm, sizeof (tm));
  261. m_AttackPointLoadList.Add (tm);
  262. }
  263. break;
  264. }
  265. cload.Close_Micro_Chunk ();
  266. }
  267. return true;
  268. }
  269. ///////////////////////////////////////////////////////////////////////
  270. //
  271. // On_Post_Load
  272. //
  273. ///////////////////////////////////////////////////////////////////////
  274. void
  275. CoverSpotNodeClass::On_Post_Load (void)
  276. {
  277. //
  278. // If the spawner isn't valid, then remove it from the system
  279. //
  280. if (m_Preset == NULL) {
  281. ::Get_Scene_Editor ()->Delete_Node (this, false);
  282. } else {
  283. //
  284. // Add each attack point at the given locations
  285. //
  286. for (int index = 0; index < m_AttackPointLoadList.Count (); index ++) {
  287. Add_Attack_Point (m_AttackPointLoadList[index]);
  288. }
  289. //
  290. // Reset the list
  291. //
  292. m_AttackPointLoadList.Delete_All ();
  293. }
  294. return ;
  295. }
  296. /////////////////////////////////////////////////////////////////
  297. //
  298. // operator=
  299. //
  300. /////////////////////////////////////////////////////////////////
  301. const CoverSpotNodeClass &
  302. CoverSpotNodeClass::operator= (const CoverSpotNodeClass &src)
  303. {
  304. //
  305. // Copy the attach point list
  306. //
  307. Free_Attack_Points ();
  308. for (int index = 0; index < src.m_AttackPointNodes.Count (); index ++) {
  309. CoverAttackPointNodeClass *attack_point = src.m_AttackPointNodes[index];
  310. if (attack_point != NULL) {
  311. Add_Attack_Point (attack_point->Get_Transform ());
  312. }
  313. }
  314. m_RequiresCrouch = src.m_RequiresCrouch;
  315. NodeClass::operator= (src);
  316. return *this;
  317. }
  318. //////////////////////////////////////////////////////////////////////
  319. //
  320. // Pre_Export
  321. //
  322. //////////////////////////////////////////////////////////////////////
  323. void
  324. CoverSpotNodeClass::Pre_Export (void)
  325. {
  326. //
  327. // Remove ourselves from the 'system' so we don't get accidentally
  328. // saved during the export.
  329. //
  330. Add_Ref ();
  331. if (m_PhysObj != NULL && m_IsInScene) {
  332. ::Get_Scene_Editor ()->Remove_Object (m_PhysObj);
  333. //
  334. // Build a cover spot entry that we can pass off the game
  335. // so it will get exported
  336. //
  337. MEMBER_RELEASE (m_GameCoverSpot);
  338. m_GameCoverSpot = new CoverEntryClass;
  339. m_GameCoverSpot->Set_Transform (Get_Transform ());
  340. m_GameCoverSpot->Set_Crouch (m_RequiresCrouch);
  341. AttackPositionListType *attack_list = m_GameCoverSpot->Get_Attack_Position_List ();
  342. //
  343. // Remove the unnecessary UI elements from the scene
  344. //
  345. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  346. CoverAttackPointNodeClass *attack_point = m_AttackPointNodes[index];
  347. EditorLineClass *line = m_AttackPointLines[index];
  348. ::Get_Scene_Editor ()->Remove_Object (line);
  349. attack_list->Add (attack_point->Get_Position ());
  350. }
  351. //
  352. // Add this cover spot to the game
  353. //
  354. CoverManager::Add_Entry (m_GameCoverSpot);
  355. }
  356. return ;
  357. }
  358. //////////////////////////////////////////////////////////////////////
  359. //
  360. // Post_Export
  361. //
  362. //////////////////////////////////////////////////////////////////////
  363. void
  364. CoverSpotNodeClass::Post_Export (void)
  365. {
  366. //
  367. // Put ourselves back into the system
  368. //
  369. if (m_PhysObj != NULL && m_IsInScene) {
  370. ::Get_Scene_Editor ()->Add_Dynamic_Object (m_PhysObj);
  371. //
  372. // Pass the Post_Export call onto any attack points as well
  373. //
  374. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  375. CoverAttackPointNodeClass *attack_point = m_AttackPointNodes[index];
  376. EditorLineClass *line = m_AttackPointLines[index];
  377. ::Get_Scene_Editor ()->Add_Dynamic_Object (line);
  378. }
  379. //
  380. // Remove the cover spot from the game
  381. //
  382. CoverManager::Remove_Entry (m_GameCoverSpot);
  383. MEMBER_RELEASE (m_GameCoverSpot);
  384. }
  385. Release_Ref ();
  386. return ;
  387. }
  388. //////////////////////////////////////////////////////////////////////
  389. //
  390. // Add_Attack_Point
  391. //
  392. //////////////////////////////////////////////////////////////////////
  393. CoverAttackPointNodeClass *
  394. CoverSpotNodeClass::Add_Attack_Point (const Matrix3D &tm)
  395. {
  396. //
  397. // Create and add the new point
  398. //
  399. CoverAttackPointNodeClass *attack_point = new CoverAttackPointNodeClass;
  400. attack_point->Initialize ();
  401. attack_point->Set_Transform (tm);
  402. attack_point->Set_Cover_Spot (this);
  403. NodeMgrClass::Setup_Node_Identity (*attack_point);
  404. m_AttackPointNodes.Add (attack_point);
  405. //
  406. // Create and add the line from the coverspot to the attack point
  407. //
  408. EditorLineClass *line = new EditorLineClass;
  409. line->Reset (m_Transform.Get_Translation () + LINE_OFFSET, tm.Get_Translation () + LINE_OFFSET);
  410. m_AttackPointLines.Add (line);
  411. if (m_IsInScene) {
  412. attack_point->Add_To_Scene ();
  413. ::Get_Scene_Editor ()->Add_Dynamic_Object (line);
  414. }
  415. return attack_point;
  416. }
  417. //////////////////////////////////////////////////////////////////////
  418. //
  419. // Remove_Attack_Point
  420. //
  421. //////////////////////////////////////////////////////////////////////
  422. void
  423. CoverSpotNodeClass::Remove_Attack_Point (CoverAttackPointNodeClass *attack_point)
  424. {
  425. //
  426. // Try to find the attack point
  427. //
  428. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  429. if (attack_point == m_AttackPointNodes[index]) {
  430. //
  431. // Free the attack point
  432. //
  433. MEMBER_RELEASE (attack_point);
  434. m_AttackPointNodes.Delete (index);
  435. //
  436. // Remove and free the line to the attack point
  437. //
  438. ::Get_Scene_Editor ()->Remove_Object (m_AttackPointLines[index]);
  439. m_AttackPointLines[index]->Release_Ref ();
  440. m_AttackPointLines.Delete (index);
  441. break;
  442. }
  443. }
  444. return ;
  445. }
  446. //////////////////////////////////////////////////////////////////////
  447. //
  448. // Free_Attack_Points
  449. //
  450. //////////////////////////////////////////////////////////////////////
  451. void
  452. CoverSpotNodeClass::Free_Attack_Points (void)
  453. {
  454. SceneEditorClass *scene = ::Get_Scene_Editor ();
  455. //
  456. // Release our hold on each attack point
  457. //
  458. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  459. CoverAttackPointNodeClass *attack_point = m_AttackPointNodes[index];
  460. EditorLineClass *line = m_AttackPointLines[index];
  461. scene->Remove_Object (line);
  462. attack_point->Remove_From_Scene ();
  463. MEMBER_RELEASE (attack_point);
  464. MEMBER_RELEASE (line);
  465. }
  466. //
  467. // Remove all the attack points from the list
  468. //
  469. m_AttackPointNodes.Delete_All ();
  470. m_AttackPointLines.Delete_All ();
  471. return ;
  472. }
  473. /////////////////////////////////////////////////////////////////
  474. //
  475. // Show_Settings_Dialog
  476. //
  477. /////////////////////////////////////////////////////////////////
  478. bool
  479. CoverSpotNodeClass::Show_Settings_Dialog (void)
  480. {
  481. NodeInfoPageClass info_tab (this);
  482. PositionPageClass pos_tab (this);
  483. CoverSpotInfoPageClass cover_info_tab (this);
  484. EditorPropSheetClass prop_sheet;
  485. prop_sheet.Add_Page (&info_tab);
  486. prop_sheet.Add_Page (&pos_tab);
  487. prop_sheet.Add_Page (&cover_info_tab);
  488. // Show the property sheet
  489. UINT ret_code = prop_sheet.DoModal ();
  490. // Return true if the user clicked OK
  491. return (ret_code == IDOK);
  492. }
  493. //////////////////////////////////////////////////////////////////////////////
  494. //
  495. // Add_To_Scene
  496. //
  497. //////////////////////////////////////////////////////////////////////////////
  498. void
  499. CoverSpotNodeClass::Add_To_Scene (void)
  500. {
  501. SceneEditorClass *scene = ::Get_Scene_Editor ();
  502. //
  503. // Add all the waypoints to the scene
  504. //
  505. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  506. CoverAttackPointNodeClass *attack_point = m_AttackPointNodes[index];
  507. EditorLineClass *line = m_AttackPointLines[index];
  508. attack_point->Add_To_Scene ();
  509. scene->Add_Dynamic_Object (line);
  510. }
  511. NodeClass::Add_To_Scene ();
  512. return ;
  513. }
  514. //////////////////////////////////////////////////////////////////////////////
  515. //
  516. // Remove_From_Scene
  517. //
  518. //////////////////////////////////////////////////////////////////////////////
  519. void
  520. CoverSpotNodeClass::Remove_From_Scene (void)
  521. {
  522. SceneEditorClass *scene = ::Get_Scene_Editor ();
  523. if (scene != NULL && m_IsInScene) {
  524. //
  525. // Remove all the waypoints from the scene
  526. //
  527. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  528. CoverAttackPointNodeClass *attack_point = m_AttackPointNodes[index];
  529. EditorLineClass *line = m_AttackPointLines[index];
  530. attack_point->Remove_From_Scene ();
  531. scene->Remove_Object (line);
  532. }
  533. }
  534. NodeClass::Remove_From_Scene ();
  535. return ;
  536. }
  537. //////////////////////////////////////////////////////////////////////////////
  538. //
  539. // Update_Lines
  540. //
  541. //////////////////////////////////////////////////////////////////////////////
  542. void
  543. CoverSpotNodeClass::Update_Lines (void)
  544. {
  545. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  546. CoverAttackPointNodeClass *attack_point = m_AttackPointNodes[index];
  547. EditorLineClass *line = m_AttackPointLines[index];
  548. line->Reset (Get_Transform ().Get_Translation () + LINE_OFFSET,
  549. attack_point->Get_Position () + LINE_OFFSET);
  550. }
  551. return ;
  552. }
  553. //////////////////////////////////////////////////////////////////////
  554. //
  555. // Peek_Collision_Obj
  556. //
  557. //////////////////////////////////////////////////////////////////////
  558. PhysClass *
  559. CoverSpotNodeClass::Peek_Collision_Obj (void) const
  560. {
  561. if (_TheCollisionObj != NULL) {
  562. _TheCollisionObj->Set_Transform (m_Transform);
  563. }
  564. return _TheCollisionObj;
  565. }
  566. //////////////////////////////////////////////////////////////////////////////
  567. //
  568. // Hide
  569. //
  570. //////////////////////////////////////////////////////////////////////////////
  571. void
  572. CoverSpotNodeClass::Hide (bool hide)
  573. {
  574. //
  575. // Apply the same operation to all the attack points and lines
  576. //
  577. for (int index = 0; index < m_AttackPointNodes.Count (); index ++) {
  578. CoverAttackPointNodeClass *attack_point = m_AttackPointNodes[index];
  579. EditorLineClass *line = m_AttackPointLines[index];
  580. attack_point->Hide (hide);
  581. line->Hide (hide);
  582. }
  583. NodeClass::Hide (hide);
  584. return ;
  585. }
  586. //////////////////////////////////////////////////////////////////////////////
  587. //
  588. // Add_Child_Node
  589. //
  590. //////////////////////////////////////////////////////////////////////////////
  591. NodeClass *
  592. CoverSpotNodeClass::Add_Child_Node (const Matrix3D &tm)
  593. {
  594. return Add_Attack_Point (tm);
  595. }
  596. //////////////////////////////////////////////////////////////////////////////
  597. //
  598. // Get_Sub_Node
  599. //
  600. //////////////////////////////////////////////////////////////////////////////
  601. NodeClass *
  602. CoverSpotNodeClass::Get_Sub_Node (int index)
  603. {
  604. return m_AttackPointNodes[index];
  605. }