Emergency 20 Dokumentation  4.2.0
CarAccidentHelper.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
15 #include <vector>
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace qsf
22 {
23  class Entity;
24  class Layer;
25 }
26 namespace em5
27 {
28  class FreeplayEvent;
29  class VehicleComponent;
30 }
31 
32 
33 //[-------------------------------------------------------]
34 //[ Namespace ]
35 //[-------------------------------------------------------]
36 namespace em5
37 {
38 
39 
40  //[-------------------------------------------------------]
41  //[ Classes ]
42  //[-------------------------------------------------------]
48  {
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public static methods ]
53  //[-------------------------------------------------------]
54  public:
55  static qsf::Entity& prepareAccidentCar(qsf::Entity& vehicleEntity, FreeplayEvent& freeplayEvent, bool startFire, bool replaceVehicle = true);
56  static qsf::Entity& prepareAccidentCar(qsf::Entity& vehicleEntity, qsf::Layer& layer, FreeplayEvent& freeplayEvent, bool startFire, bool replaceVehicle = true);
57 
58  // Fixing editing. Vehicles are currently without fire and collision components, but we need both.
59  // So we replace the _dmg entity by its undamaged counterpart and delete the damaged one.
60  static qsf::Entity& replaceVehicleEntity(qsf::Entity& vehicleEntity);
61 
62  static std::string getUndamagedEntityName(qsf::Entity& damagedEntity);
63  static void getPersonEntitiesInVehicle(VehicleComponent& vehicleComponent, std::vector<qsf::Entity*>& entities);
64 
65 
66  //[-------------------------------------------------------]
67  //[ Private methods ]
68  //[-------------------------------------------------------]
69  public:
74  inline CarAccidentHelper() {}
75 
76 
77  };
78 
79 
80 //[-------------------------------------------------------]
81 //[ Namespace ]
82 //[-------------------------------------------------------]
83 } // em5
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
Layer class.
Definition: Layer.h:56
#define EM5_API_EXPORT
Definition: Export.h:28
Vehicle component base class.
Definition: VehicleComponent.h:49
EMERGENCY 5 car accident helper.
Definition: CarAccidentHelper.h:47
Definition: PickupPersonByParamedicAction.h:21
Abstract EMERGENCY 5 freeplay event base class.
Definition: FreeplayEvent.h:66
CarAccidentHelper()
Constructor.
Definition: CarAccidentHelper.h:74