|
1 | 1 | #include "stdafx.h" |
2 | | -#include "cardamageparticles.h" |
| 2 | +#include "CarDamageParticles.h" |
3 | 3 | #ifdef DEBUG |
4 | 4 |
|
5 | 5 | #include "PHDebug.h" |
6 | 6 | #endif |
7 | 7 | #include "alife_space.h" |
8 | | -#include "hit.h" |
| 8 | +#include "Hit.h" |
9 | 9 | #include "PHDestroyable.h" |
10 | 10 | #include "Car.h" |
11 | 11 | #include "Include/xrRender/Kinematics.h" |
@@ -46,38 +46,32 @@ void CCarDamageParticles::Init(CCar* car) |
46 | 46 | void CCarDamageParticles::Play1(CCar* car) |
47 | 47 | { |
48 | 48 | if (*m_car_damage_particles1) |
49 | | - { |
50 | | - auto i = bones1.begin(), e = bones1.end(); |
51 | | - for (; e != i; ++i) |
52 | | - car->StartParticles(m_car_damage_particles1, *i, Fvector().set(0, 1, 0), car->ID()); |
53 | | - } |
| 49 | + for (auto& bone : bones1) |
| 50 | + car->StartParticles(m_car_damage_particles1, bone, Fvector().set(0, 1, 0), car->ID()); |
54 | 51 | } |
55 | 52 |
|
56 | 53 | void CCarDamageParticles::Play2(CCar* car) |
57 | 54 | { |
58 | 55 | VERIFY(!physics_world()->Processing()); |
59 | 56 | if (*m_car_damage_particles2) |
60 | | - { |
61 | | - auto i = bones2.begin(), e = bones2.end(); |
62 | | - for (; e != i; ++i) |
63 | | - car->StartParticles(m_car_damage_particles2, *i, Fvector().set(0, 1, 0), car->ID()); |
64 | | - } |
| 57 | + for (auto& bone : bones2) |
| 58 | + car->StartParticles(m_car_damage_particles2, bone, Fvector().set(0, 1, 0), car->ID()); |
65 | 59 | } |
66 | 60 |
|
67 | 61 | /***** added by Ray Twitty (aka Shadows) START *****/ |
68 | 62 | // функции для выключения партиклов дыма |
69 | 63 | void CCarDamageParticles::Stop1(CCar* car) |
70 | 64 | { |
71 | 65 | if(*m_car_damage_particles1) |
72 | | - for (auto bone : bones1) |
| 66 | + for (auto& bone : bones1) |
73 | 67 | car->StopParticles(car->ID(), bone, false); |
74 | 68 | } |
75 | 69 |
|
76 | 70 | void CCarDamageParticles::Stop2(CCar* car) |
77 | 71 | { |
78 | 72 | VERIFY(!physics_world()->Processing()); |
79 | 73 | if(*m_car_damage_particles2) |
80 | | - for (auto bone : bones2) |
| 74 | + for (auto& bone : bones2) |
81 | 75 | car->StopParticles(car->ID(), bone, false); |
82 | 76 | } |
83 | 77 | /***** added by Ray Twitty (aka Shadows) END *****/ |
|
0 commit comments