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);
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 void ConfigGetFloatArray(string path, out TFloatArray values)
Get array of floats from config on path.
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native int ConfigGetInt(string path)
Get int value from config on path.
void SetOverheatingLimitMax(float max)
float GetOverheatingLimitMin()
void SetOverheatingLimitMin(float min)
float m_OverheatingLimitMax
float GetOverheatingLimitMax()
Object GetParticleParent()
void SetParticleParams(int particle_id, Object parent, vector local_pos, vector local_ori)
void RegisterParticle(Particle p)
float m_OverheatingLimitMin
Legacy way of using particles in the game.
vector m_DefaultOri
Used for Wiggle API, to restore after unparenting.
vector m_DefaultPos
Used for Wiggle API, to restore after unparenting.
int GetParticleID()
Gets particle id.
static bool IsValidId(int id)
Purely checks for an invalid number, does NOT mean it is actually registered.
static int GetParticleIDByName(string name)
Returns particle's ID based on the filename (without .ptc suffix)
static bool m_GunParticlesState
vector CheckOrientationOverride(vector local_pos, ItemBase muzzle_owner)
float m_OnlyWithinOverheatLimitsMin
bool CheckHealthCondition(int health_label)
void WeaponParticlesBase(ItemBase muzzle_owner, string config_OnFire_entry)
vector m_OverrideDirectionVector
string m_OverrideDirectionPoint
float m_OnlyWithinRainLimitsMax
void OnParticleCreated(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search, Particle p)
void OnActivate(ItemBase weapon, int muzzle_index, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
bool CheckOverheatingCondition(float overheating_coef)
void OnUpdate(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
float m_OnlyWithinRainLimitsMin
bool m_IgnoreIfSuppressed
int m_OnlyWithinHealthLabelMin
void OnDeactivate(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
int CheckParticleOverride(string ammoType)
bool CheckRainCondition(float rain_coef)
bool CheckBoltStateCondition(ItemBase weapon)
float m_OnlyWithinOverheatLimitsMax
int m_OnlyWithinHealthLabelMax
represent weapon state base
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
static vector Direction(vector p1, vector p2)
Returns direction vector from point p1 to point p2.
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].
void OnDeactivate()
called when command ends
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.