explosion.h 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. *** Confidential - Westwood Studios ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Commando *
  23. * *
  24. * $Archive:: /Commando/Code/Combat/explosion.h $*
  25. * *
  26. * $Author:: Byon_g $*
  27. * *
  28. * $Modtime:: 1/09/02 3:16p $*
  29. * *
  30. * $Revision:: 17 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef EXPLOSION_H
  36. #define EXPLOSION_H
  37. #ifndef ALWAYS_H
  38. #include "always.h"
  39. #endif
  40. #ifndef DEFINITION_H
  41. #include "definition.h"
  42. #endif
  43. class ArmedGameObj;
  44. class BuildingGameObj;
  45. class DamageableGameObj;
  46. /*
  47. **
  48. */
  49. class ExplosionDefinitionClass : public DefinitionClass {
  50. public:
  51. ExplosionDefinitionClass( void );
  52. virtual uint32 Get_Class_ID( void ) const;
  53. virtual PersistClass * Create( void ) const { WWASSERT( 0 ); return NULL; }
  54. virtual bool Save( ChunkSaveClass &csave );
  55. virtual bool Load( ChunkLoadClass &cload );
  56. virtual const PersistFactoryClass & Get_Factory( void ) const;
  57. DECLARE_EDITABLE( ExplosionDefinitionClass, DefinitionClass );
  58. int PhysDefID;
  59. int SoundDefID;
  60. float DamageRadius;
  61. float DamageStrength;
  62. int DamageWarhead;
  63. bool DamageIsScaled;
  64. StringClass DecalFilename;
  65. float DecalSize;
  66. bool AnimatedExplosion;
  67. float CameraShakeIntensity;
  68. float CameraShakeRadius;
  69. float CameraShakeDuration;
  70. };
  71. /*
  72. ** Explosion Manager
  73. */
  74. class ExplosionManager {
  75. public:
  76. static void Create_Explosion_At( int exlosion_id, const Vector3 & pos, ArmedGameObj * damager, const Vector3 & blast_direction = Vector3( 0,0,-1), DamageableGameObj * force_victim = NULL );
  77. static void Create_Explosion_At( int exlosion_id, const Matrix3D & tm, ArmedGameObj * damager, const Vector3 & blast_direction = Vector3( 0,0,-1), DamageableGameObj * force_victim = NULL );
  78. static void Explosion_Damage_Building( int exlosion_id, BuildingGameObj * building, bool mct_damage, ArmedGameObj * damager );
  79. static void Server_Explode( int explosion_id, const Vector3 & pos, int owner_id, DamageableGameObj * force_victim = NULL );
  80. static void Explode( int explosion_id, const Vector3 & pos, int owner_id, int victim_id = 0 );
  81. };
  82. #endif // EMITTER_H