35 m_Name = config_OnFire_entry;
47 if (
GetGame().ConfigIsExisting(
string.Format(
"%1 muzzleIndex",
m_Name)))
64 if (health_limit.Count() == 2)
80 if (overheat_limit.Count() == 2)
96 if (rain_limit.Count() == 2)
116 string particle_name =
"";
119 if (particle_name !=
"")
126 ErrorEx(
string.Format(
"'%1' does not contain a definition for 'overrideparticle'",
202 OnParticleCreated(weapon, ammoType, muzzle_owner, suppressor, config_to_search, p);
206 ErrorEx(
string.Format(
"No valid particle found for: '%1'",
m_Name));
212 vector global_pos = muzzle_owner.ModelToWorld(local_pos +
Vector(-0.2, 0, 0));
216 else if ( randX > 4 )
290 string particle_file =
"";
291 string cfg_path =
"CfgAmmo " + ammoType +
" muzzleFlashParticle";
292 if (
GetGame().ConfigGetText( cfg_path, particle_file))
299 if (particle_file ==
"")
301 ErrorEx(
string.Format(
"Cannot spawn particle effect because item %1 is missing config parameter muzzleFlashParticle!", ammoType),
ErrorExSeverity.INFO);
311 devStr =
" Make sure it's registered there and then rebuild Scripts and Graphics PBOs.";
313 ErrorEx(
string.Format(
"Cannot play particle effect with name %1 because no such file is registered in ParticleList.c!%2", particle_file, devStr));
329 vector particle_ori =
"0 0 0";
345 particle_ori = particle_ori +
Vector(0,0,270);
371 weapon.KillAllOverheatingParticles();
377 OnActivate(weapon, 0, ammoType, muzzle_owner, suppressor, config_to_search);
class GP5GasMask extends MaskBase ItemBase
void MuzzleFlashLight_1()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
float m_OnlyWithinOverheatLimitsMin
float m_OnlyWithinOverheatLimitsMax
proto native vector ConfigGetVector(string path)
Get vector value from config on path.
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native void ConfigGetFloatArray(string path, out TFloatArray values)
Get array of floats from config on path.
float GetOverheatingLimitMax()
float m_OverheatingLimitMax
void SetOverheatingLimitMax(float max)
void SetParticleParams(int particle_id, Object parent, vector local_pos, vector local_ori)
Object GetParticleParent()
float GetOverheatingLimitMin()
float m_OverheatingLimitMin
void SetOverheatingLimitMin(float min)
void RegisterParticle(Particle p)
vector m_DefaultPos
Used for Wiggle API, to restore after unparenting.
vector m_DefaultOri
Used for Wiggle API, to restore after unparenting.
int GetParticleID()
Gets particle id.
Legacy way of using particles in the game.
static int GetParticleIDByName(string name)
Returns particle's ID based on the filename (without .ptc suffix)
static bool IsValidId(int id)
Purely checks for an invalid number, does NOT mean it is actually registered.
static bool m_GunParticlesState
void WeaponParticlesBase(ItemBase muzzle_owner, string config_OnFire_entry)
bool CheckRainCondition(float rain_coef)
void OnDeactivate(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
bool CheckHealthCondition(int health_label)
void OnUpdate(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
float m_OnlyWithinRainLimitsMin
int m_OnlyWithinHealthLabelMin
float m_OnlyWithinOverheatLimitsMax
float m_OnlyWithinRainLimitsMax
bool m_IgnoreIfSuppressed
float m_OnlyWithinOverheatLimitsMin
vector CheckOrientationOverride(vector local_pos, ItemBase muzzle_owner)
bool CheckOverheatingCondition(float overheating_coef)
int CheckParticleOverride(string ammoType)
string m_OverrideDirectionPoint
void OnParticleCreated(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search, Particle p)
bool CheckBoltStateCondition(ItemBase weapon)
vector m_OverrideDirectionVector
int m_OnlyWithinHealthLabelMax
void OnActivate(ItemBase weapon, int muzzle_index, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
represent weapon state base
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static vector Direction(vector p1, vector p2)
Returns direction vector from point p1 to point p2.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].