14 static int m_lastID = 0;
18 static const int INVALID = -1;
19 static const int PARTICLE_TEST = RegisterParticle(
"_test_orientation");
20 static const int DEBUG_DOT = RegisterParticle(
"debug_dot");
24 static const int CAMP_FIRE_START = RegisterParticle(
"fire_small_camp_01_start");
25 static const int CAMP_SMALL_FIRE = RegisterParticle(
"fire_small_camp_01");
26 static const int CAMP_NORMAL_FIRE = RegisterParticle(
"fire_medium_camp_01");
27 static const int CAMP_SMALL_SMOKE = RegisterParticle(
"smoke_small_camp_01");
28 static const int CAMP_NORMAL_SMOKE = RegisterParticle(
"smoke_medium_camp_01");
29 static const int CAMP_FIRE_END = RegisterParticle(
"fire_small_camp_01_end");
30 static const int CAMP_STEAM_2END = RegisterParticle(
"steam_medium_camp_2end");
31 static const int CAMP_STEAM_EXTINGUISH_START = RegisterParticle(
"default_01");
32 static const int CAMP_STOVE_FIRE = RegisterParticle(
"fire_small_stove_01");
33 static const int CAMP_STOVE_FIRE_START = RegisterParticle(
"fire_small_stove_01_start");
34 static const int CAMP_STOVE_FIRE_END = RegisterParticle(
"fire_small_stove_01_end");
36 static const int HOUSE_FIRE_START = RegisterParticle(
"fire_small_house_01_start");
37 static const int HOUSE_SMALL_FIRE = RegisterParticle(
"fire_small_house_01");
38 static const int HOUSE_SMALL_SMOKE = RegisterParticle(
"smoke_small_house_01");
39 static const int HOUSE_NORMAL_FIRE = RegisterParticle(
"fire_medium_house_01");
40 static const int HOUSE_NORMAL_SMOKE = RegisterParticle(
"smoke_medium_house_01");
41 static const int HOUSE_FIRE_END = RegisterParticle(
"fire_small_house_01_end");
42 static const int HOUSE_FIRE_STEAM_2END = RegisterParticle(
"steam_medium_house_2end");
44 static const int BARREL_FIRE_START = RegisterParticle(
"fire_small_barrel_01_start");
45 static const int BARREL_SMALL_FIRE = RegisterParticle(
"fire_small_barrel_01");
46 static const int BARREL_SMALL_SMOKE = RegisterParticle(
"smoke_small_barrel_01");
47 static const int BARREL_NORMAL_FIRE = RegisterParticle(
"fire_medium_barrel_01");
48 static const int BARREL_NORMAL_SMOKE = RegisterParticle(
"smoke_medium_barrel_01");
49 static const int BARREL_FIRE_END = RegisterParticle(
"fire_small_barrel_01_end");
50 static const int BARREL_FIRE_STEAM_2END = RegisterParticle(
"steam_medium_camp_2end");
52 static const int OVEN_FIRE_START = RegisterParticle(
"fire_small_oven_01_start");
53 static const int OVEN_SMALL_FIRE = RegisterParticle(
"fire_small_oven_01");
54 static const int OVEN_NORMAL_FIRE = RegisterParticle(
"fire_medium_oven_01");
55 static const int OVEN_FIRE_END = RegisterParticle(
"fire_small_ovenl_01_end");
58 static const int COOKING_BOILING_EMPTY = RegisterParticle(
"cooking_boiling_empty");
59 static const int COOKING_BOILING_START = RegisterParticle(
"cooking_boiling_start");
60 static const int COOKING_BOILING_DONE = RegisterParticle(
"cooking_boiling_done");
61 static const int COOKING_BAKING_START = RegisterParticle(
"cooking_baking_start");
62 static const int COOKING_BAKING_DONE = RegisterParticle(
"cooking_baking_done");
63 static const int COOKING_DRYING_START = RegisterParticle(
"cooking_drying_start");
64 static const int COOKING_DRYING_DONE = RegisterParticle(
"cooking_drying_done");
65 static const int COOKING_BURNING_DONE = RegisterParticle(
"cooking_burning_done");
68 static const int TORCH_T1 = RegisterParticle(
"fire_small_torch_02");
69 static const int TORCH_T2 = RegisterParticle(
"fire_small_torch_03");
70 static const int TORCH_T3 = RegisterParticle(
"fire_small_torch_01");
73 static const int ROADFLARE_BURNING_INIT = RegisterParticle(
"fire_small_roadflare_red_04");
74 static const int ROADFLARE_BURNING_MAIN = RegisterParticle(
"fire_small_roadflare_red_01");
75 static const int ROADFLARE_BURNING_ENDING = RegisterParticle(
"fire_small_roadflare_red_02");
76 static const int ROADFLARE_BURNING_SMOKE = RegisterParticle(
"fire_small_roadflare_red_03");
79 static const int FLAREPROJ_FIRE = RegisterParticle(
"fire_small_roadflare_red_04");
80 static const int FLAREPROJ_ACTIVATE = RegisterParticle(
"fire_small_flare_yellow_01");
81 static const int FLAREPROJ_ACTIVATE_RED = RegisterParticle(
"fire_small_flare_red_01");
82 static const int FLAREPROJ_ACTIVATE_GREEN = RegisterParticle(
"fire_small_flare_green_01");
83 static const int FLAREPROJ_ACTIVATE_BLUE = RegisterParticle(
"fire_small_flare_blue_01");
86 static const int DIGGING_STASH = RegisterParticle(
"digging_ground");
90 static const int GRENADE_RDG2_BLACK_START = RegisterParticle(
"smoke_RDG2_black_01");
91 static const int GRENADE_RDG2_BLACK_LOOP = RegisterParticle(
"smoke_RDG2_black_02");
92 static const int GRENADE_RDG2_BLACK_END = RegisterParticle(
"smoke_RDG2_black_03");
93 static const int GRENADE_RDG2_WHITE_START = RegisterParticle(
"smoke_RDG2_white_01");
94 static const int GRENADE_RDG2_WHITE_LOOP = RegisterParticle(
"smoke_RDG2_white_02");
95 static const int GRENADE_RDG2_WHITE_END = RegisterParticle(
"smoke_RDG2_white_03");
97 static const int GRENADE_M18_GREEN_START = RegisterParticle(
"smoke_M18_green_01");
98 static const int GRENADE_M18_GREEN_LOOP = RegisterParticle(
"smoke_M18_green_02");
99 static const int GRENADE_M18_GREEN_END = RegisterParticle(
"smoke_M18_green_03");
100 static const int GRENADE_M18_PURPLE_START = RegisterParticle(
"smoke_M18_purple_01");
101 static const int GRENADE_M18_PURPLE_LOOP = RegisterParticle(
"smoke_M18_purple_02");
102 static const int GRENADE_M18_PURPLE_END = RegisterParticle(
"smoke_M18_purple_03");
103 static const int GRENADE_M18_RED_START = RegisterParticle(
"smoke_M18_red_01");
104 static const int GRENADE_M18_RED_LOOP = RegisterParticle(
"smoke_M18_red_02");
105 static const int GRENADE_M18_RED_END = RegisterParticle(
"smoke_M18_red_03");
106 static const int GRENADE_M18_WHITE_START = RegisterParticle(
"smoke_M18_white_01");
107 static const int GRENADE_M18_WHITE_LOOP = RegisterParticle(
"smoke_M18_white_02");
108 static const int GRENADE_M18_WHITE_END = RegisterParticle(
"smoke_M18_white_03");
109 static const int GRENADE_M18_YELLOW_START = RegisterParticle(
"smoke_M18_yellow_01");
110 static const int GRENADE_M18_YELLOW_LOOP = RegisterParticle(
"smoke_M18_yellow_02");
111 static const int GRENADE_M18_YELLOW_END = RegisterParticle(
"smoke_M18_yellow_03");
115 static const int GRENADE_M84 = RegisterParticle(
"explosion_M84_01");
118 static const int RGD5 = RegisterParticle(
"explosion_RGD5_01");
119 static const int M67 = RegisterParticle(
"explosion_M67_01");
122 static const int POWER_GENERATOR_SMOKE = RegisterParticle(
"smoke_small_generator_01");
123 static const int BARBED_WIRE_SPARKS = RegisterParticle(
"electro_shortc2");
126 static const int BLEEDING_SOURCE = RegisterParticle(
"blood_bleeding_01");
127 static const int BLEEDING_SOURCE_LIGHT = RegisterParticle(
"blood_bleeding_02");
128 static const int BLOOD_SURFACE_DROPS = RegisterParticle(
"blood_surface_drops");
129 static const int BLOOD_SURFACE_CHUNKS = RegisterParticle(
"blood_surface_chunks");
130 static const int VOMIT = RegisterParticle(
"character_vomit_01");
131 static const int BREATH_VAPOUR_LIGHT = RegisterParticle(
"breath_vapour_light");
132 static const int BREATH_VAPOUR_MEDIUM = RegisterParticle(
"breath_vapour_medium");
133 static const int BREATH_VAPOUR_HEAVY = RegisterParticle(
"breath_vapour_heavy");
134 static const int VOMIT_CHUNKS = RegisterParticle(
"character_vomit_puddle");
137 static const int GUN_MUZZLE_FLASH_SVD_STAR = RegisterParticle(
"weapon_shot_Flame_3D_4star");
138 static const int GUN_SOLO_MUZZLE_FLASH = RegisterParticle(
"weapon_shot_Flame_3D");
139 static const int GUN_PARTICLE_TEST = RegisterParticle(
"weapon_shot_fnx_01");
140 static const int GUN_PARTICLE_CASING = RegisterParticle(
"weapon_shot_chamber_smoke");
141 static const int GUN_PARTICLE_CASING_RAISE = RegisterParticle(
"weapon_shot_chamber_smoke_raise");
142 static const int GUN_FNX = RegisterParticle(
"weapon_shot_fnx_01");
143 static const int GUN_FNX_SUPPRESSED = RegisterParticle(
"weapon_shot_fnx_02");
144 static const int GUN_CZ75 = RegisterParticle(
"weapon_shot_cz75_01");
145 static const int GUN_AKM = RegisterParticle(
"weapon_shot_akm_01");
146 static const int GUN_AKM_SUPPRESSED = RegisterParticle(
"weapon_shot_akm_02");
147 static const int GUN_IZH18 = RegisterParticle(
"weapon_shot_izh18_01");
148 static const int GUN_IZH18_SUPPRESSED = RegisterParticle(
"weapon_shot_izh18_02");
149 static const int GUN_MP5K = RegisterParticle(
"weapon_shot_mp5k_01");
150 static const int GUN_MP5K_2 = RegisterParticle(
"weapon_shot_mp5k_02_boris");
151 static const int GUN_MP5K_SUPPRESSED = RegisterParticle(
"weapon_shot_mp5k_02");
152 static const int GUN_MP5K_COMPENSATOR = RegisterParticle(
"weapon_shot_mp5k_02");
153 static const int GUN_UMP45 = RegisterParticle(
"weapon_shot_ump45_01");
154 static const int GUN_M4A1 = RegisterParticle(
"weapon_shot_m4a1_01");
155 static const int GUN_MP133 = RegisterParticle(
"weapon_shot_mp133_01");
156 static const int GUN_PELLETS = RegisterParticle(
"weapon_shot_pellets");
157 static const int GUN_MOSIN9130 = RegisterParticle(
"weapon_shot_mosin9130_01");
158 static const int GUN_MOSIN_COMPENSATOR = RegisterParticle(
"weapon_shot_mosin_compensator_01");
159 static const int GUN_CZ527 = RegisterParticle(
"weapon_shot_cz527_01");
160 static const int GUN_SKS = RegisterParticle(
"weapon_shot_sks_01");
161 static const int GUN_WINCHESTER70 = RegisterParticle(
"weapon_shot_winch70_01");
162 static const int GUN_VSS = RegisterParticle(
"weapon_shot_vss_01");
163 static const int GUN_AK74 = RegisterParticle(
"weapon_shot_ak74_01");
164 static const int GUN_AK101 = RegisterParticle(
"weapon_shot_ak101_01");
166 static const int GUN_MAGNUM = RegisterParticle(
"weapon_shot_magnum_01");
168 static const int GUN_CZ61 = RegisterParticle(
"weapon_shot_cz61_01");
169 static const int GUN_LONG_WINDED_SMOKE = RegisterParticle(
"weapon_shot_winded_smoke");
170 static const int GUN_LONG_WINDED_SMOKE_SMALL = RegisterParticle(
"weapon_shot_winded_smoke_small");
171 static const int SMOKING_BARREL = RegisterParticle(
"smoking_barrel");
172 static const int SMOKING_BARREL_SMALL = RegisterParticle(
"smoking_barrel_small");
173 static const int SMOKING_BARREL_HEAVY = RegisterParticle(
"smoking_barrel_heavy");
174 static const int SMOKING_BARREL_STEAM = RegisterParticle(
"smoking_barrel_steam");
175 static const int SMOKING_BARREL_STEAM_SMALL = RegisterParticle(
"smoking_barrel_steam_small");
176 static const int SMARKS_CHAMBER = RegisterParticle(
"weapon_shot_chamber_spark");
179 static const int IMPACT_TEST = RegisterParticle(
"impacts/bullet_impact_placeholder");
180 static const int IMPACT_DISTANT_DUST = RegisterParticle(
"impacts/distant_dust");
181 static const int IMPACT_TEST_RICOCHET = RegisterParticle(
"impacts/bullet_riochet_placeholder");
182 static const int IMPACT_TEST2 = RegisterParticle(
"_test_orientation_02");
183 static const int IMPACT_TEST_ENTER_DEBUG = RegisterParticle(
"impacts/_test_impact_enter_debug");
184 static const int IMPACT_TEST_RICOCHET_DEBUG = RegisterParticle(
"impacts/_test_impact_ricochet_debug");
185 static const int IMPACT_TEST_EXIT_DEBUG = RegisterParticle(
"impacts/_test_impact_exit_debug");
186 static const int IMPACT_TEST_NO_MATERIAL_ERROR = RegisterParticle(
"_test_no_material");
187 static const int IMPACT_WOOD_ENTER = RegisterParticle(
"impacts/hit_wood_ent_01");
188 static const int IMPACT_WOOD_RICOCHET = RegisterParticle(
"impacts/hit_wood_ric_01");
189 static const int IMPACT_WOOD_EXIT = RegisterParticle(
"impacts/hit_wood_ext_01");
190 static const int IMPACT_CONCRETE_ENTER = RegisterParticle(
"impacts/hit_concrete_ent_01");
191 static const int IMPACT_CONCRETE_RICOCHET = RegisterParticle(
"impacts/hit_concrete_ric_01");
192 static const int IMPACT_CONCRETE_EXIT = RegisterParticle(
"impacts/hit_concrete_ext_01");
193 static const int IMPACT_FOLIAGE_ENTER = RegisterParticle(
"impacts/hit_foliage_ent_01");
194 static const int IMPACT_FOLIAGE_RICOCHET = RegisterParticle(
"impacts/hit_foliage_ric_01");
195 static const int IMPACT_FOLIAGE_EXIT = RegisterParticle(
"impacts/hit_foliage_ext_01");
196 static const int IMPACT_GRASS_ENTER = RegisterParticle(
"impacts/hit_grass_ent_01");
197 static const int IMPACT_GRASS_RICOCHET = RegisterParticle(
"impacts/hit_grass_ric_01");
198 static const int IMPACT_DIRT_ENTER = RegisterParticle(
"impacts/hit_dirt_ent_01");
199 static const int IMPACT_DIRT_RICOCHET = RegisterParticle(
"impacts/hit_dirt_ric_01");
200 static const int IMPACT_DIRT_EXIT = RegisterParticle(
"impacts/hit_dirt_ext_01");
201 static const int IMPACT_RUBBER_ENTER = RegisterParticle(
"impacts/hit_rubber_ent_01");
202 static const int IMPACT_RUBBER_RICOCHET = RegisterParticle(
"impacts/hit_rubber_ric_01");
203 static const int IMPACT_RUBBER_EXIT = RegisterParticle(
"impacts/hit_rubber_ext_01");
204 static const int IMPACT_GRAVEL_ENTER = RegisterParticle(
"impacts/hit_gravel_ent_01");
205 static const int IMPACT_GRAVEL_RICOCHET = RegisterParticle(
"impacts/hit_gravel_ric_01");
206 static const int IMPACT_GRAVEL_EXIT = RegisterParticle(
"impacts/hit_gravel_ext_01");
207 static const int IMPACT_PLASTER_ENTER = RegisterParticle(
"impacts/hit_plaster_ent_01");
208 static const int IMPACT_PLASTER_RICOCHET = RegisterParticle(
"impacts/hit_plaster_ric_01");
209 static const int IMPACT_PLASTER_EXIT = RegisterParticle(
"impacts/hit_plaster_ext_01");
210 static const int IMPACT_METAL_ENTER = RegisterParticle(
"impacts/hit_metal_ent_01");
211 static const int IMPACT_METAL_RICOCHET = RegisterParticle(
"impacts/hit_metal_ric_01");
212 static const int IMPACT_METAL_EXIT = RegisterParticle(
"impacts/hit_metal_ext_01");
213 static const int IMPACT_MEAT_ENTER = RegisterParticle(
"impacts/hit_meat_ent_01");
214 static const int IMPACT_MEAT_RICOCHET = RegisterParticle(
"impacts/hit_meat_ric_01");
215 static const int IMPACT_MEAT_EXIT = RegisterParticle(
"impacts/hit_meat_ext_01");
216 static const int IMPACT_MEATBONES_ENTER = RegisterParticle(
"impacts/hit_meatbones_ent_01");
217 static const int IMPACT_MEATBONES_RICOCHET = RegisterParticle(
"impacts/hit_meatbones_ent_01");
218 static const int IMPACT_MEATBONES_EXIT = RegisterParticle(
"impacts/hit_meatbones_ext_01");
219 static const int IMPACT_GLASS_ENTER = RegisterParticle(
"impacts/hit_glass_ent_01");
220 static const int IMPACT_GLASS_RICOCHET = RegisterParticle(
"impacts/hit_glass_ric_01");
221 static const int IMPACT_GLASS_EXIT = RegisterParticle(
"impacts/hit_glass_ext_01");
222 static const int IMPACT_WATER_SMALL_ENTER = RegisterParticle(
"impacts/hit_water_ent_01");
223 static const int IMPACT_WATER_MEDIUM_ENTER = RegisterParticle(
"impacts/hit_water_ent_02");
224 static const int IMPACT_WATER_LARGE_ENTER = RegisterParticle(
"impacts/hit_water_ent_03");
225 static const int IMPACT_TEXTILE_ENTER = RegisterParticle(
"impacts/hit_textile_ent_01");
226 static const int IMPACT_TEXTILE_RICOCHET = RegisterParticle(
"impacts/hit_textile_ric_01");
227 static const int IMPACT_TEXTILE_EXIT = RegisterParticle(
"impacts/hit_textile_ext_01");
228 static const int IMPACT_SAND_ENTER = RegisterParticle(
"impacts/hit_sand_ent_01");
229 static const int IMPACT_SAND_RICOCHET = RegisterParticle(
"impacts/hit_sand_ric_01");
230 static const int IMPACT_SAND_EXIT = RegisterParticle(
"impacts/hit_sand_ext_01");
231 static const int IMPACT_PLASTIC_ENTER = RegisterParticle(
"impacts/hit_plastic_ent_01");
232 static const int IMPACT_PLASTIC_RICOCHET = RegisterParticle(
"impacts/hit_plastic_ric_01");
233 static const int IMPACT_PLASTIC_EXIT = RegisterParticle(
"impacts/hit_plastic_ext_01");
236 static const int EXPLOSION_LANDMINE = RegisterParticle(
"explosion_landmine_01");
237 static const int EXPLOSION_TEST = RegisterParticle(
"explosion_placeholder");
240 static const int SMOKING_HELI_WRECK = RegisterParticle(
"smoke_heli_wreck_01");
241 static const int SMOKE_GENERIC_WRECK = RegisterParticle(
"smoke_generic_wreck");
242 static const int SMOKING_CAR_ENGINE = RegisterParticle(
"menu_engine_fire");
243 static const int EVAPORATION = RegisterParticle(
"menu_evaporation");
246 static const int HATCHBACK_COOLANT_OVERHEATING = RegisterParticle(
"Hatchback_coolant_overheating");
247 static const int HATCHBACK_COOLANT_OVERHEATED = RegisterParticle(
"Hatchback_coolant_overheated");
248 static const int HATCHBACK_ENGINE_OVERHEATING = RegisterParticle(
"Hatchback_engine_failing");
249 static const int HATCHBACK_ENGINE_OVERHEATED = RegisterParticle(
"Hatchback_engine_failure");
250 static const int HATCHBACK_EXHAUST_SMOKE = RegisterParticle(
"Hatchback_exhaust");
253 static const int ENV_SWARMING_FLIES = RegisterParticle(
"env_fly_swarm_01");
255 static int RegisterParticle (
string file_name)
257 return RegisterParticle( GetPathToParticles() , file_name);
261 static int RegisterParticle (
string root_path,
string file_name)
263 if (!m_ParticlePaths)
266 string path = root_path + file_name +
".ptc";
270 Error(
"ERROR! Particle file not found! <" +
path +
"> Correct path to this particle in script file ParticleList.c! Then rebuild 'scripts' and 'graphics' PBOs.");
272 m_ParticlePaths.Insert(++m_lastID, root_path + file_name);
277 static int GetRegisteredParticlesCount()
292 return path +
".ptc";
296 static int GetParticleID(
string particle_file)
298 return m_ParticlePaths.GetKeyByValue(particle_file);
302 static string GetPathToParticles()
304 return "graphics/particles/";
308 static void PreloadParticles()
312 int count = m_ParticlePaths.Count();
317 for (
int i = 0; i < count; ++i)
319 string path = m_ParticlePaths.Get(i);