641{
  659    
  661    
  662    
  663    
  664    
  665    
  667    {       
  668        m_Name = config_OnFire_entry;
 
  669        
  670        
  672        
  673        
  675        
  676        
  678        
  680        if (
GetGame().ConfigIsExisting(
string.Format(
"%1 muzzleIndex", 
m_Name)))
 
  681        {
  683        }
  684        
  685        
  688        
  689        
  692        
  693        
  696        
  697        if (health_limit.Count() == 2)
  698        {
  701        }
  702        else
  703        {
  704            
  707        }
  708        
  709        
  712        
  713        if (overheat_limit.Count() == 2)
  714        {
  717        }
  718        else
  719        {
  720            
  723        }
  724        
  725        
  728        
  729        if (rain_limit.Count() == 2)
  730        {
  733        }
  734        else
  735        {
  736            
  739        }
  740        
  741        
  744        
  747        
  748        
  749        string particle_name = "";
  751        
  752        if (particle_name != "")
  753        {
  755        }
  756        else
  757        {
  759            ErrorEx(
string.Format(
"'%1' does not contain a definition for 'overrideparticle'",
 
  761        }
  762        
  763        
  766        
  768        {
  769            
  771            
  773            {
  775            }
  776        }
  777        
  778        
  781        
  782        if (v.Count() == 3)
  783        {
  784            float v1 = v.Get(0);
  785            float v2 = v.Get(1);
  786            float v3 = v.Get(2);
  788        }
  789    }
  790    
  791    
  792    
  793    
  794    
  795    
  796    
  797    
  799    {
  801        {
  802            
  804            {
  806                {
  808                    {
  810                        {
  812                            {
  814                                {
  816                                    {
  818                                        {
  820                                            {
  821                                                
  823 
  825                                                {
  826                                                    
  829                                                
  830                                                    
  832                                                
  833                                                    
  835                                                    OnParticleCreated(weapon, ammoType, muzzle_owner, suppressor, config_to_search, p);
 
  836                                                }
  837                                                else
  838                                                {
  839                                                    ErrorEx(
string.Format(
"No valid particle found for: '%1'", 
m_Name));
 
  840                                                }
  841                                                
  842                                                
  844                                                {
  845                                                    vector global_pos = muzzle_owner.ModelToWorld(local_pos + 
Vector(-0.2, 0, 0));
 
  847                                                    if ( randX > 8 )
  849                                                    else if ( randX > 4 )
  851                                                    else 
  853                                                }
  854                                            }
  855                                        }
  856                                    }
  857                                }
  858                            }
  859                        }
  860                    }
  861                }
  862            }
  863        }
  864    }
  865    
  867    {
  868        
  869    }
  870    
  872    {
  873        
  874    }
  875    
  877    {
  878        
  879    }
  880    
  881    
  882    
  883    
  884    
  885    
  886    
  887    
  889    {
  891        {
  895        }
  896        
  897        return true;
  898    }
  899    
  900    
  902    {
  904    }
  905    
  906    
  908    {
  910    }
  911    
  912    
  914    {
  916    }
  917    
  918    
  920    {
  922        
  923        string particle_file = "";
  924        string cfg_path = "CfgAmmo " + ammoType + " muzzleFlashParticle";
  925        if (
GetGame().ConfigGetText( cfg_path, particle_file))
 
  927        
  928        
  929        
  931        {
  932            if (particle_file == "")
  933            {
  934                ErrorEx(
string.Format(
"Cannot spawn particle effect because item %1 is missing config parameter muzzleFlashParticle!", ammoType), 
ErrorExSeverity.INFO);
 
  935            }
  936            else
  937            {
  939                
  941                {
  942                    string devStr;
  943                    #ifdef DEVELOPER
  944                    devStr = " Make sure it's registered there and then rebuild Scripts and Graphics PBOs.";
  945                    #endif
  946                    ErrorEx(
string.Format(
"Cannot play particle effect with name %1 because no such file is registered in ParticleList.c!%2", particle_file, devStr));
 
  948                }
  949            }
  950        }
  951        else
  952        {
  954        }
  955        
  957    }
  958    
  959    
  961    {
  962        vector particle_ori = 
"0 0 0";
 
  964        {
  968        }
  969        else
  970        {
  972            {
  974            }
  975            
  977            {
  978                particle_ori = particle_ori + 
Vector(0,0,270); 
 
  979            }
  980        }
  981        
  982        return particle_ori;
  983    }
  984}
  985 
  986
  988 
  989
  991 
  992
  994{
  996    {
  998    }
  999    
 1001    {
 1003        {
 1004            weapon.KillAllOverheatingParticles();
 1005        }
 1006    }
 1007    
 1009    {
 1010        OnActivate(weapon, 0, ammoType, muzzle_owner, suppressor, config_to_search);
 
 1011    }
 1012}
 1013 
 1015{
 1021    
 1024    
 1026    {
 1028    }
 1029    
 1031    {
 1033    }
 1034    
 1036    {
 1038    }
 1039    
 1041    {
 1043    }
 1044    
 1046    {
 1048    }
 1049    
 1051    {
 1053    }
 1054    
 1056    {
 1061    }
 1062    
 1064    {
 1066    }
 1067    
 1069    {
 1071    }
 1072    
 1074    {
 1076    }
 1077    
 1079    {
 1081    }
 1082}
class GP5GasMask extends MaskBase ItemBase
 
void MuzzleFlashLight_1()
 
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
 
bool CheckRainCondition(float rain_coef)
 
void OnDeactivate(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
 
float m_OnlyWithinOverheatLimitsMin
 
vector m_OverrideDirectionVector
 
string m_OverrideDirectionPoint
 
float m_OnlyWithinRainLimitsMax
 
class WeaponParticlesBase OnParticleCreated(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search, Particle p)
 
void WeaponParticlesBase(ItemBase muzzle_owner, string config_OnFire_entry)
 
int CheckParticleOverride(string ammoType)
 
float m_OnlyWithinRainLimitsMin
 
vector CheckOrientationOverride(vector local_pos, ItemBase muzzle_owner)
 
bool CheckHealthCondition(int health_label)
 
bool m_IgnoreIfSuppressed
 
int m_OnlyWithinHealthLabelMin
 
bool CheckBoltStateCondition(ItemBase weapon)
 
float m_OnlyWithinOverheatLimitsMax
 
int m_OnlyWithinHealthLabelMax
 
bool CheckOverheatingCondition(float overheating_coef)
 
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 OnDeactivate(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
 
void OnParticleCreated(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search, Particle p)
 
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].