Stand/Stand/Particles.hpp
2024-10-16 11:20:42 +08:00

614 lines
22 KiB
C++

#pragma once
#include "natives.hpp"
#include "Script.hpp"
namespace Stand
{
struct Particle
{
const char* rawName;
const char* assetCategory;
constexpr Particle(const char* rawName, const char* assetCategory = "core")
: rawName(rawName),assetCategory(assetCategory)
{
}
};
inline Particle g_particle_chaff("scr_sm_counter_chaff", "scr_sm_counter");
class Particles
{
public:
static inline Particle particles[] = {
// scr_sm_counter
Particle("scr_sm_counter_chaff", "scr_sm_counter"),
// scr_rcbarry2
Particle("muz_clown", "scr_rcbarry2"),
Particle("scr_clown_death", "scr_rcbarry2"),
Particle("scr_exp_clown", "scr_rcbarry2"),
Particle("scr_clown_appears", "scr_rcbarry2"),
Particle("scr_clown_bul", "scr_rcbarry2"),
// scr_rcbarry1
Particle("scr_alien_teleport", "scr_rcbarry1"),
Particle("scr_alien_disintegrate", "scr_rcbarry1"),
Particle("scr_alien_impact_bul", "scr_rcbarry1"),
// scr_rcpaparazzo1
Particle("scr_mich4_firework_burst_spawn", "scr_rcpaparazzo1"),
Particle("scr_rcpap1_camera", "scr_rcpaparazzo1"),
Particle("scr_mich4_firework_trailburst_spawn", "scr_rcpaparazzo1"),
// proj_indep_firework
Particle("scr_indep_firework_grd_burst", "proj_indep_firework"),
Particle("scr_indep_firework_air_burst", "proj_indep_firework"),
// scr_indep_fireworks
Particle("scr_indep_firework_starburst", "scr_indep_fireworks"),
Particle("scr_indep_firework_shotburst", "scr_indep_fireworks"),
Particle("scr_indep_firework_trailburst", "scr_indep_fireworks"),
Particle("scr_indep_firework_trailburst_spawn", "scr_indep_fireworks"),
Particle("scr_indep_firework_burst_spawn", "scr_indep_fireworks"),
Particle("scr_indep_firework_trail_spawn", "scr_indep_fireworks"),
Particle("scr_indep_firework_fountain", "scr_indep_fireworks"),
// scr_sr_adversary
Particle("scr_sr_lg_take_zone", "scr_sr_adversary"),
Particle("scr_sr_dst_cardboard", "scr_sr_adversary"),
// scr_stunts
Particle("scr_stunts_shotburst", "scr_stunts"),
Particle("scr_stunts_shotburst_spawn", "scr_stunts"),
// scr_sum2_hal
Particle("scr_sum2_hal_rider_death_green", "scr_sum2_hal"),
Particle("scr_sum2_hal_rider_death_blue", "scr_sum2_hal"),
Particle("scr_sum2_hal_hunted_death", "scr_sum2_hal"),
Particle("scr_sum2_hal_rider_weak_greyblack", "scr_sum2_hal"),
Particle("scr_sum2_hal_rider_death_greyblack", "scr_sum2_hal"),
Particle("scr_sum2_hal_rider_weak_orange", "scr_sum2_hal"),
Particle("scr_sum2_hal_rider_weak_green", "scr_sum2_hal"),
Particle("scr_sum2_hal_rider_death_orange", "scr_sum2_hal"),
Particle("scr_sum2_hal_hunted_respawn", "scr_sum2_hal"),
Particle("scr_sum2_hal_rider_weak_blue", "scr_sum2_hal"),
// scr_sum_gy
Particle("scr_sum_gy_exp_water_bomb", "scr_sum_gy"),
// scr_sec
Particle("scr_sec_helicopter_impact", "scr_sec"),
// scr_fm_mp_missioncreator
Particle("ent_anim_cig_exhale_mth_car", "scr_fm_mp_missioncreator"),
Particle("scr_mp_generic_dst", "scr_fm_mp_missioncreator"),
Particle("scr_mp_drug_dst", "scr_fm_mp_missioncreator"),
Particle("scr_mp_elec_dst", "scr_fm_mp_missioncreator"),
Particle("scr_mp_dust_cloud", "scr_fm_mp_missioncreator"),
Particle("scr_sh_lighter_sparks", "scr_fm_mp_missioncreator"),
Particle("scr_sh_bong_smoke", "scr_fm_mp_missioncreator"),
// scr_agencyheistb
Particle("scr_agency3b_wood_splinter", "scr_agencyheistb"),
Particle("scr_fbi5b_fragment", "scr_agencyheistb"),
Particle("scr_agency3b_linger_smoke", "scr_agencyheistb"),
Particle("scr_agency3b_heli_expl", "scr_agencyheistb"),
Particle("scr_agency_atrium_silt", "scr_agencyheistb"),
Particle("scr_agency_atrium_glass", "scr_agencyheistb"),
Particle("sp_ent_sparking_wires", "scr_agencyheistb"),
Particle("scr_agency_heli_slide_dust", "scr_agencyheistb"),
Particle("scr_agency3b_heli_exp_trail", "scr_agencyheistb"),
// scr_agencyheist
Particle("scr_fbi_mop_drips", "scr_agencyheist"),
Particle("scr_agency3a_door_hvy_trig", "scr_agencyheist"),
//Particle("scr_agency_atrium_glass", "scr_agencyheist"), // already present due to scr_agencyheistb
Particle("scr_fbi_exp_building", "scr_agencyheist"),
Particle("sp_fire_trail", "scr_agencyheist"),
// scr_fbi5a
Particle("ped_talk_water", "scr_fbi5a"),
// scr_mp_creator
//Particle("scr_mp_dust_cloud", "scr_mp_creator"), // already present due to scr_fm_mp_missioncreator
// scr_minigamegolf
Particle("scr_golf_ball_trail"),
// core
Particle("ent_anim_cig_smoke_car"),
Particle("bul_gravel_heli"),
Particle("ent_dst_concrete_large"),
Particle("bul_wood_splinter"),
Particle("exp_grd_grenade_lod"),
Particle("exp_arc_grd_flashbang_lod"),
Particle("ent_dst_gen_gobstop"),
Particle("ent_dst_inflate_ball"),
Particle("exp_grd_plane_post"),
Particle("eject_stungun"),
Particle("water_splash_obj_in"),
Particle("blood_stab"),
Particle("ent_brk_metal_frag"),
Particle("bul_water_heli"),
Particle("ent_sht_oil"),
Particle("bul_decal_water_heli"),
Particle("ent_sht_water_tower"),
Particle("bul_hay"),
Particle("bul_sand_loose_heli"),
Particle("ent_sht_beer_barrel"),
Particle("veh_sub_crush"),
Particle("ent_anim_paparazzi_flash"),
Particle("exp_grd_petrol_pump"),
Particle("exp_air_molotov"),
Particle("mel_carmetal"),
Particle("bul_concrete"),
Particle("exp_air_rpg_lod"),
Particle("water_splash_vehicle"),
Particle("ent_dst_wood_chunky"),
Particle("td_blood_shotgun"),
Particle("ent_dst_elec_fire_sp"),
Particle("exp_air_grenade_lod"),
Particle("water_splash_plane_in"),
Particle("td_blood_throat"),
Particle("ent_dst_polystyrene"),
Particle("exp_air_molotov_lod"),
Particle("eject_minigun"),
Particle("veh_backfire"),
Particle("ent_dst_inflate_ring"),
Particle("eject_auto"),
Particle("bang_concrete"),
Particle("ent_sht_gloopy_liquid"),
Particle("ent_sht_petrol"),
Particle("blood_chopper"),
Particle("ent_dst_gen_paper"),
Particle("ent_sht_flame"),
Particle("exp_grd_plane_sp"),
Particle("ent_sht_bush_foliage"),
Particle("ent_dst_sweet_boxes"),
Particle("ent_dst_casino_chips"),
Particle("ent_dst_cig_packets"),
Particle("ent_dst_wood_splinter"),
Particle("bul_gravel"),
Particle("ent_brk_concrete"),
Particle("ent_sht_steam"),
Particle("exp_air_rpg_plane"),
Particle("exp_grd_plane"),
Particle("bang_mud"),
Particle("exp_air_rpg_plane_sp"),
Particle("ent_col_tree_oranges"),
Particle("bul_stungun_metal"),
Particle("veh_respray_smoke"),
Particle("sp_petrolcan_splash"),
Particle("ped_parachute_open"),
Particle("ent_anim_street_sweep"),
Particle("bang_wood"),
Particle("bul_glass"),
Particle("glass_smash"),
Particle("liquid_splash_oil"),
Particle("blood_animal_maul"),
Particle("bang_blood"),
Particle("ent_brk_gate_smoke"),
Particle("bul_mud_heli"),
Particle("bul_cardboard"),
Particle("bul_carmetal_heli"),
Particle("exp_grd_sub_large"),
Particle("ent_col_rocks"),
Particle("water_splash_veh_out"),
Particle("ent_dst_gen_water_spray"),
Particle("bul_decal_oil"),
Particle("ent_dst_gen_food"),
Particle("ent_anim_dusty_hands"),
Particle("exp_grd_tankshell_lod"),
Particle("bul_glass_mini"),
Particle("bul_plastic"),
Particle("bul_dirt_heli"),
Particle("exp_grd_sticky_sp"),
Particle("water_amph_car_entry"),
Particle("veh_plane_eject"),
Particle("exp_grd_petrol_pump_sp"),
Particle("td_blood_stab"),
Particle("ent_ray_heli_aprtmnt_water"),
Particle("blood_armour_heavy"),
Particle("water_splash_ped_out"),
Particle("ent_dst_rubbish"),
Particle("ent_dst_glass_bottles"),
Particle("bul_glass_shotgun"),
Particle("ent_dst_ceramics_tint"),
Particle("bul_rubber_dust"),
Particle("exp_grd_plane_lod"),
Particle("ent_brk_wood_splinter"),
Particle("water_splash_bike_out"),
Particle("ent_brk_steam_burst"),
Particle("exp_extinguisher"),
Particle("water_splash_ped_in"),
Particle("bul_leaves"),
Particle("liquid_splash_blood"),
Particle("exp_air_blimp2_sp"),
Particle("exp_water"),
Particle("exp_grd_sub_large_spawn"),
Particle("bul_mud"),
Particle("exp_grd_molotov_lod"),
Particle("ent_brk_tree_trunk_bark"),
Particle("eject_auto_fp"),
Particle("bul_foam"),
Particle("ent_col_bush_leaves"),
Particle("exp_grd_rpg_post"),
Particle("blood_mist"),
Particle("wtr_rocks_wall_splash"),
Particle("bul_concrete_heli"),
Particle("ent_anim_bm_water_scp"),
Particle("ent_sht_molten_liquid"),
Particle("bul_concrete_minigun"),
Particle("exp_bird_crap"),
Particle("ent_sht_paint_cans"),
Particle("veh_light_amber"),
Particle("ent_dst_paint_cans"),
Particle("exp_grd_train"),
Particle("liquid_splash_gloopy"),
Particle("ent_sht_water"),
Particle("ent_col_palm_leaves"),
Particle("ent_dst_gen_liquid_burst"),
Particle("ent_dst_wood_planks"),
Particle("ent_brk_tree_leaves"),
Particle("exp_air_rpg_plane_lod"),
Particle("td_blood_hatchet"),
Particle("bul_decal_blood"),
Particle("exp_air_rpg_sp"),
Particle("bul_grass"),
Particle("ent_sht_cactus"),
Particle("blood_entry_head_sniper"),
Particle("td_blood_hatchet_back"),
Particle("bul_wood_splinter_heli"),
Particle("exp_grd_molotov"),
Particle("ent_dst_gen_plastic_cont"),
Particle("exp_grd_vehicle_lod"),
Particle("ent_dst_office_paper"),
Particle("liquid_splash_petrol"),
Particle("ent_dst_gen_cardboard"),
Particle("ent_dst_plant_leaves"),
Particle("ent_brk_lamppost_base"),
Particle("liquid_splash_pee"),
Particle("bul_paper"),
Particle("bul_brick"),
Particle("mel_concrete"),
Particle("ent_ray_heli_aprtmnt_embers"),
Particle("bul_glass_tv"),
Particle("liquid_splash_paint"),
Particle("water_splash_veh_in"),
Particle("fire_wrecked_plane"),
Particle("ent_ray_tanker_petrol_spray"),
Particle("ent_amb_candle_flame"),
Particle("exp_grd_grenade"),
Particle("ent_amb_wfall_splash_sml"),
Particle("exp_grd_vehicle_spawn"),
Particle("ent_dst_electrical"),
Particle("bul_carmetal"),
Particle("veh_slipstream"),
Particle("ent_amb_leaves_oak_g"),
Particle("ent_dst_veg_shrub"),
Particle("fire_wrecked_truck"),
Particle("water_cannon_jet"),
Particle("ent_ray_ch2_farm_smoke_dble"),
Particle("ent_ray_heli_aprtmnt_exp"),
Particle("ent_dst_concrete"),
Particle("ent_ray_heli_aprtmnt_sprk_wrs"),
Particle("env_wind_debris_city"),
Particle("ent_sht_blood"),
Particle("exp_grd_propane"),
Particle("fire_wrecked_bike"),
Particle("veh_panel_shut_tank"),
Particle("water_boat_exit"),
Particle("ent_sht_paper_bails"),
Particle("ent_amb_smoke_general"),
Particle("blood_entry_shotgun"),
Particle("ent_dst_upholstery"),
Particle("ent_amb_elec_crackle_sp"),
Particle("_fog_plane"),
Particle("exp_grd_sticky_lod"),
Particle("blood_entry_sniper"),
Particle("ent_dst_donuts"),
Particle("water_splash_sub_in"),
Particle("ent_dst_hobo_trolley"),
Particle("bul_chickenfarm"),
Particle("exp_grd_vehicle_post"),
Particle("ent_col_electrical"),
Particle("veh_plane_propeller_destroy"),
Particle("scr_fbi_falling_dust"),
Particle("ent_brk_blood"),
Particle("exp_grd_bzgas_smoke"),
Particle("ent_sht_petrol_fire"),
Particle("ent_amb_abattoir_saw_blood"),
Particle("bul_decal_water"),
Particle("ent_amb_snow_mist_upper"),
Particle("ent_dst_elec_fire"),
Particle("exp_grd_petrol_pump_spawn"),
Particle("fire_wrecked_car_vent"),
Particle("veh_panel_shut_feltzer2010"),
Particle("ent_dst_newspaper"),
Particle("ent_brk_wood_planks"),
Particle("mel_glass"),
Particle("blood_headshot"),
Particle("blood_throat"),
Particle("trail_splash_water"),
Particle("ent_anim_bm_water_mist"),
Particle("ent_amb_fly_zapped_spawned"),
Particle("exp_grd_rpg_sp"),
Particle("env_bar_haze"),
Particle("exp_grd_sticky"),
Particle("exp_grd_gas_can"),
Particle("water_splash_sub_out"),
Particle("glass_windscreen"),
Particle("ent_dst_elec_crackle"),
Particle("eject_heli_gun"),
Particle("ent_sht_extinguisher"),
Particle("ent_amb_stoner_dust_drop"),
Particle("ent_anim_gardener_plant"),
Particle("veh_panel_open_carHK"),
Particle("fire_wheel"),
Particle("veh_light_red_trail"),
Particle("ent_amb_falling_cherry_bloss"),
Particle("ent_dst_inflatable"),
Particle("bang_carmetal"),
Particle("wtr_sea_pole_splash"),
Particle("bang_blood_car"),
Particle("water_splash_ped"),
Particle("ent_amb_int_fireplace_sml"),
Particle("ent_amb_pro_elec_fires"),
Particle("veh_wingtip"),
Particle("ent_sht_cardboard"),
Particle("exp_grd_vehicle_sp"),
Particle("ent_amb_river_splash_gen"),
Particle("exp_grd_tankshell"),
Particle("ped_parachute_trail"),
Particle("rim_fric_hard"),
Particle("ent_brk_coins"),
Particle("ent_amb_rapid_dir_spray"),
Particle("veh_sub_dive"),
Particle("ent_anim_animal_graze"),
Particle("exp_air_blimp"),
Particle("ent_amb_stoner_falling_wchips"),
Particle("exp_grd_rpg_plane_sp"),
Particle("blood_mist_prop"),
Particle("env_wind_debris_woodland"),
Particle("bullet_tracer_jet"),
Particle("ent_amb_leaves_ficus_g"),
Particle("veh_overturned_exhaust"),
Particle("blood_entry"),
Particle("eject_shotgun"),
Particle("sp_fire_trail_heli"),
Particle("ent_brk_uprooted"),
Particle("exp_grd_barrel"),
Particle("exp_grd_vehicle"),
Particle("ent_ray_heli_aprtmnt_h_fire"),
Particle("exp_grd_rpg_lod"),
Particle("fire_ped_smoulder"),
Particle("ent_amb_fly_zapped"),
Particle("veh_air_debris"),
Particle("ent_sht_dust"),
Particle("veh_panel_open_truck"),
Particle("bullet_tracer"),
Particle("ent_dst_chick_carcass"),
Particle("ent_amb_generator_smoke"),
Particle("exp_grd_sub_large_sp"),
Particle("env_gunsmoke_paper_factory"),
Particle("ent_amb_river_mist_gen"),
Particle("bul_tarmac_heli"),
Particle("ent_amb_fire_gaswork"),
Particle("ent_amb_cluckb_steam"),
Particle("water_amph_quad_entry"),
Particle("ent_col_tree_leaves"),
Particle("ent_amb_stoner_woodchip_drop"),
Particle("water_splash_veh_trail"),
Particle("ent_dst_inflate_ball_clr"),
Particle("exp_grd_gren_sp"),
Particle("env_wind_debris_desert"),
Particle("ent_brk_banknotes"),
Particle("ent_amb_fountain_mansion2"),
Particle("ent_amb_stoner_rubble_drop"),
Particle("ent_amb_sol1_plane_wreck"),
Particle("fire_vehicle"),
Particle("ent_anim_cig_exhale_mth"),
Particle("ent_ray_paleto_gas_plume_amb_L"),
Particle("eject_pistol"),
Particle("glass_side_window_PC"),
Particle("ent_amb_cockroaches"),
Particle("ent_dst_pineapple"),
Particle("ent_amb_bubble_stream"),
Particle("ent_dst_metal_frag"),
Particle("water_splash_bicycle_out"),
Particle("eject_shotgun_fp"),
Particle("exp_grd_plane_spawn"),
Particle("mp_parachute_smoke"),
Particle("ent_dst_mail"),
Particle("ent_amb_abattoir_carcass"),
Particle("ent_anim_hen_flee"),
Particle("ent_col_falling_snow"),
Particle("exp_sht_extinguisher"),
Particle("ent_dst_crispbags"),
Particle("ent_sht_beer_containers"),
Particle("ent_amb_wfall_splash_lg"),
Particle("bang_metal"),
Particle("fire_ped_limb"),
Particle("ent_ray_heli_aprtmnt_s_fire_sq"),
Particle("ent_anim_cig_exhale_nse_car"),
Particle("bullet_tracer_mg"),
Particle("scrape_dirt_dry"),
Particle("fire_wrecked_rc"),
Particle("ent_ray_paleto_gas_plume_amb"),
Particle("water_cannon_spray"),
Particle("ent_amb_cold_air_vent"),
Particle("bul_stungun"),
Particle("blood_mouth"),
Particle("exp_arc_stun_grenade_lod"),
Particle("water_splash_plane_out"),
Particle("ent_amb_wfall_splash_med"),
Particle("ent_amb_falling_leaves_l"),
Particle("fire_wrecked_heli"),
Particle("ent_brk_cactus"),
Particle("liquid_splash_water"),
Particle("bang_dirt_dry"),
Particle("water_heli_blades"),
Particle("bul_plaster_brittle"),
Particle("fire_wrecked_tank_cockpit"),
Particle("eject_sniper_amrifle"),
Particle("bul_decal_mud"),
Particle("bul_brick_heli"),
Particle("scrape_blood_car"),
Particle("exp_arc_grd_flashbang"),
Particle("veh_faggio_exhaust"),
Particle("td_blood_melee_blunt"),
Particle("ent_amb_floating_debris"),
Particle("ent_col_gen_tree_dust"),
Particle("bang_hydraulics"),
Particle("exp_air_plane_rpg_spawn"),
Particle("ent_ray_heli_aprtmnt_silt"),
Particle("exp_xs_ray"),
Particle("ent_amb_trev1_trailer_sp_f"),
Particle("ent_amb_dry_ice_vent"),
Particle("eject_pistol_fp"),
Particle("scr_fbi_ground_debris"),
Particle("env_stripclub_haze"),
Particle("blood_stungun"),
Particle("veh_wingtip_cargo"),
Particle("bul_bushes"),
Particle("bang_plastic"),
Particle("ent_amb_stoner_falling_debris"),
Particle("ent_sht_extinguisher_water"),
Particle("fire_map"),
Particle("exp_grd_sub_large_spawn_sp"),
Particle("ent_amb_fountain_pour"),
Particle("water_splash_generic"),
Particle("scrape_blood"),
Particle("ent_amb_moths_cupboard"),
Particle("bul_glass_heli"),
Particle("ent_amb_smoke_factory_white"),
Particle("exp_air_rpg"),
Particle("eject_sniper"),
Particle("ent_sht_rubbish"),
Particle("water_jetmax_exit"),
Particle("ent_amb_trevor_tap_drip"),
Particle("td_blood_pistol"),
Particle("veh_debris_trail"),
Particle("wtr_rocks_rnd_splash"),
Particle("ent_ray_fin_petrol_splash"),
Particle("fire_wrecked_bus"),
Particle("exp_grd_rpg_spawn"),
Particle("ent_dst_snow_tombs"),
Particle("exp_grd_rpg_plane"),
Particle("ent_amb_steam_vent_open_hvy"),
Particle("glass_shards"),
Particle("ent_sht_telegraph_pole"),
Particle("ent_dst_rocks"),
Particle("ent_amb_steam_vent_rnd_hvy"),
Particle("ent_amb_smoke_factory"),
Particle("eject_smg_fp"),
Particle("ent_dst_box_noodle"),
Particle("exp_air_grenade"),
Particle("ent_amb_acid_bath"),
Particle("blood_melee_blunt"),
Particle("blood_armour"),
Particle("ent_dst_bread"),
Particle("exp_air_blimp2"),
Particle("veh_rotor_break_tail"),
Particle("scrape_concrete"),
Particle("ped_breath"),
Particle("ent_amb_stoner_landing"),
Particle("water_splash_bicycle_in"),
Particle("water_splash_bike_trail"),
Particle("ped_breath_scuba"),
Particle("ent_ray_paleto_gas_window_fire"),
Particle("water_splash_bicycle_trail"),
Particle("blood_fall"),
Particle("env_wind_debris_mountain"),
Particle("ent_dst_pumpkin"),
Particle("ent_amb_water_roof_pour_long"),
Particle("sp_fire_trail_plane"),
Particle("exp_sec_launched_emp"),
Particle("ent_dst_ceramics"),
Particle("veh_sub_leak"),
Particle("ent_amb_water_roof_pour"),
Particle("ent_dst_egg_mulch"),
Particle("ent_dst_gen_choc"),
Particle("env_smoke_fbi_thin"),
Particle("ent_anim_blown_radiator"),
Particle("bul_grass_heli"),
Particle("exp_grd_rpg"),
Particle("ent_amb_falling_leaves_s"),
Particle("ent_anim_bbq"),
Particle("exp_arc_stun_grenade"),
Particle("veh_oil_leak"),
Particle("ent_amb_rapid_dir_splash"),
Particle("bul_dirt"),
Particle("bul_decal_petrol"),
Particle("bul_tarmac"),
Particle("blood_wheel"),
Particle("ent_dst_glass_bulb"),
Particle("ent_sht_electrical_box"),
Particle("ent_dst_dust"),
Particle("ent_dst_rocks_small"),
Particle("water_splash_bike_in"),
Particle("ent_dst_chip_carrier"),
Particle("ent_dst_inflate_lilo"),
Particle("eject_sniper_heavy"),
Particle("exp_grd_petrol_pump_post"),
Particle("bul_water"),
Particle("ent_sht_feathers"),
Particle("ent_brk_champagne_case"),
Particle("glass_side_window"),
Particle("ent_ray_prologue_elec_crackle_sp"),
Particle("veh_rotor_break"),
};
static void request(const Particle* particle)
{
STREAMING::REQUEST_NAMED_PTFX_ASSET(particle->assetCategory);
}
[[nodiscard]] static bool hasLoaded(const Particle* particle)
{
return STREAMING::HAS_NAMED_PTFX_ASSET_LOADED(particle->assetCategory);
}
static void use(const Particle* particle)
{
GRAPHICS::USE_PARTICLE_FX_ASSET(particle->assetCategory);
}
static void load(const Particle* particle)
{
request(particle);
while (!hasLoaded(particle))
{
Script::current()->yield();
}
use(particle);
}
static void tryPlay(long long value, const v3& pos, const float scale = 1.0f)
{
const auto particle = reinterpret_cast<const Particle*>(value);
request(particle);
if (hasLoaded(particle))
{
use(particle);
playImpl(particle, pos, scale);
}
}
static void play(long long value, const v3& pos, const float scale = 1.0f)
{
const auto particle = reinterpret_cast<const Particle*>(value);
load(particle);
playImpl(particle, pos, scale);
}
private:
static void playImpl(const Particle* particle, const v3& pos, const float scale = 1.0f)
{
GRAPHICS::START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(particle->rawName, pos.x, pos.y, pos.z, 0.0f, 180.0f, 0.0f, scale, true, true, true, false);
}
};
}