629{
647
649
650
651
652
653
655 {
657
658
660
661
663
664
666
668 if (
GetGame().ConfigIsExisting(
string.Format(
"%1 muzzleIndex",
m_Name)))
669 {
671 }
672
673
676
677
680
681
684
686 {
689 }
690 else
691 {
692
695 }
696
697
700
702 {
705 }
706 else
707 {
708
711 }
712
713
716
718 {
721 }
722 else
723 {
724
727 }
728
729
732
735
736
739
741 {
743 }
744 else
745 {
747 ErrorEx(
string.Format(
"'%1' does not contain a definition for 'overrideparticle'",
749 }
750
751
754
756 {
757
759
761 {
763 }
764 }
765
766
768 GetGame().ConfigGetFloatArray(
string.Format(
"%1 positionOffset",
m_Name),
v);
769
771 {
776 }
777 }
778
779
780
781
782
783
784
785
787 {
789 {
790
792 {
794 {
796 {
798 {
800 {
802 {
804 {
806 {
808 {
809
811
813 {
814
817
818
820
821
824 }
825 else
826 {
827 ErrorEx(
string.Format(
"No valid particle found for: '%1'",
m_Name));
828 }
829
830
832 {
837 else if (
randX > 4 )
839 else
841 }
842 }
843 }
844 }
845 }
846 }
847 }
848 }
849 }
850 }
851 }
852 }
853
855 {
856
857 }
858
860 {
861
862 }
863
865 {
866
867 }
868
869
870
871
872
873
874
875
877 {
879 {
883 }
884
885 return true;
886 }
887
888
890 {
892 }
893
894
896 {
898 }
899
900
902 {
904 }
905
906
908 {
910
915
916
917
919 {
921 {
922 ErrorEx(
string.Format(
"Cannot spawn particle effect because item %1 is missing config parameter muzzleFlashParticle!",
ammoType),
ErrorExSeverity.INFO);
923 }
924 else
925 {
927
929 {
931 #ifdef DEVELOPER
932 devStr =
" Make sure it's registered there and then rebuild Scripts and Graphics PBOs.";
933 #endif
934 ErrorEx(
string.Format(
"Cannot play particle effect with name %1 because no such file is registered in ParticleList.c!%2",
particle_file,
devStr));
936 }
937 }
938 }
939 else
940 {
942 }
943
945 }
946
947
949 {
952 {
956 }
957 else
958 {
960 {
962 }
963
965 {
967 }
968 }
969
971 }
972}
973
974
976
977
979
980
982{
984 {
986 }
987
989 {
991 {
992 weapon.KillAllOverheatingParticles();
993 }
994 }
995
997 {
999 }
1000}
1001
1003{
1009
1012
1014 {
1016 }
1017
1019 {
1021 }
1022
1024 {
1026 }
1027
1029 {
1031 }
1032
1034 {
1036 }
1037
1039 {
1041 }
1042
1044 {
1049 }
1050
1052 {
1054 }
1055
1057 {
1059 }
1060
1062 {
1064 }
1065
1067 {
1069 }
1070}
void OnDeactivate(PlayerBase player)
Definition HeavyMetal.c:211
void MuzzleFlashLight_1()
Definition MuzzleFlashLight.c:24
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
int particle_id
Definition SmokeSimulation.c:28
void OnActivate()
Definition Trap_LandMine.c:67
void OnDeactivate(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
Definition WeaponParticles.c:592
vector CheckOrientationOverride(vector local_pos, ItemBase muzzle_owner)
Definition WeaponParticles.c:681
float m_OnlyWithinOverheatLimitsMin
Definition WeaponParticles.c:370
bool CheckHealthCondition(int health_label)
Definition WeaponParticles.c:622
bool m_IlluminateWorld
Definition WeaponParticles.c:363
void WeaponParticlesBase(ItemBase muzzle_owner, string config_OnFire_entry)
Definition WeaponParticles.c:387
vector m_OverrideDirectionVector
Definition WeaponParticles.c:378
string m_Name
Definition WeaponParticles.c:381
int m_OverrideParticle
Definition WeaponParticles.c:367
string m_OverrideDirectionPoint
Definition WeaponParticles.c:374
float m_OnlyWithinRainLimitsMax
Definition WeaponParticles.c:373
class WeaponParticlesBase OnParticleCreated(ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search, Particle p)
Definition WeaponParticles.c:362
bool m_OnlyIfBoltIsOpen
Definition WeaponParticles.c:365
bool CheckOverheatingCondition(float overheating_coef)
Definition WeaponParticles.c:628
vector m_PositionOffset
Definition WeaponParticles.c:379
string m_OnlyIfWeaponIs
Definition WeaponParticles.c:376
string m_OnlyIfBulletIs
Definition WeaponParticles.c:375
int m_MuzzleIndex
Definition WeaponParticles.c:366
float m_OnlyWithinRainLimitsMin
Definition WeaponParticles.c:372
bool m_IgnoreIfSuppressed
Definition WeaponParticles.c:364
string m_OverridePoint
Definition WeaponParticles.c:377
int m_OnlyWithinHealthLabelMin
Definition WeaponParticles.c:368
int CheckParticleOverride(string ammoType)
Definition WeaponParticles.c:640
bool CheckRainCondition(float rain_coef)
Definition WeaponParticles.c:634
bool CheckBoltStateCondition(ItemBase weapon)
Definition WeaponParticles.c:609
float m_OnlyWithinOverheatLimitsMax
Definition WeaponParticles.c:371
int m_OnlyWithinHealthLabelMax
Definition WeaponParticles.c:369
Definition InventoryItem.c:731
Definition Mosin_Compensator.c:2
Definition ObjectTyped.c:2
Definition WeaponParticles.c:382
void SetOverheatingLimitMax(float max)
Definition WeaponParticles.c:407
float GetOverheatingLimitMin()
Definition WeaponParticles.c:412
void SetOverheatingLimitMin(float min)
Definition WeaponParticles.c:402
float m_OverheatingLimitMax
Definition WeaponParticles.c:390
float GetOverheatingLimitMax()
Definition WeaponParticles.c:417
int m_ParticleID
Definition WeaponParticles.c:384
Particle GetParticle()
Definition WeaponParticles.c:397
Particle m_Particle
Definition WeaponParticles.c:383
Object GetParticleParent()
Definition WeaponParticles.c:435
vector GetParticleOri()
Definition WeaponParticles.c:445
Object m_Parent
Definition WeaponParticles.c:385
void SetParticleParams(int particle_id, Object parent, vector local_pos, vector local_ori)
Definition WeaponParticles.c:422
vector GetParticlePos()
Definition WeaponParticles.c:440
int GetParticleID()
Definition WeaponParticles.c:430
void RegisterParticle(Particle p)
Definition WeaponParticles.c:392
float m_OverheatingLimitMin
Definition WeaponParticles.c:389
vector m_LocalPos
Definition WeaponParticles.c:386
vector m_LocalOri
Definition WeaponParticles.c:387
Legacy way of using particles in the game.
Definition Particle.c:7
Definition ParticleList.c:12
static bool IsValidId(int id)
Purely checks for an invalid number, does NOT mean it is actually registered.
Definition ParticleList.c:453
static int GetParticleIDByName(string name)
Returns particle's ID based on the filename (without .ptc suffix)
Definition ParticleList.c:483
Definition gameplay.c:1531
static bool m_GunParticlesState
Definition gameplay.c:1532
Definition PointLightBase.c:2
shorthand
Definition BoltActionRifle_Base.c:6
Definition WeaponParticles.c:8
represent weapon state base
Definition BulletHide.c:2
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110
static vector Direction(vector p1, vector p2)
Returns direction vector from point p1 to point p2.
Definition EnConvert.c:220
proto native CGame GetGame()
ErrorExSeverity
Definition EnDebug.c:62
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].