movephys.cpp 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  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 : WWPhys *
  23. * *
  24. * $Archive:: /Commando/Code/wwphys/movephys.cpp $*
  25. * *
  26. * Author:: Greg Hjelstrom *
  27. * *
  28. * $Modtime:: 11/24/01 5:40p $*
  29. * *
  30. * $Revision:: 47 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * MoveablePhysClass::MoveablePhysClass -- Constructor *
  35. * MoveablePhysClass::~MoveablePhysClass -- Destructor *
  36. * MoveablePhysClass::Post_Timestep_Process -- perform post-timestep processing *
  37. * MoveablePhysClass::Update_Shadow -- Update the shadow for this object *
  38. * MoveablePhysClass::Allocate_Shadow -- ensure that a shadow object is allocated *
  39. * MoveablePhysClass::Release_Shadow -- release the shadow object *
  40. * MoveablePhysClass::Get_Shadow_Blob_Box -- Return the object space AABox for the shadow *
  41. * MoveablePhysClass::Link_To_Carrier -- Link this object to a carrier object *
  42. * MoveablePhysClass::Peek_Carrier_Sub_Object -- returns the carrier sub object pointer *
  43. * MoveablePhysClass::Save -- persistant object save support *
  44. * MoveablePhysClass::Load -- persistant object load support *
  45. * MoveablePhysClass::On_Post_Load -- Post-Load callback for MoveablePhysClass *
  46. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  47. #if defined(_MSC_VER)
  48. #pragma once
  49. #endif
  50. #include "movephys.h"
  51. #include "colmathaabox.h"
  52. #include "pscene.h"
  53. #include "dyntexproject.h"
  54. #include "chunkio.h"
  55. #include "saveload.h"
  56. #include "wwhack.h"
  57. #include "assetmgr.h"
  58. #include "physcoltest.h"
  59. #include "light.h"
  60. DECLARE_FORCE_LINK(movephys);
  61. #define SINGLE_SHADOW_CODE 1
  62. #define TRUE_PERSPECTIVE_SHADOWS 0
  63. /***********************************************************************************************
  64. **
  65. ** MoveablePhysClass Implementation
  66. **
  67. ***********************************************************************************************/
  68. /*
  69. ** Chunk ID's used by MoveablePhysClass
  70. */
  71. enum
  72. {
  73. MOVEABLE_CHUNK_PHYS = 0x00803000, // obsolete parent class
  74. MOVEABLE_CHUNK_VARIABLES,
  75. MOVEABLE_CHUNK_DYNAMICPHYS, // current parent class
  76. MOVEABLE_VARIABLE_MASS = 0x00,
  77. MOVEABLE_VARIABLE_GRAVSCALE,
  78. MOVEABLE_VARIABLE_ELASTICITY,
  79. MOVEABLE_VARIABLE_CONTROLLER,
  80. MOVEABLE_VARIABLE_CARRIER,
  81. };
  82. /***********************************************************************************************
  83. * MoveablePhysClass::MoveablePhysClass -- Constructor *
  84. * *
  85. * INPUT: *
  86. * *
  87. * OUTPUT: *
  88. * *
  89. * WARNINGS: *
  90. * *
  91. * HISTORY: *
  92. *=============================================================================================*/
  93. MoveablePhysClass::MoveablePhysClass(void) :
  94. Mass(1.0f),
  95. MassInv(1.0f),
  96. GravScale(1.0f),
  97. Elasticity(0.5f),
  98. Controller(NULL),
  99. Carrier(NULL),
  100. CarrierSubObject(NULL),
  101. ShadowManager(*this)
  102. {
  103. }
  104. /***********************************************************************************************
  105. * MoveablePhysClass::~MoveablePhysClass -- Destructor *
  106. * *
  107. * INPUT: *
  108. * *
  109. * OUTPUT: *
  110. * *
  111. * WARNINGS: *
  112. * *
  113. * HISTORY: *
  114. * 12/21/99 gth : Created. *
  115. *=============================================================================================*/
  116. MoveablePhysClass::~MoveablePhysClass(void)
  117. {
  118. Link_To_Carrier(NULL);
  119. }
  120. /***********************************************************************************************
  121. * MoveablePhysClass::Init -- inits from a MoveablePhysDefClass *
  122. * *
  123. * INPUT: *
  124. * *
  125. * OUTPUT: *
  126. * *
  127. * WARNINGS: *
  128. * *
  129. * HISTORY: *
  130. *=============================================================================================*/
  131. void MoveablePhysClass::Init(const MoveablePhysDefClass & def)
  132. {
  133. Mass = def.Mass;
  134. MassInv = 1.0f / Mass;
  135. GravScale = def.GravScale;
  136. Elasticity = def.Elasticity;
  137. DynamicPhysClass::Init(def);
  138. }
  139. /***********************************************************************************************
  140. * MoveablePhysClass::Definition_Changed -- recopy an cached constants from our def *
  141. * *
  142. * INPUT: *
  143. * *
  144. * OUTPUT: *
  145. * *
  146. * WARNINGS: *
  147. * *
  148. * HISTORY: *
  149. *=============================================================================================*/
  150. void MoveablePhysClass::Definition_Changed(void)
  151. {
  152. DynamicPhysClass::Definition_Changed();
  153. MoveablePhysDefClass * def = (MoveablePhysDefClass *)Definition;
  154. Mass = def->Mass;
  155. MassInv = 1.0f / Mass;
  156. GravScale = def->GravScale;
  157. Elasticity = def->Elasticity;
  158. }
  159. /***********************************************************************************************
  160. * MoveablePhysClass::Post_Timestep_Process -- perform post-timestep processing *
  161. * *
  162. * MoveablePhysClass's update their shadow objects in post-timestep if needed. *
  163. * *
  164. * INPUT: *
  165. * *
  166. * OUTPUT: *
  167. * *
  168. * WARNINGS: *
  169. * *
  170. * HISTORY: *
  171. * 1/4/00 gth : Created. *
  172. *=============================================================================================*/
  173. void MoveablePhysClass::Post_Timestep_Process(void)
  174. {
  175. ShadowManager.Update_Shadow();
  176. }
  177. /***********************************************************************************************
  178. * MoveablePhysClass::Get_Shadow_Blob_Box -- Return the object space AABox for the shadow *
  179. * *
  180. * This is only the default implementation which doesn't really do anything useful. Derived *
  181. * classes should over-ride this!!! *
  182. * *
  183. * INPUT: *
  184. * *
  185. * OUTPUT: *
  186. * *
  187. * WARNINGS: *
  188. * *
  189. * HISTORY: *
  190. * 1/4/00 gth : Created. *
  191. *=============================================================================================*/
  192. void MoveablePhysClass::Get_Shadow_Blob_Box(AABoxClass * set_obj_space_box)
  193. {
  194. // NOTE: derived classes should really override this!!!
  195. WWASSERT(set_obj_space_box != NULL);
  196. set_obj_space_box->Center.Set(0,0,0);
  197. set_obj_space_box->Extent.Set(1,1,1);
  198. }
  199. /***********************************************************************************************
  200. * MoveablePhysClass::Link_To_Carrier -- Link this object to a carrier object *
  201. * *
  202. * This function will make this object move with the specified carrier object. You can *
  203. * pass in NULL to clear out the linkage as well. *
  204. * *
  205. * INPUT: *
  206. * carrier - physics object that this object is "standing" on. *
  207. * carrier_sub_obj - possible render object within the physics object. This makes a *
  208. * if groundobj is an animated static object for example. *
  209. * *
  210. * OUTPUT: *
  211. * *
  212. * WARNINGS: *
  213. * This is the only function that should ever call Internal_Link_Rider or Internal_Unlink...*
  214. * *
  215. * HISTORY: *
  216. * 2/11/2000 gth : Created. *
  217. *=============================================================================================*/
  218. void MoveablePhysClass::Link_To_Carrier(PhysClass * carrier,RenderObjClass * carrier_sub_obj)
  219. {
  220. // If this is the same carrier we already have, just return
  221. if ((Carrier == carrier) && (CarrierSubObject == carrier_sub_obj)) return;
  222. // If we had a different carrier, unlink from it
  223. if (Carrier != NULL) {
  224. Carrier->Internal_Unlink_Rider(this);
  225. Carrier = NULL;
  226. CarrierSubObject = NULL;
  227. }
  228. if (carrier) {
  229. if (carrier->Internal_Link_Rider(this) == true) {
  230. // only track carriers who are tracking us!
  231. Carrier = carrier;
  232. CarrierSubObject = carrier_sub_obj;
  233. }
  234. }
  235. }
  236. /***********************************************************************************************
  237. * MoveablePhysClass::Peek_Carrier_Object -- returns the carrier object pointer *
  238. * *
  239. * INPUT: *
  240. * *
  241. * OUTPUT: *
  242. * *
  243. * WARNINGS: *
  244. * *
  245. * HISTORY: *
  246. * 8/15/2001 tss : Created. *
  247. *=============================================================================================*/
  248. PhysClass * MoveablePhysClass::Peek_Carrier_Object(void)
  249. {
  250. return Carrier;
  251. }
  252. /***********************************************************************************************
  253. * MoveablePhysClass::Peek_Carrier_Sub_Object -- returns the carrier sub object pointer *
  254. * *
  255. * INPUT: *
  256. * *
  257. * OUTPUT: *
  258. * *
  259. * WARNINGS: *
  260. * *
  261. * HISTORY: *
  262. * 7/24/2000 gth : Created. *
  263. *=============================================================================================*/
  264. RenderObjClass * MoveablePhysClass::Peek_Carrier_Sub_Object(void)
  265. {
  266. return CarrierSubObject;
  267. }
  268. /***********************************************************************************************
  269. * MoveablePhysClass::Cinematic_Move_To -- attempts to teleport to the desired transform *
  270. * *
  271. * This function attempts to teleport the object to the desired transform and "pushes" all *
  272. * dynamic objects out of the way if possible. *
  273. * *
  274. * INPUT: *
  275. * *
  276. * OUTPUT: *
  277. * *
  278. * WARNINGS: *
  279. * *
  280. * HISTORY: *
  281. * 7/24/2000 gth : Created. *
  282. *=============================================================================================*/
  283. bool MoveablePhysClass::Cinematic_Move_To(const Matrix3D &new_tm)
  284. {
  285. int cinematic_move_mode = MoveablePhysDefClass::CINEMATIC_COLLISION_PUSH;
  286. if (Get_MoveablePhysDef() != NULL) {
  287. cinematic_move_mode = Get_MoveablePhysDef()->CinematicCollisionMode;
  288. }
  289. //
  290. // Check if we can teleport to the desired location.
  291. //
  292. NonRefPhysListClass intersection_list;
  293. bool ok = false;
  294. if (cinematic_move_mode == MoveablePhysDefClass::CINEMATIC_COLLISION_NONE) {
  295. ok = true;
  296. } else {
  297. ok = Can_Teleport(new_tm, true, &intersection_list);
  298. }
  299. //
  300. // Handle the intersection if needed
  301. //
  302. if (!ok) {
  303. if (cinematic_move_mode == MoveablePhysDefClass::CINEMATIC_COLLISION_PUSH) {
  304. //
  305. // Try to shove everyone out of our way!
  306. // NOTE: this won't work for objects where orientation matters and the object
  307. // is rotating as part of the teleportation. May have to implement this
  308. // separately for RBody...
  309. //
  310. Vector3 position;
  311. Get_Position(&position);
  312. Vector3 move = new_tm.Get_Translation() - position;
  313. NonRefPhysListIterator it(&intersection_list);
  314. while (!it.Is_Done()) {
  315. it.Peek_Obj()->Push(move);
  316. it.Next();
  317. }
  318. } else if (cinematic_move_mode == MoveablePhysDefClass::CINEMATIC_COLLISION_KILL ) {
  319. //
  320. // Try to kill all objects intersecting us at the destination point
  321. //
  322. NonRefPhysListIterator it(&intersection_list);
  323. while (!it.Is_Done()) {
  324. //
  325. // (gth) rbody objects are currently including static objects in
  326. // the list of intersected objects. Don't kill them please.
  327. //
  328. if (it.Peek_Obj()->As_DynamicPhysClass() != NULL) {
  329. it.Peek_Obj()->Expire();
  330. }
  331. it.Next();
  332. }
  333. }
  334. //
  335. // check one more time unless we are in "stop" mode
  336. //
  337. if (cinematic_move_mode != MoveablePhysDefClass::CINEMATIC_COLLISION_STOP) {
  338. ok = Can_Teleport(new_tm, true);
  339. }
  340. }
  341. //
  342. // If the position is clear, teleport there
  343. //
  344. if (ok) {
  345. Set_Transform(new_tm);
  346. }
  347. return ok;
  348. }
  349. /***********************************************************************************************
  350. * MoveablePhysClass::Save -- persistant object save support *
  351. * *
  352. * INPUT: *
  353. * *
  354. * OUTPUT: *
  355. * *
  356. * WARNINGS: *
  357. * *
  358. * HISTORY: *
  359. * 1/4/00 gth : Created. *
  360. *=============================================================================================*/
  361. bool MoveablePhysClass::Save(ChunkSaveClass &csave)
  362. {
  363. csave.Begin_Chunk(MOVEABLE_CHUNK_DYNAMICPHYS);
  364. DynamicPhysClass::Save(csave);
  365. csave.End_Chunk();
  366. csave.Begin_Chunk(MOVEABLE_CHUNK_VARIABLES);
  367. WRITE_MICRO_CHUNK(csave,MOVEABLE_VARIABLE_MASS,Mass);
  368. WRITE_MICRO_CHUNK(csave,MOVEABLE_VARIABLE_GRAVSCALE,GravScale);
  369. WRITE_MICRO_CHUNK(csave,MOVEABLE_VARIABLE_ELASTICITY,Elasticity);
  370. if (Controller != NULL) {
  371. WRITE_MICRO_CHUNK(csave,MOVEABLE_VARIABLE_CONTROLLER,Controller);
  372. }
  373. if (Carrier != NULL) {
  374. WRITE_MICRO_CHUNK(csave,MOVEABLE_VARIABLE_CARRIER,Carrier);
  375. }
  376. csave.End_Chunk();
  377. return true;
  378. }
  379. /***********************************************************************************************
  380. * MoveablePhysClass::Load -- persistant object load support *
  381. * *
  382. * INPUT: *
  383. * *
  384. * OUTPUT: *
  385. * *
  386. * WARNINGS: *
  387. * *
  388. * HISTORY: *
  389. * 1/4/00 gth : Created. *
  390. *=============================================================================================*/
  391. bool MoveablePhysClass::Load(ChunkLoadClass &cload)
  392. {
  393. Controller = NULL;
  394. Carrier = NULL;
  395. while (cload.Open_Chunk()) {
  396. switch(cload.Cur_Chunk_ID())
  397. {
  398. case MOVEABLE_CHUNK_PHYS:
  399. PhysClass::Load(cload);
  400. break;
  401. case MOVEABLE_CHUNK_DYNAMICPHYS:
  402. DynamicPhysClass::Load(cload);
  403. break;
  404. case MOVEABLE_CHUNK_VARIABLES:
  405. while (cload.Open_Micro_Chunk()) {
  406. switch(cload.Cur_Micro_Chunk_ID()) {
  407. READ_MICRO_CHUNK(cload,MOVEABLE_VARIABLE_MASS,Mass);
  408. READ_MICRO_CHUNK(cload,MOVEABLE_VARIABLE_GRAVSCALE,GravScale);
  409. READ_MICRO_CHUNK(cload,MOVEABLE_VARIABLE_ELASTICITY,Elasticity);
  410. READ_MICRO_CHUNK(cload,MOVEABLE_VARIABLE_CONTROLLER,Controller);
  411. READ_MICRO_CHUNK(cload,MOVEABLE_VARIABLE_CARRIER,Carrier);
  412. }
  413. cload.Close_Micro_Chunk();
  414. }
  415. break;
  416. default:
  417. WWDEBUG_SAY(("Unhandled Chunk: 0x%X File: %s Line: %d\r\n",cload.Cur_Chunk_ID(),__FILE__,__LINE__));
  418. break;
  419. }
  420. cload.Close_Chunk();
  421. }
  422. if (Controller != NULL) {
  423. REQUEST_POINTER_REMAP((void**)&Controller);
  424. }
  425. if (Carrier != NULL) {
  426. REQUEST_POINTER_REMAP((void**)&Carrier);
  427. }
  428. SaveLoadSystemClass::Register_Post_Load_Callback(this);
  429. if (Mass < 0.01f) {
  430. Mass = 0.01f;
  431. }
  432. MassInv = 1.0f / Mass;
  433. return true;
  434. }
  435. /***********************************************************************************************
  436. * MoveablePhysClass::On_Post_Load -- Post-Load callback for MoveablePhysClass *
  437. * *
  438. * INPUT: *
  439. * *
  440. * OUTPUT: *
  441. * *
  442. * WARNINGS: *
  443. * *
  444. * HISTORY: *
  445. * 2/11/2000 gth : Created. *
  446. *=============================================================================================*/
  447. void MoveablePhysClass::On_Post_Load(void)
  448. {
  449. DynamicPhysClass::On_Post_Load();
  450. // Force our carrier to get correctly linked up, the way I do this
  451. // is to just clear it out and call the Set_Carrier function again.
  452. PhysClass * tmp_carrier = Carrier;
  453. Carrier = NULL;
  454. Link_To_Carrier(tmp_carrier);
  455. }
  456. /***********************************************************************************************
  457. **
  458. ** MoveablePhysDefClass Implementation
  459. **
  460. ***********************************************************************************************/
  461. /*
  462. ** Chunk ID's used by MoveablePhysDefClass
  463. */
  464. enum
  465. {
  466. MOVEABLEPHYSDEF_CHUNK_PHYSDEF = 0x04486000, // obsolete parent class
  467. MOVEABLEPHYSDEF_CHUNK_VARIABLES,
  468. MOVEABLEPHYSDEF_CHUNK_DYNAMICPHYSDEF, // current parent class
  469. MOVEABLEPHYSDEF_VARIABLE_MASS = 0x00,
  470. MOVEABLEPHYSDEF_VARIABLE_GRAVSCALE,
  471. MOVEABLEPHYSDEF_VARIABLE_ELASTICITY,
  472. MOVEABLEPHYSDEF_VARIABLE_CINEMATICCOLLISIONMODE,
  473. };
  474. MoveablePhysDefClass::MoveablePhysDefClass(void) :
  475. Mass(1.0f),
  476. GravScale(1.0f),
  477. Elasticity(0.1f),
  478. CinematicCollisionMode(CINEMATIC_COLLISION_PUSH)
  479. {
  480. // make our parameters editable!
  481. FLOAT_EDITABLE_PARAM(MoveablePhysDefClass, Mass, 0.01f, 100000.0f);
  482. FLOAT_EDITABLE_PARAM(MoveablePhysDefClass, GravScale, 0.0f, 10.0f);
  483. FLOAT_EDITABLE_PARAM(MoveablePhysDefClass, Elasticity, 0.0f, 1.0f);
  484. #ifdef PARAM_EDITING_ON
  485. EnumParameterClass *cinematic_param = new EnumParameterClass(&CinematicCollisionMode);
  486. cinematic_param->Set_Name ("CinematicCollisionMode");
  487. cinematic_param->Add_Value("NONE",CINEMATIC_COLLISION_NONE);
  488. cinematic_param->Add_Value("STOP",CINEMATIC_COLLISION_STOP);
  489. cinematic_param->Add_Value("PUSH",CINEMATIC_COLLISION_PUSH);
  490. cinematic_param->Add_Value("KILL",CINEMATIC_COLLISION_KILL);
  491. GENERIC_EDITABLE_PARAM( MoveablePhysDefClass, cinematic_param);
  492. #endif
  493. }
  494. bool MoveablePhysDefClass::Save(ChunkSaveClass &csave)
  495. {
  496. csave.Begin_Chunk(MOVEABLEPHYSDEF_CHUNK_DYNAMICPHYSDEF);
  497. DynamicPhysDefClass::Save(csave);
  498. csave.End_Chunk();
  499. csave.Begin_Chunk(MOVEABLEPHYSDEF_CHUNK_VARIABLES);
  500. WRITE_MICRO_CHUNK(csave,MOVEABLEPHYSDEF_VARIABLE_MASS,Mass);
  501. WRITE_MICRO_CHUNK(csave,MOVEABLEPHYSDEF_VARIABLE_GRAVSCALE,GravScale);
  502. WRITE_MICRO_CHUNK(csave,MOVEABLEPHYSDEF_VARIABLE_ELASTICITY,Elasticity);
  503. WRITE_MICRO_CHUNK(csave,MOVEABLEPHYSDEF_VARIABLE_CINEMATICCOLLISIONMODE,CinematicCollisionMode);
  504. csave.End_Chunk();
  505. return true;
  506. }
  507. bool MoveablePhysDefClass::Load(ChunkLoadClass &cload)
  508. {
  509. while (cload.Open_Chunk()) {
  510. switch(cload.Cur_Chunk_ID()) {
  511. case MOVEABLEPHYSDEF_CHUNK_PHYSDEF:
  512. PhysDefClass::Load(cload);
  513. break;
  514. case MOVEABLEPHYSDEF_CHUNK_DYNAMICPHYSDEF:
  515. DynamicPhysDefClass::Load(cload);
  516. break;
  517. case MOVEABLEPHYSDEF_CHUNK_VARIABLES:
  518. while (cload.Open_Micro_Chunk()) {
  519. switch(cload.Cur_Micro_Chunk_ID()) {
  520. READ_MICRO_CHUNK(cload,MOVEABLEPHYSDEF_VARIABLE_MASS,Mass);
  521. READ_MICRO_CHUNK(cload,MOVEABLEPHYSDEF_VARIABLE_GRAVSCALE,GravScale);
  522. READ_MICRO_CHUNK(cload,MOVEABLEPHYSDEF_VARIABLE_ELASTICITY,Elasticity);
  523. READ_MICRO_CHUNK(cload,MOVEABLEPHYSDEF_VARIABLE_CINEMATICCOLLISIONMODE,CinematicCollisionMode);
  524. }
  525. cload.Close_Micro_Chunk();
  526. }
  527. break;
  528. default:
  529. WWDEBUG_SAY(("Unhandled Chunk: 0x%X File: %s Line: %d\r\n",cload.Cur_Chunk_ID(),__FILE__,__LINE__));
  530. break;
  531. }
  532. cload.Close_Chunk();
  533. }
  534. return true;
  535. }
  536. bool MoveablePhysDefClass::Is_Type(const char * type_name)
  537. {
  538. if (stricmp(type_name,MoveablePhysDefClass::Get_Type_Name()) == 0) {
  539. return true;
  540. } else {
  541. return DynamicPhysDefClass::Is_Type(type_name);
  542. }
  543. }