diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/7z/7z.dll b/7z/7z.dll new file mode 100644 index 0000000..654f92e Binary files /dev/null and b/7z/7z.dll differ diff --git a/7z/7zG.exe b/7z/7zG.exe new file mode 100644 index 0000000..124bb10 Binary files /dev/null and b/7z/7zG.exe differ diff --git a/Alpha Prime/Mod/Alpha Prime- Dominus Prime v7.8 file - Mod DB.url b/Alpha Prime/Mod/Alpha Prime- Dominus Prime v7.8 file - Mod DB.url new file mode 100644 index 0000000..e82eaba --- /dev/null +++ b/Alpha Prime/Mod/Alpha Prime- Dominus Prime v7.8 file - Mod DB.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://www.moddb.com/mods/alpha-prime-dominus-prime/downloads/alpha-prime-dominus-prime-v75 diff --git a/Alpha Prime/Mod/PhysXLoader.dll b/Alpha Prime/Mod/PhysXLoader.dll new file mode 100644 index 0000000..0f91a60 Binary files /dev/null and b/Alpha Prime/Mod/PhysXLoader.dll differ diff --git a/Alpha Prime/Mod/Readme.rtf b/Alpha Prime/Mod/Readme.rtf new file mode 100644 index 0000000..3f97e3b Binary files /dev/null and b/Alpha Prime/Mod/Readme.rtf differ diff --git a/Alpha Prime/Mod/particle/GatlingLE_smoke.ptc b/Alpha Prime/Mod/particle/GatlingLE_smoke.ptc new file mode 100644 index 0000000..8901125 --- /dev/null +++ b/Alpha Prime/Mod/particle/GatlingLE_smoke.ptc @@ -0,0 +1,105 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "2" +ShapeSize "0 0 5" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 20 0" +Velocity "20" +VelocityRND "2" +RotMultiplier "60" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "60" +KillOldest "0" +BirthRate "8" +BirthRateRND "1" +LifeTime "0.79" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "4" +Repeat "0" + + +ColorR 2 +0.000000 0.522388 +1.000000 0.216418 + +ColorG 2 +0.000000 0.582090 +1.000000 0.253731 + +ColorB 2 +0.000000 0.619403 +1.000000 0.313433 + +Alpha 4 +0.000000 0.000000 +0.090278 1.000000 +0.729167 0.691176 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 2 +0.000000 0.179104 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 4 +0.000000 0.000000 +0.152778 0.776119 +0.597222 0.955224 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 0.985075 + + diff --git a/Alpha Prime/Mod/particle/animfire_test_smoke.ptc b/Alpha Prime/Mod/particle/animfire_test_smoke.ptc new file mode 100644 index 0000000..9600352 --- /dev/null +++ b/Alpha Prime/Mod/particle/animfire_test_smoke.ptc @@ -0,0 +1,377 @@ +$EmitorDef "fire" +Shader "particle/animfire" +ShapeType "2" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "15 15 0" +Velocity "10" +VelocityRND "20" +RotMultiplier "50" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.3" +GravityMultiplyRND "0.05" +LOD "0" +MaxNum "75" +KillOldest "0" +BirthRate "10" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "27" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 4 +0.000000 0.000000 +0.118056 0.644928 +0.378472 1.000000 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.187500 0.804348 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "12 12 12" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "10" +VelocityRND "5" +RotMultiplier "0" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "2" +BirthRateRND "0" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.927536 +1.000000 0.905797 + +ColorG 2 +0.000000 0.166667 +1.000000 0.420290 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.604167 0.688406 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.375000 1.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/animsmoke" +ShapeType "2" +ShapeSize "12 12 12" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "30 30 0" +Velocity "20" +VelocityRND "30" +RotMultiplier "50" +SizeMultiplier "120" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.1" +AirResistanceRND "0" +GravityMultiply "-0.1" +GravityMultiplyRND "0.02" +LOD "0" +MaxNum "75" +KillOldest "0" +BirthRate "6" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "15" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 0.159420 +0.357639 0.028986 +1.000000 0.000000 + +ColorG 3 +0.000000 0.159420 +0.357639 0.108696 +1.000000 0.000000 + +ColorB 3 +0.000000 0.159420 +0.357639 0.108696 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.163194 0.000000 +0.305556 0.449275 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 2 +0.000000 0.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "hotspot" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "5 5 5" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "30 30 0" +Velocity "10" +VelocityRND "0" +RotMultiplier "50" +SizeMultiplier "65" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.4" +GravityMultiplyRND "0.1" +LOD "0" +MaxNum "75" +KillOldest "0" +BirthRate "10" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "1" +TilesY "1" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.905797 + +ColorG 2 +0.000000 1.000000 +1.000000 0.420290 + +ColorB 2 +0.000000 1.000000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.149306 0.956522 +0.729167 0.717391 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.246528 1.000000 +1.000000 0.492754 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/animfire_test_smoke_small.ptc b/Alpha Prime/Mod/particle/animfire_test_smoke_small.ptc new file mode 100644 index 0000000..634d6c6 --- /dev/null +++ b/Alpha Prime/Mod/particle/animfire_test_smoke_small.ptc @@ -0,0 +1,377 @@ +$EmitorDef "fire" +Shader "particle/animfire" +ShapeType "2" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "15 15 0" +Velocity "15" +VelocityRND "6" +RotMultiplier "50" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.13" +GravityMultiplyRND "0.02" +LOD "0" +MaxNum "75" +KillOldest "0" +BirthRate "6" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "25" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.000000 +0.368056 0.760870 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.496528 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "1 1 1" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "1 1 0" +Velocity "3" +VelocityRND "2" +RotMultiplier "1" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.05" +GravityMultiplyRND "0.02" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "2" +BirthRateRND "0" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "1" +TilesY "1" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.927536 +1.000000 0.905797 + +ColorG 2 +0.000000 0.166667 +1.000000 0.420290 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.055556 1.000000 +0.666667 0.739130 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.493056 1.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/animsmoke" +ShapeType "2" +ShapeSize "12 12 12" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "30 30 0" +Velocity "30" +VelocityRND "15" +RotMultiplier "50" +SizeMultiplier "75" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.1" +AirResistanceRND "0.6" +GravityMultiply "-0.1" +GravityMultiplyRND "0.06" +LOD "0" +MaxNum "75" +KillOldest "0" +BirthRate "6" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "10" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 0.159420 +0.357639 0.028986 +1.000000 0.000000 + +ColorG 3 +0.000000 0.159420 +0.357639 0.108696 +1.000000 0.000000 + +ColorB 3 +0.000000 0.159420 +0.357639 0.108696 +1.000000 0.000000 + +Alpha 3 +0.000000 0.000000 +0.208333 0.159420 +1.000000 0.507246 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.156250 0.630435 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "hotspot" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "50" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.15" +GravityMultiplyRND "0.1" +LOD "0" +MaxNum "75" +KillOldest "0" +BirthRate "5" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.905797 + +ColorG 2 +0.000000 1.000000 +1.000000 0.420290 + +ColorB 2 +0.000000 1.000000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.118056 1.000000 +0.711806 0.898551 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.246528 1.000000 +1.000000 0.492754 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/bigbigdust.ptc b/Alpha Prime/Mod/particle/bigbigdust.ptc new file mode 100644 index 0000000..d36b4ba --- /dev/null +++ b/Alpha Prime/Mod/particle/bigbigdust.ptc @@ -0,0 +1,98 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke3" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "360 100 0" +Velocity "3000" +VelocityRND "1500" +RotMultiplier "100" +SizeMultiplier "15000" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.8" +AirResistanceRND "0.5" +GravityMultiply "0.01" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "1000" +BirthRateRND "0" +LifeTime "15" +LifeTimeRND "5" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "0" +Spring "0" + + +ColorR 3 +0.000000 0.464286 +0.052083 0.364286 +1.000000 0.092857 + +ColorG 3 +0.000000 0.435714 +0.052083 0.278571 +1.000000 0.057143 + +ColorB 3 +0.000000 0.314286 +0.052083 0.135714 +1.000000 0.100000 + +Alpha 4 +0.000000 0.050000 +0.069444 0.935714 +0.465278 0.157143 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.038194 0.985714 +0.218750 0.271429 +1.000000 0.042857 + +Size 2 +0.000000 0.164286 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/bodyflame.ptc b/Alpha Prime/Mod/particle/bodyflame.ptc new file mode 100644 index 0000000..9343f47 --- /dev/null +++ b/Alpha Prime/Mod/particle/bodyflame.ptc @@ -0,0 +1,385 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "1" +KillShapeSize "40 40 40" +ConeAngle "360 20 0" +Velocity "20" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "7" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "25" +KillOldest "0" +BirthRate "50" +BirthRateRND "3" +LifeTime "0.25" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 3 +0.000000 0.000000 +0.041667 0.985294 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.045139 1.000000 +1.000000 0.595588 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "15 0 0" +KillShapeType "1" +KillShapeSize "50 50 50" +ConeAngle "360 10 0" +Velocity "20" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "50" +BirthRateRND "2" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.823529 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.823529 +0.055556 1.000000 +0.652778 0.316176 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 0.691176 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 30 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "2" +GravityMultiply "0.01" +GravityMultiplyRND "0" +MaxNum "5" +KillOldest "0" +BirthRate "20" +BirthRateRND "1" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.955882 + +ColorG 2 +0.000000 0.860294 +1.000000 0.242647 + +ColorB 2 +0.000000 0.470588 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.055556 1.000000 +0.746528 0.676471 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "2" +ShapeSize "12 0 0" +KillShapeType "1" +KillShapeSize "50 50 50" +ConeAngle "360 10 0" +Velocity "20" +VelocityRND "2" +RotMultiplier "50" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "50" +BirthRateRND "3" +LifeTime "0.3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.933824 +1.000000 0.522059 + +ColorB 2 +0.000000 0.794118 +1.000000 0.323529 + +Alpha 4 +0.000000 0.529412 +0.065972 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.397059 +0.097222 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 1.000000 +0.868056 0.816176 +1.000000 0.029412 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/boss_firestream.ptc b/Alpha Prime/Mod/particle/boss_firestream.ptc new file mode 100644 index 0000000..d483206 --- /dev/null +++ b/Alpha Prime/Mod/particle/boss_firestream.ptc @@ -0,0 +1,293 @@ +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "600" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "120" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "45" +BirthRateRND "2" +LifeTime "0.6" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.354167 0.159420 +1.000000 0.000000 + +ColorG 3 +0.000000 1.000000 +0.354167 0.398551 +1.000000 0.000000 + +ColorB 3 +0.000000 1.000000 +0.354167 0.746377 +1.000000 0.275362 + +Alpha 4 +0.000000 0.156716 +0.277778 1.000000 +0.763889 0.626866 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 0.417910 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/animfire_mask" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "600" +VelocityRND "0" +RotMultiplier "10" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "-0.5" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "40" +BirthRateRND "3" +LifeTime "0.75" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "1" +AnimFPS "25" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.166667 0.000000 +1.000000 0.000000 + +ColorG 3 +0.000000 1.000000 +0.166667 0.797101 +1.000000 0.000000 + +ColorB 3 +0.000000 1.000000 +0.166667 0.876812 +1.000000 0.000000 + +Alpha 3 +0.000000 0.000000 +0.309028 0.275362 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.239583 0.239130 +0.687500 0.978261 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "600" +VelocityRND "0" +RotMultiplier "150" +SizeMultiplier "10" +StretchMultiplier "3" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "400" +BirthRateRND "3" +LifeTime "0.2" +LifeTimeRND "0.1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.218750 0.159420 +1.000000 0.000000 + +ColorG 3 +0.000000 1.000000 +0.218750 0.710145 +1.000000 0.123188 + +ColorB 3 +0.000000 1.000000 +0.218750 0.789855 +1.000000 0.594203 + +Alpha 4 +0.000000 0.528986 +0.097222 1.000000 +0.621528 0.442029 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/carwheeldust.ptc b/Alpha Prime/Mod/particle/carwheeldust.ptc new file mode 100644 index 0000000..b31197c --- /dev/null +++ b/Alpha Prime/Mod/particle/carwheeldust.ptc @@ -0,0 +1,95 @@ +$EmitorDef "fire" +Shader "particle/smoke/smoke3" +ShapeType "1" +ShapeSize "16 16 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "200" +VelocityRND "2" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "3.5" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "150" +KillOldest "0" +BirthRate "20" +BirthRateRND "3" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.565217 +1.000000 0.347826 + +ColorG 2 +0.000000 0.420290 +1.000000 0.181159 + +ColorB 2 +0.000000 0.253623 +1.000000 0.057971 + +Alpha 4 +0.000000 0.500000 +0.305556 0.427536 +0.718750 0.057971 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +0.416667 0.652174 +1.000000 1.000000 + +Size 3 +0.000000 0.557971 +0.322917 0.862319 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/damaged_device0.ptc b/Alpha Prime/Mod/particle/damaged_device0.ptc new file mode 100644 index 0000000..50b753c --- /dev/null +++ b/Alpha Prime/Mod/particle/damaged_device0.ptc @@ -0,0 +1,206 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "1" +ShapeSize "32 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "5" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "200" +BirthRateRND "20" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.5" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.565972 0.649254 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1" +ShapeType "1" +ShapeSize "32 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "10" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.5" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 2 +0.000000 1.000000 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 5 +0.000000 1.000000 +0.239583 0.000000 +0.545139 0.970149 +0.774306 0.402985 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/damaged_device1.ptc b/Alpha Prime/Mod/particle/damaged_device1.ptc new file mode 100644 index 0000000..d9c9eb0 --- /dev/null +++ b/Alpha Prime/Mod/particle/damaged_device1.ptc @@ -0,0 +1,417 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "50" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.5" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 5 +0.000000 1.000000 +0.222222 0.000000 +0.576389 1.000000 +0.760417 0.335821 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "4" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "50" +BirthRateRND "20" +LifeTime "1" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.5" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.045139 0.485075 +1.000000 0.052239 + +ColorB 3 +0.000000 0.529851 +0.045139 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 5 +0.000000 1.000000 +0.159722 0.000000 +0.607639 1.000000 +0.760417 0.335821 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "30" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.5" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 2 +0.000000 1.000000 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 5 +0.000000 1.000000 +0.239583 0.000000 +0.545139 0.970149 +0.774306 0.402985 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke3" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "10" +VelocityRND "5" +RotMultiplier "100" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "5" +BirthRateRND "2" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.5" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 0.000000 +0.288194 0.753731 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.425373 + +Size 3 +0.000000 0.000000 +0.413194 0.917910 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 5 +0.000000 1.000000 +0.239583 0.000000 +0.545139 0.970149 +0.774306 0.402985 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/debrisflesh.ptc b/Alpha Prime/Mod/particle/debrisflesh.ptc new file mode 100644 index 0000000..0289981 --- /dev/null +++ b/Alpha Prime/Mod/particle/debrisflesh.ptc @@ -0,0 +1,331 @@ +$EmitorDef "sparksrandom" +Shader "particle/misc/dot" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "3" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "1.5" +AirResistanceRND "0" +GravityMultiply "1.2" +GravityMultiplyRND "0" +MaxNum "70" +KillOldest "0" +BirthRate "300" +BirthRateRND "10" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.3" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "80" +RestDensity "7000" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 2 +0.000000 0.213235 +1.000000 0.066176 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.586806 0.735294 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 0.522059 +0.100694 1.000000 +0.489583 1.000000 +1.000000 0.000000 + + +$EmitorDef "sparksrandomsmaller" +Shader "particle/misc/dotclamp" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 20 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "1.5" +AirResistanceRND "0.5" +GravityMultiply "1.2" +GravityMultiplyRND "0" +MaxNum "50" +KillOldest "0" +BirthRate "150" +BirthRateRND "10" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.3" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "80" +RestDensity "7000" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 2 +0.000000 0.176471 +1.000000 0.044118 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.732639 0.816176 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 0.492647 +0.121528 1.000000 +0.482639 1.000000 +1.000000 0.000000 + + +$EmitorDef "puff" +Shader "particle/water/stream1" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 35 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "1.5" +AirResistanceRND "0.5" +GravityMultiply "1.2" +GravityMultiplyRND "0" +MaxNum "50" +KillOldest "0" +BirthRate "150" +BirthRateRND "10" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.3" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "80" +RestDensity "7000" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + + +ColorR 2 +0.000000 0.191176 +1.000000 0.058824 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.732639 0.808824 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 0.492647 +0.121528 1.000000 +0.482639 1.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/debrisfleshmass.ptc b/Alpha Prime/Mod/particle/debrisfleshmass.ptc new file mode 100644 index 0000000..d5cd7f3 --- /dev/null +++ b/Alpha Prime/Mod/particle/debrisfleshmass.ptc @@ -0,0 +1,110 @@ +$EmitorDef "sparksrandom" +Shader "particle/water/stream1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 50 0" +Velocity "60" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0.5" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +MaxNum "50" +KillOldest "0" +BirthRate "150" +BirthRateRND "5" +LifeTime "0.6" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "800" +RestDensity "7000" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 2 +0.000000 0.161765 +1.000000 0.044118 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.854167 0.882353 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/debrismetal.ptc b/Alpha Prime/Mod/particle/debrismetal.ptc new file mode 100644 index 0000000..eebb247 --- /dev/null +++ b/Alpha Prime/Mod/particle/debrismetal.ptc @@ -0,0 +1,201 @@ +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 230 0" +Velocity "90" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +MaxNum "11" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "1" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.156250 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.156250 0.720588 +1.000000 0.433824 + +ColorB 3 +0.000000 0.801471 +0.156250 0.242647 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.534722 0.713235 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 230 0" +Velocity "30" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.281250 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.281250 0.926471 +1.000000 0.691176 + +ColorB 3 +0.000000 0.926471 +0.281250 0.205882 +1.000000 0.080882 + +Alpha 3 +0.000000 1.000000 +0.531250 0.713235 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/debrisstone.ptc b/Alpha Prime/Mod/particle/debrisstone.ptc new file mode 100644 index 0000000..0dbc47d --- /dev/null +++ b/Alpha Prime/Mod/particle/debrisstone.ptc @@ -0,0 +1,201 @@ +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 230 0" +Velocity "90" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +MaxNum "11" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "1" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.156250 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.156250 0.720588 +1.000000 0.433824 + +ColorB 3 +0.000000 0.801471 +0.156250 0.242647 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.534722 0.713235 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 230 0" +Velocity "30" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +MaxNum "21" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.281250 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.281250 0.926471 +1.000000 0.691176 + +ColorB 3 +0.000000 0.926471 +0.281250 0.205882 +1.000000 0.080882 + +Alpha 3 +0.000000 1.000000 +0.531250 0.713235 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dron_drive.ptc b/Alpha Prime/Mod/particle/dron_drive.ptc new file mode 100644 index 0000000..f549db2 --- /dev/null +++ b/Alpha Prime/Mod/particle/dron_drive.ptc @@ -0,0 +1,426 @@ +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "40" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "3" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "200" +BirthRateRND "0" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.268657 +0.336806 0.059701 +1.000000 0.089552 + +ColorB 3 +0.000000 0.149254 +0.336806 0.022388 +1.000000 0.000000 + +Alpha 3 +0.000000 0.000000 +0.062500 1.000000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glows" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "1" +KillShapeSize "16 16 32" +ConeAngle "0 0 0" +Velocity "40" +VelocityRND "1" +RotMultiplier "1" +SizeMultiplier "32" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "20" +BirthRateRND "0" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.319444 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.298507 +0.319444 0.119403 +1.000000 0.000000 + +ColorB 3 +0.000000 0.253731 +0.319444 0.059701 +1.000000 0.000000 + +Alpha 2 +0.000000 0.432836 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparkssmall" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "40" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +AnimFPS "0" +TilesX "0" +TilesY "0" +Fluid "0" +RestParticlesPerMeter "140.0" +RestDensity "500.0" +KernelRadiusMultiplier "2.3" +MotionLimitMultiplier "5" +Stiffness "10.0" +Viscosity "1.0" +Damping "0.0" +StaticCollisionRestitution "0.7" +StaticCollisionAdhesion "0.0" +DynamicCollisionRestitution "0.7" +DynamicCollisionAdhesion "0.0" +SimulationMethod "1" + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.268657 +0.336806 0.059701 +1.000000 0.089552 + +ColorB 3 +0.000000 0.149254 +0.336806 0.022388 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.062500 1.000000 +0.805556 1.000000 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glowcore" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "0" +VelocityRND "1" +RotMultiplier "100" +SizeMultiplier "45" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "0.05" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.333333 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.231343 +0.333333 0.022388 +1.000000 0.000000 + +ColorB 3 +0.000000 0.119403 +0.333333 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.462687 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dust_vacuumdoor.ptc b/Alpha Prime/Mod/particle/dust_vacuumdoor.ptc new file mode 100644 index 0000000..68e77e6 --- /dev/null +++ b/Alpha Prime/Mod/particle/dust_vacuumdoor.ptc @@ -0,0 +1,184 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "1" +ShapeSize "100 100 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "360 40 0" +Velocity "250" +VelocityRND "4" +RotMultiplier "150" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0.2" +GravityMultiply "-0.09" +GravityMultiplyRND "0" +LOD "0" +MaxNum "25" +KillOldest "0" +BirthRate "20" +BirthRateRND "2" +LifeTime "1" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "1.5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.888060 + +ColorG 2 +0.000000 0.962687 +1.000000 0.679105 + +ColorB 2 +0.000000 0.843284 +1.000000 0.589552 + +Alpha 3 +0.000000 0.000000 +0.131944 0.641791 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.589552 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.368056 1.000000 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "base" +Shader "particle/smoke/smoke1" +ShapeType "1" +ShapeSize "64 64 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "360 100 0" +Velocity "500" +VelocityRND "4" +RotMultiplier "150" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "4" +AirResistanceRND "0.2" +GravityMultiply "-0.09" +GravityMultiplyRND "0" +LOD "0" +MaxNum "40" +KillOldest "0" +BirthRate "200" +BirthRateRND "2" +LifeTime "0.5" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.917910 + +ColorG 2 +0.000000 0.917910 +1.000000 0.686567 + +ColorB 2 +0.000000 0.805970 +1.000000 0.552239 + +Alpha 3 +0.000000 0.000000 +0.135417 0.649254 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.537313 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.368056 1.000000 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dustbreak.ptc b/Alpha Prime/Mod/particle/dustbreak.ptc new file mode 100644 index 0000000..b2a3584 --- /dev/null +++ b/Alpha Prime/Mod/particle/dustbreak.ptc @@ -0,0 +1,97 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2add" +ShapeType "1" +ShapeSize "40 40 30" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 140 0" +Velocity "60" +VelocityRND "5" +RotMultiplier "200" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0.2" +GravityMultiplyRND "0" +MaxNum "50" +KillOldest "0" +BirthRate "150" +BirthRateRND "1" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.955882 +1.000000 1.000000 + +ColorB 2 +0.000000 0.882353 +1.000000 1.000000 + +Alpha 3 +0.000000 0.000000 +0.083333 0.500000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.426471 + +Size 3 +0.000000 0.000000 +0.159722 0.551471 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dustfoot.ptc b/Alpha Prime/Mod/particle/dustfoot.ptc new file mode 100644 index 0000000..220a26c --- /dev/null +++ b/Alpha Prime/Mod/particle/dustfoot.ptc @@ -0,0 +1,97 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2add" +ShapeType "1" +ShapeSize "15 15 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 60 0" +Velocity "5" +VelocityRND "2" +RotMultiplier "30" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "50" +KillOldest "0" +BirthRate "45" +BirthRateRND "1" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 2 +0.000000 0.294118 +1.000000 0.654412 + +ColorG 2 +0.000000 0.286765 +1.000000 0.669118 + +ColorB 2 +0.000000 0.227941 +1.000000 0.558824 + +Alpha 3 +0.000000 0.000000 +0.125000 0.566176 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.441176 +1.000000 0.838235 + +Size 3 +0.000000 0.000000 +0.211806 0.838235 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dustfoothang.ptc b/Alpha Prime/Mod/particle/dustfoothang.ptc new file mode 100644 index 0000000..7e2a34c --- /dev/null +++ b/Alpha Prime/Mod/particle/dustfoothang.ptc @@ -0,0 +1,97 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2add" +ShapeType "1" +ShapeSize "30 30 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 720 0" +Velocity "50" +VelocityRND "5" +RotMultiplier "30" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "50" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 2 +0.000000 0.294118 +1.000000 0.661765 + +ColorG 2 +0.000000 0.294118 +1.000000 0.669118 + +ColorB 2 +0.000000 0.213235 +1.000000 0.580882 + +Alpha 3 +0.000000 0.000000 +0.034722 0.294118 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.441176 +1.000000 0.838235 + +Size 3 +0.000000 0.000000 +0.121528 0.830882 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dustfootlanding.ptc b/Alpha Prime/Mod/particle/dustfootlanding.ptc new file mode 100644 index 0000000..1c0ec8b --- /dev/null +++ b/Alpha Prime/Mod/particle/dustfootlanding.ptc @@ -0,0 +1,97 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2add" +ShapeType "1" +ShapeSize "30 30 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 160 0" +Velocity "50" +VelocityRND "5" +RotMultiplier "30" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "50" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 2 +0.000000 0.294118 +1.000000 0.661765 + +ColorG 2 +0.000000 0.294118 +1.000000 0.669118 + +ColorB 2 +0.000000 0.213235 +1.000000 0.580882 + +Alpha 3 +0.000000 0.000000 +0.034722 0.294118 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.441176 +1.000000 0.838235 + +Size 3 +0.000000 0.000000 +0.121528 0.830882 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dustfootlandinglarge.ptc b/Alpha Prime/Mod/particle/dustfootlandinglarge.ptc new file mode 100644 index 0000000..262e882 --- /dev/null +++ b/Alpha Prime/Mod/particle/dustfootlandinglarge.ptc @@ -0,0 +1,97 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2add" +ShapeType "1" +ShapeSize "30 30 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 160 0" +Velocity "60" +VelocityRND "5" +RotMultiplier "30" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "50" +KillOldest "0" +BirthRate "150" +BirthRateRND "1" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 2 +0.000000 0.294118 +1.000000 0.661765 + +ColorG 2 +0.000000 0.294118 +1.000000 0.669118 + +ColorB 2 +0.000000 0.213235 +1.000000 0.580882 + +Alpha 3 +0.000000 0.000000 +0.041667 0.426471 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.441176 +1.000000 0.838235 + +Size 3 +0.000000 0.000000 +0.121528 0.830882 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dustfootrun.ptc b/Alpha Prime/Mod/particle/dustfootrun.ptc new file mode 100644 index 0000000..5c738b6 --- /dev/null +++ b/Alpha Prime/Mod/particle/dustfootrun.ptc @@ -0,0 +1,187 @@ +$EmitorDef "smoke" +Shader "particle/terraindust" +ShapeType "2" +ShapeSize "15 15 15" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 90 0" +Velocity "10" +VelocityRND "25" +RotMultiplier "80" +SizeMultiplier "70" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.02" +AirResistanceRND "0.01" +GravityMultiply "0.02" +GravityMultiplyRND "0.005" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "50" +BirthRateRND "1" +LifeTime "5" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" +Spring "0" + + +ColorR 2 +0.000000 0.485714 +1.000000 0.442857 + +ColorG 2 +0.000000 0.492857 +1.000000 0.414286 + +ColorB 2 +0.000000 0.428571 +1.000000 0.421429 + +Alpha 4 +0.000000 0.000000 +0.385417 0.150000 +0.565972 0.157143 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.149306 0.257143 +1.000000 0.000000 + +Size 3 +0.000000 0.014286 +0.281250 0.721429 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "dust" +Shader "particle/misc/debris1" +ShapeType "1" +ShapeSize "15 15 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "360 80 0" +Velocity "20" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.01" +AirResistanceRND "0" +GravityMultiply "0.07" +GravityMultiplyRND "0.02" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" +Spring "0" + + +ColorR 2 +0.000000 0.457143 +1.000000 0.421429 + +ColorG 2 +0.000000 0.457143 +1.000000 0.428571 + +ColorB 2 +0.000000 0.000000 +1.000000 0.150000 + +Alpha 3 +0.000000 1.000000 +0.600694 0.857143 +1.000000 0.042857 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 2 +0.000000 0.121429 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/dustfootwalk.ptc b/Alpha Prime/Mod/particle/dustfootwalk.ptc new file mode 100644 index 0000000..7669b76 --- /dev/null +++ b/Alpha Prime/Mod/particle/dustfootwalk.ptc @@ -0,0 +1,94 @@ +$EmitorDef "smoke" +Shader "particle/terraindust" +ShapeType "1" +ShapeSize "15 15 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 80 0" +Velocity "40" +VelocityRND "20" +RotMultiplier "30" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.02" +AirResistanceRND "0.01" +GravityMultiply "0.051" +GravityMultiplyRND "0.02" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "45" +BirthRateRND "1" +LifeTime "2.5" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" +Spring "0" + + +ColorR 2 +0.000000 0.392857 +1.000000 0.307143 + +ColorG 2 +0.000000 0.257143 +1.000000 0.207143 + +ColorB 2 +0.000000 0.107143 +1.000000 0.071429 + +Alpha 4 +0.000000 0.500000 +0.343750 0.721429 +0.538194 0.257143 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.441176 +1.000000 0.838235 + +Size 3 +0.000000 0.000000 +0.121528 0.828571 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/electro_orangeflash.ptc b/Alpha Prime/Mod/particle/electro_orangeflash.ptc new file mode 100644 index 0000000..bbd7b73 --- /dev/null +++ b/Alpha Prime/Mod/particle/electro_orangeflash.ptc @@ -0,0 +1,288 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "8" +StretchMultiplier "1.5" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "50" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.2" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1long" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "3" +StretchMultiplier "2" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.8" +GravityMultiplyRND "0.8" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "1" +BirthRateRND "40" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.2" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.045139 0.485075 +1.000000 0.052239 + +ColorB 3 +0.000000 0.529851 +0.045139 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/electro_shortc.ptc b/Alpha Prime/Mod/particle/electro_shortc.ptc new file mode 100644 index 0000000..d89a135 --- /dev/null +++ b/Alpha Prime/Mod/particle/electro_shortc.ptc @@ -0,0 +1,308 @@ +$EmitorDef "glows" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "1" +KillShapeSize "16 16 32" +ConeAngle "360 360 0" +Velocity "30" +VelocityRND "1" +RotMultiplier "1" +SizeMultiplier "32" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "20" +BirthRateRND "0" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.3" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.309028 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.865672 +0.309028 0.425373 +1.000000 0.156716 + +ColorB 3 +0.000000 0.246269 +0.309028 0.052239 +1.000000 0.000000 + +Alpha 2 +0.000000 0.432836 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glowcore" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "16 16 16" +ConeAngle "360 360 0" +Velocity "0" +VelocityRND "1" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "0.05" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.3" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.671642 +0.336806 0.462687 +1.000000 0.000000 + +ColorB 3 +0.000000 0.119403 +0.336806 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.462687 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "100" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "6" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "50" +BirthRateRND "100" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.045139 0.485075 +1.000000 0.052239 + +ColorB 3 +0.000000 0.529851 +0.045139 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/explosion1.ptc b/Alpha Prime/Mod/particle/explosion1.ptc new file mode 100644 index 0000000..2837574 --- /dev/null +++ b/Alpha Prime/Mod/particle/explosion1.ptc @@ -0,0 +1,770 @@ +$EmitorDef "MegaBlast" +Shader "particle/animexplosion_mask" +ShapeType "2" +ShapeSize "64 64 64" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "20" +SizeMultiplier "200" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "25" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 4 +0.000000 0.000000 +0.423611 0.000000 +0.666667 0.862319 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.057971 +0.156250 0.355072 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "flame2" +Shader "particle/animfire_mask" +ShapeType "0" +ShapeSize "32 32 32" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "100" +VelocityRND "100" +RotMultiplier "0" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "500" +KillOldest "0" +BirthRate "200" +BirthRateRND "0" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "40" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.173913 +0.180556 0.797101 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.076389 0.485507 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 3 +0.000000 1.000000 +0.378472 0.159420 +1.000000 0.000000 + + +$EmitorDef "Smoke" +Shader "particle/smoke/heavysmoke" +ShapeType "2" +ShapeSize "1 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "360 360 0" +Velocity "200" +VelocityRND "0" +RotMultiplier "20" +SizeMultiplier "150" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "4" +AirResistanceRND "0" +GravityMultiply "-0.1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "41" +KillOldest "1" +BirthRate "100" +BirthRateRND "0" +LifeTime "6.09" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.963768 +1.000000 1.000000 + +ColorB 2 +0.000000 0.739130 +1.000000 1.000000 + +Alpha 3 +0.000000 0.000000 +0.086806 0.094203 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.391304 + +Size 5 +0.000000 0.000000 +0.062500 0.391304 +0.197917 0.702899 +0.406250 0.913043 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 5 +0.000000 0.000000 +0.208333 0.000000 +0.354167 1.000000 +0.555556 0.000000 +1.000000 0.000000 + + +$EmitorDef "blast2" +Shader "particle/animexplosion_mask" +ShapeType "0" +ShapeSize "32 32 32" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "100" +VelocityRND "200" +RotMultiplier "0" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "55" +BirthRateRND "50" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "40" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "0.5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 4 +0.000000 0.000000 +0.368056 0.130435 +0.656250 0.847826 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.076389 0.485507 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 3 +0.000000 1.000000 +0.378472 0.159420 +1.000000 0.000000 + + +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1long" +ShapeType "0" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 200 0" +Velocity "150" +VelocityRND "200" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1.3" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "0.5" +AirResistanceRND "1" +GravityMultiply "0.5" +GravityMultiplyRND "0.5" +LOD "0" +MaxNum "71" +KillOldest "0" +BirthRate "1000" +BirthRateRND "50" +LifeTime "0.5" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.25" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "140.0" +RestDensity "500.0" +KernelRadiusMultiplier "2.3" +MotionLimitMultiplier "5" +Stiffness "10.0" +Viscosity "1.0" +Damping "0.0" +StaticCollisionRestitution "0.7" +StaticCollisionAdhesion "0.0" +DynamicCollisionRestitution "0.7" +DynamicCollisionAdhesion "0.0" +SimulationMethod "1" + +ColorR 2 +0.000000 1.000000 +1.000000 0.932836 + +ColorG 2 +0.000000 0.559702 +1.000000 0.223881 + +ColorB 2 +0.000000 0.208955 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.715278 0.828358 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/debris1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 250 0" +Velocity "200" +VelocityRND "50" +RotMultiplier "100" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "31" +KillOldest "0" +BirthRate "1000" +BirthRateRND "5" +LifeTime "1.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.25" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.215278 0.671642 +1.000000 0.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.343284 +1.000000 0.000000 + +ColorB 3 +0.000000 0.701493 +0.215278 0.201493 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.746528 0.716418 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.232639 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "Flash" +Shader "particle/fire/glow1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "55" +VelocityRND "0" +RotMultiplier "60" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "11" +KillOldest "0" +BirthRate "500" +BirthRateRND "0" +LifeTime "1.3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.697015 +1.000000 0.238806 + +ColorB 2 +0.000000 0.264179 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.260417 1.000000 +0.565972 0.216418 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.458333 0.376812 +1.000000 0.362319 + +Size 3 +0.000000 1.000000 +0.184028 1.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 3 +0.000000 1.000000 +0.170139 0.000000 +1.000000 0.000000 + + +$EmitorDef "sparkcloud" +Shader "particle/fire/sparkcloud" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 150 0" +Velocity "250" +VelocityRND "50" +RotMultiplier "1" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "1000" +BirthRateRND "5" +LifeTime "0.7" +LifeTimeRND "0.5" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.25" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.513889 0.865672 +1.000000 0.000000 + +ColorG 3 +0.000000 0.686567 +0.513889 0.291045 +1.000000 0.000000 + +ColorB 3 +0.000000 0.000000 +0.513889 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.888889 0.940298 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +0.232639 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/explosion2.ptc b/Alpha Prime/Mod/particle/explosion2.ptc new file mode 100644 index 0000000..7979bb0 --- /dev/null +++ b/Alpha Prime/Mod/particle/explosion2.ptc @@ -0,0 +1,618 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 180 0" +Velocity "250" +VelocityRND "30" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2.5" +AirResistanceRND "0" +GravityMultiply "0.03" +GravityMultiplyRND "0" +LOD "0" +MaxNum "37" +KillOldest "0" +BirthRate "300" +BirthRateRND "1" +LifeTime "13.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.5" +Repeat "0" + + +ColorR 3 +0.000000 0.768657 +0.131944 0.611940 +1.000000 0.529851 + +ColorG 3 +0.000000 0.537313 +0.131944 0.559702 +1.000000 0.507463 + +ColorB 3 +0.000000 0.358209 +0.131944 0.485075 +1.000000 0.455224 + +Alpha 4 +0.000000 0.000000 +0.045139 0.977612 +0.833333 0.567164 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.187500 0.447761 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "flacol" +Shader "particle/fire/fire1" +ShapeType "1" +ShapeSize "100 100 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 20 0" +Velocity "50" +VelocityRND "40" +RotMultiplier "50" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "50" +BirthRateRND "1" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.4" +Repeat "0" + + +ColorR 3 +0.000000 0.985075 +0.277778 0.753731 +1.000000 0.365672 + +ColorG 3 +0.000000 0.529851 +0.277778 0.589552 +1.000000 0.388060 + +ColorB 3 +0.000000 0.029851 +0.277778 0.388060 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.093750 0.985075 +0.527778 0.522388 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +0.503472 0.962687 +1.000000 0.716418 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "flaglow" +Shader "particle/fire/glow1" +ShapeType "1" +ShapeSize "120 120 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 20 0" +Velocity "50" +VelocityRND "40" +RotMultiplier "50" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "21" +KillOldest "0" +BirthRate "30" +BirthRateRND "1" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.5" +Repeat "0" + + +ColorR 3 +0.000000 0.985075 +0.277778 0.753731 +1.000000 0.365672 + +ColorG 3 +0.000000 0.529851 +0.277778 0.589552 +1.000000 0.388060 + +ColorB 3 +0.000000 0.029851 +0.277778 0.388060 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.093750 0.985075 +0.690972 0.820895 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +0.503472 0.962687 +1.000000 0.716418 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "30 30 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 120 0" +Velocity "220" +VelocityRND "20" +RotMultiplier "50" +SizeMultiplier "70" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "11" +KillOldest "0" +BirthRate "500" +BirthRateRND "5" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.565972 0.649254 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.236111 1.000000 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "corex" +Shader "particle/glow/angelflare" +ShapeType "1" +ShapeSize "20 20 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "100" +VelocityRND "5" +RotMultiplier "250" +SizeMultiplier "400" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "3" +KillOldest "0" +BirthRate "1000" +BirthRateRND "3" +LifeTime "0.3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.25" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.197917 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.985075 +0.197917 0.820895 +1.000000 0.000000 + +ColorB 3 +0.000000 0.977612 +0.197917 0.462687 +1.000000 0.000000 + +Alpha 4 +0.000000 0.507463 +0.076389 1.000000 +0.840278 0.865672 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.559702 +0.072917 1.000000 +1.000000 1.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 1.000000 +0.170139 0.000000 +0.263889 1.000000 +1.000000 0.000000 + + +$EmitorDef "debrsmall" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "30 30 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "250" +VelocityRND "30" +RotMultiplier "150" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "21" +KillOldest "0" +BirthRate "500" +BirthRateRND "5" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.565972 0.649254 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.236111 1.000000 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/explosion3.ptc b/Alpha Prime/Mod/particle/explosion3.ptc new file mode 100644 index 0000000..908487f --- /dev/null +++ b/Alpha Prime/Mod/particle/explosion3.ptc @@ -0,0 +1,864 @@ +$EmitorDef "smokestreak" +Shader "particle/smoke/heavysmoke" +ShapeType "2" +ShapeSize "1 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "360 100 0" +Velocity "500" +VelocityRND "300" +RotMultiplier "20" +SizeMultiplier "60" +StretchMultiplier "2" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "4" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "35" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "0.721" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.604478 +1.000000 0.813433 + +ColorB 2 +0.000000 0.335821 +1.000000 0.626866 + +Alpha 4 +0.000000 0.529851 +0.045139 0.985075 +0.302083 0.455224 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.671642 + +Size 3 +0.000000 0.559702 +0.065972 0.940298 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 5 +0.000000 0.000000 +0.208333 0.000000 +0.354167 1.000000 +0.555556 0.000000 +1.000000 0.000000 + + +$EmitorDef "Smoke" +Shader "particle/smoke/heavysmoke" +ShapeType "2" +ShapeSize "1 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "360 90 0" +Velocity "300" +VelocityRND "400" +RotMultiplier "20" +SizeMultiplier "220" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0.3" +GravityMultiply "0.1" +GravityMultiplyRND "0.1" +LOD "0" +MaxNum "18" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "3.69" +LifeTimeRND "2" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.619403 +1.000000 0.880597 + +ColorB 2 +0.000000 0.253731 +1.000000 0.746269 + +Alpha 3 +0.000000 0.000000 +0.138889 0.388060 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.440298 + +Size 3 +0.000000 0.000000 +0.111111 0.574627 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 5 +0.000000 0.000000 +0.208333 0.000000 +0.354167 1.000000 +0.555556 0.000000 +1.000000 0.000000 + + +$EmitorDef "MegaBlast" +Shader "particle/animexplosion_mask" +ShapeType "2" +ShapeSize "64 64 64" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "50" +VelocityRND "0" +RotMultiplier "20" +SizeMultiplier "200" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "25" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 4 +0.000000 0.000000 +0.423611 0.000000 +0.666667 0.862319 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.057971 +0.156250 0.355072 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "flame2" +Shader "particle/animfire_mask" +ShapeType "0" +ShapeSize "32 32 32" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 80 0" +Velocity "220" +VelocityRND "50" +RotMultiplier "0" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "150" +KillOldest "0" +BirthRate "200" +BirthRateRND "0" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "40" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.173913 +0.180556 0.797101 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.076389 0.485507 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 3 +0.000000 1.000000 +0.378472 0.159420 +1.000000 0.000000 + + +$EmitorDef "blast2" +Shader "particle/animexplosion_mask" +ShapeType "0" +ShapeSize "32 32 32" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 190 0" +Velocity "100" +VelocityRND "200" +RotMultiplier "0" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "55" +BirthRateRND "50" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "40" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "0.5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 4 +0.000000 0.000000 +0.368056 0.130435 +0.656250 0.847826 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.076389 0.485507 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 3 +0.000000 1.000000 +0.378472 0.159420 +1.000000 0.000000 + + +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1long" +ShapeType "0" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 200 0" +Velocity "150" +VelocityRND "200" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1.3" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "0.5" +AirResistanceRND "1" +GravityMultiply "0.5" +GravityMultiplyRND "0.5" +LOD "0" +MaxNum "71" +KillOldest "0" +BirthRate "1000" +BirthRateRND "50" +LifeTime "0.5" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.25" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "140.0" +RestDensity "500.0" +KernelRadiusMultiplier "2.3" +MotionLimitMultiplier "5" +Stiffness "10.0" +Viscosity "1.0" +Damping "0.0" +StaticCollisionRestitution "0.7" +StaticCollisionAdhesion "0.0" +DynamicCollisionRestitution "0.7" +DynamicCollisionAdhesion "0.0" +SimulationMethod "1" + +ColorR 2 +0.000000 1.000000 +1.000000 0.932836 + +ColorG 2 +0.000000 0.559702 +1.000000 0.223881 + +ColorB 2 +0.000000 0.208955 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.715278 0.828358 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/debris1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 250 0" +Velocity "250" +VelocityRND "50" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "31" +KillOldest "0" +BirthRate "1000" +BirthRateRND "5" +LifeTime "1.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.25" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.184028 0.432836 +1.000000 0.358209 + +ColorG 3 +0.000000 1.000000 +0.184028 0.373134 +1.000000 0.305970 + +ColorB 3 +0.000000 0.701493 +0.184028 0.186567 +1.000000 0.179104 + +Alpha 3 +0.000000 1.000000 +0.746528 0.716418 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.232639 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "Flash" +Shader "particle/fire/glow1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "55" +VelocityRND "0" +RotMultiplier "60" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "500" +BirthRateRND "0" +LifeTime "1.3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.697015 +1.000000 0.238806 + +ColorB 2 +0.000000 0.264179 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.260417 1.000000 +0.565972 0.216418 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.458333 0.376812 +1.000000 0.362319 + +Size 3 +0.000000 1.000000 +0.184028 1.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 3 +0.000000 1.000000 +0.170139 0.000000 +1.000000 0.000000 + + +$EmitorDef "sparkcloud" +Shader "particle/fire/sparkcloud" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 150 0" +Velocity "350" +VelocityRND "50" +RotMultiplier "1" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "1000" +BirthRateRND "5" +LifeTime "0.7" +LifeTimeRND "0.5" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.25" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.513889 0.865672 +1.000000 0.000000 + +ColorG 3 +0.000000 0.686567 +0.513889 0.291045 +1.000000 0.000000 + +ColorB 3 +0.000000 0.000000 +0.513889 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.888889 0.940298 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +0.232639 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/explosion4.ptc b/Alpha Prime/Mod/particle/explosion4.ptc new file mode 100644 index 0000000..5e851c9 --- /dev/null +++ b/Alpha Prime/Mod/particle/explosion4.ptc @@ -0,0 +1,303 @@ +$EmitorDef "glows" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "1" +KillShapeSize "16 16 32" +ConeAngle "360 360 0" +Velocity "30" +VelocityRND "1" +RotMultiplier "1" +SizeMultiplier "32" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "11" +KillOldest "0" +BirthRate "20" +BirthRateRND "0" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.3" +Repeat "0" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.309028 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.865672 +0.309028 0.425373 +1.000000 0.156716 + +ColorB 3 +0.000000 0.246269 +0.309028 0.052239 +1.000000 0.000000 + +Alpha 2 +0.000000 0.432836 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glowcore" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "16 16 16" +ConeAngle "360 360 0" +Velocity "0" +VelocityRND "1" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "0.05" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.3" +Repeat "0" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.671642 +0.336806 0.462687 +1.000000 0.000000 + +ColorB 3 +0.000000 0.119403 +0.336806 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.462687 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "100" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "6" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "51" +KillOldest "0" +BirthRate "50" +BirthRateRND "100" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.2" +Repeat "0" +Spring "0" +Fluid "0" +RestParticlesPerMeter "140.0" +RestDensity "500.0" +KernelRadiusMultiplier "2.3" +MotionLimitMultiplier "5" +Stiffness "10.0" +Viscosity "1.0" +Damping "0.0" +StaticCollisionRestitution "0.7" +StaticCollisionAdhesion "0.0" +DynamicCollisionRestitution "0.7" +DynamicCollisionAdhesion "0.0" +SimulationMethod "1" + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.045139 0.485075 +1.000000 0.052239 + +ColorB 3 +0.000000 0.529851 +0.045139 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/fire.ptc b/Alpha Prime/Mod/particle/fire.ptc new file mode 100644 index 0000000..d03ceea --- /dev/null +++ b/Alpha Prime/Mod/particle/fire.ptc @@ -0,0 +1,491 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "1" +ShapeSize "10 10 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 20 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "9" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "30" +KillOldest "0" +BirthRate "18" +BirthRateRND "5" +LifeTime "0.55" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 5 +0.000000 0.000000 +0.041667 0.161765 +0.159722 1.000000 +0.559028 0.558824 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 1.000000 +1.000000 0.610294 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "1" +ShapeSize "10 10 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "30" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "10" +KillOldest "0" +BirthRate "7" +BirthRateRND "2" +LifeTime "0.8" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.830882 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.007353 +0.097222 1.000000 +0.652778 0.323529 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.065972 1.000000 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "1" +ShapeSize "10 10 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 30 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "3" +GravityMultiply "0.01" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "6" +BirthRateRND "5" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.955882 + +ColorG 2 +0.000000 0.860294 +1.000000 0.242647 + +ColorB 2 +0.000000 0.470588 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.055556 1.000000 +0.746528 0.676471 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "1" +ShapeSize "10 10 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "40" +VelocityRND "2" +RotMultiplier "50" +SizeMultiplier "11" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "13" +BirthRateRND "3" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.933824 +1.000000 0.522059 + +ColorB 2 +0.000000 0.794118 +1.000000 0.323529 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.573529 +0.072917 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "15" +VelocityRND "2" +RotMultiplier "30" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "2" +BirthRateRND "1" +LifeTime "2.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.257353 +1.000000 0.000000 + +ColorG 2 +0.000000 0.169118 +1.000000 0.000000 + +ColorB 2 +0.000000 0.029412 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.045139 0.022059 +0.284722 1.000000 +0.729167 0.705882 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 6 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.222222 0.000000 +0.472222 0.573529 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/firelarge.ptc b/Alpha Prime/Mod/particle/firelarge.ptc new file mode 100644 index 0000000..ce70c9d --- /dev/null +++ b/Alpha Prime/Mod/particle/firelarge.ptc @@ -0,0 +1,292 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "2" +ShapeSize "4 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "80" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "12" +BirthRateRND "3" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 5 +0.000000 0.000000 +0.041667 0.161765 +0.159722 1.000000 +0.559028 0.558824 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 1.000000 +1.000000 0.610294 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "4 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "60" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "10" +BirthRateRND "2" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.830882 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.007353 +0.097222 1.000000 +0.652778 0.323529 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.065972 1.000000 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "1" +ShapeSize "16 16 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 20 0" +Velocity "80" +VelocityRND "2" +RotMultiplier "100" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "7" +BirthRateRND "3" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.933824 +1.000000 0.522059 + +ColorB 2 +0.000000 0.794118 +1.000000 0.323529 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.573529 +0.072917 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/firelarge2.ptc b/Alpha Prime/Mod/particle/firelarge2.ptc new file mode 100644 index 0000000..1e28c9f --- /dev/null +++ b/Alpha Prime/Mod/particle/firelarge2.ptc @@ -0,0 +1,287 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "2" +ShapeSize "4 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "150" +VelocityRND "50" +RotMultiplier "0" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "15" +KillOldest "0" +BirthRate "12" +BirthRateRND "3" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 5 +0.000000 0.000000 +0.041667 0.157143 +0.156250 1.000000 +0.559028 0.557143 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.187500 1.000000 +0.677083 0.785714 +1.000000 0.550000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "4 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "120" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "70" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "10" +BirthRateRND "2" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.807143 + +ColorG 2 +0.000000 0.828571 +1.000000 0.264286 + +ColorB 2 +0.000000 0.285714 +1.000000 0.142857 + +Alpha 4 +0.000000 0.007353 +0.097222 1.000000 +0.652778 0.323529 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.128472 1.000000 +1.000000 0.428571 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "1" +ShapeSize "16 16 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "150" +VelocityRND "0" +RotMultiplier "150" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "15" +KillOldest "0" +BirthRate "7" +BirthRateRND "3" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.933824 +1.000000 0.522059 + +ColorB 2 +0.000000 0.794118 +1.000000 0.323529 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +0.416667 0.650000 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.232639 0.978571 +0.736111 0.550000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/firelargearea.ptc b/Alpha Prime/Mod/particle/firelargearea.ptc new file mode 100644 index 0000000..181a0d3 --- /dev/null +++ b/Alpha Prime/Mod/particle/firelargearea.ptc @@ -0,0 +1,287 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "1" +ShapeSize "64 64 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "160" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "50" +BirthRateRND "3" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 5 +0.000000 0.000000 +0.041667 0.161765 +0.159722 1.000000 +0.559028 0.558824 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 1.000000 +1.000000 0.610294 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "1" +ShapeSize "64 64 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "120" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "40" +BirthRateRND "2" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.830882 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.007353 +0.097222 1.000000 +0.652778 0.323529 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.065972 1.000000 +1.000000 0.683824 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "1" +ShapeSize "64 64 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "160" +VelocityRND "2" +RotMultiplier "100" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "35" +BirthRateRND "3" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.933824 +1.000000 0.522059 + +ColorB 2 +0.000000 0.794118 +1.000000 0.323529 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.573529 +0.072917 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/firelargeexplo.ptc b/Alpha Prime/Mod/particle/firelargeexplo.ptc new file mode 100644 index 0000000..a8e8239 --- /dev/null +++ b/Alpha Prime/Mod/particle/firelargeexplo.ptc @@ -0,0 +1,418 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "1" +ShapeSize "40 40 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "160" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "50" +BirthRateRND "3" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.7" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.184028 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.873134 +0.184028 0.268657 +1.000000 0.156716 + +ColorB 3 +0.000000 0.768657 +0.184028 0.000000 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.041667 0.156716 +0.156250 1.000000 +0.468750 0.305970 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 1.000000 +1.000000 0.610294 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 4 +0.000000 1.000000 +0.479167 1.000000 +0.562500 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "1" +ShapeSize "30 30 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 50 0" +Velocity "160" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "30" +BirthRateRND "2" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.152778 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.708955 +0.152778 0.238806 +1.000000 0.179104 + +ColorB 3 +0.000000 0.582090 +0.152778 0.000000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.166667 1.000000 +0.517361 0.126866 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.065972 1.000000 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 1.000000 +0.517361 1.000000 +0.739583 0.328358 +1.000000 0.000000 + + +$EmitorDef "fire" +Shader "particle/fire/glow2" +ShapeType "1" +ShapeSize "25 25 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "160" +VelocityRND "2" +RotMultiplier "150" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "3" +LifeTime "0.8" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.8" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.173611 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.888060 +0.173611 0.119403 +1.000000 0.000000 + +ColorB 3 +0.000000 0.791045 +0.173611 0.007463 +1.000000 0.000000 + +Alpha 4 +0.000000 0.507463 +0.093750 1.000000 +0.704861 0.768657 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.573529 +0.072917 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core" +Shader "particle/glow/angelflare" +ShapeType "2" +ShapeSize "20 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "40" +VelocityRND "5" +RotMultiplier "150" +SizeMultiplier "160" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "100" +BirthRateRND "3" +LifeTime "0.1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.190972 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.985075 +0.190972 0.828358 +1.000000 0.000000 + +ColorB 3 +0.000000 0.977612 +0.190972 0.664179 +1.000000 0.000000 + +Alpha 4 +0.000000 0.507463 +0.083333 1.000000 +0.934028 0.955224 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.567164 +0.072917 1.000000 +0.760417 0.761194 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 1.000000 +0.468750 1.000000 +0.493056 0.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/firesmall.ptc b/Alpha Prime/Mod/particle/firesmall.ptc new file mode 100644 index 0000000..ea183ff --- /dev/null +++ b/Alpha Prime/Mod/particle/firesmall.ptc @@ -0,0 +1,690 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "1" +ShapeSize "10 10 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 20 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "12" +BirthRateRND "5" +LifeTime "0.45" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 5 +0.000000 0.000000 +0.041667 0.161765 +0.159722 1.000000 +0.559028 0.558824 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 1.000000 +1.000000 0.610294 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "1" +ShapeSize "6 6 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "30" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "14" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "10" +KillOldest "0" +BirthRate "7" +BirthRateRND "2" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.801471 + +ColorG 2 +0.000000 0.683824 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.007353 +0.097222 1.000000 +0.652778 0.323529 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.065972 1.000000 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "1" +ShapeSize "15 15 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 30 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "3" +GravityMultiply "0.01" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "13" +BirthRateRND "5" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.955882 + +ColorG 2 +0.000000 0.860294 +1.000000 0.242647 + +ColorB 2 +0.000000 0.470588 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.055556 1.000000 +0.746528 0.676471 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "1" +ShapeSize "10 10 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "40" +VelocityRND "2" +RotMultiplier "50" +SizeMultiplier "9" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "10" +BirthRateRND "3" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.889706 +1.000000 0.522059 + +ColorB 2 +0.000000 0.786765 +1.000000 0.316176 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.573529 +0.072917 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "15" +VelocityRND "2" +RotMultiplier "30" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "4" +BirthRateRND "1" +LifeTime "2.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.257353 +1.000000 0.000000 + +ColorG 2 +0.000000 0.169118 +1.000000 0.000000 + +ColorB 2 +0.000000 0.029412 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.045139 0.022059 +0.284722 1.000000 +0.729167 0.705882 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 6 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.222222 0.000000 +0.472222 0.573529 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glowingbase" +Shader "particle/fire/glow1" +ShapeType "1" +ShapeSize "20 20 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "10" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "10" +KillOldest "0" +BirthRate "3" +BirthRateRND "2" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.801471 + +ColorG 2 +0.000000 0.683824 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.007353 +0.093750 1.000000 +0.725694 0.823529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 0.000000 +0.065972 1.000000 +1.000000 0.683824 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "firebase" +Shader "particle/fire/glow1" +ShapeType "1" +ShapeSize "17 17 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 30 0" +Velocity "2" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "6" +BirthRateRND "2" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.794118 + +ColorG 2 +0.000000 0.676471 +1.000000 0.000000 + +ColorB 2 +0.000000 0.286765 +1.000000 0.000000 + +Alpha 3 +0.000000 0.007353 +0.312500 1.000000 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 0.000000 +0.065972 1.000000 +1.000000 0.683824 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/firetrunk.ptc b/Alpha Prime/Mod/particle/firetrunk.ptc new file mode 100644 index 0000000..889d0df --- /dev/null +++ b/Alpha Prime/Mod/particle/firetrunk.ptc @@ -0,0 +1,386 @@ +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 50 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "3" +GravityMultiply "0.01" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "12" +BirthRateRND "5" +LifeTime "1.6" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.955882 + +ColorG 2 +0.000000 0.860294 +1.000000 0.242647 + +ColorB 2 +0.000000 0.470588 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.055556 1.000000 +0.746528 0.676471 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "12" +BirthRateRND "5" +LifeTime "0.9" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 5 +0.000000 0.000000 +0.041667 0.161765 +0.159722 1.000000 +0.559028 0.558824 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 1.000000 +1.000000 0.610294 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "30" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "14" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "7" +BirthRateRND "2" +LifeTime "1.6" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.823529 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.007353 +0.093750 1.000000 +0.652778 0.316176 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.045139 0.926471 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "25" +VelocityRND "2" +RotMultiplier "50" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "8" +BirthRateRND "2" +LifeTime "1.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.933824 +1.000000 0.522059 + +ColorB 2 +0.000000 0.794118 +1.000000 0.323529 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.536765 +0.069444 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/flamethrower_burner.ptc b/Alpha Prime/Mod/particle/flamethrower_burner.ptc new file mode 100644 index 0000000..3ca81c4 --- /dev/null +++ b/Alpha Prime/Mod/particle/flamethrower_burner.ptc @@ -0,0 +1,186 @@ +$EmitorDef "core" +Shader "particle/fire/glow1" +ShapeType "0" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "500" +VelocityRND "2" +RotMultiplier "150" +SizeMultiplier "3" +StretchMultiplier "1.15" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "-0.2" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "150" +BirthRateRND "3" +LifeTime "0.004" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.335821 +1.000000 0.082090 + +ColorG 2 +0.000000 1.000000 +1.000000 0.985075 + +ColorB 2 +0.000000 0.753731 +1.000000 0.574627 + +Alpha 3 +0.000000 1.000000 +0.819444 0.716418 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/glow1" +ShapeType "0" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "500" +VelocityRND "2" +RotMultiplier "150" +SizeMultiplier "2" +StretchMultiplier "1.03" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "-0.2" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "150" +BirthRateRND "3" +LifeTime "0.004" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.798507 +1.000000 0.746269 + +ColorG 2 +0.000000 1.000000 +1.000000 0.985075 + +ColorB 2 +0.000000 0.895522 +1.000000 0.888060 + +Alpha 3 +0.000000 1.000000 +0.819444 0.716418 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/flamethrower_fire.ptc b/Alpha Prime/Mod/particle/flamethrower_fire.ptc new file mode 100644 index 0000000..d0394dd --- /dev/null +++ b/Alpha Prime/Mod/particle/flamethrower_fire.ptc @@ -0,0 +1,412 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "1500" +VelocityRND "0" +RotMultiplier "150" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "-1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "60" +BirthRateRND "5" +LifeTime "0.25" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0.3" +Fluid "0" +RestParticlesPerMeter "800" +RestDensity "700" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 4 +0.000000 0.000000 +0.156250 1.000000 +0.861111 0.776119 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.420139 0.664179 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/glow/angelflarenb" +ShapeType "2" +ShapeSize "10.25 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "2000" +VelocityRND "0" +RotMultiplier "0" +SizeMultiplier "120" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "80" +KillOldest "0" +BirthRate "150" +BirthRateRND "0" +LifeTime "0.189" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0.3" + + +ColorR 4 +0.000000 0.462687 +0.093750 1.000000 +0.274306 1.000000 +1.000000 0.791045 + +ColorG 4 +0.000000 1.000000 +0.093750 0.955224 +0.274306 0.768657 +1.000000 0.246269 + +ColorB 4 +0.000000 0.865672 +0.093750 0.910448 +0.274306 0.395522 +1.000000 0.014925 + +Alpha 4 +0.000000 0.149254 +0.277778 1.000000 +0.729167 0.500000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 0.201493 +0.489583 0.507463 +0.638889 0.985075 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1nb" +ShapeType "2" +ShapeSize "5.5 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 15 0" +Velocity "2000" +VelocityRND "0" +RotMultiplier "150" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "-0.5" +GravityMultiplyRND "0" +LOD "0" +MaxNum "120" +KillOldest "0" +BirthRate "300" +BirthRateRND "0" +LifeTime "0.189" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0.3" +Fluid "0" +RestParticlesPerMeter "800" +RestDensity "700" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 3 +0.000000 0.485075 +0.197917 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.197917 0.813433 +1.000000 0.514925 + +ColorB 3 +0.000000 0.895522 +0.197917 0.410448 +1.000000 0.320896 + +Alpha 4 +0.000000 0.000000 +0.378472 0.238806 +0.638889 1.000000 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.451389 0.701493 +0.656250 0.985075 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core" +Shader "particle/fire/sparks1nb" +ShapeType "0" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "75" +VelocityRND "0" +RotMultiplier "150" +SizeMultiplier "30" +StretchMultiplier "30" +RandomRotDir "1" +RandomAngle "1" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "3" +KillOldest "0" +BirthRate "250" +BirthRateRND "0" +LifeTime "0.01" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0.3" + + +ColorR 2 +0.000000 0.574627 +1.000000 0.522388 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 0.746269 +1.000000 0.813433 + +Alpha 4 +0.000000 0.522388 +0.097222 1.000000 +0.861111 0.865672 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/flamethrower_fireenemy.ptc b/Alpha Prime/Mod/particle/flamethrower_fireenemy.ptc new file mode 100644 index 0000000..c64af2b --- /dev/null +++ b/Alpha Prime/Mod/particle/flamethrower_fireenemy.ptc @@ -0,0 +1,394 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "600" +VelocityRND "0" +RotMultiplier "150" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "-1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "30" +BirthRateRND "5" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Fluid "0" +RestParticlesPerMeter "800" +RestDensity "700" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 4 +0.000000 0.000000 +0.156250 1.000000 +0.861111 0.776119 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.253472 0.522388 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "10.25 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "600" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "120" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "60" +KillOldest "0" +BirthRate "45" +BirthRateRND "2" +LifeTime "0.63" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 3 +0.000000 0.470149 +0.208333 0.962687 +1.000000 0.798507 + +ColorG 3 +0.000000 0.917910 +0.208333 0.686567 +1.000000 0.253731 + +ColorB 3 +0.000000 0.805970 +0.208333 0.261194 +1.000000 0.134328 + +Alpha 4 +0.000000 0.156716 +0.277778 1.000000 +0.763889 0.626866 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 0.417910 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "2" +ShapeSize "5.5 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "600" +VelocityRND "0" +RotMultiplier "150" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "-0.5" +GravityMultiplyRND "0" +LOD "0" +MaxNum "45" +KillOldest "0" +BirthRate "75" +BirthRateRND "3" +LifeTime "0.376" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Fluid "0" +RestParticlesPerMeter "80" +RestDensity "700" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 3 +0.000000 0.485075 +0.197917 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.197917 0.813433 +1.000000 0.514925 + +ColorB 3 +0.000000 0.895522 +0.197917 0.410448 +1.000000 0.320896 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.402778 0.238806 +0.687500 0.985075 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "600" +VelocityRND "0" +RotMultiplier "150" +SizeMultiplier "10" +StretchMultiplier "3" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "300" +BirthRateRND "3" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.201389 0.485075 +1.000000 0.820895 + +ColorG 3 +0.000000 1.000000 +0.201389 1.000000 +1.000000 0.746269 + +ColorB 3 +0.000000 1.000000 +0.201389 0.791045 +1.000000 0.485075 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/fog_air.ptc b/Alpha Prime/Mod/particle/fog_air.ptc new file mode 100644 index 0000000..ec6c22a --- /dev/null +++ b/Alpha Prime/Mod/particle/fog_air.ptc @@ -0,0 +1,101 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "1" +ShapeSize "200 200 200" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 140 0" +Velocity "15" +VelocityRND "5" +RotMultiplier "20" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0.01" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "5" +BirthRateRND "1" +LifeTime "5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "1" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.000000 +0.506944 0.985075 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.544776 +0.517361 1.000000 +1.000000 0.425373 + +Size 3 +0.000000 0.597015 +0.496528 1.000000 +1.000000 0.746269 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/fog_floor.ptc b/Alpha Prime/Mod/particle/fog_floor.ptc new file mode 100644 index 0000000..4d2e1cc --- /dev/null +++ b/Alpha Prime/Mod/particle/fog_floor.ptc @@ -0,0 +1,93 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "1" +ShapeSize "256 256 30" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 140 0" +Velocity "15" +VelocityRND "5" +RotMultiplier "15" +SizeMultiplier "70" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0.01" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "3" +BirthRateRND "1" +LifeTime "5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "1" +Repeat "1" + + +ColorR 2 +0.000000 0.649254 +1.000000 0.619403 + +ColorG 2 +0.000000 0.686567 +1.000000 0.649254 + +ColorB 2 +0.000000 0.708955 +1.000000 0.671642 + +Alpha 3 +0.000000 0.000000 +0.496528 1.000000 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.544776 +0.517361 1.000000 +1.000000 0.425373 + +Size 3 +0.000000 0.597015 +0.496528 1.000000 +1.000000 0.746269 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/fog_floornl.ptc b/Alpha Prime/Mod/particle/fog_floornl.ptc new file mode 100644 index 0000000..489f2cc --- /dev/null +++ b/Alpha Prime/Mod/particle/fog_floornl.ptc @@ -0,0 +1,94 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "1" +ShapeSize "256 256 30" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 140 0" +Velocity "15" +VelocityRND "5" +RotMultiplier "15" +SizeMultiplier "70" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0.01" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "3" +BirthRateRND "1" +LifeTime "5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "1" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.738806 +1.000000 0.679105 + +ColorG 2 +0.000000 0.604478 +1.000000 0.589552 + +ColorB 2 +0.000000 0.522388 +1.000000 0.552239 + +Alpha 3 +0.000000 0.000000 +0.496528 0.649254 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.544776 +0.517361 1.000000 +1.000000 0.425373 + +Size 3 +0.000000 0.597015 +0.496528 1.000000 +1.000000 0.746269 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/fog_smalldust.ptc b/Alpha Prime/Mod/particle/fog_smalldust.ptc new file mode 100644 index 0000000..5553da3 --- /dev/null +++ b/Alpha Prime/Mod/particle/fog_smalldust.ptc @@ -0,0 +1,197 @@ +$EmitorDef "glow" +Shader "particle/fire/sparks1" +ShapeType "1" +ShapeSize "100 100 100" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "0" +VelocityRND "2" +RotMultiplier "0" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "1" +MaxNum "100" +KillOldest "0" +BirthRate "70" +BirthRateRND "0" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.701493 +1.000000 0.738806 + +ColorB 2 +0.000000 0.440298 +1.000000 0.425373 + +Alpha 3 +0.000000 0.000000 +0.500000 0.216418 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 2 +0.000000 0.963235 +1.000000 1.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "small" +Shader "particle/fire/sparks1" +ShapeType "1" +ShapeSize "100 100 100" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "0" +VelocityRND "2" +RotMultiplier "0" +SizeMultiplier "1" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "300" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.985075 +1.000000 0.940298 + +ColorG 2 +0.000000 0.723881 +1.000000 0.761194 + +ColorB 2 +0.000000 0.417910 +1.000000 0.462687 + +Alpha 3 +0.000000 0.000000 +0.500000 0.470149 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.963235 +1.000000 1.000000 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/heart.ptc b/Alpha Prime/Mod/particle/heart.ptc new file mode 100644 index 0000000..ec500f7 --- /dev/null +++ b/Alpha Prime/Mod/particle/heart.ptc @@ -0,0 +1,391 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "8" +StretchMultiplier "1.5" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "200" +KillOldest "0" +BirthRate "200" +BirthRateRND "100" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.2" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.204861 0.579710 +1.000000 0.202899 + +ColorG 3 +0.000000 1.000000 +0.204861 1.000000 +1.000000 1.000000 + +ColorB 3 +0.000000 0.920290 +0.204861 0.152174 +1.000000 0.072464 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1long" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "3" +StretchMultiplier "2" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "15" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "200" +KillOldest "0" +BirthRate "1" +BirthRateRND "80" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.2" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.048611 0.420290 +1.000000 0.086957 + +ColorG 3 +0.000000 1.000000 +0.048611 1.000000 +1.000000 0.362319 + +ColorB 3 +0.000000 0.528986 +0.048611 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/glow/angelflare" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "1" +BirthRateRND "0" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.2" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.208333 0.485507 +1.000000 0.210145 + +ColorG 3 +0.000000 1.000000 +0.208333 1.000000 +1.000000 1.000000 + +ColorB 3 +0.000000 0.920290 +0.208333 0.195652 +1.000000 0.072464 + +Alpha 5 +0.000000 0.000000 +0.097222 1.000000 +0.468750 0.253623 +0.767361 0.210145 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparks gravity" +Shader "particle/fire/sparks1long" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "100" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "1" +StretchMultiplier "2" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "10" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.1" +LOD "0" +MaxNum "1000" +KillOldest "0" +BirthRate "20" +BirthRateRND "80" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.2" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.048611 0.420290 +1.000000 0.086957 + +ColorG 3 +0.000000 1.000000 +0.048611 1.000000 +1.000000 0.362319 + +ColorB 3 +0.000000 0.528986 +0.048611 0.000000 +1.000000 0.000000 + +Alpha 4 +0.000000 1.000000 +0.149306 1.000000 +0.298611 0.340580 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hit_blood.ptc b/Alpha Prime/Mod/particle/hit_blood.ptc new file mode 100644 index 0000000..1c5b44f --- /dev/null +++ b/Alpha Prime/Mod/particle/hit_blood.ptc @@ -0,0 +1,407 @@ +$EmitorDef "debr" +Shader "particle/misc/blood1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 180 0" +Velocity "50" +VelocityRND "10" +RotMultiplier "200" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "3.5" +AirResistanceRND "0" +GravityMultiply "0.2" +GravityMultiplyRND "0" +LOD "0" +MaxNum "3" +KillOldest "0" +BirthRate "100" +BirthRateRND "1" +LifeTime "0.6" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 2 +0.000000 0.500000 +1.000000 0.477612 + +ColorG 2 +0.000000 0.500000 +1.000000 0.455224 + +ColorB 2 +0.000000 0.485075 +1.000000 0.462687 + +Alpha 3 +0.000000 1.000000 +0.638889 0.649254 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 1.000000 +0.114583 1.000000 +0.250000 0.291045 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.177083 0.432836 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr2" +Shader "particle/smoke/smoke3" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 220 0" +Velocity "20" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "50" +BirthRateRND "1" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 2 +0.000000 0.820895 +1.000000 0.276119 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.582090 + +Size 2 +0.000000 0.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "1" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "20" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.142361 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.910448 +0.142361 0.358209 +1.000000 0.149254 + +ColorB 3 +0.000000 0.694030 +0.142361 0.126866 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.565972 0.649254 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "stream" +Shader "particle/misc/dot" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 20 0" +Velocity "100" +VelocityRND "10" +RotMultiplier "300" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "3.5" +AirResistanceRND "0" +GravityMultiply "0.2" +GravityMultiplyRND "0" +LOD "0" +MaxNum "41" +KillOldest "0" +BirthRate "200" +BirthRateRND "1" +LifeTime "0.3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.2" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "800" +RestDensity "7000" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 2 +0.000000 0.492537 +1.000000 0.014925 + +ColorG 2 +0.000000 0.007463 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.607639 0.731343 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.114583 1.000000 +0.250000 0.291045 + +Size 3 +0.000000 0.000000 +0.177083 0.432836 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hit_blood1.ptc b/Alpha Prime/Mod/particle/hit_blood1.ptc new file mode 100644 index 0000000..dfe7904 --- /dev/null +++ b/Alpha Prime/Mod/particle/hit_blood1.ptc @@ -0,0 +1,411 @@ +$EmitorDef "debr2" +Shader "particle/smoke/smoke3" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 220 0" +Velocity "20" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "50" +BirthRateRND "1" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + +ColorR 2 +0.000000 0.820895 +1.000000 0.276119 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.582090 + +Size 2 +0.000000 0.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "stream" +Shader "particle/misc/dot" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 20 0" +Velocity "100" +VelocityRND "10" +RotMultiplier "300" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "3.5" +AirResistanceRND "0" +GravityMultiply "0.2" +GravityMultiplyRND "0" +LOD "0" +MaxNum "41" +KillOldest "0" +BirthRate "200" +BirthRateRND "1" +LifeTime "0.3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.2" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "800" +RestDensity "7000" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 2 +0.000000 0.492537 +1.000000 0.014925 + +ColorG 2 +0.000000 0.007463 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.607639 0.731343 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.114583 1.000000 +0.250000 0.291045 + +Size 3 +0.000000 0.000000 +0.177083 0.432836 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/blood1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 180 0" +Velocity "50" +VelocityRND "10" +RotMultiplier "200" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "3.5" +AirResistanceRND "0" +GravityMultiply "0.2" +GravityMultiplyRND "0" +LOD "0" +MaxNum "3" +KillOldest "0" +BirthRate "100" +BirthRateRND "1" +LifeTime "0.6" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 2 +0.000000 0.500000 +1.000000 0.477612 + +ColorG 2 +0.000000 0.500000 +1.000000 0.455224 + +ColorB 2 +0.000000 0.485075 +1.000000 0.462687 + +Alpha 3 +0.000000 1.000000 +0.638889 0.649254 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 1.000000 +0.114583 1.000000 +0.250000 0.291045 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.177083 0.432836 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandomsmaller" +Shader "particle/misc/dotclamp" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 20 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "1.5" +AirResistanceRND "0.5" +GravityMultiply "1.2" +GravityMultiplyRND "0" +MaxNum "50" +KillOldest "0" +BirthRate "150" +BirthRateRND "10" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.3" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "80" +RestDensity "7000" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + +ColorR 2 +0.000000 0.176471 +1.000000 0.044118 + +ColorG 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.732639 0.816176 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 0.492647 +0.121528 1.000000 +0.482639 1.000000 +1.000000 0.000000 \ No newline at end of file diff --git a/Alpha Prime/Mod/particle/hit_enemyweapon.ptc b/Alpha Prime/Mod/particle/hit_enemyweapon.ptc new file mode 100644 index 0000000..940d18d --- /dev/null +++ b/Alpha Prime/Mod/particle/hit_enemyweapon.ptc @@ -0,0 +1,628 @@ +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "180 40 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "7" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "1" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "0.6" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.243056 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.243056 0.216418 +1.000000 0.000000 + +ColorB 3 +0.000000 0.559702 +0.243056 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.871528 0.820895 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "4" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "1" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "3.6" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "140.0" +RestDensity "500.0" +KernelRadiusMultiplier "2.3" +MotionLimitMultiplier "5" +Stiffness "10.0" +Viscosity "1.0" +Damping "0.0" +StaticCollisionRestitution "0.7" +StaticCollisionAdhesion "0.0" +DynamicCollisionRestitution "0.7" +DynamicCollisionAdhesion "0.0" +SimulationMethod "1" + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.462687 +1.000000 0.052239 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.135417 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.135417 0.283582 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.135417 0.134328 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2add" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "82" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "1" +MaxNum "44" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "2.96" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.485075 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "150" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "2" +MaxNum "6" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hit_large.ptc b/Alpha Prime/Mod/particle/hit_large.ptc new file mode 100644 index 0000000..afcf35a --- /dev/null +++ b/Alpha Prime/Mod/particle/hit_large.ptc @@ -0,0 +1,408 @@ +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "180 40 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "7" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "0.5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.243056 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.243056 0.216418 +1.000000 0.000000 + +ColorB 3 +0.000000 0.559702 +0.243056 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.871528 0.820895 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "4" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.462687 +1.000000 0.052239 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1nb" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.135417 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.135417 0.283582 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.135417 0.134328 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hit_machinegun.ptc b/Alpha Prime/Mod/particle/hit_machinegun.ptc new file mode 100644 index 0000000..f8be9d7 --- /dev/null +++ b/Alpha Prime/Mod/particle/hit_machinegun.ptc @@ -0,0 +1,518 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1.0" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "120" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "4" +StretchMultiplier "2.45" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "1" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "140.0" +RestDensity "500.0" +KernelRadiusMultiplier "2.3" +MotionLimitMultiplier "5" +Stiffness "10.0" +Viscosity "1.0" +Damping "0.0" +StaticCollisionRestitution "0.7" +StaticCollisionAdhesion "0.0" +DynamicCollisionRestitution "0.7" +DynamicCollisionAdhesion "0.0" +SimulationMethod "1" + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.462687 +1.000000 0.052239 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + + + + +$EmitorDef "core2" +Shader "particle/fire/sparks1nb" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.135417 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.135417 0.283582 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.135417 0.134328 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.642361 0.708955 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "150 150 0" +Velocity "100" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "1" +MaxNum "17" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "3" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.093750 0.985075 +0.784722 0.791045 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.223881 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "180" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "45" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "1" +MaxNum "6" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hit_normal.ptc b/Alpha Prime/Mod/particle/hit_normal.ptc new file mode 100644 index 0000000..a644997 --- /dev/null +++ b/Alpha Prime/Mod/particle/hit_normal.ptc @@ -0,0 +1,412 @@ +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "180 40 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "7" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "0.5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.243056 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.243056 0.589552 +1.000000 0.000000 + +ColorB 3 +0.000000 0.559702 +0.243056 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.871528 0.820895 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "4" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" + +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.045139 0.485075 +1.000000 0.052239 + +ColorB 3 +0.000000 0.529851 +0.045139 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1nb" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hit_pistol.ptc b/Alpha Prime/Mod/particle/hit_pistol.ptc new file mode 100644 index 0000000..a851899 --- /dev/null +++ b/Alpha Prime/Mod/particle/hit_pistol.ptc @@ -0,0 +1,508 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "4" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.462687 +1.000000 0.052239 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1nb" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.135417 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.135417 0.283582 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.135417 0.134328 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "120" +VelocityRND "10" +RotMultiplier "200" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "1.43" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.492537 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "150" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "6" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hit_shotgun.ptc b/Alpha Prime/Mod/particle/hit_shotgun.ptc new file mode 100644 index 0000000..5fa583c --- /dev/null +++ b/Alpha Prime/Mod/particle/hit_shotgun.ptc @@ -0,0 +1,512 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "70" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "4" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "3" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.045139 0.485075 +1.000000 0.052239 + +ColorB 3 +0.000000 0.529851 +0.045139 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/fire/sparks1nb" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.215278 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.215278 0.552239 +1.000000 0.164179 + +ColorB 3 +0.000000 0.925373 +0.215278 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "150 150 0" +Velocity "100" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "8" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.985075 +0.173611 0.507463 +1.000000 0.365672 + +ColorG 3 +0.000000 0.529851 +0.173611 0.485075 +1.000000 0.395522 + +ColorB 3 +0.000000 0.029851 +0.173611 0.440298 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.062500 0.955224 +0.618056 0.746269 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.097015 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "180" +VelocityRND "10" +RotMultiplier "200" +SizeMultiplier "55" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "3" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hubb_change.ptc b/Alpha Prime/Mod/particle/hubb_change.ptc new file mode 100644 index 0000000..cd90b34 --- /dev/null +++ b/Alpha Prime/Mod/particle/hubb_change.ptc @@ -0,0 +1,293 @@ +$EmitorDef "heavy smoke" +Shader "particle/fire/sparkcloud" +ShapeType "1" +ShapeSize "32 32 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "10" +VelocityRND "0" +RotMultiplier "10" +SizeMultiplier "150" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "3" +BirthRateRND "1" +LifeTime "6" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 0.550725 +0.409722 0.094203 +1.000000 0.000000 + +ColorG 3 +0.000000 1.000000 +0.409722 1.000000 +1.000000 0.384058 + +ColorB 3 +0.000000 0.746377 +0.409722 0.528986 +1.000000 0.108696 + +Alpha 3 +0.000000 0.000000 +0.451389 0.985507 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +0.506944 0.246377 +1.000000 0.166667 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "magic dots center" +Shader "particle/misc/dot" +ShapeType "2" +ShapeSize "32 32 32" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "1" +VelocityRND "1" +RotMultiplier "10" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "-0.05" +LOD "0" +MaxNum "1000" +KillOldest "0" +BirthRate "50" +BirthRateRND "1" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.550725 +1.000000 0.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 0.398551 + +ColorB 2 +0.000000 0.760870 +1.000000 0.152174 + +Alpha 4 +0.000000 0.000000 +0.388889 0.000000 +0.500000 1.000000 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.114583 0.992754 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "flash" +Shader "particle/glow/angelflare" +ShapeType "2" +ShapeSize "32 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "0" +VelocityRND "1" +RotMultiplier "10" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.025" +GravityMultiplyRND "0" +LOD "0" +MaxNum "1000" +KillOldest "0" +BirthRate "1" +BirthRateRND "5" +LifeTime "0.01" +LifeTimeRND "0.5" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.572464 +1.000000 0.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 0.492754 + +ColorB 2 +0.000000 0.746377 +1.000000 0.152174 + +Alpha 4 +0.000000 0.000000 +0.069444 1.000000 +0.177083 0.253623 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.118056 0.992754 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hubb_mist.ptc b/Alpha Prime/Mod/particle/hubb_mist.ptc new file mode 100644 index 0000000..6444f56 --- /dev/null +++ b/Alpha Prime/Mod/particle/hubb_mist.ptc @@ -0,0 +1,311 @@ +$EmitorDef "heavy smoke" +Shader "particle/smoke/smoke1add" +ShapeType "1" +ShapeSize "64 64 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "16" +VelocityRND "2" +RotMultiplier "10" +SizeMultiplier "120" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "5" +BirthRateRND "1" +LifeTime "7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 4 +0.000000 0.557971 +0.218750 1.000000 +0.649306 0.094203 +1.000000 0.000000 + +ColorG 4 +0.000000 0.731884 +0.218750 0.942029 +0.649306 1.000000 +1.000000 0.391304 + +ColorB 4 +0.000000 1.000000 +0.218750 1.000000 +0.649306 0.528986 +1.000000 0.115942 + +Alpha 4 +0.000000 0.000000 +0.562500 0.115942 +0.812500 0.246377 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.187500 1.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "floor mist" +Shader "particle/smoke/smoke1add" +ShapeType "1" +ShapeSize "700 700 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "1" +VelocityRND "2" +RotMultiplier "10" +SizeMultiplier "120" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "10" +BirthRateRND "1" +LifeTime "10" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 4 +0.000000 0.572464 +0.218750 1.000000 +0.843750 0.108696 +1.000000 0.000000 + +ColorG 4 +0.000000 1.000000 +0.218750 0.942029 +0.843750 1.000000 +1.000000 0.391304 + +ColorB 4 +0.000000 0.681159 +0.218750 1.000000 +0.843750 0.471014 +1.000000 0.152174 + +Alpha 3 +0.000000 0.000000 +0.500000 0.500000 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.437500 0.833333 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "magic dotas" +Shader "particle/misc/dot" +ShapeType "1" +ShapeSize "512 512 512" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "1" +VelocityRND "2" +RotMultiplier "10" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "1000" +KillOldest "0" +BirthRate "200" +BirthRateRND "1" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 4 +0.000000 0.557971 +0.218750 1.000000 +0.812500 0.094203 +1.000000 0.000000 + +ColorG 4 +0.000000 1.000000 +0.218750 0.942029 +0.812500 1.000000 +1.000000 0.630435 + +ColorB 4 +0.000000 0.746377 +0.218750 1.000000 +0.812500 0.536232 +1.000000 0.173913 + +Alpha 7 +0.000000 0.000000 +0.055556 1.000000 +0.201389 0.246377 +0.489583 0.000000 +0.548611 1.000000 +0.701389 0.231884 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.437500 0.833333 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/hubb_mist_boost.ptc b/Alpha Prime/Mod/particle/hubb_mist_boost.ptc new file mode 100644 index 0000000..5ebd61d --- /dev/null +++ b/Alpha Prime/Mod/particle/hubb_mist_boost.ptc @@ -0,0 +1,524 @@ +$EmitorDef "heavy smoke" +Shader "particle/fire/sparkcloud" +ShapeType "1" +ShapeSize "64 64 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "4" +VelocityRND "15" +RotMultiplier "10" +SizeMultiplier "150" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "3" +BirthRateRND "1" +LifeTime "12" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 0.550725 +0.409722 0.094203 +1.000000 0.000000 + +ColorG 3 +0.000000 1.000000 +0.409722 1.000000 +1.000000 0.384058 + +ColorB 3 +0.000000 0.746377 +0.409722 0.528986 +1.000000 0.108696 + +Alpha 5 +0.000000 0.000000 +0.204861 1.000000 +0.489583 0.000000 +0.725694 1.000000 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +0.239583 0.340580 +1.000000 0.130435 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "crystal smoke" +Shader "particle/fire/drips1" +ShapeType "1" +ShapeSize "64 64 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "8" +VelocityRND "8" +RotMultiplier "10" +SizeMultiplier "45" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "200" +KillOldest "0" +BirthRate "10" +BirthRateRND "1" +LifeTime "15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 4 +0.000000 1.000000 +0.218750 1.000000 +0.840278 0.086957 +1.000000 0.000000 + +ColorG 4 +0.000000 0.500000 +0.218750 0.942029 +0.840278 1.000000 +1.000000 0.376812 + +ColorB 4 +0.000000 0.326087 +0.218750 1.000000 +0.840278 0.514493 +1.000000 0.130435 + +Alpha 10 +0.000000 1.000000 +0.114583 0.000000 +0.437500 0.000000 +0.510417 1.000000 +0.618056 0.000000 +0.684028 1.000000 +0.763889 0.000000 +0.875000 1.000000 +1.000000 0.000000 +0.982639 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.138889 1.000000 +0.371528 0.231884 +1.000000 0.224638 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "floor mist" +Shader "particle/fire/sparkcloud" +ShapeType "1" +ShapeSize "512 512 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "1" +VelocityRND "2" +RotMultiplier "5" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "3" +BirthRateRND "1" +LifeTime "20" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 0.000000 +0.489583 0.101449 +1.000000 0.000000 + +ColorG 3 +0.000000 0.442029 +0.489583 1.000000 +1.000000 0.376812 + +ColorB 3 +0.000000 0.181159 +0.489583 0.304348 +1.000000 0.144928 + +Alpha 7 +0.000000 0.000000 +0.173611 0.637681 +0.375000 0.000000 +0.479167 0.601449 +0.593750 0.000000 +0.795139 0.615942 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "magic dots center" +Shader "particle/misc/dot" +ShapeType "1" +ShapeSize "64 64 64" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "0.2" +VelocityRND "0.75" +RotMultiplier "10" +SizeMultiplier "2" +StretchMultiplier "5" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "-0.1" +LOD "0" +MaxNum "1000" +KillOldest "0" +BirthRate "50" +BirthRateRND "1" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 4 +0.000000 0.550725 +0.218750 0.891304 +0.840278 0.362319 +1.000000 0.000000 + +ColorG 4 +0.000000 1.000000 +0.218750 1.000000 +0.840278 0.884058 +1.000000 0.398551 + +ColorB 4 +0.000000 0.760870 +0.218750 0.905797 +0.840278 0.579710 +1.000000 0.152174 + +Alpha 7 +0.000000 0.000000 +0.170139 1.000000 +0.343750 0.014493 +0.517361 1.000000 +0.715278 0.000000 +0.871528 1.000000 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.114583 0.992754 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "magic dots around center" +Shader "particle/smoke/smoke1add" +ShapeType "2" +ShapeSize "200 200 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "0" +VelocityRND "1" +RotMultiplier "10" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.025" +GravityMultiplyRND "0" +LOD "0" +MaxNum "1000" +KillOldest "0" +BirthRate "150" +BirthRateRND "1" +LifeTime "6" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 4 +0.000000 0.572464 +0.218750 1.000000 +0.631944 0.108696 +1.000000 0.000000 + +ColorG 4 +0.000000 1.000000 +0.218750 0.942029 +0.631944 1.000000 +1.000000 0.492754 + +ColorB 4 +0.000000 0.746377 +0.218750 1.000000 +0.631944 0.318841 +1.000000 0.152174 + +Alpha 9 +0.000000 0.000000 +0.125000 1.000000 +0.246528 0.000000 +0.368056 0.992754 +0.493056 0.000000 +0.621528 1.000000 +0.743056 0.000000 +0.871528 1.000000 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.118056 0.992754 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/mine_drive.ptc b/Alpha Prime/Mod/particle/mine_drive.ptc new file mode 100644 index 0000000..4a1b6da --- /dev/null +++ b/Alpha Prime/Mod/particle/mine_drive.ptc @@ -0,0 +1,204 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "1" +ShapeSize "30 30 6" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "200" +BirthRateRND "20" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.5" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.114583 0.888060 +1.000000 0.641791 + +ColorG 3 +0.000000 1.000000 +0.114583 0.768657 +1.000000 0.507463 + +ColorB 3 +0.000000 1.000000 +0.114583 0.679105 +1.000000 0.440298 + +Alpha 3 +0.000000 1.000000 +0.565972 0.649254 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core2" +Shader "particle/flash/electric" +ShapeType "1" +ShapeSize "24 24 6" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "500" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.5" +Repeat "1" + + +ColorR 3 +0.000000 1.000000 +0.156250 0.820895 +1.000000 0.701493 + +ColorG 3 +0.000000 1.000000 +0.156250 0.649254 +1.000000 0.432836 + +ColorB 3 +0.000000 0.910448 +0.156250 0.223881 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 5 +0.000000 1.000000 +0.239583 0.000000 +0.545139 0.970149 +0.774306 0.402985 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/physx/fluidbleedtest.ptc b/Alpha Prime/Mod/particle/physx/fluidbleedtest.ptc new file mode 100644 index 0000000..c08dc54 --- /dev/null +++ b/Alpha Prime/Mod/particle/physx/fluidbleedtest.ptc @@ -0,0 +1,106 @@ +$EmitorDef "blood" +Shader "particle/misc/blooddrop" +ShapeType "2" +ShapeSize "0.4961 0 0" +KillShapeType "0" +KillShapeSize "16.03 16.03 16.03" +ConeAngle "0 0 0" +Velocity "15.08" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "3.0" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0.7" +GravityMultiplyRND "0" +LOD "0" +MaxNum "400" +KillOldest "0" +BirthRate "50" +BirthRateRND "0" +LifeTime "5.51" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "7" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "80" +RestDensity "700" +KernelRadiusMultiplier "2.4" +MotionLimitMultiplier "3" +Stiffness "50" +Viscosity "15" +Damping "0.1" +StaticCollisionRestitution "0.01" +StaticCollisionAdhesion "0.6" +DynamicCollisionRestitution "0.01" +DynamicCollisionAdhesion "0.6" + + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 1.000000 +0.784722 0.978261 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 4 +0.000000 1.000000 +0.076389 0.985507 +0.135417 0.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/physx/fluidtest.ptc b/Alpha Prime/Mod/particle/physx/fluidtest.ptc new file mode 100644 index 0000000..0ebb388 --- /dev/null +++ b/Alpha Prime/Mod/particle/physx/fluidtest.ptc @@ -0,0 +1,105 @@ +$EmitorDef "blood" +Shader "particle/misc/liquidrop" +ShapeType "2" +ShapeSize "4 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "1200" +KillOldest "0" +BirthRate "500" +BirthRateRND "0" +LifeTime "7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "12" +Repeat "1" +Fluid "0" +RestParticlesPerMeter "80" +RestDensity "800" +KernelRadiusMultiplier "2.3" +MotionLimitMultiplier "5" +Stiffness "15" +Viscosity "10" +Damping "0.1" +StaticCollisionRestitution "0.1" +StaticCollisionAdhesion "0.1" +DynamicCollisionRestitution "0.1" +DynamicCollisionAdhesion "0.1" + + +ColorR 3 +0.000000 0.043478 +0.572917 0.043478 +1.000000 0.043478 + +ColorG 3 +0.000000 0.594203 +0.572917 0.594203 +1.000000 0.000000 + +ColorB 3 +0.000000 0.043478 +0.572917 0.043478 +1.000000 0.043478 + +Alpha 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/physx/hit_machinegun.ptc b/Alpha Prime/Mod/particle/physx/hit_machinegun.ptc new file mode 100644 index 0000000..f8be9d7 --- /dev/null +++ b/Alpha Prime/Mod/particle/physx/hit_machinegun.ptc @@ -0,0 +1,518 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1.0" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 90 0" +Velocity "120" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "4" +StretchMultiplier "2.45" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0.01" +LOD "1" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "50" +LifeTime "5" +LifeTimeRND "0.2" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" +Fluid "0" +RestParticlesPerMeter "140.0" +RestDensity "500.0" +KernelRadiusMultiplier "2.3" +MotionLimitMultiplier "5" +Stiffness "10.0" +Viscosity "1.0" +Damping "0.0" +StaticCollisionRestitution "0.7" +StaticCollisionAdhesion "0.0" +DynamicCollisionRestitution "0.7" +DynamicCollisionAdhesion "0.0" +SimulationMethod "1" + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.462687 +1.000000 0.052239 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + + + + +$EmitorDef "core2" +Shader "particle/fire/sparks1nb" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "20" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.135417 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.135417 0.283582 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.135417 0.134328 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.642361 0.708955 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "150 150 0" +Velocity "100" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "1" +MaxNum "17" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "3" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.093750 0.985075 +0.784722 0.791045 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.223881 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debr" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "180" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "45" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "1" +MaxNum "6" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/pod_fire.ptc b/Alpha Prime/Mod/particle/pod_fire.ptc new file mode 100644 index 0000000..f53558e --- /dev/null +++ b/Alpha Prime/Mod/particle/pod_fire.ptc @@ -0,0 +1,377 @@ +$EmitorDef "fire" +Shader "particle/animfire" +ShapeType "2" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "15 15 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "50" +SizeMultiplier "70" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "2" +GravityMultiply "-0.75" +GravityMultiplyRND "-0.2" +LOD "0" +MaxNum "75" +KillOldest "0" +BirthRate "20" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "30" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 4 +0.000000 0.000000 +0.118056 0.644928 +0.378472 1.000000 +1.000000 1.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.187500 0.804348 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "12 12 12" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "0" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "2" +BirthRateRND "0" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.927536 +1.000000 0.905797 + +ColorG 2 +0.000000 0.166667 +1.000000 0.420290 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.604167 0.688406 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.375000 1.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/animsmoke" +ShapeType "2" +ShapeSize "12 12 12" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "30 30 0" +Velocity "20" +VelocityRND "30" +RotMultiplier "50" +SizeMultiplier "300" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.1" +AirResistanceRND "0.5" +GravityMultiply "-0.2" +GravityMultiplyRND "0.04" +LOD "0" +MaxNum "300" +KillOldest "0" +BirthRate "40" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "8" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 0.159420 +0.357639 0.028986 +1.000000 0.000000 + +ColorG 3 +0.000000 0.159420 +0.357639 0.108696 +1.000000 0.000000 + +ColorB 3 +0.000000 0.159420 +0.357639 0.108696 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.177083 0.000000 +0.392361 0.384058 +1.000000 0.478261 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 2 +0.000000 0.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "hotspot" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "5 5 5" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "30 30 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "50" +SizeMultiplier "65" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "-0.4" +GravityMultiplyRND "0.1" +LOD "0" +MaxNum "75" +KillOldest "0" +BirthRate "10" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "1" +TilesY "1" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.905797 + +ColorG 2 +0.000000 1.000000 +1.000000 0.420290 + +ColorB 2 +0.000000 1.000000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.149306 0.956522 +0.729167 0.717391 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.246528 1.000000 +1.000000 0.492754 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/pod_smoke.ptc b/Alpha Prime/Mod/particle/pod_smoke.ptc new file mode 100644 index 0000000..1c95c83 --- /dev/null +++ b/Alpha Prime/Mod/particle/pod_smoke.ptc @@ -0,0 +1,288 @@ +$EmitorDef "smoke" +Shader "particle/animfire_mask" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 120 0" +Velocity "10" +VelocityRND "5" +RotMultiplier "30" +SizeMultiplier "400" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "400" +KillOldest "1" +BirthRate "200" +BirthRateRND "5" +LifeTime "1.8" +LifeTimeRND "0.5" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "10" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "0" +Spring "0" + + +ColorR 3 +0.000000 0.000000 +0.222222 0.000000 +1.000000 0.000000 + +ColorG 3 +0.000000 0.000000 +0.222222 0.000000 +1.000000 0.000000 + +ColorB 3 +0.000000 0.000000 +0.222222 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 0.000000 +0.440972 0.268116 +1.000000 0.289855 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.079861 0.537313 +0.361111 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.666667 0.925373 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 0.753731 +0.059028 0.462687 +1.000000 0.477612 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke2" +Shader "particle/animfire_mask" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "80 80 80" +ConeAngle "15 15 0" +Velocity "10" +VelocityRND "5" +RotMultiplier "0" +SizeMultiplier "300" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "200" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "0.8" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "30" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "60" +Repeat "0" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 0.681159 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.141791 +0.427083 0.835821 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.666667 0.920290 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 25 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "150" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "100" +BirthRateRND "10" +LifeTime "0.1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "0" +Spring "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.830882 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.694030 +0.041667 0.985075 +0.774306 0.783582 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.708955 +0.496528 0.985075 +1.000000 0.828358 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/ric_beton.ptc b/Alpha Prime/Mod/particle/ric_beton.ptc new file mode 100644 index 0000000..14adf21 --- /dev/null +++ b/Alpha Prime/Mod/particle/ric_beton.ptc @@ -0,0 +1,380 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 160 0" +Velocity "180" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "130" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "1" +MaxNum "12" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "3.377" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.865672 +0.190972 0.574627 +1.000000 0.432836 + +ColorG 3 +0.000000 0.768657 +0.190972 0.514925 +1.000000 0.365672 + +ColorB 3 +0.000000 0.701493 +0.190972 0.485075 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.093750 0.985075 +0.781250 0.791045 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.223881 + +Size 3 +0.000000 0.000000 +0.149306 0.805970 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debris" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 160 0" +Velocity "200" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "1" +MaxNum "10" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.985075 +0.204861 0.656716 +1.000000 0.604478 + +ColorG 3 +0.000000 0.529851 +0.204861 0.574627 +1.000000 0.567164 + +ColorB 3 +0.000000 0.029851 +0.204861 0.492537 +1.000000 0.522388 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "hotspot" +Shader "particle/fire/sparks1glow" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "0.3" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "1.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "2" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.470149 + +ColorG 2 +0.000000 0.477612 +1.000000 0.149254 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + diff --git a/Alpha Prime/Mod/particle/ric_gravel.ptc b/Alpha Prime/Mod/particle/ric_gravel.ptc new file mode 100644 index 0000000..87467fa --- /dev/null +++ b/Alpha Prime/Mod/particle/ric_gravel.ptc @@ -0,0 +1,286 @@ +$EmitorDef "sparkles" +Shader "particle/fire/sparkdensecloud" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "360 30 0" +Velocity "250" +VelocityRND "50" +RotMultiplier "0" +SizeMultiplier "70" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0.8" +GravityMultiplyRND "0.2" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "200" +BirthRateRND "30" +LifeTime "1.5" +LifeTimeRND "0.25" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" +Spring "0" + + +ColorR 3 +0.000000 0.529412 +0.468750 0.389706 +1.000000 0.345588 + +ColorG 3 +0.000000 0.470588 +0.468750 0.375000 +1.000000 0.338235 + +ColorB 3 +0.000000 0.441176 +0.468750 0.411765 +1.000000 0.441176 + +Alpha 3 +0.000000 1.000000 +0.805556 0.926471 +1.000000 0.058824 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.024306 0.117647 +0.781250 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 90 0" +Velocity "200" +VelocityRND "50" +RotMultiplier "300" +SizeMultiplier "200" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1.5" +AirResistanceRND "1" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "12" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "4.502" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" +Spring "0" + + +ColorR 2 +0.000000 0.338235 +1.000000 0.551471 + +ColorG 2 +0.000000 0.323529 +1.000000 0.529412 + +ColorB 2 +0.000000 0.323529 +1.000000 0.544118 + +Alpha 4 +0.000000 0.007353 +0.055556 0.963235 +0.659722 0.220588 +1.000000 0.014706 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.400000 + +Size 3 +0.000000 0.036765 +0.083333 0.485294 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "point" +Shader "particle/fire/sparks1glow" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "5" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "2" +Repeat "0" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.298611 0.875000 +1.000000 0.272059 + +ColorG 3 +0.000000 0.139706 +0.298611 0.786765 +1.000000 0.191176 + +ColorB 3 +0.000000 0.080882 +0.298611 0.073529 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.243056 0.227941 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/ric_iron.ptc b/Alpha Prime/Mod/particle/ric_iron.ptc new file mode 100644 index 0000000..1d6c63c --- /dev/null +++ b/Alpha Prime/Mod/particle/ric_iron.ptc @@ -0,0 +1,566 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1long" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "90 90 0" +Velocity "100" +VelocityRND "200" +RotMultiplier "1" +SizeMultiplier "6" +StretchMultiplier "1.5" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "0" +AirResistanceRND "0.5" +GravityMultiply "1" +GravityMultiplyRND "0.5" +LOD "1" +MaxNum "5" +KillOldest "0" +BirthRate "10" +BirthRateRND "100" +LifeTime "1" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.522388 +1.000000 0.365672 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "coreglow" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 0 0" +Velocity "200" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.135417 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.135417 0.283582 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.135417 0.134328 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.638889 0.701493 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "150" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "1" +MaxNum "10" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "3.377" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.093750 0.985075 +0.784722 0.791045 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.223881 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "hotspot" +Shader "particle/fire/sparks1glow" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "0.3" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "1.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "2" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.470149 + +ColorG 2 +0.000000 0.477612 +1.000000 0.149254 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksmall" +Shader "particle/fire/sparks1glow" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "90 90 0" +Velocity "100" +VelocityRND "200" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0.5" +GravityMultiply "1" +GravityMultiplyRND "0.5" +LOD "1" +MaxNum "100" +KillOldest "0" +BirthRate "150" +BirthRateRND "100" +LifeTime "0.5" +LifeTimeRND "0.5" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.522388 +1.000000 0.365672 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/ric_metal.ptc b/Alpha Prime/Mod/particle/ric_metal.ptc new file mode 100644 index 0000000..2b23465 --- /dev/null +++ b/Alpha Prime/Mod/particle/ric_metal.ptc @@ -0,0 +1,659 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom" +Shader "particle/fire/sparks1long" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "90 90 0" +Velocity "100" +VelocityRND "200" +RotMultiplier "1" +SizeMultiplier "3" +StretchMultiplier "2.2" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "0" +AirResistanceRND "0.5" +GravityMultiply "1" +GravityMultiplyRND "0.5" +LOD "1" +MaxNum "5" +KillOldest "0" +BirthRate "10" +BirthRateRND "50" +LifeTime "1" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.522388 +1.000000 0.365672 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksrandom2" +Shader "particle/fire/sparks1long" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "90 90 0" +Velocity "100" +VelocityRND "200" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1.2" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "0" +AirResistanceRND "0.5" +GravityMultiply "1" +GravityMultiplyRND "0.5" +LOD "1" +MaxNum "10" +KillOldest "0" +BirthRate "10" +BirthRateRND "50" +LifeTime "1" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.522388 +1.000000 0.365672 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "coreglow" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 0 0" +Velocity "200" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.135417 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.135417 0.283582 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.135417 0.134328 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.638889 0.701493 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "150" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "1" +MaxNum "6" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "3.377" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.093750 0.985075 +0.784722 0.791045 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.223881 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "hotspot" +Shader "particle/fire/sparks1glow" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "0.3" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "1.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "2" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.470149 + +ColorG 2 +0.000000 0.477612 +1.000000 0.149254 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksmall" +Shader "particle/fire/sparks1glow" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "90 90 0" +Velocity "100" +VelocityRND "200" +RotMultiplier "1" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0.5" +GravityMultiply "1" +GravityMultiplyRND "0.5" +LOD "1" +MaxNum "100" +KillOldest "0" +BirthRate "50" +BirthRateRND "100" +LifeTime "0.5" +LifeTimeRND "0.5" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.522388 +1.000000 0.365672 + +ColorB 2 +0.000000 0.007463 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.777778 0.791045 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/ric_plastic.ptc b/Alpha Prime/Mod/particle/ric_plastic.ptc new file mode 100644 index 0000000..6f1e81a --- /dev/null +++ b/Alpha Prime/Mod/particle/ric_plastic.ptc @@ -0,0 +1,381 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 60 0" +Velocity "150" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "1" +MaxNum "3" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "3.3765" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.992537 +0.204861 0.514925 +1.000000 0.373134 + +ColorG 3 +0.000000 0.537313 +0.204861 0.447761 +1.000000 0.402985 + +ColorB 3 +0.000000 0.037313 +0.204861 0.402985 +1.000000 0.335821 + +Alpha 4 +0.000000 0.000000 +0.093750 0.985075 +0.784722 0.791045 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.223881 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debris" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "180" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "45" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "1" +MaxNum "6" +KillOldest "0" +BirthRate "360" +BirthRateRND "1" +LifeTime "4.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.6" +Repeat "0" + + +ColorR 3 +0.000000 0.985075 +0.204861 0.656716 +1.000000 0.604478 + +ColorG 3 +0.000000 0.529851 +0.204861 0.574627 +1.000000 0.567164 + +ColorB 3 +0.000000 0.029851 +0.204861 0.492537 +1.000000 0.522388 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "hotspot" +Shader "particle/fire/sparks1glow" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "0.3" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "1.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "2" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.470149 + +ColorG 2 +0.000000 0.477612 +1.000000 0.149254 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/ric_rubber.ptc b/Alpha Prime/Mod/particle/ric_rubber.ptc new file mode 100644 index 0000000..74e6fb3 --- /dev/null +++ b/Alpha Prime/Mod/particle/ric_rubber.ptc @@ -0,0 +1,285 @@ +$EmitorDef "sparkscore" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "70" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "6" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0.01" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "0.15" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.225694 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 1.000000 +0.225694 0.343284 +1.000000 0.156716 + +ColorB 3 +0.000000 0.917910 +0.225694 0.201493 +1.000000 0.074627 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "debris" +Shader "particle/misc/debris1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 150 0" +Velocity "150" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +LOD "1" +MaxNum "12" +KillOldest "0" +BirthRate "120" +BirthRateRND "1" +LifeTime "1.501" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 3 +0.000000 0.985075 +0.201389 0.634328 +1.000000 0.477612 + +ColorG 3 +0.000000 0.529851 +0.201389 0.604478 +1.000000 0.440298 + +ColorB 3 +0.000000 0.029851 +0.201389 0.522388 +1.000000 0.417910 + +Alpha 3 +0.000000 0.000000 +0.097222 0.992537 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 0.485075 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.152778 0.552239 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "hotspot" +Shader "particle/fire/sparks1glow" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "10 10 0" +Velocity "0.3" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "16" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "5" +LifeTime "1.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "2" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.470149 + +ColorG 2 +0.000000 0.477612 +1.000000 0.149254 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.569444 0.656716 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/rocket_smoke.ptc b/Alpha Prime/Mod/particle/rocket_smoke.ptc new file mode 100644 index 0000000..b11a57f --- /dev/null +++ b/Alpha Prime/Mod/particle/rocket_smoke.ptc @@ -0,0 +1,285 @@ +$EmitorDef "smoke" +Shader "particle/animfire_mask" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 120 0" +Velocity "10" +VelocityRND "5" +RotMultiplier "30" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "420" +KillOldest "1" +BirthRate "200" +BirthRateRND "5" +LifeTime "3" +LifeTimeRND "0.5" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "20" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 3 +0.000000 0.000000 +0.222222 0.000000 +1.000000 0.000000 + +ColorG 3 +0.000000 0.000000 +0.222222 0.000000 +1.000000 0.000000 + +ColorB 3 +0.000000 0.000000 +0.222222 0.000000 +1.000000 0.000000 + +Alpha 3 +0.000000 0.000000 +0.440972 0.268116 +1.000000 0.289855 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 0.000000 +0.079861 0.537313 +0.361111 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.666667 0.925373 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 0.753731 +0.059028 0.462687 +1.000000 0.477612 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "smoke2" +Shader "particle/animfire_mask" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "80 80 80" +ConeAngle "15 15 0" +Velocity "10" +VelocityRND "5" +RotMultiplier "0" +SizeMultiplier "15" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "210" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "1.37" +LifeTimeRND "0" +LifetimeByAnim "1" +AnimOnce "1" +AnimFPS "50" +TilesX "8" +TilesY "4" +PointSprites "0" +EffectTime "60" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 0.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 0.681159 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.141791 +0.427083 0.835821 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.666667 0.920290 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 25 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "100" +BirthRateRND "10" +LifeTime "0.1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.830882 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.694030 +0.041667 0.985075 +0.774306 0.783582 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.708955 +0.496528 0.985075 +1.000000 0.828358 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smasher_burn.ptc b/Alpha Prime/Mod/particle/smasher_burn.ptc new file mode 100644 index 0000000..2c17bd6 --- /dev/null +++ b/Alpha Prime/Mod/particle/smasher_burn.ptc @@ -0,0 +1,294 @@ +$EmitorDef "glows" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "1" +KillShapeSize "16 16 32" +ConeAngle "0 0 0" +Velocity "40" +VelocityRND "1" +RotMultiplier "1" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "20" +BirthRateRND "0" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.319444 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.298507 +0.319444 0.119403 +1.000000 0.000000 + +ColorB 3 +0.000000 0.253731 +0.319444 0.059701 +1.000000 0.000000 + +Alpha 2 +0.000000 0.432836 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparkssmall" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "30 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "800" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "50" +StretchMultiplier "5" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.268657 +0.336806 0.059701 +1.000000 0.089552 + +ColorB 3 +0.000000 0.149254 +0.336806 0.022388 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.062500 1.000000 +0.805556 1.000000 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glowcore" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "0" +VelocityRND "1" +RotMultiplier "100" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "0.05" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.333333 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.231343 +0.333333 0.022388 +1.000000 0.000000 + +ColorB 3 +0.000000 0.119403 +0.333333 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.462687 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smasher_init.ptc b/Alpha Prime/Mod/particle/smasher_init.ptc new file mode 100644 index 0000000..9f76d16 --- /dev/null +++ b/Alpha Prime/Mod/particle/smasher_init.ptc @@ -0,0 +1,389 @@ +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "40" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "200" +BirthRateRND "0" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.268657 +0.336806 0.059701 +1.000000 0.089552 + +ColorB 3 +0.000000 0.149254 +0.336806 0.022388 +1.000000 0.000000 + +Alpha 3 +0.000000 0.000000 +0.062500 1.000000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glows" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "1" +KillShapeSize "16 16 32" +ConeAngle "0 0 0" +Velocity "40" +VelocityRND "1" +RotMultiplier "1" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "20" +BirthRateRND "0" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.319444 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.298507 +0.319444 0.119403 +1.000000 0.000000 + +ColorB 3 +0.000000 0.253731 +0.319444 0.059701 +1.000000 0.000000 + +Alpha 2 +0.000000 0.432836 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparkssmall" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "40" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "5" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "1" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.268657 +0.336806 0.059701 +1.000000 0.089552 + +ColorB 3 +0.000000 0.149254 +0.336806 0.022388 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.062500 1.000000 +0.805556 1.000000 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glowcore" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "0" +VelocityRND "1" +RotMultiplier "100" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "0.05" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 3 +0.000000 1.000000 +0.333333 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.231343 +0.333333 0.022388 +1.000000 0.000000 + +ColorB 3 +0.000000 0.119403 +0.333333 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.462687 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smoke_waste.ptc b/Alpha Prime/Mod/particle/smoke_waste.ptc new file mode 100644 index 0000000..c07885d --- /dev/null +++ b/Alpha Prime/Mod/particle/smoke_waste.ptc @@ -0,0 +1,97 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke1" +ShapeType "1" +ShapeSize "32 32 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "70 80 0" +Velocity "5" +VelocityRND "2" +RotMultiplier "50" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.1" +AirResistanceRND "0.2" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "1" +BirthRate "2" +BirthRateRND "1" +LifeTime "1.5" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "5" +Repeat "1" + + +ColorR 2 +0.000000 0.917910 +1.000000 0.380597 + +ColorG 2 +0.000000 0.865672 +1.000000 0.574627 + +ColorB 2 +0.000000 0.582090 +1.000000 0.171642 + +Alpha 3 +0.000000 0.000000 +0.343750 0.649254 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.268657 +1.000000 0.738806 + +Size 3 +0.000000 0.276119 +0.305556 0.656716 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smoke_wastelarge.ptc b/Alpha Prime/Mod/particle/smoke_wastelarge.ptc new file mode 100644 index 0000000..76cdfa9 --- /dev/null +++ b/Alpha Prime/Mod/particle/smoke_wastelarge.ptc @@ -0,0 +1,97 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "70 80 0" +Velocity "15" +VelocityRND "2" +RotMultiplier "100" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.1" +AirResistanceRND "0.2" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "1" +BirthRate "2" +BirthRateRND "1" +LifeTime "2" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "15" +Repeat "1" + + +ColorR 2 +0.000000 0.917910 +1.000000 0.380597 + +ColorG 2 +0.000000 0.865672 +1.000000 0.574627 + +ColorB 2 +0.000000 0.582090 +1.000000 0.171642 + +Alpha 3 +0.000000 0.000000 +0.298611 1.000000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.447761 + +Size 3 +0.000000 0.276119 +0.305556 0.656716 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smoke_wastelarge2.ptc b/Alpha Prime/Mod/particle/smoke_wastelarge2.ptc new file mode 100644 index 0000000..4fb9b99 --- /dev/null +++ b/Alpha Prime/Mod/particle/smoke_wastelarge2.ptc @@ -0,0 +1,93 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "70 80 0" +Velocity "10" +VelocityRND "10" +RotMultiplier "100" +SizeMultiplier "125" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0.02" +GravityMultiply "-0.1" +GravityMultiplyRND "0" +LOD "0" +MaxNum "25" +KillOldest "1" +BirthRate "3" +BirthRateRND "1" +LifeTime "6" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "15" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.917910 +1.000000 0.380597 + +ColorG 2 +0.000000 0.865672 +1.000000 0.574627 + +ColorB 2 +0.000000 0.582090 +1.000000 0.171642 + +Alpha 3 +0.000000 0.000000 +0.298611 1.000000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.442857 + +Size 3 +0.000000 0.276119 +0.305556 0.656716 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smokeblack.ptc b/Alpha Prime/Mod/particle/smokeblack.ptc new file mode 100644 index 0000000..71df40a --- /dev/null +++ b/Alpha Prime/Mod/particle/smokeblack.ptc @@ -0,0 +1,100 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "12" +VelocityRND "2" +RotMultiplier "30" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "2" +BirthRateRND "1" +LifeTime "5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.257353 +1.000000 0.000000 + +ColorG 2 +0.000000 0.250000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.257353 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.090278 1.000000 +0.729167 0.691176 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 2 +0.000000 0.500000 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smokeblacklong.ptc b/Alpha Prime/Mod/particle/smokeblacklong.ptc new file mode 100644 index 0000000..5c93f9b --- /dev/null +++ b/Alpha Prime/Mod/particle/smokeblacklong.ptc @@ -0,0 +1,100 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "12" +VelocityRND "2" +RotMultiplier "30" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "35" +KillOldest "0" +BirthRate "2" +BirthRateRND "1" +LifeTime "10" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.257353 +1.000000 0.000000 + +ColorG 2 +0.000000 0.250000 +1.000000 0.000000 + +ColorB 2 +0.000000 0.257353 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.090278 1.000000 +0.729167 0.691176 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 2 +0.000000 0.500000 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smokeblackmass.ptc b/Alpha Prime/Mod/particle/smokeblackmass.ptc new file mode 100644 index 0000000..f92b12c --- /dev/null +++ b/Alpha Prime/Mod/particle/smokeblackmass.ptc @@ -0,0 +1,103 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 60 0" +Velocity "25" +VelocityRND "2" +RotMultiplier "60" +SizeMultiplier "50" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "15" +KillOldest "0" +BirthRate "6" +BirthRateRND "1" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.000000 +1.000000 0.164179 + +ColorG 2 +0.000000 0.059701 +1.000000 0.231343 + +ColorB 2 +0.000000 0.029851 +1.000000 0.201493 + +Alpha 4 +0.000000 0.000000 +0.090278 1.000000 +0.829861 0.716418 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 2 +0.000000 0.522388 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smokeblackmass2.ptc b/Alpha Prime/Mod/particle/smokeblackmass2.ptc new file mode 100644 index 0000000..74ae69a --- /dev/null +++ b/Alpha Prime/Mod/particle/smokeblackmass2.ptc @@ -0,0 +1,97 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "2" +ShapeSize "24 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 60 0" +Velocity "50" +VelocityRND "5" +RotMultiplier "60" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "6" +BirthRateRND "1" +LifeTime "4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.000000 +1.000000 0.164179 + +ColorG 2 +0.000000 0.059701 +1.000000 0.231343 + +ColorB 2 +0.000000 0.029851 +1.000000 0.201493 + +Alpha 4 +0.000000 0.000000 +0.090278 1.000000 +0.829861 0.716418 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 3 +0.000000 0.365672 +0.149306 0.791045 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/smokewhite.ptc b/Alpha Prime/Mod/particle/smokewhite.ptc new file mode 100644 index 0000000..ff13beb --- /dev/null +++ b/Alpha Prime/Mod/particle/smokewhite.ptc @@ -0,0 +1,100 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "12" +VelocityRND "2" +RotMultiplier "30" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "2" +BirthRateRND "1" +LifeTime "5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.257353 +1.000000 0.823529 + +ColorG 2 +0.000000 0.250000 +1.000000 0.801471 + +ColorB 2 +0.000000 0.257353 +1.000000 0.786765 + +Alpha 4 +0.000000 0.000000 +0.090278 1.000000 +0.729167 0.691176 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 2 +0.000000 0.500000 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/sprites/angelflare.tga b/Alpha Prime/Mod/particle/sprites/angelflare.tga new file mode 100644 index 0000000..d8810c6 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/angelflare.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/blood1.tga b/Alpha Prime/Mod/particle/sprites/blood1.tga new file mode 100644 index 0000000..7606f03 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/blood1.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/debris1.tga b/Alpha Prime/Mod/particle/sprites/debris1.tga new file mode 100644 index 0000000..b65fa24 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/debris1.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/dot.tga b/Alpha Prime/Mod/particle/sprites/dot.tga new file mode 100644 index 0000000..63cb9e0 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/dot.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/drip.tga b/Alpha Prime/Mod/particle/sprites/drip.tga new file mode 100644 index 0000000..ab4be3b Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/drip.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/drop01.tga b/Alpha Prime/Mod/particle/sprites/drop01.tga new file mode 100644 index 0000000..3e3e863 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/drop01.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/drop02.tga b/Alpha Prime/Mod/particle/sprites/drop02.tga new file mode 100644 index 0000000..3764797 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/drop02.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/dust.tga b/Alpha Prime/Mod/particle/sprites/dust.tga new file mode 100644 index 0000000..ebaf036 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/dust.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/faeryflare.tga b/Alpha Prime/Mod/particle/sprites/faeryflare.tga new file mode 100644 index 0000000..b0f6669 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/faeryflare.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/fire.tga b/Alpha Prime/Mod/particle/sprites/fire.tga new file mode 100644 index 0000000..74a8b08 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/fire.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/firesmall.tga b/Alpha Prime/Mod/particle/sprites/firesmall.tga new file mode 100644 index 0000000..74a8b08 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/firesmall.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/flame.tga b/Alpha Prime/Mod/particle/sprites/flame.tga new file mode 100644 index 0000000..9d945e2 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/flame.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/flamesmall.tga b/Alpha Prime/Mod/particle/sprites/flamesmall.tga new file mode 100644 index 0000000..10c620b Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/flamesmall.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/glow.tga b/Alpha Prime/Mod/particle/sprites/glow.tga new file mode 100644 index 0000000..e4aa7a2 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/glow.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/glow2.tga b/Alpha Prime/Mod/particle/sprites/glow2.tga new file mode 100644 index 0000000..e1cd23e Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/glow2.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/heavysmoke.dds b/Alpha Prime/Mod/particle/sprites/heavysmoke.dds new file mode 100644 index 0000000..99209b5 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/heavysmoke.dds differ diff --git a/Alpha Prime/Mod/particle/sprites/heavysmoke.tga b/Alpha Prime/Mod/particle/sprites/heavysmoke.tga new file mode 100644 index 0000000..d425176 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/heavysmoke.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/smoke.tga b/Alpha Prime/Mod/particle/sprites/smoke.tga new file mode 100644 index 0000000..cf34c99 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/smoke.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/smoke2.tga b/Alpha Prime/Mod/particle/sprites/smoke2.tga new file mode 100644 index 0000000..67a37b5 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/smoke2.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/smoke3.tga b/Alpha Prime/Mod/particle/sprites/smoke3.tga new file mode 100644 index 0000000..21f401e Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/smoke3.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/spark.tga b/Alpha Prime/Mod/particle/sprites/spark.tga new file mode 100644 index 0000000..5da2cdc Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/spark.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/spark2.tga b/Alpha Prime/Mod/particle/sprites/spark2.tga new file mode 100644 index 0000000..493f0ad Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/spark2.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/sparkcloud.tga b/Alpha Prime/Mod/particle/sprites/sparkcloud.tga new file mode 100644 index 0000000..20ed29b Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/sparkcloud.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/sparkdensecloud.tga b/Alpha Prime/Mod/particle/sprites/sparkdensecloud.tga new file mode 100644 index 0000000..0b4a983 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/sparkdensecloud.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/sparklong.tga b/Alpha Prime/Mod/particle/sprites/sparklong.tga new file mode 100644 index 0000000..fc10628 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/sparklong.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/waterdrop.tga b/Alpha Prime/Mod/particle/sprites/waterdrop.tga new file mode 100644 index 0000000..a94734e Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/waterdrop.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/waterstream.tga b/Alpha Prime/Mod/particle/sprites/waterstream.tga new file mode 100644 index 0000000..e310665 Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/waterstream.tga differ diff --git a/Alpha Prime/Mod/particle/sprites/waterstreamlong.tga b/Alpha Prime/Mod/particle/sprites/waterstreamlong.tga new file mode 100644 index 0000000..94d1f3b Binary files /dev/null and b/Alpha Prime/Mod/particle/sprites/waterstreamlong.tga differ diff --git a/Alpha Prime/Mod/particle/steam_areared.ptc b/Alpha Prime/Mod/particle/steam_areared.ptc new file mode 100644 index 0000000..e1fe122 --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_areared.ptc @@ -0,0 +1,103 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke2add" +ShapeType "1" +ShapeSize "64 64 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "16" +VelocityRND "2" +RotMultiplier "30" +SizeMultiplier "45" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "60" +KillOldest "0" +BirthRate "3" +BirthRateRND "1" +LifeTime "4.81" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.776119 +1.000000 0.395522 + +ColorG 2 +0.000000 0.313433 +1.000000 0.089552 + +ColorB 2 +0.000000 0.000000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.090278 1.000000 +0.729167 0.679105 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 2 +0.000000 0.500000 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/steam_door.ptc b/Alpha Prime/Mod/particle/steam_door.ptc new file mode 100644 index 0000000..eefadef --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_door.ptc @@ -0,0 +1,198 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke2" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "80 80 0" +Velocity "350" +VelocityRND "4" +RotMultiplier "50" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "3.5" +AirResistanceRND "0.2" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "25" +KillOldest "0" +BirthRate "20" +BirthRateRND "2" +LifeTime "1" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "1" +Repeat "1" + + +ColorR 2 +0.000000 0.888060 +1.000000 0.701493 + +ColorG 2 +0.000000 1.000000 +1.000000 0.835821 + +ColorB 2 +0.000000 0.955224 +1.000000 0.888060 + +Alpha 3 +0.000000 0.000000 +0.125000 0.791045 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.268657 +1.000000 0.738806 + +Size 3 +0.000000 0.000000 +0.333333 0.716418 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "base" +Shader "particle/smoke/smoke2add" +ShapeType "2" +ShapeSize "5 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "60 60 0" +Velocity "250" +VelocityRND "4" +RotMultiplier "150" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "5" +AirResistanceRND "0.2" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "30" +BirthRateRND "2" +LifeTime "0.5" +LifeTimeRND "0.1" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "1" +Repeat "1" + + +ColorR 2 +0.000000 0.888060 +1.000000 0.701493 + +ColorG 2 +0.000000 1.000000 +1.000000 0.835821 + +ColorB 2 +0.000000 0.955224 +1.000000 0.888060 + +Alpha 3 +0.000000 0.000000 +0.076389 0.970149 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.268657 +1.000000 0.738806 +0.000000 0.000000 + +Size 4 +0.000000 0.000000 +0.062500 0.544776 +0.243056 0.985075 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.607639 1.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/steam_flammable.ptc b/Alpha Prime/Mod/particle/steam_flammable.ptc new file mode 100644 index 0000000..659bb66 --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_flammable.ptc @@ -0,0 +1,97 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke1" +ShapeType "1" +ShapeSize "34 34 0" +KillShapeType "0" +KillShapeSize "17 17 17" +ConeAngle "70 80 0" +Velocity "5" +VelocityRND "2" +RotMultiplier "50" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.1" +AirResistanceRND "0.2" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "1" +BirthRate "2" +BirthRateRND "1" +LifeTime "1.5" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "5" +Repeat "1" + + +ColorR 2 +0.000000 0.917910 +1.000000 0.380597 + +ColorG 2 +0.000000 0.865672 +1.000000 0.574627 + +ColorB 2 +0.000000 0.582090 +1.000000 0.171642 + +Alpha 3 +0.000000 0.000000 +0.343750 0.649254 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.268657 +1.000000 0.738806 + +Size 3 +0.000000 0.276119 +0.305556 0.656716 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/steam_misty_orange.ptc b/Alpha Prime/Mod/particle/steam_misty_orange.ptc new file mode 100644 index 0000000..6ac64b1 --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_misty_orange.ptc @@ -0,0 +1,96 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke1" +ShapeType "2" +ShapeSize "25 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "70 80 0" +Velocity "45" +VelocityRND "4" +RotMultiplier "50" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +AirResistance "0.1" +AirResistanceRND "0.2" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "1" +BirthRate "5" +BirthRateRND "2" +LifeTime "2" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "5" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.850746 + +ColorG 2 +0.000000 0.873134 +1.000000 0.470149 + +ColorB 2 +0.000000 0.589552 +1.000000 0.179104 + +Alpha 3 +0.000000 0.000000 +0.215278 0.589552 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.268657 +1.000000 0.738806 + +Size 3 +0.000000 0.276119 +0.305556 0.656716 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/steam_misty_white.ptc b/Alpha Prime/Mod/particle/steam_misty_white.ptc new file mode 100644 index 0000000..808f9ee --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_misty_white.ptc @@ -0,0 +1,92 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke2" +ShapeType "2" +ShapeSize "25 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "80 80 0" +Velocity "90" +VelocityRND "4" +RotMultiplier "50" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "0.1" +AirResistanceRND "0.2" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "40" +KillOldest "0" +BirthRate "10" +BirthRateRND "2" +LifeTime "2" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "5" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.000000 +0.138889 0.679105 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.268657 +1.000000 0.738806 + +Size 3 +0.000000 0.216418 +0.170139 0.858209 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/steam_misty_whitelarge.ptc b/Alpha Prime/Mod/particle/steam_misty_whitelarge.ptc new file mode 100644 index 0000000..d2b7f44 --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_misty_whitelarge.ptc @@ -0,0 +1,93 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke2" +ShapeType "2" +ShapeSize "20 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "60 80 0" +Velocity "160" +VelocityRND "20" +RotMultiplier "50" +SizeMultiplier "100" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.4" +AirResistanceRND "0.1" +GravityMultiply "-0.03" +GravityMultiplyRND "0" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "10" +BirthRateRND "2" +LifeTime "5" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.820895 +1.000000 0.671642 + +ColorG 2 +0.000000 0.977612 +1.000000 0.910448 + +ColorB 2 +0.000000 1.000000 +1.000000 0.917910 + +Alpha 3 +0.000000 0.000000 +0.125000 0.716418 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.440298 + +Size 3 +0.000000 0.410448 +0.100694 0.873134 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/steam_misty_whitelarge2.ptc b/Alpha Prime/Mod/particle/steam_misty_whitelarge2.ptc new file mode 100644 index 0000000..e3cc2f9 --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_misty_whitelarge2.ptc @@ -0,0 +1,93 @@ +$EmitorDef "steam_smoke" +Shader "particle/smoke/smoke2" +ShapeType "2" +ShapeSize "20 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "60 60 0" +Velocity "250" +VelocityRND "20" +RotMultiplier "50" +SizeMultiplier "70" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0.4" +AirResistanceRND "0.1" +GravityMultiply "-0.03" +GravityMultiplyRND "0" +LOD "0" +MaxNum "100" +KillOldest "0" +BirthRate "20" +BirthRateRND "2" +LifeTime "3.2" +LifeTimeRND "0.3" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "10" +Repeat "1" +Spring "0" + + +ColorR 2 +0.000000 0.820895 +1.000000 0.671642 + +ColorG 2 +0.000000 0.977612 +1.000000 0.910448 + +ColorB 2 +0.000000 1.000000 +1.000000 0.917910 + +Alpha 3 +0.000000 0.000000 +0.045139 0.716418 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.440298 + +Size 3 +0.000000 0.410448 +0.100694 0.873134 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/steam_smoke.ptc b/Alpha Prime/Mod/particle/steam_smoke.ptc new file mode 100644 index 0000000..d93c9d1 --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_smoke.ptc @@ -0,0 +1,196 @@ +$EmitorDef "steam_smokelight" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "60 60 0" +Velocity "50" +VelocityRND "4" +RotMultiplier "100" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "-0.3" +AirResistanceRND "0" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "80" +KillOldest "0" +BirthRate "40" +BirthRateRND "0" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "15" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.128472 0.746269 +1.000000 0.746269 + +ColorG 3 +0.000000 1.000000 +0.128472 0.798507 +1.000000 0.798507 + +ColorB 3 +0.000000 1.000000 +0.128472 0.850746 +1.000000 0.888060 + +Alpha 3 +0.000000 1.000000 +0.500000 1.000000 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.238806 +0.295139 0.507463 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 4 +0.000000 1.000000 +0.118056 0.805970 +0.680556 0.746269 +1.000000 0.000000 + +RotationSpeedMast 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +SizeMast 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 0.276119 + + +$EmitorDef "ignitionlight" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "40 40 0" +Velocity "50" +VelocityRND "4" +RotMultiplier "100" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "-0.3" +AirResistanceRND "0" +GravityMultiply "-0.08" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "50" +BirthRateRND "0" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "1.5" +Repeat "0" + + +ColorR 2 +0.000000 0.761194 +1.000000 0.768657 + +ColorG 2 +0.000000 0.843284 +1.000000 0.835821 + +ColorB 2 +0.000000 0.902985 +1.000000 0.880597 + +Alpha 3 +0.000000 1.000000 +0.274306 0.970149 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.187500 0.820895 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.149306 1.000000 +1.000000 0.432836 + +RotationSpeedMast 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +SizeMast 3 +0.000000 1.000000 +1.000000 0.000000 +0.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/steam_smoke2.ptc b/Alpha Prime/Mod/particle/steam_smoke2.ptc new file mode 100644 index 0000000..c28909e --- /dev/null +++ b/Alpha Prime/Mod/particle/steam_smoke2.ptc @@ -0,0 +1,207 @@ +$EmitorDef "steam_smokelight" +Shader "particle/smoke/smoke3" +ShapeType "1" +ShapeSize "16 16 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "60 60 0" +Velocity "5" +VelocityRND "4" +RotMultiplier "100" +SizeMultiplier "30" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "-0.3" +AirResistanceRND "0" +GravityMultiply "-0.05" +GravityMultiplyRND "0" +LOD "0" +MaxNum "50" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 4 +0.000000 0.000000 +0.232639 1.000000 +0.500000 1.000000 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.520833 0.500000 +1.000000 0.962687 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.114583 0.492537 +1.000000 0.432836 + +RotationSpeedMast 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +SizeMast 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +StretchMast 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 0.276119 + + +$EmitorDef "ignitionlight" +Shader "particle/smoke/smoke3" +ShapeType "1" +ShapeSize "16 16 0" +KillShapeType "0" +KillShapeSize "16 16 16" +ConeAngle "60 60 0" +Velocity "20" +VelocityRND "4" +RotMultiplier "100" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "-0.3" +AirResistanceRND "0" +GravityMultiply "-0.08" +GravityMultiplyRND "0" +LOD "0" +MaxNum "40" +KillOldest "0" +BirthRate "50" +BirthRateRND "0" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "1.5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.880597 + +ColorG 2 +0.000000 1.000000 +1.000000 0.925373 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.492537 +0.493056 0.850746 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.503472 0.813433 +1.000000 1.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.149306 1.000000 +1.000000 0.432836 + +RotationSpeedMast 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +SizeMast 3 +0.000000 1.000000 +1.000000 0.000000 +0.000000 0.000000 + +StretchMast 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/tachyondust.ptc b/Alpha Prime/Mod/particle/tachyondust.ptc new file mode 100644 index 0000000..fc9f016 --- /dev/null +++ b/Alpha Prime/Mod/particle/tachyondust.ptc @@ -0,0 +1,108 @@ +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "10 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "180 360 0" +Velocity "20" +VelocityRND "0" +RotMultiplier "250" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "80" +KillOldest "0" +BirthRate "150" +BirthRateRND "0" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "4.5" +Repeat "0" + + +ColorR 3 +0.000000 0.411765 +0.170139 0.426471 +1.000000 0.294118 + +ColorG 3 +0.000000 0.411765 +0.170139 0.602941 +1.000000 0.308824 + +ColorB 3 +0.000000 0.419118 +0.170139 0.926471 +1.000000 0.448529 + +Alpha 4 +0.000000 1.000000 +0.159722 1.000000 +0.739583 0.794118 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +0.180556 0.227941 +1.000000 0.022059 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 4 +0.000000 1.000000 +0.729167 1.000000 +0.847222 1.000000 +1.000000 1.000000 + +ColorGMast 4 +0.000000 1.000000 +0.729167 0.798507 +0.847222 0.000000 +1.000000 0.022388 + +ColorBMast 4 +0.000000 1.000000 +0.729167 1.000000 +0.847222 0.000000 +1.000000 0.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 0.000000 +0.166667 0.850746 +0.767361 0.917910 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/tachyonexplode.ptc b/Alpha Prime/Mod/particle/tachyonexplode.ptc new file mode 100644 index 0000000..c30afcb --- /dev/null +++ b/Alpha Prime/Mod/particle/tachyonexplode.ptc @@ -0,0 +1,407 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke3" +ShapeType "2" +ShapeSize "50 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "30" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "5" +BirthRateRND "2" +LifeTime "3.61" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "2" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.992537 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.000000 +0.250000 0.761194 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.179104 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 0.000000 +0.050000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksmaller" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "100 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "250" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "6" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0.5" +GravityMultiplyRND "0" +LOD "0" +MaxNum "400" +KillOldest "0" +BirthRate "500" +BirthRateRND "5" +LifeTime "4" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.052083 1.000000 +1.000000 0.910448 + +ColorG 3 +0.000000 0.223881 +0.052083 0.313433 +1.000000 0.000000 + +ColorB 3 +0.000000 0.126866 +0.052083 0.216418 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.534722 0.713235 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.138889 0.104478 +1.000000 0.000000 + + +$EmitorDef "coreflash" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "50 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "100" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "1000" +BirthRateRND "2" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.753731 +0.045139 0.753731 +1.000000 0.246269 + +ColorB 3 +0.000000 0.716418 +0.045139 0.671642 +1.000000 0.082090 + +Alpha 3 +0.000000 1.000000 +0.607639 0.664179 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.204861 0.147059 +1.000000 0.000000 + + +$EmitorDef "electric" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "30 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "10" +VelocityRND "0" +RotMultiplier "200" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "1000" +BirthRateRND "2" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.086806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.738806 +0.086806 0.761194 +1.000000 0.246269 + +ColorB 3 +0.000000 0.679105 +0.086806 0.597015 +1.000000 0.082090 + +Alpha 3 +0.000000 0.686567 +0.607639 0.656716 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.204861 0.147059 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/tachyonexplode2.ptc b/Alpha Prime/Mod/particle/tachyonexplode2.ptc new file mode 100644 index 0000000..066a0f0 --- /dev/null +++ b/Alpha Prime/Mod/particle/tachyonexplode2.ptc @@ -0,0 +1,205 @@ +$EmitorDef "coreflash" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "50 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "100" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "1000" +BirthRateRND "2" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.048611 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.910448 +0.048611 0.880597 +1.000000 0.529851 + +ColorB 3 +0.000000 0.716418 +0.048611 0.671642 +1.000000 0.082090 + +Alpha 3 +0.000000 1.000000 +0.607639 0.664179 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.204861 0.147059 +1.000000 0.000000 + + +$EmitorDef "electric" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "30 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "10" +VelocityRND "0" +RotMultiplier "200" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "1000" +BirthRateRND "2" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.086806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.865672 +0.086806 0.813433 +1.000000 0.574627 + +ColorB 3 +0.000000 0.679105 +0.086806 0.597015 +1.000000 0.082090 + +Alpha 3 +0.000000 0.686567 +0.607639 0.656716 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.204861 0.147059 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/tachyonexplode3.ptc b/Alpha Prime/Mod/particle/tachyonexplode3.ptc new file mode 100644 index 0000000..94b1cdf --- /dev/null +++ b/Alpha Prime/Mod/particle/tachyonexplode3.ptc @@ -0,0 +1,407 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke3" +ShapeType "2" +ShapeSize "50 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "30" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "5" +BirthRateRND "2" +LifeTime "3.61" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "2" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.992537 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.000000 +0.263889 0.962687 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.179104 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 0.000000 +0.050000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksmaller" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "100 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "250" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "6" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0.5" +GravityMultiplyRND "0" +LOD "0" +MaxNum "400" +KillOldest "0" +BirthRate "500" +BirthRateRND "5" +LifeTime "4" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.052083 1.000000 +1.000000 0.910448 + +ColorG 3 +0.000000 0.223881 +0.052083 0.313433 +1.000000 0.000000 + +ColorB 3 +0.000000 0.126866 +0.052083 0.216418 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.534722 0.713235 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.138889 0.104478 +1.000000 0.000000 + + +$EmitorDef "coreflash" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "50 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "100" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "1000" +BirthRateRND "2" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.753731 +0.045139 0.753731 +1.000000 0.246269 + +ColorB 3 +0.000000 0.716418 +0.045139 0.671642 +1.000000 0.082090 + +Alpha 3 +0.000000 1.000000 +0.607639 0.664179 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.204861 0.147059 +1.000000 0.000000 + + +$EmitorDef "electric" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "30 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "10" +VelocityRND "0" +RotMultiplier "200" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "1000" +BirthRateRND "2" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.086806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.738806 +0.086806 0.761194 +1.000000 0.246269 + +ColorB 3 +0.000000 0.679105 +0.086806 0.597015 +1.000000 0.082090 + +Alpha 3 +0.000000 0.686567 +0.607639 0.656716 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.204861 0.147059 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/tachyonexplode4.ptc b/Alpha Prime/Mod/particle/tachyonexplode4.ptc new file mode 100644 index 0000000..94b1cdf --- /dev/null +++ b/Alpha Prime/Mod/particle/tachyonexplode4.ptc @@ -0,0 +1,407 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke3" +ShapeType "2" +ShapeSize "50 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "30" +VelocityRND "10" +RotMultiplier "150" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "1" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "5" +BirthRateRND "2" +LifeTime "3.61" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "2" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.992537 +1.000000 1.000000 + +ColorB 2 +0.000000 1.000000 +1.000000 1.000000 + +Alpha 3 +0.000000 0.000000 +0.263889 0.962687 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.179104 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 0.000000 +0.050000 1.000000 +1.000000 1.000000 + + +$EmitorDef "sparksmaller" +Shader "particle/fire/sparks1" +ShapeType "2" +ShapeSize "100 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "250" +VelocityRND "10" +RotMultiplier "1" +SizeMultiplier "6" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "1" +Lighting "0" +AirResistance "3" +AirResistanceRND "0" +GravityMultiply "0.5" +GravityMultiplyRND "0" +LOD "0" +MaxNum "400" +KillOldest "0" +BirthRate "500" +BirthRateRND "5" +LifeTime "4" +LifeTimeRND "1" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.052083 1.000000 +1.000000 0.910448 + +ColorG 3 +0.000000 0.223881 +0.052083 0.313433 +1.000000 0.000000 + +ColorB 3 +0.000000 0.126866 +0.052083 0.216418 +1.000000 0.000000 + +Alpha 3 +0.000000 1.000000 +0.534722 0.713235 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.138889 0.104478 +1.000000 0.000000 + + +$EmitorDef "coreflash" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "50 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "100" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "10" +KillOldest "0" +BirthRate "1000" +BirthRateRND "2" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.753731 +0.045139 0.753731 +1.000000 0.246269 + +ColorB 3 +0.000000 0.716418 +0.045139 0.671642 +1.000000 0.082090 + +Alpha 3 +0.000000 1.000000 +0.607639 0.664179 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.204861 0.147059 +1.000000 0.000000 + + +$EmitorDef "electric" +Shader "particle/flash/electric" +ShapeType "2" +ShapeSize "30 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 180 0" +Velocity "10" +VelocityRND "0" +RotMultiplier "200" +SizeMultiplier "80" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "1000" +BirthRateRND "2" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.086806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.738806 +0.086806 0.761194 +1.000000 0.246269 + +ColorB 3 +0.000000 0.679105 +0.086806 0.597015 +1.000000 0.082090 + +Alpha 3 +0.000000 0.686567 +0.607639 0.656716 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 + +Stretch 3 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.204861 0.147059 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/tachyonfire.ptc b/Alpha Prime/Mod/particle/tachyonfire.ptc new file mode 100644 index 0000000..a8e8239 --- /dev/null +++ b/Alpha Prime/Mod/particle/tachyonfire.ptc @@ -0,0 +1,418 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "1" +ShapeSize "40 40 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 10 0" +Velocity "160" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "50" +BirthRateRND "3" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.7" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.184028 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.873134 +0.184028 0.268657 +1.000000 0.156716 + +ColorB 3 +0.000000 0.768657 +0.184028 0.000000 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.041667 0.156716 +0.156250 1.000000 +0.468750 0.305970 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 1.000000 +1.000000 0.610294 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 4 +0.000000 1.000000 +0.479167 1.000000 +0.562500 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "1" +ShapeSize "30 30 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 50 0" +Velocity "160" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "40" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +AirResistance "2" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "30" +BirthRateRND "2" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.152778 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.708955 +0.152778 0.238806 +1.000000 0.179104 + +ColorB 3 +0.000000 0.582090 +0.152778 0.000000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.166667 1.000000 +0.517361 0.126866 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.065972 1.000000 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 1.000000 +0.517361 1.000000 +0.739583 0.328358 +1.000000 0.000000 + + +$EmitorDef "fire" +Shader "particle/fire/glow2" +ShapeType "1" +ShapeSize "25 25 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 20 0" +Velocity "160" +VelocityRND "2" +RotMultiplier "150" +SizeMultiplier "25" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +AirResistance "1" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "100" +BirthRateRND "3" +LifeTime "0.8" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.8" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.173611 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.888060 +0.173611 0.119403 +1.000000 0.000000 + +ColorB 3 +0.000000 0.791045 +0.173611 0.007463 +1.000000 0.000000 + +Alpha 4 +0.000000 0.507463 +0.093750 1.000000 +0.704861 0.768657 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.573529 +0.072917 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "core" +Shader "particle/glow/angelflare" +ShapeType "2" +ShapeSize "20 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 360 0" +Velocity "40" +VelocityRND "5" +RotMultiplier "150" +SizeMultiplier "160" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "5" +KillOldest "0" +BirthRate "100" +BirthRateRND "3" +LifeTime "0.1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "1" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.190972 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.985075 +0.190972 0.828358 +1.000000 0.000000 + +ColorB 3 +0.000000 0.977612 +0.190972 0.664179 +1.000000 0.000000 + +Alpha 4 +0.000000 0.507463 +0.083333 1.000000 +0.934028 0.955224 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.567164 +0.072917 1.000000 +0.760417 0.761194 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 1.000000 +0.468750 1.000000 +0.493056 0.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/torch.ptc b/Alpha Prime/Mod/particle/torch.ptc new file mode 100644 index 0000000..5132216 --- /dev/null +++ b/Alpha Prime/Mod/particle/torch.ptc @@ -0,0 +1,480 @@ +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 30 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "3" +GravityMultiply "0.01" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "8" +BirthRateRND "5" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.955882 + +ColorG 2 +0.000000 0.860294 +1.000000 0.242647 + +ColorB 2 +0.000000 0.470588 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.055556 1.000000 +0.746528 0.676471 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 20 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "12" +BirthRateRND "5" +LifeTime "0.45" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 5 +0.000000 0.000000 +0.041667 0.161765 +0.159722 1.000000 +0.559028 0.558824 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 1.000000 +1.000000 0.610294 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "30" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "14" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "10" +KillOldest "0" +BirthRate "7" +BirthRateRND "2" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.823529 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.007353 +0.093750 1.000000 +0.652778 0.316176 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 0.000000 +0.045139 0.926471 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "drips" +Shader "particle/fire/drips1" +ShapeType "1" +ShapeSize "2 2 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 90 0" +Velocity "1" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "3" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0" +MaxNum "3" +KillOldest "0" +BirthRate "1" +BirthRateRND "2" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.801471 +1.000000 0.257353 + +ColorB 2 +0.000000 0.500000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.052083 1.000000 +0.736111 0.904412 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 10 0" +Velocity "25" +VelocityRND "2" +RotMultiplier "50" +SizeMultiplier "8" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "8" +BirthRateRND "2" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.933824 +1.000000 0.522059 + +ColorB 2 +0.000000 0.794118 +1.000000 0.323529 + +Alpha 4 +0.000000 0.529412 +0.100694 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.536765 +0.069444 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/torch_dynamic.ptc b/Alpha Prime/Mod/particle/torch_dynamic.ptc new file mode 100644 index 0000000..65193be --- /dev/null +++ b/Alpha Prime/Mod/particle/torch_dynamic.ptc @@ -0,0 +1,595 @@ +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "1" +KillShapeSize "50 50 50" +ConeAngle "360 20 0" +Velocity "40" +VelocityRND "3" +RotMultiplier "0" +SizeMultiplier "7" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "25" +KillOldest "0" +BirthRate "8" +BirthRateRND "5" +LifeTime "0.45" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.676471 + +ColorB 2 +0.000000 0.551471 +1.000000 0.323529 + +Alpha 3 +0.000000 0.000000 +0.041667 0.992647 +1.000000 0.000000 + +RotationSpeed 3 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.048611 1.000000 +1.000000 0.602941 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 1.000000 +0.315972 1.000000 +0.888889 0.838235 +1.000000 0.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "2" +ShapeSize "2 0 0" +KillShapeType "1" +KillShapeSize "40 40 40" +ConeAngle "360 10 0" +Velocity "30" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "14" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "12" +BirthRateRND "2" +LifeTime "0.7" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.830882 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.830882 +0.055556 1.000000 +0.652778 0.323529 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 3 +0.000000 1.000000 +0.045139 1.000000 +1.000000 0.683824 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 0.691176 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 1.000000 +0.451389 0.977941 +0.888889 0.816176 +1.000000 0.000000 + + +$EmitorDef "sparks" +Shader "particle/fire/sparks1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 30 0" +Velocity "40" +VelocityRND "5" +RotMultiplier "1" +SizeMultiplier "2" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "2" +GravityMultiply "0.01" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "6" +BirthRateRND "2" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.955882 + +ColorG 2 +0.000000 0.860294 +1.000000 0.242647 + +ColorB 2 +0.000000 0.470588 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.055556 1.000000 +0.746528 0.676471 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 0.382353 +0.968750 1.000000 +1.000000 0.000000 + + +$EmitorDef "drips" +Shader "particle/fire/drips1" +ShapeType "1" +ShapeSize "2 2 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 90 0" +Velocity "1" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "3" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0.1" +GravityMultiplyRND "0" +MaxNum "3" +KillOldest "0" +BirthRate "1" +BirthRateRND "2" +LifeTime "1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.801471 +1.000000 0.257353 + +ColorB 2 +0.000000 0.500000 +1.000000 0.000000 + +Alpha 4 +0.000000 0.000000 +0.052083 1.000000 +0.736111 0.904412 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 0.000000 +1.000000 0.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 0.000000 + + +$EmitorDef "fire" +Shader "particle/fire/fire1" +ShapeType "2" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "35 35 35" +ConeAngle "360 10 0" +Velocity "27" +VelocityRND "2" +RotMultiplier "50" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "15" +KillOldest "0" +BirthRate "10" +BirthRateRND "3" +LifeTime "0.6" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.933824 +1.000000 0.522059 + +ColorB 2 +0.000000 0.794118 +1.000000 0.323529 + +Alpha 4 +0.000000 0.529412 +0.065972 1.000000 +0.621528 0.448529 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 1.000000 +0.416667 0.654412 +1.000000 1.000000 + +Size 4 +0.000000 0.397059 +0.097222 1.000000 +0.586806 0.507353 +1.000000 0.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 1.000000 +0.868056 0.816176 +1.000000 0.029412 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 4 +0.000000 1.000000 +0.277778 1.000000 +0.878472 0.816176 +1.000000 0.000000 + + +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 20 0" +Velocity "40" +VelocityRND "2" +RotMultiplier "200" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +MaxNum "20" +KillOldest "0" +BirthRate "10" +BirthRateRND "2" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 0.257353 +1.000000 0.000000 + +ColorG 2 +0.000000 0.169118 +1.000000 0.000000 + +ColorB 2 +0.000000 0.029412 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.048611 0.022059 +0.288194 1.000000 +0.819444 0.941176 +1.000000 0.000000 + +RotationSpeed 5 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 +1.000000 1.000000 + +Size 5 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.260417 0.698529 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 4 +0.000000 0.000000 +0.357639 0.000000 +0.722222 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 5 +0.000000 0.000000 +0.420139 0.007353 +0.437500 1.000000 +0.951389 1.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/trail_firesmoke.ptc b/Alpha Prime/Mod/particle/trail_firesmoke.ptc new file mode 100644 index 0000000..7d2204b --- /dev/null +++ b/Alpha Prime/Mod/particle/trail_firesmoke.ptc @@ -0,0 +1,320 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 40 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "50" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "10" +BirthRateRND "5" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "12" +Repeat "0" + + +ColorR 4 +0.000000 1.000000 +0.236111 0.720588 +0.475694 0.139706 +1.000000 0.000000 + +ColorG 4 +0.000000 0.757353 +0.236111 0.352941 +0.475694 0.058824 +1.000000 0.000000 + +ColorB 4 +0.000000 0.294118 +0.236111 0.000000 +0.475694 0.000000 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.027778 0.000000 +0.069444 1.000000 +0.687500 0.580882 +1.000000 0.014706 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 0.962687 +1.000000 1.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 3 +0.000000 1.000000 +0.659722 0.865672 +1.000000 0.000000 + +ColorGMast 3 +0.000000 1.000000 +0.659722 0.895522 +1.000000 0.000000 + +ColorBMast 3 +0.000000 1.000000 +0.659722 0.902985 +1.000000 0.000000 + +AlphaMast 3 +0.000000 1.000000 +0.666667 0.925373 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 0.000000 +0.059028 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.809028 0.865672 +1.000000 0.000000 + + +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 40 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "200" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "40" +BirthRateRND "10" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.264706 + +ColorB 2 +0.000000 0.551471 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.041667 0.161765 +0.159722 1.000000 +0.559028 0.558824 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.111111 0.647059 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.680556 0.985075 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 0.000000 +0.135417 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.750000 1.000000 +1.000000 0.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 25 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "10" +BirthRateRND "10" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "10" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.830882 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.698529 +0.041667 0.985294 +0.774306 0.786765 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.713235 +0.500000 0.955882 +1.000000 0.830882 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.684028 0.992537 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 3 +0.000000 0.000000 +0.135417 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.746528 1.000000 +1.000000 0.022388 + + diff --git a/Alpha Prime/Mod/particle/trail_firesmokeshort.ptc b/Alpha Prime/Mod/particle/trail_firesmokeshort.ptc new file mode 100644 index 0000000..641e3a5 --- /dev/null +++ b/Alpha Prime/Mod/particle/trail_firesmokeshort.ptc @@ -0,0 +1,320 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 40 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "50" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "10" +BirthRateRND "5" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "12" +Repeat "0" + + +ColorR 4 +0.000000 1.000000 +0.236111 0.720588 +0.475694 0.139706 +1.000000 0.000000 + +ColorG 4 +0.000000 0.757353 +0.236111 0.352941 +0.475694 0.058824 +1.000000 0.000000 + +ColorB 4 +0.000000 0.294118 +0.236111 0.000000 +0.475694 0.000000 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.027778 0.000000 +0.069444 1.000000 +0.687500 0.580882 +1.000000 0.014706 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 0.962687 +1.000000 1.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 3 +0.000000 1.000000 +0.225694 0.895522 +1.000000 0.000000 + +ColorGMast 3 +0.000000 1.000000 +0.225694 0.888060 +1.000000 0.000000 + +ColorBMast 3 +0.000000 1.000000 +0.225694 0.895522 +1.000000 0.000000 + +AlphaMast 3 +0.000000 1.000000 +0.666667 0.925373 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 0.000000 +0.059028 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.809028 0.865672 +1.000000 0.000000 + + +$EmitorDef "flame" +Shader "particle/fire/flame1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 40 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "200" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "40" +BirthRateRND "10" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorG 2 +0.000000 0.882353 +1.000000 0.264706 + +ColorB 2 +0.000000 0.551471 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.041667 0.161765 +0.159722 1.000000 +0.559028 0.558824 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.111111 0.647059 +1.000000 1.000000 + +Stretch 2 +0.000000 0.000000 +1.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.680556 0.985075 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 0.000000 +0.135417 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.750000 1.000000 +1.000000 0.000000 + + +$EmitorDef "glow" +Shader "particle/fire/glow1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 25 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "1" +SizeMultiplier "10" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "0" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "30" +KillOldest "0" +BirthRate "10" +BirthRateRND "10" +LifeTime "0.4" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "5" +Repeat "0" + + +ColorR 2 +0.000000 1.000000 +1.000000 0.808824 + +ColorG 2 +0.000000 0.830882 +1.000000 0.264706 + +ColorB 2 +0.000000 0.286765 +1.000000 0.147059 + +Alpha 4 +0.000000 0.698529 +0.041667 0.985294 +0.774306 0.786765 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +Size 3 +0.000000 0.713235 +0.500000 0.955882 +1.000000 0.830882 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.684028 0.992537 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 3 +0.000000 0.000000 +0.135417 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.746528 1.000000 +1.000000 0.022388 + + diff --git a/Alpha Prime/Mod/particle/trail_smoke.ptc b/Alpha Prime/Mod/particle/trail_smoke.ptc new file mode 100644 index 0000000..73da666 --- /dev/null +++ b/Alpha Prime/Mod/particle/trail_smoke.ptc @@ -0,0 +1,113 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 40 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "50" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "10" +BirthRateRND "5" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "12" +Repeat "0" + + +ColorR 4 +0.000000 0.694030 +0.211806 0.417910 +0.472222 0.134328 +1.000000 0.000000 + +ColorG 4 +0.000000 0.425373 +0.211806 0.186567 +0.472222 0.052239 +1.000000 0.000000 + +ColorB 4 +0.000000 0.126866 +0.211806 0.000000 +0.472222 0.000000 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.027778 0.000000 +0.069444 1.000000 +0.687500 0.580882 +1.000000 0.014706 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 0.962687 +1.000000 1.000000 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 3 +0.000000 1.000000 +0.659722 0.865672 +1.000000 0.000000 + +ColorGMast 3 +0.000000 1.000000 +0.659722 0.895522 +1.000000 0.000000 + +ColorBMast 3 +0.000000 1.000000 +0.659722 0.902985 +1.000000 0.000000 + +AlphaMast 3 +0.000000 1.000000 +0.666667 0.925373 +1.000000 0.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 0.000000 +0.059028 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 3 +0.000000 1.000000 +0.809028 0.865672 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/trail_smoke_loop.ptc b/Alpha Prime/Mod/particle/trail_smoke_loop.ptc new file mode 100644 index 0000000..99ec382 --- /dev/null +++ b/Alpha Prime/Mod/particle/trail_smoke_loop.ptc @@ -0,0 +1,107 @@ +$EmitorDef "smoke" +Shader "particle/smoke/smoke1" +ShapeType "0" +ShapeSize "0 0 0" +KillShapeType "0" +KillShapeSize "8 8 8" +ConeAngle "360 40 0" +Velocity "40" +VelocityRND "0" +RotMultiplier "50" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "20" +KillOldest "0" +BirthRate "10" +BirthRateRND "5" +LifeTime "1.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "12" +Repeat "1" +Spring "0" + + +ColorR 4 +0.000000 0.694030 +0.211806 0.417910 +0.472222 0.134328 +1.000000 0.000000 + +ColorG 4 +0.000000 0.425373 +0.211806 0.186567 +0.472222 0.052239 +1.000000 0.000000 + +ColorB 4 +0.000000 0.126866 +0.211806 0.000000 +0.472222 0.000000 +1.000000 0.000000 + +Alpha 5 +0.000000 0.000000 +0.027778 0.000000 +0.069444 1.000000 +0.687500 0.580882 +1.000000 0.014706 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 3 +0.000000 0.000000 +0.052083 0.962687 +1.000000 1.000000 + +ColorRMast 3 +0.000000 1.000000 +0.649306 1.000000 +1.000000 1.000000 + +ColorGMast 3 +0.000000 1.000000 +0.649306 1.000000 +1.000000 1.000000 + +ColorBMast 3 +0.000000 1.000000 +0.649306 1.000000 +1.000000 1.000000 + +AlphaMast 3 +0.000000 1.000000 +0.631944 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 3 +0.000000 1.000000 +0.496528 1.000000 +1.000000 1.000000 + +BRateMast 3 +0.000000 1.000000 +0.503472 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/waterdrip.ptc b/Alpha Prime/Mod/particle/waterdrip.ptc new file mode 100644 index 0000000..3af2722 --- /dev/null +++ b/Alpha Prime/Mod/particle/waterdrip.ptc @@ -0,0 +1,100 @@ +$EmitorDef "water" +Shader "particle/water/drips1" +ShapeType "1" +ShapeSize "20 20 0" +KillShapeType "0" +KillShapeSize "0 0 0" +ConeAngle "360 20 0" +Velocity "0" +VelocityRND "0" +RotMultiplier "30" +SizeMultiplier "3" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0.2" +GravityMultiplyRND "0" +MaxNum "10" +KillOldest "0" +BirthRate "3" +BirthRateRND "1" +LifeTime "3" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "1" +EffectTime "10" +Repeat "1" + + +ColorR 2 +0.000000 0.757353 +1.000000 0.500000 + +ColorG 2 +0.000000 0.808824 +1.000000 0.705882 + +ColorB 2 +0.000000 0.860294 +1.000000 0.772059 + +Alpha 4 +0.000000 0.000000 +0.107639 0.463235 +0.895833 0.455882 +1.000000 0.000000 + +RotationSpeed 4 +0.000000 0.000000 +0.000000 0.000000 +0.052083 0.507353 +0.298611 0.985294 + +Size 4 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.329861 0.735294 + +Stretch 4 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/particle/watersplash.ptc b/Alpha Prime/Mod/particle/watersplash.ptc new file mode 100644 index 0000000..cecdd04 --- /dev/null +++ b/Alpha Prime/Mod/particle/watersplash.ptc @@ -0,0 +1,98 @@ +$EmitorDef "smoke" +Shader "particle/water/drops1" +ShapeType "1" +ShapeSize "10 10 2" +KillShapeType "0" +KillShapeSize "50 50 50" +ConeAngle "360 40 0" +Velocity "120" +VelocityRND "5" +RotMultiplier "100" +SizeMultiplier "20" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "1" +GravityMultiplyRND "0" +MaxNum "151" +KillOldest "0" +BirthRate "400" +BirthRateRND "1" +LifeTime "0.5" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.2" +Repeat "0" + + +ColorR 2 +0.000000 0.904412 +1.000000 0.698529 + +ColorG 2 +0.000000 1.000000 +1.000000 0.794118 + +ColorB 2 +0.000000 1.000000 +1.000000 0.889706 + +Alpha 4 +0.000000 0.000000 +0.107639 0.330882 +0.520833 0.125000 +1.000000 0.000000 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 0.522059 + +Size 3 +0.000000 0.000000 +0.170139 0.286765 +1.000000 1.000000 + +Stretch 5 +0.000000 0.000000 +1.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +StretchMast 2 +0.000000 0.000000 +1.000000 0.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/weaponflash1.ptc b/Alpha Prime/Mod/particle/weaponflash1.ptc new file mode 100644 index 0000000..7a186d0 --- /dev/null +++ b/Alpha Prime/Mod/particle/weaponflash1.ptc @@ -0,0 +1,194 @@ +$EmitorDef "glowcore" +Shader "particle/glow/angelflare" +ShapeType "0" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "16 16 100" +ConeAngle "1 1 0" +Velocity "200" +VelocityRND "1" +RotMultiplier "1" +SizeMultiplier "60" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "100" +BirthRateRND "0" +LifeTime "0.2" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.3" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.534722 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.738806 +0.534722 0.447761 +1.000000 0.000000 + +ColorB 3 +0.000000 0.388060 +0.534722 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.738806 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 4 +0.000000 1.000000 +0.128472 1.000000 +0.312500 0.000000 +1.000000 0.000000 + + +$EmitorDef "electro" +Shader "particle/flash/electric" +ShapeType "0" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "16 16 16" +ConeAngle "1 1 0" +Velocity "10" +VelocityRND "1" +RotMultiplier "100" +SizeMultiplier "22" +StretchMultiplier "1" +RandomRotDir "0" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "0.1" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +AnimFPS "0" +TilesX "0" +TilesY "0" +PointSprites "0" +EffectTime "0.3" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 1.000000 + +ColorG 3 +0.000000 0.791045 +0.336806 0.462687 +1.000000 0.000000 + +ColorB 3 +0.000000 0.395522 +0.336806 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.462687 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 4 +0.000000 1.000000 +1.000000 1.000000 +0.000000 0.000000 +0.000000 0.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 0.000000 +1.000000 0.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 4 +0.000000 1.000000 +0.114583 1.000000 +0.312500 0.000000 +1.000000 0.000000 + + diff --git a/Alpha Prime/Mod/particle/weaponflash1player.ptc b/Alpha Prime/Mod/particle/weaponflash1player.ptc new file mode 100644 index 0000000..de2883c --- /dev/null +++ b/Alpha Prime/Mod/particle/weaponflash1player.ptc @@ -0,0 +1,90 @@ +$EmitorDef "glowcore" +Shader "particle/glow/angelflarenb" +ShapeType "0" +ShapeSize "3 0 0" +KillShapeType "1" +KillShapeSize "16 16 16" +ConeAngle "0 0 0" +Velocity "20" +VelocityRND "1" +RotMultiplier "300" +SizeMultiplier "27" +StretchMultiplier "1" +RandomRotDir "1" +RandomAngle "1" +Collisions "0" +Lighting "0" +AirResistance "0" +AirResistanceRND "0" +GravityMultiply "0" +GravityMultiplyRND "0" +LOD "0" +MaxNum "2" +KillOldest "0" +BirthRate "30" +BirthRateRND "0" +LifeTime "0.05" +LifeTimeRND "0" +LifetimeByAnim "0" +AnimOnce "0" +PointSprites "0" +EffectTime "0.05" +Repeat "0" + + +ColorR 3 +0.000000 1.000000 +0.336806 1.000000 +1.000000 0.753731 + +ColorG 3 +0.000000 0.791045 +0.336806 0.462687 +1.000000 0.000000 + +ColorB 3 +0.000000 0.388060 +0.336806 0.000000 +1.000000 0.000000 + +Alpha 2 +0.000000 1.000000 +1.000000 0.791045 + +RotationSpeed 2 +0.000000 1.000000 +1.000000 1.000000 + +Size 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorRMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorGMast 2 +0.000000 1.000000 +1.000000 1.000000 + +ColorBMast 2 +0.000000 1.000000 +1.000000 1.000000 + +AlphaMast 2 +0.000000 1.000000 +1.000000 1.000000 + +RotationSpeedMast 2 +0.000000 1.000000 +1.000000 1.000000 + +SizeMast 2 +0.000000 1.000000 +1.000000 1.000000 + +BRateMast 2 +0.000000 1.000000 +1.000000 1.000000 + + diff --git a/Alpha Prime/Mod/scripts/animset.h b/Alpha Prime/Mod/scripts/animset.h new file mode 100644 index 0000000..9a1bf12 --- /dev/null +++ b/Alpha Prime/Mod/scripts/animset.h @@ -0,0 +1,83 @@ +BoneMask BoneMasks[32] + +int CurrentGroup + +const int MAX_ANIMSLOTS = 512 +const int MAX_ANIMSETS = 192 + +//----------------------------------------------------------------- +void Bone(int bone) +{ + BoneMask mask = BoneMasks[CurrentGroup] + + int m = mask.Mask[bone >> 5] + mask.Mask[bone >> 5] = 1 << (bone & 31) | m +} + +void SetAllBones() +{ + BoneMask mask = BoneMasks[CurrentGroup] + + mask.Mask[0] = 0xffffffff + mask.Mask[1] = 0xffffffff + mask.Mask[2] = 0xffffffff +} + +//----------------------------------------------------------------- +void BeginGroup(int group) +{ + CurrentGroup = group + BoneMasks[group] = new BoneMask +} + +class AnimSet extends _serializable +{ + int Counter + string Name + + string AnimNames[MAX_ANIMSLOTS] + vobject Anims[MAX_ANIMSLOTS] + int FPS[MAX_ANIMSLOTS] + vector Motion[MAX_ANIMSLOTS] + int Flags[MAX_ANIMSLOTS] + +//----------------------------------------------------------------- + void AnimSet(string name) + { + Name = name + } + +//----------------------------------------------------------------- + void Load() + { + if(!Counter) + { + for(int n = 0; n < MAX_ANIMSLOTS; n++) + { + string name = AnimNames[n] + if(name) + Anims[n] = GetObject(name) + } + } + Counter++ + } + +//----------------------------------------------------------------- + void Unload() + { + int cnt = Counter - 1 + if(cnt == 0) + { + for(int n = 0; n < MAX_ANIMSLOTS; n++) + { + if(Anims[n]) + ReleaseObject(Anims[n], 0) + } + } + Counter = cnt + } +} + + +AnimSet CurrentAnimSet +int CurrentAnimFlags, CurrentAnimID diff --git a/Alpha Prime/Mod/scripts/class_creature/ai.h b/Alpha Prime/Mod/scripts/class_creature/ai.h new file mode 100644 index 0000000..ceb43dd --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_creature/ai.h @@ -0,0 +1,8227 @@ +const float MIN_GRENADE_DIST = 0//96 //3metru +const float MAX_GRENADE_DIST = 543 //16metru +const float MIN_GRENADE_PERIOD = 0.35 //nejvic 1 granat za 5sec + +class BleedSource extends MinClass +{ + vector LMatrix[4] + int Bone + float BirthTime + CreatureClass Owner + + void SetupMatrix(vector pos, vector vec) + { + vector vec1 + vector vec2 + vec1[0] = vec[1] + vec1[1] = vec[2] + vec1[2] = vec[0] + vec2 = vec * vec1 + vec1 = vec2 * vec + VectorNormalize(vec1) + VectorNormalize(vec2) + + LMatrix[0] = vec1 + LMatrix[1] = vec2 + LMatrix[2] = vec + LMatrix[3] = pos + + vector mat[4] + vector mat2[4] + + if(GetBoneMatrix(Owner, Bone, mat) + { + MatrixMultiply4(mat, LMatrix, mat2) + SetMatrix(this, mat2) + } + } + + void BleedSource(vector lvec, vector lpos, int bone, CreatureClass owner) + { + Bone = bone + BirthTime = currenttime + Owner = owner + + SetFlags(this, TFL_FULLMATRIX|TFL_VISIBLE) + SetupMatrix(lpos, lvec) + SetObject(GetObject("particle/physx/fluidbleedtest.ptc")) + } +} + + +const int AnimRunFire[4] = {t_run, t_run_fr, t_run_fb, t_run_fl} +const int AnimWalkFire[4] = {t_run_aim, t_lstrafe, t_brun, t_rstrafe} + +const int QDiff[4][4] = { + 0, 1, 2, 1, + 1, 0, 1, 2, + 2, 1, 0, 1, + 1, 2, 1, 0} + +float g_Ticktime = 0 + +//================================================================================= +class SSource extends MinClass +{ + vector LMatrix[4] + int Bone + float BirthTime + CreatureClass Owner + + void SetupMatrix(vector pos, vector vec) + { + vector vec1 + vector vec2 + vec1[0] = vec[1] + vec1[1] = vec[2] + vec1[2] = vec[0] + vec2 = vec * vec1 + vec1 = vec2 * vec + VectorNormalize(vec1) + VectorNormalize(vec2) + + LMatrix[0] = vec1 + LMatrix[1] = vec2 + LMatrix[2] = vec + LMatrix[3] = pos + + vector mat[4] + vector mat2[4] + + if(GetBoneMatrix(Owner, Bone, mat) + { + MatrixMultiply4(mat, LMatrix, mat2) + SetMatrix(this, mat2) + } + } + + void SSource(vector lvec, vector lpos, int bone, CreatureClass owner) + { + Bone = bone + BirthTime = currenttime + Owner = owner + + SetFlags(this, TFL_FULLMATRIX|TFL_VISIBLE) + SetupMatrix(lpos, lvec) + SetObject(GetObject("particle/hit_blood1.ptc")) + } +} + + + +//================================================================================= +class AICreatureClass extends CreatureClass +{ +//events +string OnDeath, OnDie, OnFirstSight, OnCombat, OnLostTarget +string OnActivate, OnLowHealth + +//keys +float lowhealth +float visrange,halfrange,quarterrange + +//--------------------------- +//Assets and definitions + +float fMinCosForSlowTurn +float fMaxStrafeDistance +float fMinBulletRain +float fVisibilityLatency +float fAlertedVisibilityLatency +float fLeanShootTime +float fCrouchShootTime +float fNotInLOFTimeout //how long it will take until AI will change shooting point when target is not in LOF + //(just for combat/guardcombat tactics) +float fMaxRange //max distance to waypoint + +int MinAttacksInRow[4], MaxAttacksInRow[4] +float MinAttackDelay[4], MaxAttackDelay[4] +float MinRestAfterAttack[4], MaxRestAfterAttack[4] + +float MinStunTime, MaxStunTime +float fShootpointTimeout //period for changing waypoints + //(just for berserk/combat/guardcombat tactics) + +float fCloseHitRange +float MinRoamIdleTime, MaxRoamIdleTime + +bool bFlameResistent +bool bAngledWalk +bool bCanLean +bool bCanCrouch +bool bHasGestures +bool bCanConfirmGesture +bool bNoLOFLatency +bool bCanFireInCrouch +bool bCanShootInTakeCover +bool bHasSpotAnim +bool bCanThrowGrenade +bool bCanThrowGrenadeInCrouch +bool bCanUseConnections + +bool bLongRange, bShortRange + +int SmallPainGroup + +int pain +int PainTimer + +bool AILocked +bool bShooting + +int AttackDist, AttackDistMin, AttackDistClose + + +float TurnSpeed +float WeaponRange + +int NumRelaxIdleAnims +int NumRelaxIdleVarAnims +int NumAlertIdleAnims +int NumAlertIdleVarAnims +int NumCombatIdleAnims +int NumCombatIdleVarAnims +int NumSpotIdleAnims +int NumFightIdleAnims +int NumLostIdleAnims +int NumCloseCombatAnims + +string RagdollDef +string RagdollMaterial +float RagdollMass + +string AnimSetName, DefaultAnimSetName + +int UsedOn, UsedOff //maska pro used propety info_waypoint. WP_USED_ON_ENEMY/WP_USED_ON_RAT/WP_USED_OFF_ENEMY/WP_USED_OFF_RAT + +SpeechSet SSet + +//----------------------------------------------------------------- +//runtime +//----------------------------------------------------------------- +#ifdef DEVELOPER +int WDLine +#endif + +dGeom geom + +//onground control +bool notonground + + +int CCount +bool Stopped +bool bOnLowHealth +ExtClass GuardTarget + +vector AttackerLKP //last known position +float AttackerLKPTime + +vector DangerPos + +float OnWPTime +bool WPIsNotValid + +//list of observed items +ExtClass Observed[ObservedBufferSize] +float ObservedTime[ObservedBufferSize] +int NumObserved + + +//AI buffer +bool AI_Used[AIBufferSize] +float AI_Time[AIBufferSize] +MinClass AI_Ent[AIBufferSize] +vector AI_Pos[AIBufferSize] //position where occured + +int AI_ActEvents + +int VisTime + +CreatureClass LostTarget + +float BulletRainCounter +info_waypoint OriginWaypoint, TempWaypoint, WalkWaypoint +info_waypoint CurrentWP +float RestTime + +int AICmd +string AIParm + +bool FirstSight, sfirst + +info_squad Squad +int AttackStatus //used by squad to qualify who is doing what + +FireWeaponClass CurrentWeapon + +int CmdStack[64] +string CmdParmStack[64][8] +int CmdStackPos + +//CreatureClass Targets[16] +//int NumTargets + +CreatureClass Target + +int LastAmbientSound +vector DistanceVector +string LastPathError +float LastPathTolerance + + +info_waypoint Waypoints[64] +int NumWaypoints + +ExtClass Unreachable[32] +float UnreachableTime[32] +int NumUnreachable + +info_waypoint UsedWaypoint +info_waypoint LRUWaypoints[2] +int LRUTop + +ExtClass _TurnTarget +float ShootTime +ExtClass ShootTarget + +int iNoMotion + +int iTraceHit + +float NotInLOFTime +float LastLOFTime + +//----------------------------------------------------------------- +// Senses +//----------------------------------------------------------------- +ExtClass VisibleTargets[16] +float VTLastTime[16] +float VTFirstTime[16] +int NumVisibleTargets + + +//----------------------------------------------------------------- +// Movement solver +//----------------------------------------------------------------- +float DistTolerance +float LastPathTime +ExtClass WTarget +CPosition WPosition2 +CPath WPath +bool WPathContainJumps //is there jump on the way? + +int WNum //index on path +vector WPos +float WTargetDist +FuncClass WaitForDoors +vector WVector + +bool WTurn +float WAddAngle //Angular displacement for walk +float turnspeed, turnangle, turndist + +float TickTime +vector MVec +float MVecLen +bool StopThread + +//----------------------------------------------------------------- +void BeforeBodyDestroy() +{ + Projectile cur = FirstProjectile + while(cur) + { + cur.OnShooterBodyRemove() + cur = cur.NextProjectile + } + FirstProjectile = NULL +} + +//----------------------------------------------------------------- +void M_Remove(ExtClass other) +{ + //KillThread(this, "FSMThread") + Stopped = true + Show(false) + ClearEventMask(this, -1) + ClearFlags(this, -1) + /* + if(ragdollActive) + { + dRagdollDestroy(this) + ragdollActive = false + } */ +} + +//----------------------------------------------------------------- +void M_SetAttackRange(ExtClass other) +{ + AttackDist = atoi(other._value) +} + +//----------------------------------------------------------------- +void M_SetState(ExtClass other) +{ + strlower(other._value) + + switch(other._value) + { + case "combat": + SetState(s_combat) + break + + case "relaxed": + SetState(s_relaxed) + break + + default: + DPrint(_name + ".SetState(): Unknown state " + other._value) + ErrorNum++ + break + } +} + +//----------------------------------------------------------------- +void AISleep(float sleep) +{ + Wait(Stopped == false) + Sleep(sleep) +} + +//----------------------------------------------------------------- +bool WTraceFilter(CreatureClass other, vector raypos, vector raydir) +{ + if(other == this || !IsInherited(other, CExtClass)) + return false + + if(other.ClassType == ClassTypeMiscPhysicsGlass || other.ClassType == ClassTypeMiscShootDetector || other.ClassType == ClassTypeMiscShootingShield) + return other.IsShot(raypos, raydir) + + //get rid of this fucking railing + if(other.ClassType == ClassTypeMiscModel) + { + misc_model mm = other + + if(mm.railing) + return false + + return true + } + + if(other.ClassType == ClassTypeCreature) + { + if(other.Disabled) + return false + + //if(GroupID != other.GroupID) + //return true + } + + return true +} + +//----------------------------------------------------------------- +ExtClass GetTarget(string parm, int types = 0) +{ + if(parm == "player") + return World.Player + + ExtClass targ = FindClass(parm) + + if(targ == NULL) + { + DPrint(_name + ".AddCmd/GuardTarget/SetTarget/SetWaypoints can't found target " + parm) + ErrorNum++ + } + else + { + switch(types) + { + case 1: + if(targ.ClassType != CTypeInfoWaypoint) + { + DPrint(_name + ".AddCmd/GuardTarget/SetTarget trying to set " + ClassName(targ) + " as target " + parm) + targ = NULL + ErrorNum++ + } + break + + case 2: + if(targ.ClassType != CTypeInfoWaypoint && targ.ClassType != CTypeInfoWpGroup) + { + DPrint(_name + ".SetWaypoints trying to set " + ClassName(targ) + " as target " + parm) + targ = NULL + ErrorNum++ + } + break + } + } + return targ +} + +//----------------------------------------------------------------- +int TryFindPath(ExtClass target) +{ + if(GetWPos() == NULL) + { + return 0 + } + + int res + float tcost = 0 + float cost = 0 + + if(agent) + { + cost = agent.GetTraverseCost() + agent.SetTraverseCost(1.0) + } + + if(!World.pPathFinder.FindClosestPosition(ShapeIndex, WPosition, WPosition, Radius * 2)) + { + LastPathError = "TryFindPath: actor is obstructed" + res = 0 + goto getout + } + CPosition pos2 = target.GetWPos() + + if(pos2 == NULL) + { + LastPathError = "TryFindPath: target '" + target._name + "' out of NAV mesh" + res = 0 + goto getout + } + + if(target.agent) + { + tcost = target.agent.GetTraverseCost() + target.agent.SetTraverseCost(1.0) + } + + CPosition cpos2 = new CPosition + if(!World.pPathFinder.FindClosestPosition(ShapeIndex, pos2, cpos2, Radius * 1)) + { + LastPathError = "TryFindPath: target '" + target._name + "' is obstructed" + res = 0 + goto getout + } + + if(!IsConnected(WPosition, cpos2)) + { + LastPathError = "TryFindPath: target '" + target._name + "' is not in the same group" + res = 0 + goto getout + } + + + CPath path = World.pPathFinder.FindShortestPath(ShapeIndex, WPosition, cpos2, 1 - bCanUseConnections) + + if(path == NULL) + { + LastPathError = "TryFindPath: can't found path to target '" + target._name + "'" + res = 0 + } + else + { + path.Destroy() + path = NULL + res = true + } + +getout: + + if(cpos2) + { + delete cpos2 + } + + if(tcost && target.agent) + { + target.agent.SetTraverseCost(tcost) + } + + if(cost) + { + agent.SetTraverseCost(cost) + } + + return res +} + +//----------------------------------------------------------------- +void M_SetWaypoints(ExtClass other) +{ + NumWaypoints = 0 + + string p = other._value + string token + int cgroup = -1 + + if(GetWPos()) + { + cgroup = WPosition.group + } + + while(NumWaypoints < 64) + { + int t = ParseStringEx(p, token) + + if(t != 3) + { + DPrint(_name + ".SetWaypoints has syntax error") + ErrorNum++ + return + } + + info_waypoint w = GetTarget(token, 2) + + if(w) + { + if(w.ClassType == CTypeInfoWpGroup) + { + info_wpgroup wgr = w + + for(int n = 0; n < wgr.NumWaypoints; n++) + { + w = wgr.PWaypoints[n] + + if(w.WPosition) + { + if(w.WPosition.group != cgroup) + { + DPrint(".SetWaypoints error! Waypoint: " + w._name + "has different nav-group than " + _name) + } + } + + Waypoints[NumWaypoints++] = w + + if(NumWaypoints >= 64) + return + } + } + else + { +#ifdef DEVELOPER + if(!TryFindPath(w)) + { + + DPrint(_name + ".SetWaypoints warning! Reason: " + LastPathError) + } +#endif + if(w.WPosition) + { + if(w.WPosition.group != cgroup) + { + DPrint(".SetWaypoints error! Waypoint: " + w._name + "has different nav-group than " + _name) + } + } + + Waypoints[NumWaypoints++] = w + } + } + + t = ParseStringEx(p, token) + + if(t == 0) + break + + if(token != ",") + { + DPrint(_name + ".SetWaypoints has syntax error") + ErrorNum++ + return + } + } +} + +//----------------------------------------------------------------- +void M_SetTarget(ExtClass other) +{ + CreatureClass cc = GetTarget(other._value) + if(cc) + Target = cc +} + +//----------------------------------------------------------------- +void M_SetGuardTarget(ExtClass other) +{ + CreatureClass cc = GetTarget(other._value, 1) + if(cc) + GuardTarget = cc +} + +//----------------------------------------------------------------- +void Say(int type) +{ + if(SSet == NULL) + return + + if(!SSet.HasSounds(type)) + return + + float d + + //didn't we said something recently? + d = currenttime - LastSayTime + if(d < 1.0) + return + + World.SManager.Say(this, type) +} + +//----------------------------------------------------------------- +float Distance(CreatureClass target) +{ + vector from, t + + from = CurrentPos - HHVec + + if(IsInherited(target, CInfoWaypoint)) + { + info_waypoint wp = target + t = wp.floor + } + else + { + if(target.ClassType == ClassTypeCreature) + t = target.CurrentPos - target.HHVec + else + t = GetOrigin(target) + } + + t = t - from + + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, from, to) + + if(fabs(t[2]) < Height) + t[2] = (float)1 + + DistanceVector = t + + return VectorNormalize(DistanceVector) +} + +//----------------------------------------------------------------- +float DistanceBetween(CreatureClass target) +{ + return Distance(target) - Radius - target.Radius +} + +//----------------------------------------------------------------- +float AttackerDistance() +{ + if(Attacker == NULL) + return 10000000 //FIXME: shouldn't happen!!!??? + + vector from, t + + from = CurrentPos - HHVec + + if(Attacker.ClassType == ClassTypeCreature) + t = AttackerLKP - Attacker.HHVec + else + t = GetOrigin(Attacker) + + t = t - from + + DistanceVector = t + DistanceVector[2] = 0 + VectorNormalize(DistanceVector) + + if(fabs(t[2]) < Height) + t[2] = 0 + + return VectorLength(t) +} + +//----------------------------------------------------------------- +void AIKillEvents() +{ + for(int n = 0; n < AIBufferSize; n++) + AI_Used[n] = false + + AI_ActEvents = 0 +} + +//----------------------------------------------------------------- +// status +//----------------------------------------------------------------- +int Alertable() +{ + if(status == STATE_SCRIPT) + return false + + if(status >= STATE_WALK && status <= STATE_LOST_TARGET) + return true + + return false +} + +//----------------------------------------------------------------- +int Alerted() +{ + if(status >= STATE_1STSIGHT && status < STATE_COVER) + return true + + return false +} + +//----------------------------------------------------------------- +float Turn2TargetDiff(vector tpos, float adisp = 0) +{ + vector targetvec = tpos - CurrentPos + targetvec[2] = 0 + + turnangle = Vector2Yaw(targetvec) + adisp + + return DiffAngle(turnangle, faceyaw) +} + +//----------------------------------------------------------------- +void ResetTurn() +{ + turnspeed = 0 + turndist = 0 + WTurn = false +} + +//----------------------------------------------------------------- +float TurnToTarget(vector tpos, float s, float adisp = 0) +{ + turnspeed = s + + //otacej k cili + turndist = Turn2TargetDiff(tpos, adisp) + + //good enough direction + if(fabs(turndist) < 1.0) + turndist = 0 + + return turndist +} + +//----------------------------------------------------------------- +void CAmbientSoundEnd() +{ + if(LastAmbientSound >= 0) + { + //there is different sound playing. Interrupt it + if(CSoundID[LastAmbientSound]) + { + EndSound(CSoundID[LastAmbientSound]) + CSoundID[LastAmbientSound] = 0 + } + LastAmbientSound = -1 + } +} + +//----------------------------------------------------------------- +void CAmbientSound(int n) +{ + if(LastAmbientSound != n) + { + if(LastAmbientSound >= 0) + { + //there is different sound playing. Interrupt it + if(CSoundID[LastAmbientSound]) + { + EndSound(CSoundID[LastAmbientSound]) + CSoundID[LastAmbientSound] = 0 + } + } + } + else + { + //sound is playing already + if(CSoundID[LastAmbientSound]) + return + } + + LastAmbientSound = n + //Play new sound + CSoundID[n] = PlaySound(this, CSounds[n], SF_3D) +} + +//----------------------------------------------------------------- +void SetAnimState(int type, bool force = false) +{ + if(type == t_idle) + { + CAmbientSoundEnd() + } + + atype = type + + if(force) + { + otype = -1 + } +} + +//----------------------------------------------------------------- +//Play one-shot anim, and wait for end +//----------------------------------------------------------------- +int WaitAnims + +//----------------------------------------------------------------- +void PlayAnimWait(local int slot, int anm, float blend, int grp, int fps, int flags, bool forcefinish = false) +{ + //don't hang on nonexistent anims + //AssertAnim(anm) + if(!ASet.Anims[anm]) + return + + WaitAnims++ + + PlayAnim(slot, anm, blend, grp, fps, flags | AF_ONCE | AF_NOANIMEND | AF_BLENDOUT) + + local int prevstatus = status + + while(true) + { + if(!IsAnimSlotPlaying(this, 1 << slot)) + break + + + if(!forcefinish && !IsState(prevstatus)) + { + SetAnimSlot(this, slot, VNULL, 20.0, 0, NULL, 0, 0) + break + } + + Sleep(0) + } + + WaitAnims-- +} + +//----------------------------------------------------------------- +float TurnByAnim(local ExtClass target, float maxdiff) +{ + //DPrint("TurnByAnim") + //Print(target) + + float fturn = 0, turn + + turn = Turn2TargetDiff(GetMatrix(target, 3)) + fturn = fabs(turn) + + //don't waste time + if(fturn < maxdiff) + return 0 + + local float spenttime = 0 + local int atbase + local int awbase = a_relax_walk + + if(astate == s_relaxed) + { + if(!ASet.Anims[a_relax_turn]) + { + atbase = a_alert_turn + awbase = a_alert_walk + } + } + else + { + if(astate == s_alert) + { + atbase = a_alert_turn + awbase = a_alert_walk + } + else + { + atbase = a_combat_turn + awbase = a_combat_walk + } + } + + SetXYVelocity(ZeroVec) + + //Print(String("turn by anim " + ftoa(fturn))) + + local int prevstate = status + + //Print("turning by walk") + + //too small diference for anim, do it by rotating "moonwalker" + //existujou vubec animace? + if(fturn < 30 || !ASet.Anims[atbase] || !ASet.Anims[atbase + 1]) + { + iNoMotion = 2 + PlayAnim(s_custom, awbase, 10.0, g_all, 30, 0) + + while(IsState(prevstate)) + { + turn = fabs(TurnToTarget(GetOrigin(target), TurnSpeed)) + + if(ShowAI) + SetWidgetText(WAI, 4, "TurnByAnim " + ftoa(spenttime) + " " + ftoa(turn)) + + if(turn < 5) + break + + AISleep(2) + spenttime += 2 + } + } + else + { + iNoMotion = 1 + //don't turn + ResetTurn() + + local float pturn = -turn + + while(IsState(prevstate)) + { + //HACK: there is some bug? which terminate our anim?? + if(!IsAnimSlotPlaying(this, 1 << s_custom)) + { + //force refresh! + pturn = -turn + } + + float p = pturn * turn //changed direction? + if(p < 0) + { + //Print(String("turning by 90degrees " + ftoa(turn))) + if(turn > 0) + PlayAnim(s_custom, atbase + 0, 10.0, g_all, 30, 0) + else + PlayAnim(s_custom, atbase + 1, 10.0, g_all, 30, 0) + + pturn = turn + } + + AISleep(2) + spenttime += 2 + + //don't move this code. turn is not local and only here is not harmed! + turn = Turn2TargetDiff(GetOrigin(target)) + + if(ShowAI) + SetWidgetText(WAI, 4, "TurnByAnim " + ftoa(spenttime) + " " + ftoa(turn)) + + if(fabs(turn) < 10) + break + } + } + iNoMotion = 0 + + SetAnimSlot(this, s_custom, VNULL, 20.0, 0, NULL, 0, 0) + + if(ShowAI) + SetWidgetText(WAI, 4, "") + + //Print("End turn") + + return spenttime +} + +//----------------------------------------------------------------- +bool IsUnreachable(ExtClass ec) +{ + for(int n = 0; n < NumUnreachable; n++) + { + if(Unreachable[n] == ec) + return true + } + + return false +} + +//----------------------------------------------------------------- +void SetUnreachable(ExtClass ec, float timeout = 2) +{ + //don't remember temporary waypoints + if(IsInherited(ec, CExtClass) && ec._name && substr(ec._name, 0, 1) == "@") + return + + if(NumUnreachable >= 32) + return + + for(int n = 0; n < NumUnreachable; n++) + { + if(Unreachable[n] == ec) + { + UnreachableTime[n] = currenttime + timeout + return + } + } + + Unreachable[NumUnreachable] = ec + UnreachableTime[NumUnreachable] = currenttime + timeout + NumUnreachable++ +} + +//----------------------------------------------------------------- +string GetLastPathError() +{ + return "actor('" + _name + "') - " + LastPathError +} + +//----------------------------------------------------------------- +bool CheckDirectPath(ExtClass target) +{ + if(GetWPos() == NULL) + return false + + if(target.GetWPos() == NULL) + return false + + CPosition pos2 = target.GetWPos() + + if(pos2 == NULL) + return false + + float tcost = 0 + float cost = 0 + + if(agent) + { + cost = agent.GetTraverseCost() + agent.SetTraverseCost(1.0) + } + + if(target.agent) + { + tcost = target.agent.GetTraverseCost() + target.agent.SetTraverseCost(1.0) + } + + bool res = World.pPathFinder.TestLineCollision(ShapeIndex, WPosition, pos2) + + if(tcost) + { + target.agent.SetTraverseCost(tcost) + } + + if(cost) + { + agent.SetTraverseCost(cost) + } + + return res +} + +//----------------------------------------------------------------- +bool IsOnWPos() +{ + vector v = WPos - CurrentPos + v[2] = 0 + float wdist = VectorNormalize(v) + + WVector = v + WTargetDist = Distance(WTarget) +/* +Print(wdist) +Print(WTarget) +if(ClassName(this)=="creature_boss"&&KeyState(KC_M)) +{ + ClearKey(KC_M) + debug +} +*/ + //FIXME: don't use facevec!!! but real motion vector!!!! + float dot = v * MVec //facevec + + //we are walking in good direction. Make it more precise! + if(dot >= 0.95) + { + if(wdist < DistTolerance * 0.3) + return true + } + else + { + if(wdist < DistTolerance) + return true + } + return false +} + +//----------------------------------------------------------------- +// Animhook. End of jump, start rolling +//----------------------------------------------------------------- +void EndJump() +{ + iTransitionAnim = 2 + if(geom) + { + dBodyInteractionLayer(this, ET_NPC) + dBodySetGravity(this, "0 0 -9.8") + SetVelocity(this, "0 0 -100") + ClearFlags(this, TFL_ONGROUND) + SetXYVelocity(ZeroVec) + } +} + +//----------------------------------------------------------------- +void ArriveWP(info_waypoint targ) +{ + if(targ.ClassType == CTypeInfoWaypoint) + { + CallMethods(this, targ.OnArrival) + if(targ.firstsound) + { + _value = targ.firstsound + M_Sound(this) + targ.firstsound = "" + } + } +} + +//----------------------------------------------------------------- +void LeaveWP(info_waypoint targ) +{ + if(targ.ClassType == CTypeInfoWaypoint) + { + CallMethods(this, targ.OnDeparture) + targ.lastusetime = currenttime + } +} + +//----------------------------------------------------------------- +int BeginPath(ExtClass target, bool force, bool verbose = true, float targettol = 1.0) +{ + LastPathTime = currenttime + LastPathError = "" + LastPathTolerance = targettol + WaitForDoors = NULL + + int res + float tcost = 0 + float cost = 0 + + WTurn = false + + if(ShowAI) + SetWidgetText(WAI, 5, "") + + if(WPath) + { + WPath.Destroy() + WPath = NULL + } + + WTarget = target + + if(!force && IsUnreachable(target)) + { + LastPathError = "BeginPath: target is unreachable: '" + target._name + "'" + if(verbose) + DPrint(GetLastPathError()) + + res = PATH_NOT_FOUND + goto getout + } + + if(GetWPos() == NULL) + { + LastPathError = "BeginPath: actor is out of area" + DPrint(GetLastPathError()) + res = PATH_NOT_FOUND + goto getout + } + + if(agent) + { + cost = agent.GetTraverseCost() + agent.SetTraverseCost(1.0) + } + + if(!World.pPathFinder.FindClosestPosition(ShapeIndex, WPosition, WPosition, Radius * 1.5)) + { + LastPathError = "BeginPath: actor is obstructed" + DPrint(GetLastPathError()) + + SetUnreachable(target) + res = PATH_NOT_FOUND + goto getout + } + + CPosition pos2 = target.GetWPos() + + if(pos2 == NULL) + { + LastPathError = "BeginPath: target '" + target._name + "' is out of NAV mesh" + if(verbose) + DPrint(GetLastPathError()) + + SetUnreachable(target) + res = PATH_LOST_TARGET + goto getout + } + + if(target.agent) + { + tcost = target.agent.GetTraverseCost() + target.agent.SetTraverseCost(1.0) + } + + if(!World.pPathFinder.FindClosestPosition(ShapeIndex, pos2, WPosition2, Radius * targettol)) + { + res = PATH_NOT_FOUND + goto getout + } + + + if(!IsConnected(WPosition, WPosition2)) + { + LastPathError = "BeginPath: actor and target '" + target._name + " aren't in the same group" + if(verbose) + DPrint(GetLastPathError()) + + SetUnreachable(target) + res = PATH_LOST_TARGET + goto getout + } + + + WPath = World.pPathFinder.FindShortestPath(ShapeIndex, WPosition, WPosition2, 1 - bCanUseConnections) + + if(WPath) + { + WPos = WPath.Position(0) + WNum = 0 + + //if we are standing quite at the waypoint, this can cause quirks. + //Better to skip to next waypoint. + if(WPath.Size() > 1 && IsOnWPos()) + { + WNum++ + WPos = WPath.Position(1) + IsOnWPos() + } + + WPathContainJumps = false + for(int n = 0; n < WPath.Size(); n++) + { + info_connection conn = WPath.Connection(n) + if(conn != NULL) + { + if(conn.type == 1 || conn.type == 2) + WPathContainJumps = true + break + } + } + + WTurn = true + res = PATH_OK + goto getout + } +/* + vector v1 = World.pPathFinder.PointForPosition(WPosition) + vector v2 = World.pPathFinder.PointForPosition(WPosition2) + + AddDShape(SHAPE_BBOX, 0xffffff00, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, v1 - "3 3 3", v1 + "3 3 3") + AddDShape(SHAPE_BBOX, 0xffffff00, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, v2 - "3 3 3", v2 + "3 3 3") + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, v1, v2) +*/ + //shouldn't happen? + if(ShowAI) + { + SetWidgetText(WAI, 5, String("BeginPath: can't found path")) + } + + if(World.pPathFinder.GetLastError() == PFE_TIMEOUT) + SetUnreachable(target, 3) + else + SetUnreachable(target) + + res = PATH_NOT_FOUND + +getout: + + if(tcost) + { + target.agent.SetTraverseCost(tcost) + } + + if(cost) + { + agent.SetTraverseCost(cost) + } + return res +} + +//----------------------------------------------------------------- +void ProcessConnection(info_connection conn) +{ + CallMethods(this, conn.OnArrival) + + ResetTurn() + + dBodyInteractionLayer(this, ET_NOCOLLISION) + dBodySetGravity(this, ZeroVec) + SetVelocity(this, ZeroVec) + vector v = WPos - CurrentPos + v[2] = 0 + + VectorNormalize(v) + WVector = v + + info_connection conn2 = FindClass(conn.link) + + if(conn2) + TurnByAnim(conn2, 5) + + iTransitionAnim = 1 + + switch(conn.type) + { + case 1: + PlayAnim(s_custom, a_combat_railjump, 10.0, g_all, 30, AF_ONCE|AF_NOANIMEND) + break + + case 2: + //find nearest glass + for(misc_physics_glass glass = GetNextEntity(NULL, CMiscPhysicsGlass); glass != NULL; glass = GetNextEntity(glass, CMiscPhysicsGlass)) + { + vector gpos = facevec * 32 + GetMatrix(this, 3) + "0 0 32" + vector vdist = gpos - GetMatrix(glass, 3) + + if(VectorLength(vdist) < 150) + glass.BreakBox(gpos, "-24 -24 -24", "24 24 16") + } + + PlayAnim(s_custom, a_combat_windowjump, 10.0, g_all, 30, AF_ONCE|AF_NOANIMEND) + break + + case 3: + PlayAnimWait(s_custom, a_combat_crawl, 10.0, g_all, 30, AF_BLENDOUT|AF_ONCE, true) + break + } + + if(conn.type == 3) + { + dBodyInteractionLayer(this, ET_NPC) + dBodySetGravity(this, "0 0 -9.8") + SetXYVelocity(ZeroVec) + } + else + { + local float jprevz = CurrentPos[2] + Wait(iTransitionAnim == 2) + + //TODO:better wait for hitting the ground + Wait(GetFlags(this) & TFL_ONGROUND) + Wait(!IsAnimSlotPlaying(this, 1 << s_custom)) + + aprevz = CurrentPos[2] + + jprevz = jprevz - aprevz + if(jprevz > 48) + { + PlayAnim(s_custom, a_jump_drop, 0.1, NULL, 30, AF_ONCE|AF_NOANIMEND) + Wait(!IsAnimSlotPlaying(this, 1 << s_custom)) + } + + SetAnimSlot(this, s_custom, VNULL, 10.0, 0, NULL, 0, 0) + } + + iTransitionAnim = 0 +} + +//----------------------------------------------------------------- +int UpdatePath(local int anm, local float pathrefresh = AI_PATHREFRESH, bool verbose = true) +{ + if(WPath == NULL) + { + return PATH_NOT_FOUND + } + + if(WaitForDoors) + { + if(WaitForDoors.status == 3) + { + atype = anm + WaitForDoors = NULL + } + return PATH_OK + } + + vector v + + float dt + float t = currenttime - LastPathTime + + //every Nsec update path + if(t > pathrefresh) + { + int res = BeginPath(WTarget, false, verbose, LastPathTolerance) + if(res != PATH_OK) + { + return res + } + } + + //TODO: Call departure event! + if(CurrentWP != WTarget) + { + if(CurrentWP) + { + LeaveWP(CurrentWP) + CurrentWP = NULL + } + } + + CPosition a = WTarget.GetWPos() + + if(a == NULL) + { + if(ShowAI) + SetWidgetText(WAI, 5, String("UpdatePath: " + _name + " lost WTarget")) + return PATH_LOST_TARGET + } + + WTurn = true + + if(IsOnWPos()) + { + local info_connection conn = WPath.Connection(WNum) + + WNum++ + + //get next position + if(WNum >= WPath.Size()) + { + WTurn = false + + //if we were walking for waypoint + if(IsInherited(WTarget, CInfoWaypoint)) + { + CurrentWP = WTarget + ArriveWP(CurrentWP) + } + return PATH_FINISHED + } + else + { + WPos = WPath.Position(WNum) + } + + if(conn) + { + ProcessConnection(conn) + res = BeginPath(WTarget, true) + if(res != PATH_OK) + { + return res + } + } + } + else + { + float dot = v * facevec + + if(astate == s_relaxed) + { + //check if next waypoint is on sharp angle. + + //if it's more than 50degrees and it's near from here, use strafe + if(WTargetDist < fMaxStrafeDistance && fabs(dot) < 0.6) + { + //realize which side the target is on + if(GetSide(WPos, CurrentPos, facevec) < 0) + { + SetAnimState(t_lstrafe) + } + else + { + SetAnimState(t_rstrafe) + } + goto mdone + } + } + + if(astate != s_combat) + { + //if so, make turn inplace instead of walk/run in direction + if(dot < fMinCosForSlowTurn) + { + SetOrigin(WalkWaypoint, WPos) + TurnByAnim(WalkWaypoint, 10) + } + } + + SetAnimState(anm) + +mdone:; + } + + //it may happen during waiting. It's strange anyway :-/ + if(WPath == NULL) + { + return PATH_NOT_FOUND + } + + //are we there yet? + if(WNum >= WPath.Size() - 1) + { + if(IsOnWPos()) + { + WTurn = false + + //if we were walking for waypoint + if(IsInherited(WTarget, CInfoWaypoint)) + { + CurrentWP = WTarget + ArriveWP(CurrentWP) + } + return PATH_FINISHED + } + } + + return PATH_OK +} + +//----------------------------------------------------------------- +float AIEventAge(int ev) +{ + return currenttime - AI_Time[ev] +} + +//----------------------------------------------------------------- +// creature noises +//----------------------------------------------------------------- +void SoundFirstSight() +{ +} + +//----------------------------------------------------------------- +void SoundSuspicious() +{ +} + +//----------------------------------------------------------------- +void BeginLostTarget(CreatureClass cc) +{ + LostTarget = cc + + if(status != STATE_LOST_TARGET) + { + SwitchFSM(STATE_LOST_TARGET) + } +} + +//Shape LKP +//----------------------------------------------------------------- +void SetAttackerLKP(vector pos) +{ + /* + if(LKP) + { + LKP.Destroy() + LKP = NULL + } + + LKP = AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos - "3 3 3", pos + "3 3 3") +*/ + AttackerLKP = pos + AttackerLKPTime = currenttime +} + +//----------------------------------------------------------------- +void SetWP(info_waypoint wp, vector pos) +{ + vector to + + if(wp.WPosition == NULL) + wp.WPosition = new CPosition + + if(World.pPathFinder.PositionForPoint(pos, wp.WPosition)) + { + to = World.pPathFinder.PointForPosition(wp.WPosition) + } + else + { + float endplane[4] + //maybe we are too high above nav-mesh. Trace down + to = pos - "0 0 128" + int pf = ClearFlags(this, TFL_SOLID) + TraceLineEx(MONSTER, pos, to, ZeroVec, ZeroVec, NULL, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, NULL) + SetFlags(this, pf) + to += "0 0 4" + + World.pPathFinder.PositionForPoint(to, wp.WPosition) + } + + wp.coords = to + wp.floor = to + SetOrigin(wp, to) +} + +//----------------------------------------------------------------- +void BeginCombatTarget(CreatureClass cc) +{ + Attacker = cc + SetAttackerLKP(cc.CurrentPos) + + if(bLongRange) + { + if(astate == s_relaxed) + { + SwitchFSM(STATE_1STSIGHT) + } + else + SwitchFSM(STATE_LR_ATTACK) + } + else + { + if(BeginPath(cc, true, false) == PATH_OK) + { + if(astate == s_relaxed) + { + SwitchFSM(STATE_1STSIGHT) + } + else + { + SwitchFSM(STATE_CHASE) + } + } + else + { + BeginLostTarget(cc) + } + } + + SetState(s_combat) +} + +//----------------------------------------------------------------- +bool IsLastMan() +{ + if(Squad && Squad.Alive == 1) + return true + + return false +} + +//----------------------------------------------------------------- +void BeginCover(CreatureClass cc) +{ + if(!IsLastMan()) + Say(ST_TAKECOVER) + Attacker = cc + SetAttackerLKP(cc.CurrentPos) + + SwitchFSM(STATE_COVER) +} + +//----------------------------------------------------------------- +bool BeginCoverFromDanger(ExtClass actor, vector pos) +{ + if(!IsLastMan()) + Say(ST_GRENADE) + + //if we were recently solving this problem, check distance from the new danger + if(StateAge(STATE_COVERFROMDANGER) < 2.0) + { + //it's pretty close. Don't care about it + if(VectorLength(pos - DangerPos) < 84) + { + return false + } + } + + //don't be so coward when already fighting + if(Alerted()) + { + if(VectorLengthSq(pos - CurrentPos) > 191.8 * 191.8) + { + return false + } + } + + if(World.pPathFinder.PositionForPoint(pos, NULL)) + { + Attacker = actor + DangerPos = pos + SetWP(TempWaypoint, pos) + SwitchFSM(STATE_COVERFROMDANGER) + return true + } + + //shit! + BeginCover(World.Player) + return true +} + +//----------------------------------------------------------------- +void BeginRoam(CreatureClass cc) +{ + SwitchFSM(STATE_ROAMING) +} + +//----------------------------------------------------------------- +// Alert event occured. Choose the behavior according to Tactics settings +//----------------------------------------------------------------- +int DoTactics(CreatureClass cc) +{ + //We are not interested in anything + if(Tactics <= TACTICS_IDLE) + return 0 + + //roaming are usualy small animals + if(Tactics == TACTICS_ROAM) + { + BeginCover(cc) + return 1 + } + + if(Tactics == TACTICS_COVER) + { + BeginCover(cc) + return 1 + } + + //Already alerted + if(Alerted()) + { + //are we alerted by other target? + if(cc == Attacker) + return -1 + } + + CPosition area + + //alerted + if(status == STATE_LOST_TARGET && LostTarget == cc) + { + area = GetWPos() + + if(!IsConnected(cc.GetWPos(), area)) + return 0 + + if(!TryFindPath(LostTarget)) + { + return 0 + } + } + + float dist = Distance(cc) + + //there is enough of them + if(cc.NumAttackers >= sizeof(Attackers)) + { + area = GetWPos() + + //try to replace further attacker + for(int n = 0; n < sizeof(Attackers); n++) + { + AICreatureClass ac = cc.Attackers[n] + + if(ac == NULL) + continue + + if(ac.Distance(cc) > dist) + { + if(bLongRange) + { + ac.AIKillEvents() + ac.EndAttack() + SetWP(TempWaypoint, ac.CurrentPos) + GuardTarget = TempWaypoint + SwitchFSM(STATE_GUARD) + goto skip + } + else + { + //don't replace longrange by shortrange, if we don't have path! + if(ac.bLongRange && IsConnected(ac.GetWPos(), area)) + { + ac.AIKillEvents() + ac.EndAttack() + + SetWP(TempWaypoint, ac.CurrentPos) + GuardTarget = TempWaypoint + SwitchFSM(STATE_GUARD) + goto skip + } + } + } + } + + return 0 + } + +skip: + CallMethods(this, OnCombat) + BeginCombatTarget(cc) + return 1 +} + +//----------------------------------------------------------------- +void M_ResetFirstSight(ExtClass other) +{ + FirstSight = false +} + +//----------------------------------------------------------------- +void M_SetTactics(ExtClass other) +{ + if(status >= STATE_DIE) + return + + strlower(other._value) + + int prevtactics = Tactics + + switch(other._value) + { + case "combat": + Tactics = TACTICS_COMBAT + break + + case "cover": + Tactics = TACTICS_COVER + break + + case "covercombat": + Tactics = TACTICS_COVERCOMBAT + break + + case "guardcombat": + Tactics = TACTICS_GUARDCOMBAT + SwitchFSM(STATE_GUARD) + return + + case "berserk": + Tactics = TACTICS_BERSERK + break + + case "idle": + Tactics = TACTICS_IDLE + if(status != STATE_SCRIPT) + SwitchFSM(STATE_IDLE) + return + + case "dummy": + Tactics = TACTICS_DUMMY + return + + case "roam": + Tactics = TACTICS_ROAM + BeginRoam(Target) + return + + default: + DPrint(_name + ".SetTactics(): Unknown tactics " + other._value) + ErrorNum++ + break + } + + if(Target || GuardTarget) + { + CreatureClass cc = NULL + + if(Tactics == TACTICS_COMBAT || Tactics == TACTICS_COVERCOMBAT || Tactics == TACTICS_BERSERK) + cc = Target + + //Take cover + if(Tactics == TACTICS_COVER) + { + if(Target == NULL) + { + Target = Attacker + + if(Target == NULL) + { + DPrint(_name + ".SetTactics(Cover): There is no Target nor Attacker") + ErrorNum++ + return + } + } + + //Tactics == TACTICS_COVER is not real tactics. It's just temporary state + Tactics = prevtactics + BeginCover(Target) + return + } + + //go & guard + if(Tactics == TACTICS_GUARDCOMBAT) + { + //Attacker = GuardTarget + SwitchFSM(STATE_GUARD) + return + } + + if(cc) + { + if(cc.ClassType == ClassTypeCreature) + SetAttackerLKP(cc.CurrentPos) + + DoTactics(cc) + } + return + } + + //DPrint(_name + " has no target for SetTactics") +} + +//----------------------------------------------------------------- +void M_DisablePain(ExtClass other) +{ + flags |= FL_NOPAIN +} + +//----------------------------------------------------------------- +void M_EnablePain(ExtClass other) +{ + flags &= 0xffffffff - FL_NOPAIN +} + +//----------------------------------------------------------------- +void M_DisableSenses(ExtClass other) +{ + flags &= 0xffffffff - (FL_SEE|FL_HEAR|FL_FEEL) +} + +//----------------------------------------------------------------- +void M_EnableSenses(ExtClass other) +{ + VisTime = 0 //quick response + flags |= FL_SEE|FL_HEAR|FL_FEEL + NumVisibleTargets = 0 +} + +//----------------------------------------------------------------- +void M_DisableHearing(ExtClass other) +{ + flags &= 0xffffffff - FL_HEAR +} + +//----------------------------------------------------------------- +void M_EnableHearing(ExtClass other) +{ + flags |= FL_HEAR +} + +//----------------------------------------------------------------- +void M_DisableSeeing(ExtClass other) +{ + flags &= 0xffffffff - FL_SEE + NumVisibleTargets = 0 + ClearEventMask(this, EV_FLASHLIGHT) +} + +//----------------------------------------------------------------- +void M_EnableSeeing(ExtClass other) +{ + VisTime = 0 //quick response + flags |= FL_SEE + SetEventMask(this, EV_FLASHLIGHT) +} + +//----------------------------------------------------------------- +void M_DisableFeeling(ExtClass other) +{ + flags &= 0xffffffff - FL_FEEL +} + +//----------------------------------------------------------------- +void M_EnableFeeling(ExtClass other) +{ + flags |= FL_FEEL +} + +//----------------------------------------------------------------- +void M_EndScript(ExtClass other) +{ + CmdStackPos = 0 + AICmd = AICMD_NONE + AIParm = "" +} + +//----------------------------------------------------------------- +void M_SetHealth(ExtClass other) +{ + float rate = atof(other._value) + clamp rate<0, 100> + Health = MaxHealth * rate / 100 + bOnLowHealth = true +} + +//----------------------------------------------------------------- +void AnimDeath(int dir, float pow) +{ + int a = rand(0, 3) + + if(dir == 0) + a += 2 + + a += a_death + + if(!PlayAnim(s_death, a, 20.0, g_all, 30, AF_ONCE)) + { + SetTimer(this, this, 150, EV_ANIMEND, s_death, true) + } + + atype = -1 + astate = -1 +} + +//----------------------------------------------------------------- +void UnuseWaypoint() +{ + if(UsedWaypoint) + { + UsedWaypoint.used &= UsedOff + UsedWaypoint = NULL + } +} + +//----------------------------------------------------------------- +void UseWaypoint(info_waypoint uwp) +{ + UnuseWaypoint() + + if(LRUWaypoints[LRUTop] != uwp) + { + LRUTop = LRUTop + 1 & 1 + LRUWaypoints[LRUTop] = uwp + } + + UsedWaypoint = uwp + UsedWaypoint.used |= UsedOn +} + +//----------------------------------------------------------------- +bool RecentlyUsed(info_waypoint wp) +{ + if(LRUWaypoints[0] == wp || LRUWaypoints[1] == wp) + return true + + return false +} + + +//----------------------------------------------------------------- +bool CmdPath(string parm) +{ + local info_waypoint targ = GetTarget(parm, 1) + + if(targ == NULL) + return false + + if(!IsInherited(targ, CInfoWaypoint)) + { + DPrint(_name + ".AddCmd(Walk/Run) failed! Reason: target " + targ._name + " is not waypoint") + ErrorNum++ + return false + } + + if(CurrentWP == targ) + { + //we are here already! + return false + } + + if(targ.used & UsedOn) + { + DPrint(_name + ".AddCmd(Walk/Run) failed! Reason: target " + targ._name + " is occupied by someone") + ErrorNum++ + return false + } + + for(local int timeout = 0; timeout < 5; timeout++) + { + if(BeginPath(targ, true, false) == PATH_OK) + { + UseWaypoint(targ) + return true + } + + AISleep(50) + } +/* + vector wfrom = World.pPathFinder.PointForPosition(WPosition) + vector wto = World.pPathFinder.PointForPosition(targ.WPosition) + + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, wfrom, wto) + + AddDShape(SHAPE_BBOX, 0xff00ffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, wfrom - "4 4 4", wfrom + "4 4 4") + AddDShape(SHAPE_BBOX, 0xff00ffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, wto - "4 4 4", wto + "4 4 4") + + BeginPath(targ, true, false) +*/ + DPrint(_name + ".AddCmd(Walk/Run) failed! Reason: " + LastPathError) + return false +} + +//----------------------------------------------------------------- +bool CmdShoot(string AIParm, bool nowait) +{ + int c = strstr(AIParm, ",") + ExtClass targ + float ttime + + if(c != -1) + { + targ = GetTarget(trim(substr(AIParm, 0, c))) + ttime = atof(substr(AIParm, c + 1, strlen(AIParm) - c - 1)) + } + else + { + targ = GetTarget(trim(AIParm)) + ttime = -1 + } + + if(targ == NULL) + return false + + ShootTarget = targ + ShootTime = ttime + + if(ShootTime != 0) + { + if(!nowait) + SetAnimState(t_idle) + + SetState(s_combat) + } + return true +} + +//----------------------------------------------------------------- +bool PopStack() +{ + if(!CmdStackPos) + { + AICmd = AICMD_NONE + AIParm = "" + SetAnimState(t_idle) + return false + } + + int c + + CmdStackPos-- + + AIParm = CmdParmStack[CmdStackPos] + AICmd = CmdStack[CmdStackPos] + + switch(AICmd) + { + case AICMD_SHOOTNW: + CmdShoot(AIParm, true) + return PopStack() + + case AICMD_SHOOT: + if(CmdShoot(AIParm, false)) + { + Wait(ShootTime == 0) + } + return PopStack() + + case AICMD_END: + M_EndScript(this) + return false + + case AICMD_WALK: + if(!CmdPath(AIParm)) + return PopStack() + SetAnimState(t_walk) + break + + case AICMD_RUN: + if(!CmdPath(AIParm)) + return PopStack() + SetAnimState(t_run) + break + + case AICMD_IDLE: + SetAnimState(t_idle) + break + + case AICMD_ANIM: + _value = AIParm + SetAnimState(t_idle) + M_SetAnim(this) + break + + case AICMD_ANIMNW: + AICmd = AICMD_IDLE + _value = AIParm + SetAnimState(t_idle) + M_SetAnim(this) + break + + case AICMD_USE: + ExtClass ec = GetTarget(AIParm) + if(ec) + ec.Activate(0, this) + return PopStack() + + case AICMD_WSIGHT: + break + + case AICMD_CALL: + CallMethods(this, AIParm) + return PopStack() + + case AICMD_SLEEP: + SetAnimState(t_idle) + AISleep(atof(AIParm)) + return PopStack() + + case AICMD_TURN: + c = strstr(AIParm, ",") + if(c != -1) + { + _TurnTarget = GetTarget(substr(AIParm, 0, c)) + } + else + { + _TurnTarget = GetTarget(AIParm) + } + break + + case AICMD_TURNBY: + c = strstr(AIParm, ",") + if(c != -1) + { + _TurnTarget = GetTarget(substr(AIParm, 0, c)) + } + else + { + _TurnTarget = GetTarget(AIParm) + } + break + + case AICMD_SAY: +/* if(ClassName(this) == "creature_faggioli") //TODO World.say() uz bude asi iba pre cutsceny. mozno by to mohlo fungovat cez Transmitter.Say() ktory sluzi ako SpeekBuffer + World.say(AIParm, "faggioli", INGAME_DIALOG, false) + else + World.say(AIParm, "computer", INGAME_DIALOG, false) + + Wait(World.InGameDialogSound == 0)*/ + return PopStack() + + default: + return false + } + + return true +} + +//----------------------------------------------------------------- +void AddCmd(string parm) +{ + if(status >= STATE_DIE) + return + + int c = strstr(parm, ",") + int ic + + string cmd + + if(c >= 0) + { + cmd = substr(parm, 0, c) + triminplace(cmd) + parm = substr(parm, c + 1, strlen(parm) - c - 1) + triminplace(parm) + } + else + { + cmd = parm + parm = "" + } + + strlower(cmd) + + switch(cmd) + { + case "end": + ic = AICMD_END + break + + case "idle": + ic = AICMD_IDLE + break + + case "walk": + ic = AICMD_WALK + break + + case "run": + ic = AICMD_RUN + break + + case "anim": + ic = AICMD_ANIM + break + + case "animnowait": + ic = AICMD_ANIMNW + break + + case "use": + ic = AICMD_USE + break + + case "call": + ic = AICMD_CALL + break + + case "waitsight": + ic = AICMD_WSIGHT + break + + case "sleep": + ic = AICMD_SLEEP + break + + case "turn": + ic = AICMD_TURN + break + + case "turnby": + ic = AICMD_TURNBY + break + + case "shoot": + ic = AICMD_SHOOT + break + + case "shootnowait": + ic = AICMD_SHOOTNW + break + + case "say": + ic = AICMD_SAY + break + + default: + DPrint("Unknown AI command:" + cmd + " on entity " + _name) + return + } + + if(status != STATE_SCRIPT) + { + if(CmdStackPos != 0) + { + Print(String(_name + " has switched to SCRIPT mode, but his stack is not empty")) + } + } + + //AddStack + for(int n = CmdStackPos - 1; n >= 0; n--) + { + CmdStack[n + 1] = CmdStack[n] + CmdParmStack[n + 1] = CmdParmStack[n] + } + + CmdStack[0] = ic + CmdParmStack[0] = parm + CmdStackPos++ + + if(status != STATE_SCRIPT) + { + //AIKillEvents() + SwitchFSM(STATE_SCRIPT) + AICmd = AICMD_IDLE + } +} + +//----------------------------------------------------------------- +void M_AddCmd(ExtClass other) +{ + AddCmd(other._value) +} + +//----------------------------------------------------------------- +void GetSpeechSet(string name) +{ + for(int n = 0; n <= World.SpeechSetCount; n++) + { + SpeechSet ss = World.SpeechSets[n] + + if(ss.Name == name) + { + ss.Load() + SSet = ss + return + } + } +} + +//----------------------------------------------------------------- +void GetHurtFactors(float hf[]) +{ + for(int n = 0; n < sizeof(hf); n++) + { + //hurt factor must not be 0!!! + if(hf[n] == 0.0) + HurtFactor[n] = 1.0 + else + HurtFactor[n] = hf[n] + } +} + +vector shootpos + +//----------------------------------------------------------------- +bool TestShootFilter(ExtClass other, vector raypos, vector raydir) +{ + switch(other.ClassType) + { + case ClassTypeMiscPhysicsGlass: + return false + + case ClassTypeMiscShootDetector: + return other.IsShot(raypos, raydir) + + case ClassTypeMiscShootingShield: + return other.IsShot(raypos, raydir) + + case ClassTypeMiscModel: + misc_model mm = other + if(mm.railing) + return false + + case ClassTypePhysicsPart: + physics_part pack = other.Owner + + if(pack && pack.ClassType == ClassTypeEnterableVehicle) + { + if(pack.status == 1) + { + return false + } + } + break + } + + return true +} + +//----------------------------------------------------------------- +CreatureClass TestShoot(ExtClass enemy, vector to) +{ + MinClass cent = NULL + float endplane[4] + + vector from = GetMatrix(CurrentWeapon, 3) + + int fl = ClearFlags(this, TFL_SOLID) + + shootpos = to + "0 0 20" + + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, from, shootpos) + + TraceLineEx(DEFAULT, from, shootpos, ZeroVec, ZeroVec, cent, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, &TestShootFilter) + if(cent != enemy) + { + shootpos = to + + TraceLineEx(DEFAULT, from, shootpos, ZeroVec, ZeroVec, cent, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, &TestShootFilter) + } + + SetFlags(this, fl) + return cent +} + +//----------------------------------------------------------------- +int IsEnemy(CreatureClass cc) +{ + //we have no enemies + if(flags & FL_FRIENDLY) + return false + + //shouldn't happen + if(cc.status >= STATE_DIE) + return false + + if(cc.GroupID != GroupID) + return true + + return false +} + +//----------------------------------------------------------------- +// virtual functions +//----------------------------------------------------------------- +void AnimPain(int fl, float pow, vector painvec) +{ + if(flags & FL_NOPAIN || flags & FL_PUPPET) + return + + if(PainTimer) + { + StopTimer(PainTimer) + PainTimer = 0 + } + + pain = 1 + + int a + + painvec[2] = 0 + VectorNormalize(painvec) + +vector endpos = painvec * -24 + CurrentPos + + int hitdir = HitDirection2(painvec) + + if(hitdir == 1) + { + if(ASet.Anims[a_pain_back]) + { + PlayAnim(s_pain, a_pain_back + rand(0, 4), 15.0, SmallPainGroup, 40, AF_ONCE) + return + } + } + +/* if(TestMove(CurrentPos, endpos, false) < 1) + { + a = a_pain_inplace + rand(0, 5) + } + else + {*/ + a = a_pain + rand(0, 4) +// } + + if(!ASet.Anims[a]) + { + pain = 0 + return + } + + PlayAnim(s_pain, a, 20.0, SmallPainGroup, 40, AF_ONCE) +} + +//----------------------------------------------------------------- +void Show(bool show) +{ + if(show) + { + SetFlags(this, TFL_VISIBLE|TFL_SOLID) + } + else + { + ClearFlags(this, TFL_VISIBLE|TFL_SOLID) + } + + if(CurrentWeapon) + CurrentWeapon.Show(show) +} + +//----------------------------------------------------------------- +bool InFront(MinClass other, float cos = 0.7) +{ + vector min, max + GetCBoundBox(other, min, max) + vector vec = min + max * (float)0.5 + vec = vec - CurrentPos + vec[2] = 0 + VectorNormalize(vec) + + float d = vec * facevec + + if(d > cos) + return true + + return false +} + +//----------------------------------------------------------------- +int TestDoorBlock(FuncClass fc) +{ + if(WaitForDoors == fc) + return true + + if(flags & FL_CANOPENDOORS && fc.ClassType == ClassTypeFunc) + { + if(fc.ClassNum != ClassNumDoor && fc.ClassNum != ClassNumRotDoor) + return false + + if(fc.CanActivate(0, this) == ACT_ENABLE) + { + fc.Activate(0, fc) + WaitForDoors = fc + SetAnimState(t_idle) + ResetTurn() + return true + } + else + { + //already opening + if(fc.status == 1) + { + WaitForDoors = fc + SetAnimState(t_idle) + ResetTurn() + return true + } + } + } + return false +} + +//----------------------------------------------------------------- +// AI memory buffer +//----------------------------------------------------------------- +void AIKillEvent(int ev) +{ + if(AI_Used[ev]) + { + AI_Used[ev] = false + AI_ActEvents-- + } +} + +//----------------------------------------------------------------- +void AIAddEvent(int ev, vector pos, MinClass ent) +{ + if(ent == Attacker) + { + SetAttackerLKP(pos) + } + + AI_Time[ev] = currenttime + + if(AI_Used[ev]) + { + vector v = CurrentPos - pos + float dist1 = v * v + + v = CurrentPos - AI_Pos[ev] + float dist2 = v * v + + //replace further events? + if(dist1 >= dist2) + return + } + else + { + AI_ActEvents++ + AI_Used[ev] = true + } + + AI_Ent[ev] = ent + AI_Pos[ev] = pos +} + +//----------------------------------------------------------------- +void AIInit() +{ + AIKillEvents() +} + +//----------------------------------------------------------------- +float IsObserved(ExtClass ent) +{ + for(int n = 0; n < NumObserved; n++) + { + if(Observed[n] == ent) + return currenttime - ObservedTime[n] + } + + return 0 +} + +//----------------------------------------------------------------- +void AddObserved(ExtClass ent) +{ + float worst = 0 + int worstnum = 0 + + for(int n = 0; n < NumObserved; n++) + { + //already included. Just update time + if(Observed[n] == ent) + { + ObservedTime[n] = currenttime + return + } + + float diff = currenttime - ObservedTime[n] + if(diff > worst) + { + worst = diff + worstnum = n + } + } + + if(NumObserved < ObservedBufferSize) + { + Observed[NumObserved] = ent + ObservedTime[NumObserved] = currenttime + NumObserved++ + return + } + + Observed[worstnum] = ent + ObservedTime[worstnum] = currenttime +} + + +float LastCover + +//----------------------------------------------------------------- +bool DoFirstSight(CreatureClass cc) +{ + if(!FirstSight) + { + //Print(String(_name + " First Sight on " + cc._name)) + + Say(ST_ALERT) + + FirstSight = true + + if(!sfirst) + { + sfirst = true + SoundFirstSight() + } + + if(Squad) + { + Squad.OnMemberAttacked(this, cc, AttackerLKP) + } + + if(OnFirstSight) + { + CallMethods(this, OnFirstSight) + return true + } + } + return false +} + +//----------------------------------------------------------------- +//jednou za cas projizdi nabufferovane udalosti, projizdi aktivni +//a pokud je to mozne, prepina FSM na nove ukoly +//----------------------------------------------------------------- +void AIProcess() +{ + if(Attacker && Alerted() && NotInLOFTime > 11.0) + { + NotInLOFTime = 0 + CallMethods(this, OnLostTarget) + } + + for(int currevent = 0; AI_ActEvents && currevent < AIBufferSize; currevent++) + { + if(!AI_Used[currevent]) + continue + + AI_Used[currevent] = false + + CreatureClass cc = AI_Ent[currevent] + + AI_ActEvents-- + switch(currevent) + { + case AIE_GRENADE: + if(DoFirstSight(World.Player)) + return + + if(Tactics <= TACTICS_IDLE) + break + + if(BeginCoverFromDanger(World.Player, AI_Pos[currevent])) + return + break + + case AIE_SHOTORTOUCH: + if(cc == World.Player && DoFirstSight(cc)) + return + + if(Tactics <= TACTICS_IDLE) + break + + //short range enemies are helpless when enemy out of area + if(!bLongRange) + { + CPosition area = cc.GetWPos() + CPosition myarea = GetWPos() + + if(!IsConnected(area, myarea)) + { + BeginCover(cc) + return + } + } + + if(cc != Attacker || Alertable()) + { + Say(ST_ALERTBYSHOT) + if(DoTactics(AI_Ent[currevent])) + return + } + break + + case AIE_SAWENEMY: + if(cc == World.Player && DoFirstSight(cc)) + { + return + } + + if(Tactics <= TACTICS_IDLE) + break + + if(NumCloseCombatAnims && cc == Attacker && DistanceBetween(cc) < DISTANCE_TO_CLOSECOMBAT && InFront(cc, 0.5) && StateAge(STATE_CLOSECOMBAT) > 1.5) + { + bool fighting = IsState(STATE_LR_ATTACK) + fighting |= IsState(STATE_CHASE) + + if(fighting) + { + SwitchFSM(STATE_CLOSECOMBAT) + } + return + } + + if(Alertable()) + { + if(DoTactics(AI_Ent[currevent])) + { + Say(ST_ALERT) + return + } + } + break + + case AIE_BULLETRAIN: + if(Tactics <= TACTICS_IDLE) + break + + if(IsState(STATE_COVER)) + break + + if(!Alertable()) + { + float d = currenttime - LastCover + if(d >= 3) + { + LastCover = currenttime + BeginCover(AI_Ent[currevent]) + return + } + } + break + + case AIE_HEARDSHOT: + if(cc == World.Player && DoFirstSight(cc)) + return + + if(Tactics <= TACTICS_IDLE) + break + + if(Alertable()) + { + Say(ST_ALERTBYSHOT) + if(DoTactics(AI_Ent[currevent])) + return + } + break + + case AIE_SAWDEADBODY: + if(Tactics <= TACTICS_IDLE) + break + + //ignore already observed bodies + if(IsObserved(AI_Ent[currevent]) == 0) + { + if(Alertable()) + { + Say(ST_ALERTBYDEAD) + SwitchFSM(STATE_OBSERVE) + AddObserved(AI_Ent[currevent]) + SetWP(TempWaypoint, GetOrigin(AI_Ent[currevent])) + SoundSuspicious() + } + return + } + break + + case AIE_HEARDNOISE: + if(cc == World.Player && DoFirstSight(cc)) + return + + if(Tactics <= TACTICS_IDLE) + break + + if(Alertable()) + { + if(cc) + { + float tdist = IsObserved(cc) + + //it's not so long we observed it + if(tdist && tdist < 5) + break + + AddObserved(cc) + } + SwitchFSM(STATE_OBSERVE) + SetWP(TempWaypoint, AI_Pos[currevent]) + SoundSuspicious() + } + break + + case AIE_SQUADATTACKED: + if(cc == World.Player && DoFirstSight(cc)) + return + + if(Tactics <= TACTICS_IDLE) + break + + if(Alertable()) + { + SwitchFSM(STATE_OBSERVE) + AddObserved(AI_Ent[currevent]) + SetWP(TempWaypoint, GetOrigin(AI_Ent[currevent])) + SoundSuspicious() + } + break + } + } +} + +//----------------------------------------------------------------- +void NotifyNoise(MinClass actor, vector origin, int noises) +{ + vector v + float dot + + if(noises & NOISE_FLAME) + { + //if is visible, send it as danger event. + v = origin - EyesPos() + VectorNormalize(v) + dot = v * facevec + if(dot > 0.225) + { + AIAddEvent(AIE_GRENADE, origin, NULL) + } + return + } + + if(noises & NOISE_PHYSICS && ClassName(actor) == "ProjectileGrenade") + { + //if is visible, send it as grenade event. Noise otherwise + v = origin - EyesPos() + VectorNormalize(v) + dot = v * facevec + if(dot > 0.225) + { + AIAddEvent(AIE_GRENADE, origin, NULL) + return + } + } + + if(noises & NOISE_SHOOT && IsEnemy(actor)) + { + AIAddEvent(AIE_HEARDSHOT, origin, actor) + return + } + + //it's dangerous to add actors which could be deleted (grenades etc.). + //These two types are most common and should be safe + if(!IsInherited(actor, CCreatureClass) && !IsInherited(actor, CMiscPhysicsModel)) + actor = NULL + + AIAddEvent(AIE_HEARDNOISE, origin, actor) +} + +//----------------------------------------------------------------- +bool AddVisibleTarget(ExtClass target, float dist) +{ + for(int n = 0; n < NumVisibleTargets; n++) + { + if(VisibleTargets[n] == target) + { + VTLastTime[n] = currenttime + float td = currenttime - VTFirstTime[n] + + float timeout = 0.1 + + //do 3metru reaguj prakticky okamzite + if(dist > DIST_TO_IMMED_REACTION) + { + //scale by distance function! + dist = dist + DIST_TO_IMMED_REACTION + float scale = DIST_TO_IMMED_REACTION / dist + timeout = 1 - scale + + if(target == Attacker) + timeout *= fAlertedVisibilityLatency + else + timeout *= fVisibilityLatency + } + + if(td >= timeout) + return true + + return false + } + } + + VisibleTargets[NumVisibleTargets] = target + VTLastTime[NumVisibleTargets] = currenttime + VTFirstTime[NumVisibleTargets] = currenttime + NumVisibleTargets++ + + //do 3metru reaguj okamzite + if(dist < DIST_TO_IMMED_REACTION) + return true + + return false +} + +//----------------------------------------------------------------- +void UpdateVisibleTargets() +{ + for(int n = 0; n < NumVisibleTargets; n++) + { + float td = currenttime - VTLastTime[n] + + if(td > 3) + { + //remove + if(NumVisibleTargets > 1) + { + VisibleTargets[n] = VisibleTargets[NumVisibleTargets - 1] + VTLastTime[n] = VTLastTime[NumVisibleTargets - 1] + VTFirstTime[n] = VTFirstTime[NumVisibleTargets - 1] + } + NumVisibleTargets-- + } + } +} + +//----------------------------------------------------------------- +vector GetLookVector() +{ + vector mat[4], vec + + GetBoneMatrix(this, LookBone, mat) + if(LookAxis < 0) + vec = ZeroVec - mat[-LookAxis - 1] + else + vec = mat[LookAxis - 1] + + return vec +} + +//----------------------------------------------------------------- + void UpdateLookAt() + { + if(LookTimeout > currenttime) + { + vector tpos, epos, mat[4] + + epos = EyesPos() + + if(IsInherited(LookTarget, CCreatureClass)) + { + //exception for small robots + if(Height <= 48) + tpos = GetMatrix(LookTarget, 3) + else + tpos = LookTarget.EyesPos() + } + else + tpos = GetMatrix(LookTarget, 3) + + vector ang = Vector2Angles(tpos - epos) + + float yaw = DiffAngle(ang[YAW], faceyaw + LAddAngle) +/* +if(_name == "lightTrooper2" && atype == t_run_fb) +{ + widget w + + if(w == NULL) + { + w = CreateWidget(WTYPE_TEXT, 0, 0, 400, 200, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND, 0xffffffff, 190) + } + + SetFont(w, MainFont) + SetWidgetText(w, 0, ftoa(ang[YAW])) + SetWidgetText(w, 1, ftoa(faceyaw)) + SetWidgetText(w, 2, ftoa(yaw)) + SetWidgetText(w, 3, ftoa(LAddAngle)) + + + if(KeyState(KC_G)) + { + ClearKey(KC_G) + debug + } +} +*/ + float pitch = ang[PITCH] + + if(pitch > 180) + pitch = pitch - 360 + + float ayaw = fabs(yaw) + //avoid tiny oscilations + if(ayaw < 1.5) + yaw = 0 + + if(ayaw > fYawLimit) + { + yaw = 0 + pitch = 0 + } + } + else + { + pitch = 0 + yaw = 0 + } + + + SetHeadOrientation(pitch, yaw) + } + +//----------------------------------------------------------------- + void LookAt(ExtClass target) + { + LookTarget = target + + if(target) + { + LookTimeout = currenttime + 2 + return + } + + LookTimeout = 0 + } + +Shape eyeshape +//----------------------------------------------------------------- +// AI visibility +//----------------------------------------------------------------- +void AIVisibility() +{ + if(!flags & FL_SEE) + return + + UpdateVisibleTargets() + + int mask = FL_WAIT4TRIGGER | FL_FRIENDLY | FL_HURTENEMIES + + if(flags & mask) + return + + VisTime-- + + if(VisTime > 0) + return + + VisTime = 5 + + int nvise + MinClass visents[100] + vector epos, from, vec + vector mat[4] + + //except ourself from query + int prevfl = ClearFlags(this, TFL_SOLID|TFL_VISIBLE|TFL_USER6) + GetBoneMatrix(this, LookBone, mat) + from = mat[3] + if(LookAxis < 0) + vec = ZeroVec - mat[-LookAxis - 1] + else + vec = mat[LookAxis - 1] + + if(eyeshape) + { + eyeshape.Destroy() + eyeshape = NULL + } + + if(ShowAI) + eyeshape = AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from, vec * 128 + from) + + nvise = VisEntities(from, vec, 130.0, visrange, visents, 100, TFL_VISIBLE|TFL_USER6) + while(nvise > 0) + { + AICreatureClass cc = visents[--nvise] + + if(cc.ClassType == ClassTypeCreature) + epos = cc.EyesPos() + else + epos = GetMatrix(cc, 3) + + //HACK: +#ifdef DEVELOPER + if(cc == World.Player && g_iFly) + continue +#endif + + vector vdist = from - epos + + if(fabs(vdist[2]) > 256) //too high/low + continue + + int vfl = ClearFlags(cc, TFL_SOLID) + + //it's not worth to test visibility again. It has been done in VisEntities! + bool vis = P2PVisibilityEx(from, epos, TRACE_DETAIL|TRACE_ENTS|TRACE_PASSTRANSLUCENT) + + SetFlags(cc, vfl) + + if(vis) + { + float dist = Distance(cc) + + if(ClassName(cc) == "ProjectileGrenade") + { + if(dist < 212) + AIAddEvent(AIE_GRENADE, epos, NULL) + continue + } + + if(IsEnemy(cc)) + { + if(AddVisibleTarget(cc, dist)) + AIAddEvent(AIE_SAWENEMY, epos, cc) + } + else + { + switch(cc.status) + { +/* + case STATE_CHASE: + if(cc.Attacker && IsEnemy(cc.Attacker)) + { + AIAddEvent(AIE_SAWENEMY, cc.Attacker.CurrentPos, cc.Attacker) + } + break +*/ + case STATE_LR_ATTACK: + if(cc.Attacker && IsEnemy(cc.Attacker) && IsInherited(cc, CAICreatureClass) && cc.bShooting) + { + AIAddEvent(AIE_SAWENEMY, cc.AttackerLKP, cc.Attacker) + } + break + +//when we saw someone near us, attacking foe behind us. It makes AI little bit more sensible + case STATE_LR_ATTACK: + if(cc.Attacker && IsEnemy(cc.Attacker)) + { + if(dist < 144 && Distance(cc.Attacker)) + { + float d = DistanceVector * facevec + if(d < 0) + { + AIAddEvent(AIE_SAWENEMY, cc.Attacker.CurrentPos, cc.Attacker) + } + } + } + break + + case STATE_DIE: + AIAddEvent(AIE_SAWDEADBODY, epos, cc) + break + + case STATE_DEAD: + AIAddEvent(AIE_SAWDEADBODY, epos, cc) + break + } + } + } + } + + SetFlags(this, prevfl) +} + +//----------------------------------------------------------------- +void OnHit() +{ +} + +//----------------------------------------------------------------- +void OnDie() +{ +} + +//----------------------------------------------------------------- +void OnDeath() +{ +} + +//----------------------------------------------------------------- + void SoundPain() + { + } + +//----------------------------------------------------------------- + void SoundDeath() + { + } + +//----------------------------------------------------------------- +void Kill(int dir = 0, float pow = 0) +{ + ClearEventMask(this, EV_TOUCH) + UpdateAgent(false) + + //stop all weapon anims, which could cause animhooks + SetAnimSlot(this, s_weapon, VNULL, 20.0, 0, NULL, 0, 0) + + //unuse current waypoint + UnuseWaypoint() + + SwitchFSM(STATE_DIE) + + KillThread(this, "FSMThread") + + WTurn = false + + if(ShowAI) + ShowWidget(WAI, false) + + ShowAI = false + iTraceHit = 0 + + SetAnimSlot(this, s_pain, VNULL, 20.0, 0, NULL, 0, 0) + + SoundDeath() + OnDie() + CallMethods(this, OnDie) + + bShooting = false + if(CurrentWeapon) + { + CurrentWeapon.InterruptAction() + + CreatureClass pla = World.Player + int DiffLevel = pla.GetDifficultyLevel() + string cweapon = ClassName(CurrentWeapon) + WeaponClass wc = NULL + WeaponClass pwc = NULL + int amin, amax; + + switch(cweapon) + { + case "item_weapon_pistol": + wc = new item_weapon_pistol + amin = DroppedAmmoGunQuantityMin[DiffLevel] + amax = DroppedAmmoGunQuantityMax[DiffLevel] + 1 + break + + case "item_weapon_machinegun": + wc = new item_weapon_machinegun + amin = DroppedAmmoMachinegunQuantityMin[DiffLevel] + amax = DroppedAmmoMachinegunQuantityMax[DiffLevel] + 1 + break + + case "item_weapon_shotgun": + wc = new item_weapon_shotgun + amin = DroppedAmmoShotgunQuantityMin[DiffLevel] + amax = DroppedAmmoShotgunQuantityMax[DiffLevel] + 1 + break + + case "item_weapon_sniperrifle": + wc = new item_weapon_sniperrifle + amin = DroppedAmmoSniperRifleQuantityMin[DiffLevel] + amax = DroppedAmmoSniperRifleQuantityMax[DiffLevel] + 1 + break + + case "item_weapon_rocketlauncher": + wc = new item_weapon_rocketlauncher + amin = DroppedAmmoRocketLauncherQuantityMin[DiffLevel] + amax = DroppedAmmoRocketLauncherQuantityMax[DiffLevel] + 1 + break + + case "item_weapon_flamethrower": + wc = new item_weapon_flamethrower + amin = DroppedAmmoFlameThrowerQuantityMin[DiffLevel] + amax = DroppedAmmoFlameThrowerQuantityMax[DiffLevel] + 1 + break + } + if(pla && wc) + { + pwc = pla.GetWeaponPointer(wc.ClassNum) + if(pwc == NULL || pwc.Ammo == 0) + { + //nema, dej plnou + wc.Ammo = amax + } + else + { + //pridej proporcionalne k tomu, kolik uz ma + Print(String("Ammo " + itoa(pwc.Ammo))) + Print(String("Min/Max " + itoa(amin) + "/" + itoa(amax))) + + + float ad, ascale + + ad = amax - amin + if(amax < pwc.Ammo) + { + //mame vic, nez max limit. Snizuj horni hranici + ascale = amax / pwc.Ammo + + ad = ad * ascale + ad = ad + amin + + if(ad > amax) + ad = amax + if(ad < amin) + ad = amin + + amax = ad + } + else + { + //mame min, nez max limit. Zvysuj spodni hranici + ascale = pwc.Ammo / amax + ad = ad * ascale + ad = amax - ad + + if(ad > amax) + ad = amax + if(ad < amin) + ad = amin + + amin = ad + } + + Print(String("New Min/Max " + itoa(amin) + "/" + itoa(amax))) + + wc.Ammo = rand(amin, amax + 1); + } + + RemoveChild(this, CurrentWeapon) + wc.coords = GetMatrix(CurrentWeapon, 3) + vector vecs = Vector2Angles(GetMatrix(CurrentWeapon, 0)) + wc.angle3 = vecs[0] + wc.angle = vecs[1] + + Throw(wc, World, EV_INIT, 0) + Throw(wc, World, EV_LOADED, 0) + + SetVelocity(wc, facevec * frand(0.5, 0.9) + "0 0 0.55" * 17) + ClearFlags(CurrentWeapon, 0xffffffff) + ClearEventMask(CurrentWeapon, 0xffffffff) + CurrentWeapon = NULL + } + } + + if(RagdollDef) + { + BeforeBodyDestroy() //informujeme entity zavisle na tomto body ze sa maze + dBodyDestroy(this) + SetVelocity(this, ZeroVec) + if(InitRagdoll(RagdollDef, RagdollMass, RagdollMaterial)) + { + SetFlags(this, TFL_FULLMATRIX|TFL_DYNAMICBBOX) + + //make fake death anim + SetTimer(this, this, 150, EV_ANIMEND, s_death, true) + return + } + } + + SetAnimSlot(this, s_walk, ASet.Anims[a_relax_idle], 20.0, 0, NULL, 30, 0) + SetAnimSlot(this, s_idlevar, VNULL, 20.0, 0, NULL, 30, 0) + SetAnimSlot(this, s_custom, VNULL, 20.0, 0, NULL, 30, 0) + + AnimDeath(dir,pow) +} + +//----------------------------------------------------------------- +void LowerHealth(float damage) +{ + Health = Health - damage + clamp Health<0, Health> + + if(OnLowHealth && bOnLowHealth) + { + float f = Health / MaxHealth * 100 + if(f < lowhealth) + { + bOnLowHealth = false + CallMethods(this, OnLowHealth) + } + } +} + +//----------------------------------------------------------------- +void M_Kill(ExtClass other) +{ + Kill(HitDirection("0 0 1"), 100) +} + +int LastShootID, LastHitID + +//TODO: upravit tak aby sa zohladnovalo if(shot.HurtType == typ) +// typy: HT_SHOT HT_EXPLOSION HT_IMPACT HT_FLAME HT_HURT_TRIGGER +// HT_FLAME je volany velmi casto. per frame + +BleedSource BleedSources[4] + +//----------------------------------------------------------------- +void UpdateBleedSources() +{ + for(int n = 0; n < sizeof(BleedSources); n++) + { + BleedSource obs = BleedSources[n] + if(obs != NULL) + { + float diff = currenttime - obs.BirthTime + + if(diff > 20) + { + delete obs + BleedSources[n] = NULL + continue + } + + vector mat[4] + vector mat2[4] + + if(GetBoneMatrix(this, obs.Bone, mat) + { + MatrixMultiply4(mat, obs.LMatrix, mat2) + SetMatrix(obs, mat2) + BumpFrame(obs, ftime, false) + } + } + } +} + +//----------------------------------------------------------------- +void AddBleedSource(ShotStorage shot) +{ + + vector mat[4] + + if(GetBoneMatrix(this, shot.Bone, mat)) + { + vector lpos = VectorMatrixInvMultiply4(mat, shot.to) + vector lvec = VectorMatrixInvMultiply3(mat, -shot.dir) + + int oldest = -0.4 + float oldtime = currenttime + for(int n = 0; n < sizeof(BleedSources); n++) + { + BleedSource obs = BleedSources[n] + if(obs == NULL) + { + BleedSources[n] = new BleedSource(lvec, lpos, shot.Bone, this) + return + } + + if(obs.BirthTime < oldtime) + { + oldtime = obs.BirthTime + oldest = n + } + } + + delete BleedSources[oldest] + BleedSources[oldest] = new BleedSource(lvec, lpos, shot.Bone, this) + } +} +bool bFirstShotToRagdoll +int NumShots +int RagdollHitCount + +//----------------------------------------------------------------- + +int LastShootID, LastHitID + +//TODO: upravit tak aby sa zohladnovalo if(shot.HurtType == typ) +// typy: HT_SHOT HT_EXPLOSION HT_IMPACT HT_FLAME HT_HURT_TRIGGER +// HT_FLAME je volany velmi casto. per frame + +SSource SSources[4] + +//----------------------------------------------------------------- +void UpdateSSources() +{ + for(int n = 0; n < sizeof(SSources); n++) + { + SSource obs = SSources[n] + if(obs != NULL) + { + float diff = currenttime - obs.BirthTime + + if(diff > 19.0) + { + delete obs + SSources[n] = NULL + continue + } + + vector mat[4] + vector mat2[4] + + if(GetBoneMatrix(this, obs.Bone, mat) + { + MatrixMultiply4(mat, obs.LMatrix, mat2) + SetMatrix(obs, mat2) + BumpFrame(obs, ftime, false) + } + } + } +} + +//----------------------------------------------------------------- +void AddSSource(ShotStorage shot) +{ + + vector mat[4] + + if(GetBoneMatrix(this, shot.Bone, mat)) + { + vector lpos = VectorMatrixInvMultiply4(mat, shot.to) + vector lvec = VectorMatrixInvMultiply3(mat, -shot.dir) + + int oldest = -0.3 + float oldtime = currenttime + for(int n = 0; n < sizeof(SSources); n++) + { + SSource obs = SSources[n] + if(obs == NULL) + { + SSources[n] = new SSource(lvec, lpos, shot.Bone, this) + return + } + + if(obs.BirthTime < oldtime) + { + oldtime = obs.BirthTime + oldest = n + } + } + + delete SSources[oldest] + SSources[oldest] = new SSource(lvec, lpos, shot.Bone, this) + } +} + +bool bFirstShotToRagdoll +int NumShots +int RagdollHitCount + + +//----------------------------------------------------------------- +int Shoot(ShotStorage shot) +{ + NumShots++ + vector ForceDir + vector org = GetMatrix(this, 3) + + float dmg = shot.damage //kolko energie to ma zobrat + vector dir = shot.dir + vector pos = shot.to + int result = SR_NONE + //pozor, je nutno odlisit power a damage! + float pow = shot.power * 520 * sqrt(sqrt(1 / g_timescale)) //jak silna rana to bola (hlavne pre impact power) + + CreatureClass cc = shot.shooter + bool iscreature = false + + if(IsInherited(cc, CCreatureClass)) + { + //FIXME: at se nezranujou mezi sebou + if(cc.GroupID == GroupID) + { + return SR_NONE + } + iscreature = true + +// if(cc.ClassNum == ClassNumPlayer) //damage od playera podla difficulty levelu. medzi sebou nie +// dmg *= World.playerscale + } + + if(shot.HurtType == HT_FLAME) + { + if(!ragdollActive) + { + org = GetMatrix(this, 3) + ForceDir = org - shot.from + } + + + //odfiltrujeme dalsi zasahy v ramci jednoho vystrelu + if(iscreature && shot.ID != LastShootID) + { + BulletRainCounter = BulletRainCounter + 1 + + if(BulletRainCounter >= fMinBulletRain) + { + //informuj, ze jsme "pod palbou" + AIAddEvent(AIE_BULLETRAIN, cc.CurrentPos, cc) + BulletRainCounter = 0 + } + } + if(status < STATE_DIE && dmg > 0) + { + WakeupRagdoll() + if(Immortality || bFlameResistent) + result = SR_COVERED + else + { + WakeupRagdoll() + result = SR_HIT + LowerHealth(dmg * sqrt(sqrt(sqrt(1 / g_timescale)))) + + SoundPain() + + if(Health == 0) + { + if(Squad) + Squad.OnMemberKilled(this) + + if(flags & FL_PUPPET) + return SR_HIT + + Kill(HitDirection(dir), pow) + result = SR_KILL + goto deadend + } + + } + + if(!bFlameResistent) + { + OnHit() + AnimPain(0, pow, -dir) + if(iscreature) + { + if(flags & FL_FEEL && IsEnemy(cc)) + AIAddEvent(AIE_SHOTORTOUCH, cc.CurrentPos, cc) + } + + } + + if(bFlameResistent) + { + + OnHit() + AnimPain(0, pow, -dir) + if(iscreature) + { + if(flags & FL_FEEL && IsEnemy(cc)) + AIAddEvent(AIE_SHOTORTOUCH, cc.CurrentPos, cc) + } + result = SR_COVERED + } + + if(iscreature) + { + if(flags & FL_FEEL && IsEnemy(cc)) + AIAddEvent(AIE_SHOTORTOUCH, cc.CurrentPos, cc) + } + + + } + + return result + + } + + + if(shot.HurtType == HT_SHOT) + { + if(!ragdollActive) + { + org = GetMatrix(this, 3) + ForceDir = org - shot.from + } + + if(Disabled) + return SR_NONE + + //scale by damage factor + if(shot.Bone != -1) + { + //float dscale = HurtFactor[shot.Bone] + dmg *= HurtFactor[shot.Bone] + + } + + float f, hurtfactor = 1 + + //odfiltrujeme dalsi zasahy v ramci jednoho vystrelu + if(iscreature && shot.ID != LastShootID) + { + BulletRainCounter = BulletRainCounter + 1 + + if(BulletRainCounter >= fMinBulletRain) + { + //informuj, ze jsme "pod palbou" + AIAddEvent(AIE_BULLETRAIN, cc.CurrentPos, cc) + BulletRainCounter = 0 + } + } + /* + if(!DmgFlags[cc.ClassNum][ClassNum] & DMGF_NONOISE) + HitFeedback(this, cc, pos, dir, hurtfactor, cover) + */ + + if(status < STATE_DIE) + { + if(!Immortality && dmg > 0) + { + LowerHealth(dmg) + + SoundPain() + + if(Health == 0) + { + if(Squad) + Squad.OnMemberKilled(this) + + if(flags & FL_PUPPET) + return SR_HIT + + Kill(HitDirection(dir), pow) + result = SR_KILL + goto deadend + } + } + OnHit() + + AnimPain(0, pow, -dir) + + if(iscreature) + { + if(flags & FL_FEEL && IsEnemy(cc)) + AIAddEvent(AIE_SHOTORTOUCH, cc.CurrentPos, cc) + } + + if(Immortality) + result = SR_COVERED + else + result = SR_HIT + } + + deadend:; + + if(status >= STATE_DIE) + { + VectorNormalize(dir) + + if(shot.ID != LastHitID) + { + LastHitID = shot.ID + + if(status < STATE_DEAD) + { + pow = shot.power * shot.NumBullets * 900 * (1 / g_timescale) + clamp pow<760, 5400> + } + else + { + pow = shot.power * shot.NumBullets * 1500 * (1 / g_timescale) + clamp pow<760, 8750> + } + + dir = dir * pow + + if(ragdollActive && RagdollHitCount == 0) + { + WakeupRagdoll() + + if(!bFirstShotToRagdoll) + { + + bFirstShotToRagdoll=true + //lower it little bit + dir = dir * 0.8 + + for(int b = 0; b < 64; b++) + { + if(!RBones[b]) + continue + + //ragdolly nemaji radi velke impulsy mimo centrum kosti, jinak muze + //dojit k prekrouceni limitu + vector bpos = GetMatrix(RBones[b], 3) + + //AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, bpos - "3 3 3", bpos + "3 3 3") + + dBodyApplyImpulseAt(RBones[b], dir, bpos) + RagdollHitCount++ + } + } + else + { + if(shot.Bone >= 0 && RBones[shot.Bone]) + { + bpos = GetMatrix(RBones[shot.Bone], 3) + dBodyApplyImpulseAt(RBones[shot.Bone], dir, bpos) + RagdollHitCount++ + } + } + } + else + { + WakeupRagdoll() + dBodyApplyImpulseAt(this, dir, bpos) + RagdollHitCount++ + + } +#ifndef GERMAN + RagdollHitCount = 0 +#endif + } + result = SR_HIT + } + + LastShootID = shot.ID + return result + } + +//--- + if(shot.HurtType == HT_EXPLOSION) + { + float scale + pow *= ExplosionImpactScale * 0.005 * sqrt(sqrt(sqrt(1 / g_timescale))) //koli moznosti vyscalovat vsetky bodies v hre + pow *= 0.3 //na potvory je to vela + + if(!ragdollActive) + { + org = GetMatrix(this, 3) + ForceDir = org - shot.from + } + + if(status < STATE_DIE) + { + if(!Immortality && dmg > 0) + { + LowerHealth(dmg) + SoundPain() + + if(Health == 0) + { + if(Squad) + Squad.OnMemberKilled(this) + + Kill(HitDirection(ForceDir), pow) + goto deadend2 + } + + OnHit() + } + + AnimPain(0, shot.power, ForceDir) + + if(flags & FL_FEEL && IsEnemy(World.Player)) + AIAddEvent(AIE_SHOTORTOUCH, shot.from, World.Player) //TODO: get real actor of explosion!!!! + } + + deadend2:; + //manage dead bodies + if(status >= STATE_DIE && RagdollHitCount == 0) + { + if(ragdollActive) + { + WakeupRagdoll() + ApplyExplosionOnRagdoll(shot.from, shot.radius, pow) + RagdollHitCount++ + } + else + { + WakeupRagdoll() + shot.power += shot.power * scale * 86 * (1 / g_timescale) + dBodyApplyImpulseAt(this, ForceDir * pow, org) + RagdollHitCount++ + } + } +#ifndef GERMAN + RagdollHitCount = 0 +#endif + return true + } + +//-- + if(shot.HurtType == HT_IMPACT) + { + if(!ragdollActive) + { + ForceDir = org - shot.from + VectorNormalize(ForceDir) + } + + if(status < STATE_DIE) + { + if(!Immortality && dmg > 0) + { + LowerHealth(dmg) + SoundPain() + + if(Health == 0) + { + if(Squad) + Squad.OnMemberKilled(this) + + Kill(HitDirection(ForceDir), shot.power) + } + + OnHit() + } + + AnimPain(0, shot.power, ZeroVec) + + if(flags & FL_FEEL && IsEnemy(World.Player)) + AIAddEvent(AIE_SHOTORTOUCH, shot.from, World.Player) //TODO: get real actor of hurt!!!! + } + } + + if(shot.HurtType == HT_HURT_TRIGGER ) + { + if(!ragdollActive) + { + ForceDir = org - shot.from + VectorNormalize(ForceDir) + } + + if(status < STATE_DIE) + { + if(!Immortality && dmg > 0) + { + LowerHealth(dmg) + SoundPain() + + if(Health == 0) + { + if(Squad) + Squad.OnMemberKilled(this) + + Kill(HitDirection(ForceDir), shot.power) + } + + OnHit() + } + + AnimPain(0, shot.power, ZeroVec) + + if(flags & FL_FEEL && IsEnemy(World.Player)) + AIAddEvent(AIE_SHOTORTOUCH, shot.from, shot.shooter) //TODO: get real actor of hurt!!!! + } + } +} + +//----------------------------------------------------------------- +int CountFighters(bool replace) +{ + int fp = 0 + AICreatureClass best = NULL + float dist = VectorLengthSq(CurrentPos - Attacker.CurrentPos) + + for(int a = 0; a < sizeof(Attackers); a++) + { + AICreatureClass ac = Attacker.Attackers[a] + + if(ac && ac.AttackStatus == 3) + { + float dist2 = VectorLengthSq(CurrentPos - ac.CurrentPos) + + if(dist2 > dist) + best = ac + + fp++ + } + } + + if(replace && best) + { + best.AttackStatus = 1 + fp = 0 + } + + return fp +} + +//----------------------------------------------------------------- +bool MeleeWaitForFight() +{ + local float maxtime = 150//MaxWaitTime + local float ft = 0 + + while(true) + { + if(ShowAI) + SetWidgetText(WAI, 4, "MeleeWaitForFight " + ftoa(maxtime)) + + if(!CountFighters(true)) + return true + + if(ft >= frand(150, 250)) + { + if(ShowAI) + SetWidgetText(WAI, 4, "MeleeWaitForFight " + ftoa(RestTime) + " IdleVar") + + ft = 0 + PlayAnimWait(s_custom, a_fight_idle_var + rand(0, NumFightIdleAnims), 20.0, g_all, 30, AF_ONCE) + } + + if(maxtime <= 0) + return false + + float t = TurnByAnim(Attacker, 25) + ft += t + maxtime -= t * 6 + + AISleep(AI_SLOWREFRESH) + maxtime -= AI_SLOWREFRESH * 6 + ft += AI_SLOWREFRESH + } +} + +//----------------------------------------------------------------- +info_waypoint FindWaypoint(info_waypoint except, vector from, float minrange, float range, int type, CreatureClass target, bool beginpath = true) +{ +/* + if(ClassName(this) != "creature_dron") + { + if(type & 2 && KeyState(KC_N)) + { + ClearKey(KC_N) + debug + } +} +*/ + //get offset from floor to barell of the gun (TODO: precompute this!!!) + vector off = GetMatrix(CurrentWeapon, 3) + off -= GetMatrix(this, 3) - HHVec + off[0] = 0 + off[1] = 0 + + vector targetpos + vector targetfloor + + if(IsInherited(target, CCreatureClass)) + { + targetpos = target.EyesPos() - "0 0 2" //HACK: make it more visible for player + targetfloor = target.CurrentPos - target.HHVec + } + else + { + targetpos = GetMatrix(target, 3) + targetfloor = targetpos + } + + float fromfloor = CurrentPos[2] - HHeight + + //plane for filtering waypoints behind target's back + vector targetplane = targetpos - CurrentPos + VectorNormalize(targetplane) + float tdist = targetplane * targetpos + + info_waypoint cwp + info_waypoint wpts[8] + int numwp = 0 + + info_waypoint wp + info_waypoint temparray[256] + info_waypoint wparray[] + int numwaypoints + CAgent AttackerAgent + + if(NumWaypoints) + { + numwaypoints = NumWaypoints + wparray = Waypoints + } + else + { + CPosition area = GetWPos() + + if(area == NULL) + { + DPrint("FindWaypoint: Creature " + _name + " is out of area!") + return NULL + } + + numwaypoints = World.pPathFinder.FindWaypoints(area, range, temparray, 256) + wparray = temparray + } + + int tfl, pfl = ClearFlags(this, TFL_SOLID) + if(target) + tfl = ClearFlags(target, TFL_SOLID) + + float sqrange = range * range + minrange *= minrange + float dot + + if(target && beginpath) + { + AttackerAgent = World.pPathFinder.AgentFromID(NULL, targetpos, 8, 4) + } + + for(int wpnum = 0; wpnum < numwaypoints; wpnum++) + { + wp = wparray[wpnum] + + //shouldn't happen + if(wp == NULL) + continue + + if(wp == except) + continue + + if(wp.used & UsedOn) + continue + + int wflags = wp.flags + //don't use waypoints used for scripting! + if(!wflags & 6) + continue + + //don't use disabled waypoints + if(wflags & 0x40000000) + continue + + //HOTFIX: protoze designeri s oblibou davaji do stejny grupy galerii >4metry nad zemi + if(fabs(fromfloor - wp.floor[2]) > 160) + continue + + vector v + + //we are trying to get to close to target as possible, but not the longest way + if(Tactics == TACTICS_BERSERK) + { + vector midpoint = targetpos + from * 0.6 + + v = wp.coords - midpoint + } + else + v = wp.coords - from + + float dist = v * v + + if(dist > sqrange) + { + continue + } + int cost = wp.cost << 8 + + if(type != 0) + { + //we have to satisfy waypoint's enemyfov + if(wp.enemyfov) + { + dot = FaceVectorTo(wp.floor, targetfloor) * wp.facevec + if(dot < wp.enemyfov) + { + continue + } + } + + //we have to satisfy waypoint's coverfov + if(wp.coverfov) + { + if(type == 1 || Tactics == TACTICS_COVERCOMBAT) + { + dot = FaceVectorTo(wp.floor, targetfloor) * wp.facevec + if(dot < wp.coverfov) + { + if(type == 1) + continue + + cost += 1 << 16 + } + } + } + + //we have to satisfy waypoint's enemyradius + if(wp.enemyradius) + { + if(wp.enemyradius > VectorLength(wp.floor - targetfloor)) + continue + } + + float targdist + + targdist = wp.radius * wp.radius + + //we have to satisfy waypoint's radius + if(wp.radius > 0 && targdist < dist) + { + continue + } + + if(!type & wflags) + { + cost += 2 << 16 + } + + //isn't it too close to target? + targdist = VectorLengthSq(wp.floor - targetfloor) + + if(Tactics != TACTICS_BERSERK && targdist < minrange) + { + //for shooting points it's ineligible!! + if(type & 2) + continue + + //penalize this case + cost += 1 << 16 + } + + if(Tactics == TACTICS_COVERCOMBAT && !wflags & 1) + { + //penalize not-cover waypoints little bit + cost += 90 + } + } + + if(RecentlyUsed(wp)) + { + cost += 1 << 8 //slight penalty + } + + dist = sqrt(dist) / range * 100 + clamp dist<0, 110> +// cost += 100 - dist + +//FIXME: fuckin bug, when left is int and right is float. It fuckup completely! + int idist = dist + cost += idist + + float tt = currenttime - wp.lastusetime * 100 + + if(tt < wp.reusetime) + { + cost += 1 << 8 + } + + if(target && type) //is valid for shoot/hide? + { + vector fr = wp.floor + off + bool vis = P2PVisibilityEx(fr, targetpos, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL) + + if(!vis && wflags & 12 && type & 2) + { + //lean waypoints has more than one shooting pos! + if(wflags & 8) + { + vis = P2PVisibilityEx(wp.rightvec * 32.0 + fr, targetpos, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL) + } + + if(!vis && wflags & 4) + { + vis = P2PVisibilityEx(wp.rightvec * -32.0 + fr, targetpos, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL) + } + } + + dot = wp.coords * targetplane - tdist + + //don't prefer waypoints behind enemy's back + if(dot > 0) + cost += 38 + + if(type & 1) //cover + { + if(vis) + cost += 2 << 16 + + goto done + } + + if(type & 2) //shoot + { + //TODO: prefer waypoints closer to target? + + if(!vis) + { + cost += 8 << 15 + } + /* else + { + AddDShape(SHAPE_BBOX, 0xffffff00, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, wp.coords - "3 3 3", wp.coords + "3 3 3") + }*/ + + } + } + +done: + //Slightly prefer crouch/lean waypoints if we can use them + //TODO: decide by tactics, or squad manager! + if(type == 2) + { + if(bCanLean && wflags & 12) + { + cost -= 33 + } + + if(bCanCrouch && wflags & 16) + { + cost -= 25 + } + } + + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, CurrentPos, wp.coords) + + wp.tcost = cost + + if(numwp < 8) + { + wpts[numwp++] = wp + continue + } + + //too much entries. Replace the worst waypoint + int wcost = cost + int worse + + for(int c = 0; c < 8; c++) + { + cwp = wpts[c] + if(cwp.tcost > wcost) + { + wcost = cwp.tcost + worse = c + } + } + + if(wcost > cost) + wpts[worse] = wp + } + +getout: + + SetFlags(this, pfl) + if(target) + SetFlags(target, tfl) + + //sort this shit out + if(numwp > 1) + { + int nn = numwp - 1 + while(true) + { + bool dosort = false + for(c = 0; c < nn; c++) + { + cwp = wpts[c] + wp = wpts[c + 1] + if(cwp.tcost > wp.tcost) + { + wpts[c] = wp + wpts[c + 1] = cwp + dosort = true + } + cwp = wpts[c] + } + + if(!dosort) + break + } + } + +//Print(numwp) + + wp = NULL + if(numwp > 0) + { + if(!beginpath) + return wpts[0] //we don't need to cleanup AttackerAgent as he doesn't exist in this case + + for(c = 0; c < numwp; c++) + { + wp = wpts[c] + + if(BeginPath(wp, false, false) == PATH_OK) + { + UseWaypoint(wp) + goto found + } + } + wp = NULL + } + +found:; + + if(AttackerAgent) + { + AttackerAgent.Destroy() + AttackerAgent = NULL + } + + return wp +} + +//----------------------------------------------------------------- +vector AimTarget(vector targ) +{ + //safe way + if(Attacker == NULL) + return targ + + vector ctarg = shootpos + vector diff = ctarg - targ + return ctarg +} + +//----------------------------------------------------------------- +int iAttackCounter +float fRestTimer +float fAttackTimer +int iAttackType +vector ShootPos //virtual position of target + +//----------------------------------------------------------------- +void ShootOff() +{ + bShooting = false +} + +//----------------------------------------------------------------- +void ShootOn(int type, bool resetpos = true) +{ + fRestTimer = 0 + fAttackTimer = 0 + iAttackType = type + iAttackCounter = rand(MinAttacksInRow[type], MaxAttacksInRow[type]) + bShooting = true + + if(Attacker && resetpos) + ShootPos = Attacker.GetCenterOfBody() +} + +//----------------------------------------------------------------- +void ReloadGun() +{ + if(!IsLastMan()) + Say(ST_RELOADING) + //NPC has unlimited ammo! + Ammo[CurrentWeapon.AmmoType] = 1000 + CurrentWeapon.Action(2, ZeroVec) +} + +//----------------------------------------------------------------- +bool NeedReload(int reserve = 0) +{ + if(CurrentWeapon.Ammo == -1 || CurrentWeapon.Ammo > reserve) + return false + + return true +} + +//----------------------------------------------------------------- +bool CanHitTarget(vector tpos) +{ + //return true, if we are at the good angle + vector mat[4] + GetMatrix4(CurrentWeapon, mat) + + float dot + vector aimvec1, aimvec2 + + aimvec2 = mat[1] + dot = UpVec * aimvec2 + + //gun is pointing mostly vertically + if(fabs(dot) > 0.5) + return false + + aimvec1 = tpos - mat[3] + aimvec1[2] = 0 + VectorNormalize(aimvec1) + + aimvec2[2] = 0 + VectorNormalize(aimvec2) + + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mat[3], mat[2] * 64 + mat[3]) + //AddDShape(SHAPE_LINE, 0xfff00fff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mat[3], aimvec2 * 64 + mat[3]) + + dot = aimvec1 * aimvec2 + + if(dot < 0.89) + return false + + return true +} + +//----------------------------------------------------------------- +string NoShootReason + +//----------------------------------------------------------------- +bool IsAiming() +{ + int mask = IsAnimSlotPlaying(this, 0xfff) + + for(int s = 0; s < 12 && mask != 0; s++) + { + if(mask & 1) + { + if(!SlotFlags[s] & ASF_AIMING) + return false + + return true + } + mask = mask >> 1 + } + + return false +} + +//----------------------------------------------------------------- +void ProcessShooting() +{ + if(Stopped || iTraceHit) + return + + if(ShootTime != 0 && ShootTarget) + { +#ifdef DEVELOPER + NoShootReason = "Scripted shooting" +#endif + vector tpos = GetMatrix(ShootTarget, 3) + + LookAt(ShootTarget) + + if(ShootTime > 0) + { + ShootTime -= ftime * 90 + clamp ShootTime<0, ShootTime> + } + + if(fAttackTimer) + { + fAttackTimer -= ftime + if(fAttackTimer > 0) + return + } + + if(!CurrentWeapon.CanAct(1)) + return + + if(!CanHitTarget(tpos)) + return + + CurrentWeapon.Ammo = CurrentWeapon.AmmoPerMagazine + CurrentWeapon.Action(1, tpos) + + fAttackTimer = frand(MinAttackDelay[iAttackType], MaxAttackDelay[iAttackType]) + return + } + + if(!bShooting || Attacker == NULL) + { +#ifdef DEVELOPER + NoShootReason = "!bShooting || Attacker == NULL" +#endif + return + } + + //zpomaleni reakce + vector zz = Attacker.GetCenterOfBody() + float fd = 0.05 * (1 + ftime) + ShootPos = zz - ShootPos * fd + ShootPos + + if(CurrentWeapon.NumActions >= 2 && NeedReload()) + { + if(!CurrentWeapon.CanAct(2)) + { +#ifdef DEVELOPER + NoShootReason = "!CurrentWeapon.CanAct(2)" +#endif + return + } + + ReloadGun() +#ifdef DEVELOPER + NoShootReason = "ReloadGun()" +#endif + return + } + + //delay between attacks + if(fAttackTimer) + { + fAttackTimer -= ftime + if(fAttackTimer > 0) ////FIXME: SOMETIMES it's >0 forever!!!! + { +#ifdef DEVELOPER + NoShootReason = "fAttackTimer > 0" +#endif + return + } + } + + bool always = false + + if(atype == t_run_fb || atype == t_run_fl || atype == t_run_fr) + { + always = true + } + + //we are taking rest + if(fRestTimer) + { + fRestTimer -= ftime * 1.9 + if(fRestTimer > 0) + { +#ifdef DEVELOPER + NoShootReason = "fRestTimer > 0" +#endif + return + } + + fRestTimer = 0 + } + + if(iAttackCounter) + { + + if(!CurrentWeapon.CanAct(1)) + { +#ifdef DEVELOPER + NoShootReason = "!CurrentWeapon.CanAct(1)" +#endif + return + } + + if(!IsAiming()) + { +#ifdef DEVELOPER + NoShootReason = "!IsAiming()" +#endif + return + } + + //very rough approximation + if(!always && !CanHitTarget(zz)) + { +#ifdef DEVELOPER + NoShootReason = "!CanHitTarget(shootpos)" +#endif + return + } + + CreatureClass ccz = TestShoot(Attacker, zz) + + if(ccz == Attacker) + { + LastLOFTime = currenttime + NotInLOFTime = 0 + goto shoot + } + + //get rid of this fucking railing +/* + if(ccz.ClassType == ClassTypeMiscModel) + { + misc_model mm = ccz + + if(mm.railing) + { + NotInLOFTime = 0 //FIXME: that's bad! We cannot guarantee that Attacker will be shot! + goto shoot + } + } +*/ + +#ifdef DEVELOPER + NoShootReason = "ccz != Attacker | " + ClassName(ccz) + " != " + ClassName(Attacker) +#endif + + NotInLOFTime += 0.1 + //fAttackTimer = 0.1 //don't test it every frame + + //we don't want to see flames going thru geometry, or rockets exploding at shooter + if(bNoLOFLatency) + return + + if(NotInLOFTime >= 0.6) //some latency + return + + //it's long time we hit something + float td = currenttime - LastLOFTime + if(td > MaxAttackDelay[0] * 2.0) + return + +shoot:; + + SetAttackerLKP(Attacker.CurrentPos) + +#ifdef DEVELOPER + NoShootReason = "Shot!" +#endif + + shootpos[0] = ShootPos[0] + shootpos[1] = ShootPos[1] + + if(always) + { + //this kind is very rough. Shoot somewhere between exact position and projected barell of the gun + vector fvec = shootpos - GetMatrix(CurrentWeapon, 3) + float l = VectorLength(fvec) + + fvec = GetMatrix(CurrentWeapon, 1) * l + fvec = fvec + GetMatrix(CurrentWeapon, 3) + fvec[2] = shootpos[2] + + shootpos = shootpos + fvec * 0.5004 +//AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, GetMatrix(CurrentWeapon, 3), shootpos) + } + + CurrentWeapon.Action(1, shootpos) + + if(!always) + iAttackCounter-- + + if(iAttackCounter == 0) + { + iAttackCounter = rand(MinAttacksInRow[iAttackType], MaxAttacksInRow[iAttackType]) + fRestTimer = frand(MinRestAfterAttack[iAttackType], MaxRestAfterAttack[iAttackType]) + } + else + fAttackTimer = frand(MinAttackDelay[iAttackType], MaxAttackDelay[iAttackType]) + } +} + +//----------------------------------------------------------------- +int AIIdle(local ExtClass target, local int itype = it_default, local float wakedist = 0) +{ + SetAnimState(t_idle) + local float ft = 350 + local int prevs = status + local int res = 0 + + ResetTurn() + while(RestTime != 0 && IsState(prevs)) + { + if(ShowAI) + SetWidgetText(WAI, 4, "AIIdle " + ftoa(RestTime)) + + if(target && wakedist > 0) + { + if(Distance(target) < wakedist) + { + res = 1 + goto getout + } + } + + AISleep(AI_SLOWREFRESH) + ft += AI_SLOWREFRESH + + if(ft >= frand(250, 350)) + { + if(ShowAI) + SetWidgetText(WAI, 4, "AIIdle " + ftoa(RestTime) + " IdleVar") + + ft = 0 + + int anim = -1 + + switch(itype) + { + case it_default: + if(astate == s_combat && NumCombatIdleVarAnims) + anim = a_combat_idle_var + rand(0, NumCombatIdleVarAnims) + else + { + if(astate == s_alert && NumAlertIdleVarAnims) + anim = a_alert_idle_var + rand(0, NumAlertIdleVarAnims) + else + { + if(NumRelaxIdleVarAnims) + anim = a_relax_idle_var + rand(0, NumRelaxIdleVarAnims) + } + } + break + + case it_fight: + //anim = a_fight_idle_var + rand(0, NumFightIdleAnims) + break + + case it_lost: + if(NumLostIdleAnims) + anim = a_lost_idle_var + rand(0, NumLostIdleAnims) + break + } + + if(anim >= 0) + PlayAnimWait(s_idlevar, anim, 10.0, g_all, 30, AF_ONCE) + } + + if(target) + { + ft += TurnByAnim(target, 50) + } + } + +getout: + if(ShowAI) + SetWidgetText(WAI, 4, "") + + return res +} + +//----------------------------------------------------------------- +bool IsKilled(int newstat = 0) +{ + if(Attacker.status >= STATE_DIE) + { + AttackStatus = 0 + + if(newstat) + SwitchFSM(newstat) + return true + } + + return false +} + +//----------------------------------------------------------------- +bool DoFastMove() +{ + if(WPathContainJumps) + return true + + if(VectorLengthSq(CurrentPos - AttackerLKP) < 229 * 229) + return true + + return false +} + +//----------------------------------------------------------------- +//2 - back +//0 - front +//1 - right +//3 - left +//----------------------------------------------------------------- +int TargetQuadrant(float angle, ExtClass target, int pq = -1) +{ + float dyaw = Vector2Yaw(GetMatrix(target, 3) - CurrentPos) + + float fa = FixAngle(angle - dyaw + 45) + int nq = fa / 90 & 3 + + //when quadrant just changed, use some delta to avoid + //oscillations on borders + if(pq != -1 && nq != pq) + { + switch(pq) + { + case 0: + if(fa <= 100 && fa >= 0 || fa > 350) + return pq + break + + case 1: + if(fa <= 190 && fa >= 80) + return pq + break + + case 2: + if(fa <= 280 && fa >= 170) + return pq + break + + case 3: + if(fa >= 260 && fa <= 360 || fa <= 10) + return pq + break + } + } + + return nq +} + +//----------------------------------------------------------------- +void LRNextSP(local info_waypoint wp) +{ + AttackStatus = 2 + + UseWaypoint(wp) + + local bool fastmove = false + local float movetime + + if(!bAngledWalk) + movetime = FLT_MAX //never change it + else + movetime = currenttime + 16.0 //next time to test fast/slow condition + + if(!bAngledWalk || WPath.Length() > 460) //>16metru - vzdy rychle + { + TurnByAnim(wp, 90) + fastmove = true + movetime = FLT_MAX + } + else + { + if(DoFastMove()) + { + fastmove = true + movetime = currenttime + 19.5 + } + } + + local int anm = t_run + local int quad = -1 + SetAnimState(anm) + + float d + + while(IsState(STATE_LR_ATTACK)) + { + int res = UpdatePath(anm) + + if(res == PATH_FINISHED) + { + return + } + + if(!IsState(STATE_LR_ATTACK)) + return + + if(res != PATH_OK) + { + //it's dangerous. It could put us into infinite loop LRAttack->LRNextSP->Guard->LRAttack!!! + //SwitchFSM(STATE_GUARD) + return + } + + if(bShortRange) //prepni na shortrange + { + float dist = AttackerDistance() + if(dist < AttackDistMin && StateAge(STATE_CHASE) > 4) + { + CPosition warea = GetWPos() + if(IsConnected(warea, Attacker.GetWPos())) + { + if(TryFindPath(Attacker) == PATH_OK) + { + BeginPath(Attacker, true, true) + SwitchFSM(STATE_CHASE) + return + } + } + } + } + + if(!WaitForDoors) + { + if(currenttime > movetime) + { + //TODO: don't change it quite at end of way + fastmove = DoFastMove() + movetime = currenttime + 6 + } + + if(fastmove) + { + if(bCanShootInTakeCover) + { + quad = TargetQuadrant(Vector2Yaw(WVector), Attacker, quad) + anm = AnimRunFire[quad] + } + else + { + quad = -1 + anm = t_run + } + } + else + { + quad = TargetQuadrant(Vector2Yaw(WVector), Attacker, quad) + anm = AnimWalkFire[quad] + } + + //changed anim + if(anm == t_run) + { + vector v = AttackerLKP - CurrentPos + v[2] = 0 + VectorNormalize(v) + float dot = v * facevec + + if(dot > 0.7) + anm = t_run_aim + } + + SetAnimState(anm) + } + + AISleep(AI_REFRESH) + } +} + +//----------------------------------------------------------------- +bool CanUseForCrouch(info_waypoint wp, float fov) +{ + if(!bCanCrouch) + return false + + if(wp != NULL && wp.flags & 16) + { + AttackerDistance() + + float dot = wp.facevec * DistanceVector + + if(fov != 0) + { + if(dot < fov) + return false + } + else + { + if(dot < wp.coverfov) + return false + } + return true + } + + return false +} + +//----------------------------------------------------------------- +bool CanUseForLean(info_waypoint wp, float fov) +{ + if(!bCanLean) + return false + + if(wp == NULL) + return false + + if(!wp.flags & 12) + return false + + AttackerDistance() + + float dot = wp.facevec * DistanceVector + + if(fov != 0) + { + if(dot < fov) + return false + } + else + { + if(dot < wp.coverfov) + return false + } + + return true +} + +//----------------------------------------------------------------- +//is this waypoint still valid? +bool IsCurrentWPValid(bool cover) +{ + float d = AttackerDistance() + +if(ClassName(CurrentWP) != "info_waypoint") +{ + DPrint("WTF? " + ClassName(CurrentWP)) +} + + if(CurrentWP.enemyradius && CurrentWP.enemyradius > d) + { + return false + } + + d = DistanceVector * CurrentWP.facevec + if(CurrentWP.enemyfov && d < CurrentWP.enemyfov) + { + return false + } + + if(cover && d < CurrentWP.coverfov) + { + return false + } + + return true +} + +//----------------------------------------------------------------- +bool WPTimedOut() +{ + if(Tactics != TACTICS_COVERCOMBAT && Tactics != TACTICS_COVER && fShootpointTimeout > 0) + { + if(OnWPTime > fShootpointTimeout) + { + return true + } + } + + if(Tactics == TACTICS_BERSERK || Tactics == TACTICS_COMBAT || Tactics == TACTICS_GUARDCOMBAT && fNotInLOFTimeout > 0) + { + if(NotInLOFTime > fNotInLOFTimeout) + { + return true + } + } + + return false +} + +float LastGrenadeTime +float LastTestGrenadeTime +ShotStorage GrenadeShotStor +ProjectileTachyonGrenade grenade +int GrenadeHand +vector GrenadeTarget + +//----------------------------------------------------------------- +//animhooks +void GrenadeGrap() +{ + grenade = new ProjectileTachyonGrenade(1) + Throw(grenade, World, EV_INIT, 0) + + if(GrenadeHand == 1) + AddChild(this, grenade, p_rhand2) + else + AddChild(this, grenade, p_lhand) +} + +//----------------------------------------------------------------- +void GrenadeThrow() +{ + vector mat[4] + GetMatrix4(grenade, mat) + + RemoveChild(this, grenade) + + GrenadeShotStor.from = mat[3] + GrenadeShotStor.to = GrenadeTarget + "0 0 30.4" + GrenadeShotStor.shooter = this + + grenade.SetTransform(mat) + + float speed = VectorLength(AttackerLKP - CurrentPos) * 4.3 + clamp speed<660, 3790> + + grenade.speed = speed + grenade.Fire(GrenadeShotStor) + grenade = NULL +} + +//----------------------------------------------------------------- +void ThrowGrenade2(int type, bool incrouch) +{ + LastGrenadeTime = currenttime * 0.5 + + local bool prevshoot = bShooting + + ShootOff() + const int baseanim[2] = {a_combat_grenade, a_combat_grenade_crouch} + + int anm = baseanim[incrouch] + type + + PlayAnimWait(s_custom, anm, 10.0, g_all, 45, AF_ONCE|AF_BLENDOUT, true) + + if(prevshoot) + ShootOn(0) +} + +//----------------------------------------------------------------- +bool TestGrenadeLOF(vector from, vector altoffset) +{ + int flags = ClearFlags(Attacker, TFL_SOLID) + + GrenadeTarget = AttackerLKP + + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from, AttackerLKP) + + bool res = P2PVisibilityEx(from, AttackerLKP, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL) + + if(res == false && altoffset != ZeroVec) + { + res = P2PVisibilityEx(from, AttackerLKP + altoffset, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL) + + if(res) + GrenadeTarget = AttackerLKP + altoffset + } + + SetFlags(Attacker, flags) + return res +} + +//----------------------------------------------------------------- +bool ThrowGrenade(info_waypoint wp, int mask, bool incrouch) +{ + //bad waypoint, or just reloading gun + if(CurrentWP == NULL || !CurrentWP.flags & 128|256|512 || CurrentWeapon.Action == 2) + return false + + //too early + float diff = currenttime - (LastGrenadeTime / 2) + + if(diff < MIN_GRENADE_PERIOD) + return false + + LastTestGrenadeTime = currenttime + 0.1 + + float sq = VectorLengthSq(AttackerLKP - CurrentPos) + + //too far, or close + if(sq < MIN_GRENADE_DIST * MIN_GRENADE_DIST || sq > MAX_GRENADE_DIST * MAX_GRENADE_DIST) + { + return false + } + + vector dvec = AttackerLKP - CurrentPos + dvec[2] = 0 + VectorNormalize(dvec) + + //is on opposite direction + float dot = dvec * CurrentWP.facevec + if(dot < 0) + return false + + //don't test it too often + if(currenttime < LastTestGrenadeTime) + return false + + vector fr = HHVec + wp.floor + + //muzeme hazet zprava/zleva + if(wp.flags & 256|512) + { + float side = GetSide(AttackerLKP, CurrentPos, CurrentWP.facevec) + + if(fabs(dvec * CurrentWP.facevec) < 0.987 || !wp.flags & 128) + { + if(side < 0) + { + if(wp.flags & 256) + { + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, wp.rightvec * -32.0 + fr, AttackerLKP) + //test LOF + if(TestGrenadeLOF(wp.rightvec * -32.0 + fr, wp.rightvec * -32.0)) + { + GrenadeHand = -1 + ThrowGrenade2(1, incrouch) + return true + } + } + } + else + { + if(wp.flags & 512) + { + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, wp.rightvec * 32.0 + fr, AttackerLKP) + //test LOF + if(TestGrenadeLOF(wp.rightvec * 32.0 + fr, wp.rightvec * 32.0)) + { + GrenadeHand = 1 + ThrowGrenade2(2, incrouch) + return true + } + } + } + } + } + + if(wp.flags & 128) + { +//AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, wp.floor + "0 0 48", AttackerLKP) + //test LOF + if(TestGrenadeLOF(fr + "0 0 32", ZeroVec)) + { + //hazime horem + GrenadeHand = 1 + ThrowGrenade2(0, incrouch) + return true + } + } + + return false +} + +//----------------------------------------------------------------- +bool LRLeanIdle() +{ + if(!CurrentWP.flags & 12) + { + //Shouldn't happen + return true + } + + ResetTurn() + SetAnimState(t_idle) + ShootOff() + + while(IsState(STATE_LR_ATTACK)) + { + if(WPTimedOut()) + { + //don't leave waypoint when out of ammo + if(NeedReload(3)) + { + ReloadGun() + Wait(CurrentWeapon.Action == 0) + } + return true + } + + if(!IsCurrentWPValid(true)) + return true + + //DistanceVector is set by IsCurrentWPValid call + SetOrigin(TempWaypoint, DistanceVector * 64.0 + CurrentPos) + TurnByAnim(TempWaypoint, 0) + + if(!IsState(STATE_LR_ATTACK)) + return true + + if(!CanUseForLean(CurrentWP, 0)) + return true + + if(bCanThrowGrenade && ThrowGrenade(CurrentWP, 128|256|512, true)) + { + goto done + } + + //we can reload now. Try it + if(CurrentWeapon.NumActions >= 2 && NeedReload(1)) + { + Wait(CurrentWeapon.CanAct(2)) + + if(!IsState(STATE_LR_ATTACK)) + return true + + //may changed meanwhile + if(NeedReload(1)) + { + ReloadGun() + } + } + + local int anm + //which way we can lean? + int lf = CurrentWP.flags & 12 + + if(lf == 12) + { + //check how old is LKP and decide accordingly + float lkpt = currenttime - AttackerLKPTime + if(lkpt > 970) + { + //it's a long time we saw attacker + if(rand(0, 100) > 50) + anm = a_combat_llean + else + anm = a_combat_rlean + } + else + { + //find out which way we have to lean + if(GetSide(AttackerLKP, CurrentPos, CurrentWP.facevec) < 0) + { + anm = a_combat_llean + } + else + { + anm = a_combat_rlean + } + } + } + else + { + if(lf & 4) //left + anm = a_combat_llean + else + anm = a_combat_rlean + } + + PlayAnimWait(s_custom, anm, 10.0, g_all, 30, AF_ONCE, true) + PlayAnim(s_custom, anm + 1, 0.0, g_all, 30, 0) + ShootOn(0) + + for(local float wn = 0; wn < fLeanShootTime; wn += AI_SLOWREFRESH) + { + if(!IsCurrentWPValid(true)) + break + + AISleep(AI_SLOWREFRESH) + + if(NeedReload(3)) + wn = fLeanShootTime + } + + ShootOff() + PlayAnimWait(s_custom, anm + 2, 10.0, g_all, 30, AF_ONCE|AF_BLENDOUT, true) + + if(wn != fLeanShootTime) + return true + +done:; + //we can reload now. Try it + if(CurrentWeapon.NumActions >= 2 && NeedReload(1)) + { + Wait(CurrentWeapon.CanAct(2)) + + if(!IsState(STATE_LR_ATTACK)) + return true + + //may changed meanwhile + if(NeedReload(1)) + { + ReloadGun() + } + } + + for(wn = 0; wn < 200; wn += AI_SLOWREFRESH) + { + if(!IsCurrentWPValid(true)) + return true + + AISleep(AI_SLOWREFRESH) + } + } + return false +} + +//----------------------------------------------------------------- +bool IsCrouchWPValid() +{ + float adist = AttackerDistance() + if(CurrentWP == NULL) + { + //only criteria is distance and TODO: trace + if(adist < AttackDistMin) + return false + } + else + { + if(!IsCurrentWPValid(true)) + return false + } + + return true +} + +//----------------------------------------------------------------- +bool LRCrouchIdle() +{ + ResetTurn() + SetAnimState(t_idle) + ShootOff() + + int res + local bool down = true + local float wn + //do crouch + PlayAnimWait(s_custom, a_crouch + 1, 10.0, g_all, 30, AF_ONCE, true) + + //crouch-idle + PlayAnim(s_custom, a_crouch + 0, 10.0, g_all, 30, 0) + + local float maxwait + + while(IsState(STATE_LR_ATTACK)) + { + if(WPTimedOut()) + { + //don't leave waypoint when out of ammo + if(NeedReload(3)) + { + ReloadGun() + Wait(CurrentWeapon.Action == 0) + } + + res = true + goto getout + } + + if(bCanFireInCrouch) + maxwait = frand(90, 105) + else + maxwait = frand(180, 215) + + for(wn = 0; wn < maxwait; wn += AI_SLOWREFRESH) + { + if(!IsState(STATE_LR_ATTACK)) + { + res = false + goto getout + } + + if(!IsCrouchWPValid()) + { + res = true + goto getout + } + + AISleep(AI_SLOWREFRESH) + } + + TurnToTarget(AttackerLKP, 60) + + if(CurrentWP && !CanUseForCrouch(CurrentWP, 0)) + { + res = true + goto getout + } + + //we can reload now. Try it + if(CurrentWeapon.NumActions >= 2 && NeedReload(1)) + { + Wait(CurrentWeapon.CanAct(2)) + + if(!IsState(STATE_LR_ATTACK)) + { + res = false + goto getout + } + + //may changed meanwhile + if(NeedReload(1)) + { + ReloadGun() + } + } + + if(bCanThrowGrenadeInCrouch && ThrowGrenade(CurrentWP, 128|256|512, true)) + { + goto done + } + + if(!bCanFireInCrouch || frand(0, 100) > 95) + { + //stand up + down = false + + PlayAnimWait(s_custom, a_crouch + 2, 10.0, g_all, 30, AF_ONCE|AF_BLENDOUT, true) + + ShootOn(0) + + for(wn = 0; wn < fCrouchShootTime; wn += AI_SLOWREFRESH) + { + if(!IsState(STATE_LR_ATTACK)) + { + res = false + goto getout + } + + if(!IsCrouchWPValid()) + { + res = true + goto getout + } + + AISleep(AI_SLOWREFRESH) + + if(NeedReload(2)) + break + } + + //crouch down + down = true + PlayAnimWait(s_custom, a_crouch + 1, 10.0, g_all, 30, AF_ONCE, true) + } + else + { + //ShootOn is in animhook + //ShootOn(0) + PlayAnimWait(s_custom, a_crouch_fire + rand(0, 2), 10.0, g_all, 30, AF_ONCE|AF_BLENDOUT, true) + } + + ShootOff() +done:; + PlayAnim(s_custom, a_crouch + 0, 10.0, g_all, 30, 0) + + //we can reload now. Try it + if(CurrentWeapon.NumActions >= 2 && NeedReload(1)) + { + Wait(CurrentWeapon.CanAct(2)) + + if(!IsState(STATE_LR_ATTACK)) + { + res = false + goto getout + } + + //may changed meanwhile + if(NeedReload(1)) + { + ReloadGun() + } + } + } + res = false + +getout:; + + if(down) + PlayAnimWait(s_custom, a_crouch + 2, 10.0, g_all, 30, AF_ONCE|AF_BLENDOUT, true) + + //pro jistotu + SetAnimSlot(this, s_custom, VNULL, 10.0, 10.0, NULL, 0, 0) + + return res +} + +//----------------------------------------------------------------- +void PlayGesture(int anm, int group) +{ + //should *NOT* happen! + if(!ASet.Anims[anm]) + return + + PlayAnim(s_idlevar, anm, 20.0, group, 30, AF_ONCE|AF_BLENDOUT|AF_NOANIMEND) +} + +//----------------------------------------------------------------- +void DoGesture(AICreatureClass other, ExtClass target) +{ + //in which direction we have to confirm command? + if(ASet.Anims[a_act_look_left]) + { + if(GetSide(other.CurrentPos, CurrentPos, GetLookVector()) < 0) + PlayGesture(a_act_look_left, g_confirmgesture) + else + PlayGesture(a_act_look_right, g_confirmgesture) + } + + //which way is other actor pointing? + const int anims[4] = {a_act_forward_go, a_act_right_go, a_act_back_go, a_act_left_go} + other.PlayGesture(anims[other.TargetQuadrant(other.faceyaw, this)], g_gesture) +} + +//----------------------------------------------------------------- +bool LRAttack() +{ + SetAnimState(t_idle) + + OnWPTime = 0 + WPIsNotValid = false + local float shoottime = rand(MinAttacksInRow[0], MaxAttacksInRow[0]) * frand(MinAttackDelay[0], MaxAttackDelay[0]) + Attacker.AddAttacker(this) + while(true) + { + if(!IsState(STATE_LR_ATTACK)) + return false + + AttackStatus = 1 + + float dist = AttackerDistance() + + if(Tactics == TACTICS_COVERCOMBAT && dist < 376 && CurrentWP == NULL) + { + //make them coward little bit + goto nextwp + } + + if(WPIsNotValid) + goto nextwp + + if(CurrentWP && !IsCurrentWPValid(false)) + goto nextwp + + if(WPTimedOut()) + goto nextwp + + //We're too near to Attacker + if(dist < AttackDistMin) + { + if(bShortRange && StateAge(STATE_CHASE) > 2) //prepni na shortrange + { + CPosition warea = GetWPos() + if(IsConnected(warea, Attacker.GetWPos())) + { + if(TryFindPath(Attacker) == PATH_OK) + { + BeginPath(Attacker, true, true) + SwitchFSM(STATE_CHASE) + return false + } + } + } +nextwp:; + //FIXME: HUH??? We used LKP as 'from' parameter? WHY? +// info_waypoint wp = FindWaypoint(CurrentWP, AttackerLKP, AttackDistMin, 512, 2, Attacker) + info_waypoint wp = FindWaypoint(CurrentWP, CurrentPos, AttackDistMin, fMaxRange, 2, Attacker) + + if(wp != NULL) + { + if(!IsLastMan()) + Say(ST_CHANGINGWP) + + //try to embroider it by some gestures + if(Squad && bCanConfirmGesture) + { + CreatureClass other = Squad.FindCommander(this, wp) + + if(other) + { + DoGesture(other, wp) + } + } + + //it's the time for another shooting point + LRNextSP(wp) + SetAnimState(t_idle) + + if(!IsState(STATE_LR_ATTACK)) + return false + } + else + { + AISleep(frand(MinAttackDelay[iAttackType], MaxAttackDelay[iAttackType])) //at least time for shoot repeat + } + + WPIsNotValid = false + OnWPTime = 0 + } + + if(ShowAI) + SetWidgetText(WAI, 3, "dist:" + ftoa(dist) + " OnWPTime:" + ftoa(OnWPTime)) + + //turn to attacker if we need that + TurnByAnim(Attacker, 50) + if(!IsState(STATE_LR_ATTACK)) + return false + + AISleep(AI_REFRESH) + if(!IsState(STATE_LR_ATTACK)) + return false + + shoottime -= AI_REFRESH + + if(shoottime > 0) + continue + + shoottime = rand(MinAttacksInRow[0], MaxAttacksInRow[0]) * frand(MinAttackDelay[0], MaxAttackDelay[0]) + + //can be used for leaning? + if(CanUseForLean(CurrentWP, 0.5)) + { + if(!LRLeanIdle()) + return false + + ShootOn(0, false) + + WPIsNotValid = true //get out of here! + } + else + { + //AICreatureClass cc = TestShoot(Attacker, Attacker.GetCenterOfBody()) + + //can we crouch here? + //if(cc == Attacker && CanUseForCrouch(CurrentWP, 0.5)) + if(CanUseForCrouch(CurrentWP, 0.5) && TestShoot(Attacker, Attacker.GetCenterOfBody()) == Attacker) + { + if(!LRCrouchIdle()) + return false + + ShootOn(0, false) + WPIsNotValid = true //get out of here! + } + else + { + //hacked in as Boss is too lethal! + if(Tactics == TACTICS_BERSERK) + RestTime = frand(1.0, 2.0) + else + RestTime = frand(0.1, 0.2) + + //we can reload now. Try it + if(CurrentWeapon.NumActions >= 2 && NeedReload(1)) + { + local bool sh = bShooting + + bShooting = false + + Wait(CurrentWeapon.CanAct(2)) + + if(!IsState(STATE_LR_ATTACK)) + return false + + //may changed meanwhile + if(NeedReload(1)) + { + ReloadGun() + } + bShooting = sh + } + + AIIdle(Attacker, it_fight, AttackDistMin) + + if(bCanThrowGrenade) + ThrowGrenade(CurrentWP, 128|256|512, false) + } + } + + if(!IsState(STATE_LR_ATTACK)) + return false + + if(IsKilled(STATE_RETURN)) + return false + + AISleep(AI_REFRESH) //avoid deadlock + } + + return true +} + +//----------------------------------------------------------------- +void AILongRangeAttack() +{ + SetState(s_combat) + AttackStatus = 1 + + ShootOn(0, true) + AISleep(AI_REFRESH) + + LRAttack() + + ShootOff() +} + +//----------------------------------------------------------------- +void AICloseCombat() +{ + ShootOff() + + while(IsState(STATE_CLOSECOMBAT)) + { + TurnByAnim(Attacker, 5) + PlayAnimWait(s_weapon, a_combat_closecombat + rand(0, NumCloseCombatAnims), 10.0, g_all, 50, AF_BLENDOUT|AF_ONCE, true) + + if(DistanceBetween(Attacker) > DISTANCE_TO_CLOSECOMBAT - 16) + break + + AISleep(AI_REFRESH) + } + + if(IsState(STATE_CLOSECOMBAT)) + SwitchFSM(STATE_LR_ATTACK) +} + +//----------------------------------------------------------------- +void AIChase() +{ + Attacker.AddAttacker(this) + SetState(s_combat) + + SetAnimState(t_run) + local bool stand = false + + while(IsState(STATE_CHASE)) + { + AISleep(AI_REFRESH) + + if(Attacker.status >= STATE_DIE) + { + ShootOff() + AIKillEvents() + SwitchFSM(STATE_RETURN) + return + } + + local float enemydist = AttackerDistance() + + if(!stand) + { + int res + + if(enemydist < 190) + res = UpdatePath(t_run, 5.0, false) + else + res = UpdatePath(t_run, 6.5, false) + + if(res != PATH_OK && res != PATH_FINISHED) + { + //Print("beginlosttarget") + ShootOff() + BeginLostTarget(Attacker) + return + } + + CPosition area + + area = GetWPos() + + if(!IsConnected(Attacker.GetWPos(), area)) + { + ShootOff() + BeginLostTarget(Attacker) + return + } + } + + enemydist = AttackerDistance() + + if(enemydist > AttackDist) + { + ShootOff() + SwitchFSM(STATE_GUARD) + return + } + + if(bLongRange && enemydist > AttackDistMin) //prepni na longrange + { + ShootOff() + SwitchFSM(STATE_LR_ATTACK) + return + } + + if(stand) + { + //some hysteresis, to avoid oscilation + if(enemydist > AttackDistClose + 22 || !CheckDirectPath(Attacker)) + { + SetAnimState(t_run) + stand = false + } + else + { + if(CurrentWeapon.Action && ASet.Anims[a_combat_idle_fire]) + SetAnimState(t_idle_fire) + else + SetAnimState(t_idle) + + TurnByAnim(Attacker, 30) + } + } + else + { + if(enemydist <= AttackDistMin) + { + if(!bShooting) + ShootOn(0, true) + + if(enemydist <= AttackDistClose && CheckDirectPath(Attacker)) + { + SetAnimState(t_idle) + stand = true + ResetTurn() + } + } + else + { + if(bShooting) + ShootOff() + } + } + } + ShootOff() +} + +//----------------------------------------------------------------- +void AIFirstSight() +{ + if(bHasSpotAnim) + { + if(Distance(Attacker) > 64) + PlayAnimWait(s_custom, a_spot_idle_var + 2, 10.0, g_all, 45, AF_ONCE|AF_BLENDOUT) + } + + SetState(s_combat) + SetAnimState(t_idle) + TurnByAnim(Attacker, 30) + + if(bLongRange) + SwitchFSM(STATE_LR_ATTACK) + else + SwitchFSM(STATE_CHASE) +} + +//----------------------------------------------------------------- +void AIReturn() +{ + SetState(s_relaxed) + + if(OriginWaypoint.GetWPos() == NULL || Distance(OriginWaypoint) < 32) + { + SetAnimState(t_idle) + SwitchFSM(STATE_GUARD) + return + } + + SetAnimState(t_walk) + + if(BeginPath(OriginWaypoint, false, true) != PATH_OK) + { + SetAnimState(t_idle) + SwitchFSM(STATE_GUARD) + return + } + + while(IsState(STATE_RETURN)) + { + int res = UpdatePath(t_walk) + + if(!IsState(STATE_RETURN)) + return + + if(res == PATH_FINISHED) + { + SetAnimState(t_idle) + SwitchFSM(STATE_GUARD) + return + } + + if(res != PATH_OK) + { + SetAnimState(t_idle) + SwitchFSM(STATE_GUARD) + return + } + + AISleep(AI_REFRESH) + } +} + +//----------------------------------------------------------------- +void AIObserve() +{ + local int wtime = 0 + + SetState(s_alert) + //nebudem popobihat kvuli malym vzdalenostem + if(Distance(TempWaypoint) < 96) + { + //muzeme se ohlednout + if(ASet.Anims[a_spot_idle_var]) + { + float dot = DistanceVector * facevec + + if(dot < 0.5 && dot > -0.5) + { + int side = 1 + if(GetSide(GetOrigin(TempWaypoint), CurrentPos, facevec) < 0) + side = 0 + + PlayAnimWait(s_custom, a_spot_idle_var + side, 20.0, g_all, 15, AF_ONCE|AF_BLENDOUT) + + if(IsState(STATE_OBSERVE)) + { + SetState(s_relaxed) + SetAnimState(t_idle) + SwitchFSM(STATE_RETURN) + } + return + } + } + + //musime se otocit + TurnByAnim(TempWaypoint, 15) + + AISleep(AI_REFRESH) + RestTime = frand(4, 6) + AIIdle(TempWaypoint, it_default) + if(IsState(STATE_OBSERVE)) + { + SetState(s_relaxed) + SetAnimState(t_idle) + SwitchFSM(STATE_RETURN) + } + return + } + + TurnByAnim(TempWaypoint, 5) + + if(!IsState(STATE_OBSERVE)) + return + + if(BeginPath(TempWaypoint, false, false, 2.0) != PATH_OK) + { + //nemuzeme tam dojit, tak se aspon podivej + RestTime = frand(4.0, 6.0) + AIIdle(TempWaypoint, it_default) + if(IsState(STATE_OBSERVE)) + { + SetState(s_relaxed) + SetAnimState(t_idle) + SwitchFSM(STATE_RETURN) + } + return + } + + SetAnimState(t_walk) + + while(IsState(STATE_OBSERVE)) + { + int res = UpdatePath(t_walk) + + if(!IsState(STATE_OBSERVE)) + return + + //jsme tam + if(res == PATH_FINISHED) + { + SetAnimState(t_idle) + + RestTime = frand(4.0, 6.0) + AIIdle(TempWaypoint, it_default) + + if(!IsState(STATE_OBSERVE)) + return + + SetState(s_relaxed) + SwitchFSM(STATE_RETURN) + return + } + + if(res != PATH_OK) + { + SwitchFSM(STATE_GUARD) + return + } + + AISleep(AI_REFRESH) + } +} + +//----------------------------------------------------------------- +void AIGuard() +{ + if(GuardTarget == NULL || BeginPath(GuardTarget, false, false) != PATH_OK) + { + RestTime = 5.0 + AIIdle(GuardTarget, it_default) + return + } + + local int anm = t_walk + + SetAnimState(anm) +// SetState(s_relaxed) + + while(IsState(STATE_GUARD)) + { + //pokud nejsme relaxed, tak se po par vterinach automaticky uklidnime + if(astate != s_relaxed && StateAge(STATE_GUARD) > 4.0) + SetState(s_relaxed) + + int res = UpdatePath(anm) + + if(!IsState(STATE_GUARD)) + return + + if(res == PATH_FINISHED) + { + ArriveWP(CurrentWP) + if(!IsState(STATE_GUARD)) + return + + local ExtClass next = FindClass(GuardTarget.link) + + if(next) + { + TurnByAnim(next, 15) + + while(true) + { + if(!IsState(STATE_GUARD)) + return + + if(BeginPath(next, false) != PATH_OK) + { + RestTime = 5.0 + AIIdle(GuardTarget, it_default) + continue + } + + GuardTarget = next + break + } + AISleep(AI_REFRESH) + continue + } + else + { + RestTime = -1 + AIIdle(GuardTarget, it_default) + return + } + } + else + { + if(res != PATH_OK) + { + RestTime = 5.0 + AIIdle(GuardTarget, it_default) + return + } + } + + + AISleep(AI_REFRESH) + } +} + +//----------------------------------------------------------------- +void AILostTarget() +{ + local info_waypoint wp + + SetState(s_combat) + + wp = NULL + + ShootOn(0) + while(IsState(STATE_LOST_TARGET)) + { + RestTime = frand(3.0, 6.0) + AIIdle(LostTarget, it_lost, 0) + + wp = FindWaypoint(wp, GetOrigin(LostTarget), 0, 256, 0, LostTarget) + + if(wp == NULL) + continue + + SetAnimState(t_run) + while(IsState(STATE_LOST_TARGET)) + { + int res = UpdatePath(t_run) + + if(res == PATH_FINISHED) + { + /* + wp = FindClass(wp.link) + + if(wp && BeginPath(wp, false) == PATH_OK) + continue + */ + break + } + else + { + if(res != PATH_OK) + { + break + } + } + + AISleep(AI_REFRESH) + } + } + ShootOff() +} + +//----------------------------------------------------------------- +void AITakeCoverFromDanger() +{ + local int anm = t_run + SetState(s_combat) + SetAnimState(anm) + + local info_waypoint wp = FindWaypoint(CurrentWP, CurrentPos, 64, 512, 0, TempWaypoint, true) + + if(wp == NULL) + { + SetWP(TempWaypoint, CurrentPos) + GuardTarget = TempWaypoint + SwitchFSM(STATE_GUARD) + return + } + + while(IsState(STATE_COVERFROMDANGER)) + { + int res = UpdatePath(anm) + + if(!IsState(STATE_COVERFROMDANGER)) + goto getout + + if(res == PATH_FINISHED) + { + if(Attacker && Tactics == TACTICS_COMBAT || Attacker && Tactics == TACTICS_GUARDCOMBAT) + { + BeginCombatTarget(Attacker) + } + else + { + SetWP(TempWaypoint, CurrentPos) + GuardTarget = TempWaypoint + SwitchFSM(STATE_GUARD) + } + return + } + + if(res == PATH_NOT_FOUND) + { + SetWP(TempWaypoint, CurrentPos) + GuardTarget = TempWaypoint + SwitchFSM(STATE_GUARD) + } + + AISleep(AI_REFRESH) + } +getout: + SetAnimState(t_idle) +} +//----------------------------------------------------------------- +void AITakeCover() +{ + ShootOn(1, true) + + local info_waypoint wp, prev = NULL + + local int anm = t_run + SetState(s_combat) + SetAnimState(anm) + +again: + while(IsState(STATE_COVER)) + { + prev = wp + + wp = FindWaypoint(prev, CurrentPos, 8, 512, 1, Attacker) + + if(wp == NULL) + { + if(prev) + { + AISleep(AI_REFRESH) + goto again + } + + if(Tactics == TACTICS_COMBAT || Tactics == TACTICS_GUARDCOMBAT) + { + BeginCombatTarget(Attacker) + } + else + { + //Tactics = TACTICS_COVER + //Tactics = TACTICS_COVERCOMBAT + SwitchFSM(STATE_GUARD) + } + goto getout + } + + UseWaypoint(wp) + + local int quad = -1 + + while(wp) + { + int res = UpdatePath(anm) + + if(!IsState(STATE_COVER)) + goto getout + + if(res == PATH_FINISHED) + { + if(Tactics == TACTICS_COMBAT || Tactics == TACTICS_GUARDCOMBAT) + { +//goto again + BeginCombatTarget(Attacker) + } + else + { + SetWP(TempWaypoint, CurrentPos) + GuardTarget = TempWaypoint + SwitchFSM(STATE_GUARD) + } + goto getout + } + + if(res == PATH_NOT_FOUND) + { + goto again + } + + if(!WaitForDoors) + { + if(bCanShootInTakeCover) + { + quad = TargetQuadrant(Vector2Yaw(WVector), Attacker, quad) + anm = AnimRunFire[quad] + } + else + { + quad = -1 + anm = t_run + } + + SetAnimState(anm) + } + + AISleep(AI_REFRESH) + + if(!IsState(STATE_COVER)) + goto getout + } + + if(!IsState(STATE_COVER)) + goto getout + + AISleep(AI_REFRESH) + } + +getout: + ShootOff() + //UnuseWaypoints() //??? +} + +//----------------------------------------------------------------- +void AIRoaming() +{ + local info_waypoint wp = NULL + + SetState(s_relaxed) + while(IsState(STATE_ROAMING)) + { + wp = FindWaypoint(wp, CurrentPos, 32, 384, 0, NULL) + + if(wp == NULL) + { + AISleep(AI_REFRESH) + AIIdle(World.Player, it_default) + goto next + } + + UseWaypoint(wp) + + if(rand(0, 100) > 25) + SetAnimState(t_run) + else + SetAnimState(t_walk) + + while(wp) + { + if(UpdatePath(t_run) == PATH_FINISHED) + { + RestTime = frand(MinRoamIdleTime, MaxRoamIdleTime) + AIIdle(World.Player, it_default) + wp.used &= UsedOff + goto next + } + AISleep(AI_REFRESH) + + if(!IsState(STATE_ROAMING)) + goto getout + } + +next: + if(!IsState(STATE_ROAMING)) + goto getout + + AISleep(AI_REFRESH) + } + +getout: + if(wp) + wp.used &= UsedOff +} + +//----------------------------------------------------------------- +void AIScript() +{ + while(IsState(STATE_SCRIPT)) + { + switch(AICmd) + { + case AICMD_NONE: + if(!PopStack()) //periodically check stack for new commands + { + if(Tactics == TACTICS_IDLE) + { + DPrint(_name + " has ended with script-stack and his Tactics == Idle. Creature will freeze. It's probably a bug in in-game script") + } + + //HOTFIX: obcas se stane (mozna i chybou ingame skriptu), ze skonci command-stack + //a potvora zustane vytuhla v STATE_SCRIPT + if(Tactics != TACTICS_DUMMY) + { + SwitchFSM(STATE_GUARD) + return + } + } + break + + case AICMD_IDLE: + PopStack() + break + + case AICMD_WALK: + if(UpdatePath(t_walk) == PATH_FINISHED) + { + PopStack() + } + break + + case AICMD_RUN: + if(UpdatePath(t_run) == PATH_FINISHED) + { + PopStack() + } + break + + case AICMD_ANIM: + Wait(AICmd != AICMD_ANIM || status != STATE_SCRIPT) + break + + case AICMD_WSIGHT: + Wait(AICmd != AICMD_WSIGHT || status != STATE_SCRIPT) + break + + case AICMD_TURNBY: + SetOrigin(TempWaypoint, Yaw2Vector(Yaw(GetAngles(_TurnTarget))) * 64.0 + GetOrigin(_TurnTarget)) + TurnByAnim(TempWaypoint, 0) + PopStack() + break + + case AICMD_TURN: + if(_TurnTarget == CurrentWP) + { + DPrint("Using AICmd(Turn) to waypoint which we are on " + _name + " use turnby instead!") + } + else + { + TurnByAnim(_TurnTarget, 0) + } + PopStack() + break + } + + AISleep(AI_REFRESH) + } +} + +//----------------------------------------------------------------- +void ChangeAnim() +{ + if(ostate == astate && otype == atype && oextra == aextra) + return + +//Print(String(itoa(ostate) + " " + itoa(otype) + " " + itoa(oextra))) + MotionAnim = -1 + + float b1 = 20.0 + + if(atype == t_idle && otype != atype) + { + b1 = 40.0 + } + + ostate = astate + otype = atype + oextra = aextra + + int a1 = -1, gr1 = g_all, fps1 = 30, f1 = 0 + + switch(atype) + { + case t_bwalk: + WAddAngle = 180 + LAddAngle = 0 + break + + case t_brun: + WAddAngle = 180 + LAddAngle = 0 + break + + case t_lstrafe: + WAddAngle = -90 + LAddAngle = 0 + break + + case t_rstrafe: + WAddAngle = 90 + LAddAngle = 0 + break + + case t_run_fb: + WAddAngle = 0 + LAddAngle = -180 + break + + case t_run_fl: + WAddAngle = 0 + LAddAngle = 90 + break + + case t_run_fr: + WAddAngle = 0 + LAddAngle = -90 + break + + default: + WAddAngle = 0 + LAddAngle = 0 + break + } + + switch(astate) + { + case s_relaxed: + switch(atype) + { + case t_walk: + a1 = a_relax_walk + break + + case t_bwalk: + a1 = a_relax_bwalk + break + + case t_run: + a1 = a_relax_run + break + + case t_run_aim: + a1 = a_relax_run + break + + case t_brun: + a1 = a_relax_brun + break + + case t_idle: + a1 = a_relax_idle + rand(0, NumRelaxIdleAnims) + break + + case t_lstrafe: + a1 = a_relax_strafe + 0 + break + + case t_rstrafe: + a1 = a_relax_strafe + 1 + break + } + break + + case s_alert: + switch(atype) + { + case t_walk: + a1 = a_alert_walk + break + + case t_bwalk: + a1 = a_alert_bwalk + break + + case t_run: + a1 = a_alert_run + break + + case t_run_aim: + a1 = a_alert_run + break + + case t_brun: + a1 = a_relax_brun + break + + case t_idle: + a1 = a_alert_idle + rand(0, NumAlertIdleAnims) + break + + case t_lstrafe: + a1 = a_alert_strafe + 0 + break + + case t_rstrafe: + a1 = a_alert_strafe + 1 + break + } + break + + case s_combat: + switch(atype) + { + case t_walk: + a1 = a_combat_walk + break + + case t_bwalk: + a1 = a_alert_bwalk + break + + case t_run: + a1 = a_combat_run + break + + case t_run_aim: + a1 = a_combat_run_aim + break + + case t_brun: + a1 = a_combat_brun + break + + case t_idle_fire: + a1 = a_combat_idle_fire + break + + case t_idle: + a1 = a_combat_idle + rand(0, NumCombatIdleAnims) + break + + case t_lstrafe: + a1 = a_combat_strafe + 0 + break + + case t_rstrafe: + a1 = a_combat_strafe + 1 + break + + case t_run_fb: + a1 = a_combat_run_fire + 0 + if(!ASet.Anims[a1]) + { + a1 = a_combat_run + LAddAngle = 0 + } + break + + case t_run_fl: + a1 = a_combat_run_fire + 1 + if(!ASet.Anims[a1]) + { + a1 = a_combat_run + LAddAngle = 0 + } + break + + case t_run_fr: + a1 = a_combat_run_fire + 2 + if(!ASet.Anims[a1]) + { + a1 = a_combat_run + LAddAngle = 0 + } + break + } + } + + if(a1 >= 0) + { + MotionAnim = a1 + PlayAnim(s_walk, a1, b1, gr1, fps1, f1) + } + else + { + SetAnimSlot(this, s_walk, VNULL, b1, 0, NULL, 0, 0) + } +} + +//----------------------------------------------------------------- +void AIIdleState() +{ + RestTime = -1 + AIIdle(Attacker) +} +/* + void LookThread() + { + while(true) + { + LookAt(World.Player) + AISleep(1) + } + } +*/ +//----------------------------------------------------------------- + void FSMThread() + { + +// SetState(s_combat) +// SetAnimState(t_run) +// SetAnimState(t_run_fr) +/* + WVector = facevec + +CurrentWP = FindClass("wpg1") +Attacker = World.Player + + while(true) + { +AttackerLKP = GetOrigin(World.Player) - "0 0 16" + CurrentStateCount = StateCount + TurnByAnim(World.Player, 5) + AISleep(100) + + if(bCanThrowGrenade && ThrowGrenade(CurrentWP, 128|256|512, false)) + { + Attacker = World.Player + + } +*/ +/* + while(true) + { +// Attacker = World.Player +// OneAttack(1, 0) + + LookAt(World.Player) + AISleep(1) + } + return //haha +*/ +/* + if(_name == "test2") + PlayAnim(s_custom, a_crouch, 4, g_all, 30, 0) + + while(true) + { + if(_name == "test1") + { + DoGesture(FindClass("test2"), World.Player) + Sleep(200) + } + +// TurnByAnim(World.Player, 0) +// AISleep(100) + +// Attacker = World.Player +// OneAttack(1, 0) + + LookAt(World.Player) + AISleep(1) + } +*/ +/* + SwitchFSM(STATE_GUARD) + CurrentStateCount = StateCount + SetState(s_combat) + + thread LookThread() + + while(true) + { + TurnByAnim(World.Player, 0) + AISleep(300) + } +*/ + //AI state machine core + while(true) + { + AttackStatus = 0 +/* + local int prevstatus + int diff = StateCount - CurrentStateCount + if(diff > 1) + { + Print(String("FSM Error: one or more states lost on entity " + _name + ". New state is " + AIStatusNames[status] + ". Old state is " + AIStatusNames[prevstatus])) + } + prevstatus = status +*/ + CurrentStateCount = StateCount + + if(ShowAI) + SetWidgetText(WAI, 4, "") + + switch(status) + { + case STATE_ROAMING: + AIRoaming() + break + + case STATE_COVERFROMDANGER: + AITakeCoverFromDanger() + break + + case STATE_COVER: + AITakeCover() + break +/* + //utocime + case STATE_ATTACK: + AICloseAttack() + break +*/ + //close-hit + case STATE_CLOSECOMBAT: + AICloseCombat() + break + + //honime nepritele + case STATE_CHASE: + AIChase() + break + + case STATE_LR_ATTACK: + AILongRangeAttack() + break + + case STATE_1STSIGHT: + AIFirstSight() + break + + case STATE_LOST_TARGET: + AILostTarget() + break + + case STATE_RETURN: + AIReturn() + break + + case STATE_SCRIPT: + AIScript() + break + + case STATE_OBSERVE: + AIObserve() + break + + case STATE_GUARD: + AIGuard() + break + + case STATE_IDLE: + AIIdleState() + break + + default: + AISleep(AI_SLOWREFRESH) + break + } + } + } + +int Loged +//----------------------------------------------------------------- +void Login() +{ + Loged = true + KillThread(this, "FSMThread") + SetAnimState(t_idle) +} + +//----------------------------------------------------------------- +void Logoff() +{ + Loged = false + thread FSMThread() +} + +//----------------------------------------------------------------- +void CreateBody() +{ +} + +//----------------------------------------------------------------- +void Awake() +{ +#ifdef EDITOR + if(World.EditorActive == true) + return +#endif + + //shouldn't happen. But it does, ocassionaly :-( + if(CurrentWeapon == NULL || status >= STATE_DIE) + return + + int prev = status, tprev = Tactics + CreatureClass tgprev = Target + + flags &= 0xffffffff - FL_SUMMON_TRIGGER + flags |= FL_SEE|FL_HEAR|FL_FEEL + + CallMethods(this, OnActivate) + + SetEventMask(this, EV_TIMER | EV_VISIBLE | EV_INIT | EV_TOUCH | EV_FRAME | EV_ANIMEND | EV_SOUNDEND | EV_FLASHLIGHT) + + if(flags & FL_PUPPET) + return + + if(WalkWaypoint == NULL) + { + WalkWaypoint = new info_waypoint + WalkWaypoint._name = "@TempWalkWaypoint_" + _name + TempWaypoint = new info_waypoint + TempWaypoint._name = "@TempWaypoint_" + _name + OriginWaypoint = new info_waypoint + OriginWaypoint._name = "@OriginWaypoint_" + _name + + SetWP(OriginWaypoint, CurrentPos) + SetWP(TempWaypoint, CurrentPos) + SetWP(WalkWaypoint, CurrentPos) + } + + CreateBody() + dBodySetInertiaTensor(this, ZeroVec, ZeroVec) + dBodyActive(this, true, true) + SetFlags(this, TFL_SOLID) + dBodyInteractionLayer(this, ET_NPC) + dBodyCreatePhysXShadow(this, 1, true) + + ClearFlags(this, TFL_NOSHADOW) + ClearFlags(CurrentWeapon, TFL_NOSHADOW) + + //scripted + if(CmdStackPos || prev != status || tprev != Tactics || Target != tgprev) + { + if(status == 0) + { + //Shouldn't never happen. But it does occassionaly + + //if we cannot combat player, let's guard + SetWP(TempWaypoint, CurrentPos) + GuardTarget = TempWaypoint + SwitchFSM(STATE_GUARD) + } + + thread FSMThread() + return + } + + Attacker = World.Player + SetAttackerLKP(Attacker.CurrentPos) + + //thread Hack() + + if(flags & FL_PUPPET) + { + Tactics = TACTICS_IDLE + SwitchFSM(STATE_SCRIPT) + M_DisableSenses(this) + thread FSMThread() + return + } + + if(flags & FL_ROAM) + { + Tactics = TACTICS_ROAM + BeginRoam(FindClass(link)) + thread FSMThread() + return + } + +//TODO: get rid of this mess + if(flags & FL_GUARD) + { + GuardTarget = FindClass(link) + + if(GuardTarget == NULL) + GuardTarget = OriginWaypoint + + Tactics = TACTICS_GUARDCOMBAT + SwitchFSM(STATE_GUARD) + } + else + { + if(flags & FL_COMBAT) + { + //nasty cheating :-( + AIAddEvent(AIE_SAWENEMY, GetOrigin(World.Player), World.Player) //neccessary? + Tactics = TACTICS_COMBAT + + if(DoTactics(World.Player) == 0 || status == 0) //state should be set always. But it doesn't occassionaly + { + //if we cannot combat player, let's guard + SetWP(TempWaypoint, CurrentPos) + GuardTarget = TempWaypoint + SwitchFSM(STATE_GUARD) + } + } + else + { + Tactics = TACTICS_COMBAT + SwitchFSM(STATE_GUARD) + } + } + + thread FSMThread() +} + +//----------------------------------------------------------------- +void InitCreature() +{ + if(!flags & FL_PUPPET) + { + if(GetWPos() == NULL) + { + DPrint("InitCreature: " + _name + " is out of area. AI stopped!") + status = STATE_DEAD + ErrorNum++ + return + } + + if(World.pPathFinder.TestPointCollision(ShapeIndex, WPosition)) + { + DPrint("InitCreature: " + _name + " is obstructed. AI stopped!") + status = STATE_DEAD + ErrorNum++ + return + } + } + + if(flags & FL_SUMMON_TRIGGER) + { + if(flags & FL_SUMMON) + Show(false) + + SetFlags(this, TFL_NOSHADOW) + SetFlags(CurrentWeapon, TFL_NOSHADOW) + SetWeight(this, 0) + return + } + + Awake() +} + +//----------------------------------------------------------------- + void EOnTimer(MinClass other, int extra) + { + if(extra == 100) + { + pain = false + PainTimer = 0 + } + } + +//----------------------------------------------------------------- + void EOnFlashlight(MinClass other, int extra) + { + if(AddVisibleTarget(World.Player, Distance(World.Player))) + AIAddEvent(AIE_HEARDNOISE, World.Player.CurrentPos, World.Player) + } + +//----------------------------------------------------------------- + void ReloadAction() //animhook na moment vlozenia naboja + { + if(IsInherited(CurrentWeapon, CFireWeaponClass) + { + FireWeaponClass fw = CurrentWeapon + fw.ReloadAction() + } + } + +//----------------------------------------------------------------- + void EOnAnimEnd(MinClass other, int extra) + { + if(status == STATE_SCRIPT && AICmd == AICMD_ANIM) + { + AICmd = AICMD_NONE + return + } + + switch(extra) + { + case s_weapon: + if(CurrentWeapon) + Throw(CurrentWeapon, other, EV_ANIMEND, extra + 100) + return + + case s_walk: + return + + case s_death: + SwitchFSM(STATE_DEAD) + CallMethods(this, OnDeath) + SetFlags(this, TFL_NOSHADOW) + OnDeath() + + return + + case s_pain: + SetAnimSlot(this, s_pain, VNULL, 20.0, 0, NULL, 0, 0) + + if(PainTimer) + StopTimer(PainTimer) + + PainTimer = SetTimer(this, this, frand(MinStunTime, MaxStunTime), EV_TIMER, 100, true) + return + } + + //proste ji vyhod + if(extra > s_weapon) + { + if(extra >= s_cutscene && extra <= 11) + return + + SetAnimSlot(this, extra, VNULL, 20.0, 0, NULL, 0, 0) + } + } + +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + if(ShowAI) + { + ShowWidget(WAI, true) + vector pp = ProjectVector(this, ZeroVec) + float px, py + px = pp[0] + py = pp[1] + SetWidgetPos(WAI, px, py, 512, 128) + + if(Stopped) + { + vector cmin, cmax + GetCBoundBox(this, cmin, cmax) + + //AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_ONCE|SS_TRANSP, cmin, cmax) + + if(IntersectRayBox(World.CameraPos, World.CameraNorm * 1024.0 + World.CameraPos, cmin, cmax) == -1) + { + ShowWidget(WAI, false) + } + else + { + int line = 2 + for(int n = CmdStackPos - 1; n >= 0; n--) + { + SetWidgetText(WAI, line++, AICmdNames[CmdStack[n]] + "(" + CmdParmStack[n] + ")") + } + } + } + } + + if(status >= STATE_DIE) + return 0 + + UpdateLookAt() + + viewframe = extra + + return 0 + } + +//----------------------------------------------------------------- + float CorrectYaw(float a, float speed) + { + SetYaw(CorrectAngle(faceyaw, a, speed)) + return fabs(faceyaw - a) + } + + +//----------------------------------------------------------------- + bool DoTraceHit() + { + vector vec = Attacker.CurrentPos - CurrentPos + vec[2] = 0 + VectorNormalize(vec) + + float range = fCloseHitRange + Radius + vector from = CurrentPos - HHVec + "0 0 32" + vector to = vec * range + from + float plane[4] + int sparm + ExtClass other + + int pf = ClearFlags(this, TFL_SOLID) + float d = TraceLineEx(DEFAULT, from, to, ZeroVec, ZeroVec, other, plane, NULL, sparm, TRACE_DEFAULT|TRACE_BONES, NULL) + SetFlags(this, pf) + + if(d < 1) + { + if(other.ClassType == ClassTypeCreature) + { + ShotStorage parms + + parms = new ShotStorage + parms.from = from + parms.VisualsFrom = CurrentPos + parms.to = to + parms.dir = vec + parms.shooter = this + parms.HurtType = HT_SHOT + parms.NumBullets = 1 + parms.MarkSize = 35 + parms.RicDecalType = DE_BULLET + parms.RicSndType = SE_BULLET + parms.RicParticlesType = PE_BULLET + parms.ID = World.ShootID++ + parms.CameraHitFactor = 5 + parms.Bone = g_iTraceBone + parms.power = 45 + parms.damage = WDmgCloseHit + + if(parms.Shoot(other) == SR_HIT) + { + parms.power = -1 //HACKHACK! + ShotEffects(parms, other, to, Vector(plane[0], plane[1], plane[2]), sparm) + delete parms + return true + } + delete parms + } + } + + return false + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + TickTime += ftime + + //Not so often updated: + if(TickTime > TICK_PERIOD) + { + float count = floor(TickTime / TICK_PERIOD) + + TickTime -= TICK_PERIOD * count + + //process unreachables + for(int n = 0; n < NumUnreachable; n++) + { + if(currenttime >= UnreachableTime[n]) + { + NumUnreachable-- + Unreachable[n] = Unreachable[NumUnreachable] + UnreachableTime[n] = UnreachableTime[NumUnreachable] + n-- + } + } + + if(ragdollActive && RagdollTimeout) + { + RagdollTimeout -= TICK_PERIOD + + if(RagdollTimeout <= 0) + { + RagdollTimeout = 0 + dBodyActive(this, false, false) + //dBodyInteractionLayer(this, ET_RAGDOLL) + } + } + + if(status < STATE_DIE) + { + if(!flags & FL_PUPPET) + { + RestTime -= TICK_PERIOD + clamp RestTime<0, RestTime> + + //when volatile action, lock AI processing + if(!AILocked) + { + AIVisibility() + AIProcess() + } + } + + if(iTraceHit) + { + if(DoTraceHit()) + iTraceHit = 0 + } + } + } + + OnWPTime += ftime + + UpdateBleedSources() + UpdateSSources() + + if(ShowAI) + { + ShowWidget(WAI, true) + + string str + + if(bShooting) + str = "Shoot:On " + else + str = "Shoot:Off " + + if(pain) + str += "Pain " + else + str += " " + + if(flags & FL_SEE) + str += "S " + else + str += "- " + + if(flags & FL_HEAR) + str += "H " + else + str += "- " + + if(flags & FL_FEEL) + str += "F " + else + str += "- " + + str += AIStatusNames[status] + str += "(" + itoa(StateCount) + ")." + + int srcline + string thr = ThreadFunction(this, "FSMThread", 1, srcline) + if(!thr) + { + str += "No thread" + } + else + { + str += thr + str += ":" + itoa(srcline) + } + + if(_state) + SetWidgetText(WAI, 0, _name + " : " + _state) + else + SetWidgetText(WAI, 0, _name + " : No state") + + SetWidgetText(WAI, 1, str) + SetWidgetText(WAI, 2, AITacticsNames[Tactics]) +/* + if(status == STATE_SCRIPT) + { + if(AICmd >= 0) + SetWidgetText(WAI, 2, itoa(CmdStackPos) + ":" + AICmdNames[AICmd] + "(" + AIParm + ")") + } + else + SetWidgetText(WAI, 2, "") +*/ + + if(WPath) + str = "T:" + itoa(WTurn) + " AD:" + itoa(WAddAngle) + " Dist:" + ftoa(WTargetDist) + " Wp:" + itoa(WNum) + "/" + itoa(WPath.Size()) + else + str = "T:" + itoa(WTurn) + " AD:" + itoa(WAddAngle) + + SetWidgetText(WAI, 7, str) + SetWidgetText(WAI, 8, "NoShootReason: " + NoShootReason) + + if(WTarget && status < STATE_DIE) + { + AddDShape(SHAPE_LINE, 0xffff00ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_ONCE|SS_TRANSP, CurrentPos, GetOrigin(WTarget)) + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_ONCE|SS_TRANSP, CurrentPos, WPos) + AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_ONCE|SS_TRANSP, WPos - "4 4 4", WPos + "4 4 4") + } + + str = "Attacker:" + + if(Attacker) + { + str += Attacker._name + if(flags & FL_HURTENEMIES) + str += " Under chaos" + } + + SetWidgetText(WAI, 6, str) + } + + //only animate & quit + if(status >= STATE_DIE) + { + if(status < STATE_DEAD) + BumpFrame(this, ftime, 0) + + return + } + + if(Stopped) + { + if(viewframe != g_iViewFrame) + { + if(ShowAI && WAI) + ShowWidget(WAI, false) + } + SetVelocity(this, ZeroVec) + return + } + +//update current values + BulletRainCounter -= ftime * 0.2 + clamp BulletRainCounter<0, BulletRainCounter> + + vector ang = GetAngles(this) + faceyaw = ang[YAW] + facevec = Yaw2Vector(faceyaw) + + ProcessShooting() + + //Print(String(_name + ":" + NoShootReason)) + + if(Loged) + { + if(KEY(MOVE_F, false)) + SetAnimState(t_walk) + else + { + if(KEY(MOVE_B, false)) + SetAnimState(t_bwalk) + else + SetAnimState(t_idle) + } + + ang[1] = ang[1] - (g_fMouseSpeedH * (float)MouseDeltaX * 3) + SetAngles(this, ang) + } + +//fall&drown damage + if(GetFlags(this) & TFL_ONGROUND) + { + if(notonground > 1) + { + float zdist = LastZ - CurrentPos[2] + + if(zdist > 100) + { + Kill() + return + } + } + + notonground = 0 + LastZ = CurrentPos[2] + } + else + { + notonground++ + } +/* + if(!flags & FL_PUPPET) + { + //optimize: don't animate idle when out of sight + int diff = g_iViewFrame - viewframe + if(diff > 16) + { + if(ShowAI && WAI) + ShowWidget(WAI, false) + + if(atype == t_idle && CurrentWeapon && CurrentWeapon.Action == 0 && WaitAnims == 0 && !Alerted()) + goto noanim + } + + if(!pain && flags & FL_FROZEN) + goto noanim + } +*/ + BumpFrame(this, ftime, 0) + + noanim:; + + MVec = ZeroVec + MVecLen = 0 + + //MOTION + if(MotionAnim != -1 && iNoMotion != 2) + { + if(iNoMotion != 1) + { + vector pvel = GetVelocity(this) + + if(MotionAnim >= 0) + MVec = ASet.Motion[MotionAnim] + + if(MVec != ZeroVec) + { + MVec = this.VectorToParent(MVec) + } + else + { + float ft = 1.2 / ftime + MVec = GetAnimLinearMovement(this) * ft + MVec = this.VectorToParent(MVec) + + if(iTransitionAnim == 0 && MotionAnim != -2) + { + vector zz = MVec + VectorNormalize(zz) + ft = fabs(zz * WVector) + 0.4 + clamp ft<0, 1> + + MVec = WVector * VectorLength(MVec) + MVec = MVec * ft + } + } + + float zvel = pvel[2] + + //HACK: keep them on ground at any cost + if(atype != t_walk) + { + if(zvel > 32 && !GetFlags(this) & TFL_ONGROUND) + zvel = -1 + } + + SetVelocity(this, Vector(MVec[0], MVec[1], zvel)) + + MVecLen = VectorNormalize(MVec) + } + + SetAngles(this, GetAngles(this) + GetAnimAngularMovement(this)) + } + + if(!Loged) + { +#ifdef EDITOR + if(!World.EditorActive) + { +#endif + float d, tang + + if(turndist) + { + turndist = faceyaw + + d = CorrectAngle(turndist, turnangle, turnspeed * 5) + ang[YAW] = d + turndist -= d + + if(fabs(turndist) < 1.0) + turndist = 0 + + SetYaw(d) + } + else + { + if(WTurn) + { + tang = FixAngle(Vector2Yaw(WVector) + WAddAngle) + + d = DiffAngle(tang, faceyaw) + + if(fabs(d) > 0.1) + { + clamp d<20, FLT_MAX> + SetYaw(CorrectAngle(faceyaw, tang, MVecLen * 4.0)) + } + } + } +#ifdef EDITOR + } +#endif + } + + //look at our target + if(Attacker) + { + if(Alerted() || status == STATE_LOST_TARGET || status == STATE_COVER) + { + LookAt(Attacker) + } + } + + ChangeAnim() + } + +//----------------------------------------------------------------- + void M_Activate(ExtClass other) + { + if(flags & FL_WAIT4TRIGGER) + { + Awake() + + if(Squad) + { + Squad.OnMemberActivate(this) + } + } + } + +//----------------------------------------------------------------- + int CountAnims(int base, int max) + { + for(int count = 0; count < max; count++) + { + if(!ASet.Anims[base + count]) + break + } + return count + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(!AnimSetName) + { + AnimSetName = DefaultAnimSetName + } + +#ifdef EDITOR + if(!SoundSetName) + SoundSetName = "LightTrooper" +#endif + if(!GetAnimSet(AnimSetName)) + return + + //init idle anims + NumRelaxIdleAnims = CountAnims(a_relax_idle, 4) + NumRelaxIdleVarAnims = CountAnims(a_relax_idle_var, 4) + + NumAlertIdleAnims = CountAnims(a_alert_idle, 4) + NumAlertIdleVarAnims = CountAnims(a_alert_idle_var, 4) + + NumCombatIdleAnims = CountAnims(a_combat_idle, 4) + NumCombatIdleVarAnims = CountAnims(a_combat_idle_var, 4) + + NumSpotIdleAnims = CountAnims(a_spot_idle_var, 4) + NumFightIdleAnims = CountAnims(a_fight_idle_var, 4) + NumLostIdleAnims = CountAnims(a_lost_idle_var, 4) + + NumCloseCombatAnims = CountAnims(a_combat_closecombat, 5) + + //set static capabilities + if(ASet.Anims[a_combat_run_fire + 0] && ASet.Anims[a_combat_run_fire + 1] && ASet.Anims[a_combat_run_fire + 2]) + bAngledWalk = true + + if(ASet.Anims[a_combat_llean] && ASet.Anims[a_combat_rlean]) + bCanLean = true + + if(ASet.Anims[a_crouch]) + bCanCrouch = true + + if(ASet.Anims[a_act_left_go] && ASet.Anims[a_act_right_go] && ASet.Anims[a_act_back_go] && ASet.Anims[a_act_forward_go]) + bHasGestures = true + + if(ASet.Anims[a_act_look_left] && ASet.Anims[a_act_look_right]) + bCanConfirmGesture = true + + if(ASet.Anims[a_crouch_fire] && ASet.Anims[a_crouch_fire + 1]) + bCanFireInCrouch = true + + if(ASet.Anims[a_combat_run_fire] && ASet.Anims[a_combat_run_fire + 1] && ASet.Anims[a_combat_run_fire + 2]) + bCanShootInTakeCover = true + + if(ASet.Anims[a_spot_idle_var + 2]) + bHasSpotAnim = true + + if(ASet.Anims[a_combat_grenade + 0] && ASet.Anims[a_combat_grenade + 1] && ASet.Anims[a_combat_grenade + 2] && ASet.Anims[a_combat_grenade + 3]) + bCanThrowGrenade = true + + if(ASet.Anims[a_combat_grenade_crouch + 0] && ASet.Anims[a_combat_grenade_crouch + 1] && ASet.Anims[a_combat_grenade_crouch + 2]) + bCanThrowGrenadeInCrouch = true + + if(ASet.Anims[a_jump_drop] && ASet.Anims[a_combat_railjump] && ASet.Anims[a_combat_windowjump] && ASet.Anims[a_combat_crawl]) + bCanUseConnections = true + + if(bCanThrowGrenadeInCrouch || bCanThrowGrenade) + { + grenade = new item_weapon_grenade(this) + grenade.Show(false) + ClearEventMask(grenade, EV_VISIBLE | EV_FRAME) + ClearFlags(grenade, TFL_VISIBLE|TFL_NOSHADOW) + + GrenadeShotStor = new ShotStorage + GrenadeShotStor.damage = WDmgEnemyGrenade + GrenadeShotStor.power = 25 + GrenadeShotStor.NumBullets = 1 + GrenadeShotStor.MarkSize = 26 + GrenadeShotStor.StreakWidth = 1.2 * sqrt(sqrt(1 / g_timescale)) + GrenadeShotStor.StreakLength = 45.6 * sqrt(sqrt(1 / g_timescale)) + GrenadeShotStor.StreakSpeed = 5100 + GrenadeShotStor.StreakShader = 0 + GrenadeShotStor.RicDecalType = DE_PLASMA + GrenadeShotStor.shooter = this + } + + if(ClassName(CurrentWeapon) == "item_weapon_flamethrower" || ClassName(CurrentWeapon) == "item_weapon_rocketlauncher") + bNoLOFLatency = true + + //puppets has deferred loading in order to save memory + if(ClassName(this) != "creature_puppet") + LoadSoundSet(SoundSetName, CSounds) + + halfrange = visrange * 0.5 + quarterrange = visrange * 0.25 + + DistTolerance = Radius * 1.5 + clamp DistTolerance<8, 64> //lower threshold for small animals + +//Print(String(ClassName(this) + " " + itoa(DistTolerance))) + + //DistTolerance = 15 //!!! + + int ev = 0 + + if(!flags & FL_SUMMON_TRIGGER) + ev |= EV_VISIBLE | EV_TOUCH | EV_FRAME | EV_ANIMEND | EV_SOUNDEND + + SetEventMask(this, ev) + + MaxHealth = Health + + CurrentPos = coords + + if(!lowhealth) + lowhealth = 50 + bOnLowHealth = true + + SetState(s_relaxed) + SetAnimState(t_idle) + + ChangeAnim() + BumpFrame(this, 0, 0) + + ShowAI = false + WAI = NULL + } + +//----------------------------------------------------------------- +float NextRefreshTime + + void EOnTouch(AICreatureClass other, int extra) + { + if(other == World || other.ClassType == ClassTypeTrigger) + return + + if(!IsInherited(other, CExtClass)) + return + + //narazili jsme do dveri? + if(TestDoorBlock(other)) + return + + if(GetFlags(other) & TFL_PATHBLOCK) + other.UpdateAgent(true) + + //vsechny dalsi testy se tykaji vyhradne potvor! + if(other.ClassType != ClassTypeCreature) + return + + //stoji nam nekdo v ceste? +//VERY dangerous. May cause huge traffic in crowd of monsters! Limited to 0.5 sec period now! + if(NextRefreshTime < currenttime && InFront(other)) + { + NextRefreshTime = currenttime + 0.5 + //force update + LastPathTime = AI_PATHREFRESH * -0.25 + LastPathTime + } + + if(!flags & FL_FEEL || status == STATE_ATTACK || status == STATE_CHASE) + return + + if(IsEnemy(other) && IsEnemy(other)) + AIAddEvent(AIE_SHOTORTOUCH, GetOrigin(other), other) + } + +//----------------------------------------------------------------- + void EOnLoad(MinClass other, int extra) + { + ShowAI = false + WAI = NULL +#ifdef DEVELOPER + WDLine = NULL +#endif + //LoadSoundSet(SoundSetName, CSounds) + } + +//----------------------------------------------------------------- + void TraceStart() + { + iTraceHit = 1 + CurrentWeapon.TraceStart() + } + +//----------------------------------------------------------------- + void TraceEnd() + { + iTraceHit = 0 + CurrentWeapon.TraceEnd() + } + +//----------------------------------------------------------------- + void ~AICreatureClass() + { + BeforeBodyDestroy() + dBodyDestroy(this) + + if(geom) + { + dGeomDestroy(geom) + } + + if(CurrentWeapon) + { + delete CurrentWeapon + CurrentWeapon = NULL + } + + if(ASet) + ASet.Unload() + + if(SSet) + SSet.Unload() + + if(WalkWaypoint) + delete WalkWaypoint + + if(TempWaypoint) + delete TempWaypoint + + if(OriginWaypoint) + delete OriginWaypoint + + if(WPosition2) + delete WPosition2 + + if(GrenadeShotStor) + { + delete GrenadeShotStor + GrenadeShotStor = NULL + } + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + WeaponRange = AttackDistMin + + CallMethods(this, OnLoad) + InitCreature() + } + +//----------------------------------------------------------------- + void AICreatureClass() + { + TickTime = g_Ticktime + g_Ticktime = g_Ticktime + TICK_PERIOD + + RagdollMaterial = "material/default" + RagdollMass = 45 * sqrt(g_timescale) + + if(visrange == 0) + visrange = 1024 + + AttackDist = 1024 + AttackDistMin = 92 + AttackDistClose = 64 + AIInit() + + SetFlags(this, TFL_DEF | TFL_TOUCHTRIGGERS) + SetEventMask(this, EV_LOADED|EV_INIT) + + SetKind(this, MONSTER) + + facevec[0] = cos(angle * DEG2RAD) + facevec[1] = sin(angle * DEG2RAD) + + //BoneHurtFactor = Human_Hurt + + CCount = CreatureCount++ + CreatureCount &= 15 + + SetState(s_relaxed) + SetAnimState(t_idle) + + MinAttacksInRow[0] = 13 + MaxAttacksInRow[0] = 17 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.12 + MinRestAfterAttack[0] = 1 + MaxRestAfterAttack[0] = 2 + + MinAttacksInRow[1] = 7 + MaxAttacksInRow[1] = 12 + MinAttackDelay[1] = 0.1 + MaxAttackDelay[1] = 0.12 + MinRestAfterAttack[1] = 1 + MaxRestAfterAttack[1] = 2 + + MinStunTime = 0.5 + MaxStunTime = 48 +// fShootpointTimeout = 4.5 + fShootpointTimeout = -1.0 + fNotInLOFTimeout = 3.3 + + MinRoamIdleTime = 2.1 + MaxRoamIdleTime = 6.5 + + //never + fMinCosForSlowTurn = -100 + + fMinBulletRain = 3.511 + + fVisibilityLatency = 0.497 + fAlertedVisibilityLatency = 0.12 + fLeanShootTime = 250 + fCrouchShootTime = 220 + + fMaxRange = 543 + fCloseHitRange = 39.8 + bFlameResistent = false + + LookAxis = -2 + LookBone = B_Common_Head + + TurnSpeed = 59.689 * sqrt(sqrt(sqrt(sqrt(sqrt(g_timescale))))) + + SmallPainGroup = g_all + + UsedOn = WP_USED_ON_ENEMY + UsedOff = WP_USED_OFF_ENEMY + +#ifdef DEVELOPER + ShowAI = g_bShowAI +#endif + + MotionAnim = -1 + + LastAmbientSound = -1 + AgentCost = 24 + + WPosition2 = new CPosition + + GroupID = GROUP_NPC + + LastShootID = -1 + LastHitID = -1 + } +//--------------------------------------------------------------------------------- +#ifdef EDITOR + void EditorOpened() + { + Stopped = true + } + + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + SetOrientation(Pos, Angs[1]) + UpdateMainVisualizer() + UpdateEntity(this) + } + + void CreateEditorVisuals() + { + } +#endif +} + +//--------------------------------------------------------------------------------- +CreatureClass info_squad::FindCommander(CreatureClass fromactor, ExtClass target) +{ + vector from = fromactor.CurrentPos + vector face = fromactor.facevec + + vector targ = GetMatrix(target, 3) + + CreatureClass bestactor = NULL + float bestcost = 999999999999 + + for(int n = 0; n < NumMembers; n++) + { + AICreatureClass cc = Members[n] + +// if(cc != fromactor && cc.atype == t_idle) + if(cc != fromactor && cc.bHasGestures) + { + vector cdir = cc.CurrentPos - from + + //dist is base for cost + float cost = VectorNormalize(cdir) + + //is commander facing toward target? + cdir = targ - cc.CurrentPos + VectorNormalize(cdir) + + float dot = cdir * cc.facevec + if(dot < 0.5) + continue + + if(!P2PVisibilityEx(from, cc.CurrentPos, TRACE_VISTEST|TRACE_NOTRACE)) + continue + + int fd = g_iViewFrame - cc.viewframe + + if(fd > 3) + { + //probably not visible, that's bad + cost += 200 + } + + if(cost < bestcost) + { + bestcost = cost + bestactor = cc + } + } + } + + return bestactor +} + diff --git a/Alpha Prime/Mod/scripts/class_creature/ai2.h b/Alpha Prime/Mod/scripts/class_creature/ai2.h new file mode 100644 index 0000000..6bf7cbc --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_creature/ai2.h @@ -0,0 +1,560 @@ +//TODO: make unified system for conditions, instead of many querying functions +//TODO: replace various combat states by Behavior classes with implemented innerloop +//TODO: create capability bits instead of many bools. Create Set/(Get?) methods + +class AICreatureClass; + +//----------------------------------------------------------------- +// compute on which side is target when looking 'from' in 'facevec' direction +// < 0 is on left +// > 0 is on right +//----------------------------------------------------------------- +float GetSide(vector target, vector from, vector facevec) +{ + //construct side plane + vector pnormal = facevec * UpVec + float pdist = pnormal * from + + return pnormal * target - pdist +} + +//----------------------------------------------------------------- +vector FaceVectorTo(vector from, vector to) +{ + vector vec = to - from + + vec[2] = 0 + VectorNormalize(vec) + return vec +} + +//================================================================================= + +//event slot indexes. +const int AIE_BULLETRAIN = 0 +const int AIE_SHOTORTOUCH = 1 +const int AIE_SAWENEMY = 2 +const int AIE_HEARDSHOT = 3 +const int AIE_SAWDEADBODY = 4 +const int AIE_SAWSHOTBODY = 5 +const int AIE_HEARDNOISE = 6 +const int AIE_SQUADATTACKED= 7 +const int AIE_GRENADE = 8 + +const int AIBufferSize = 9 + + +const int AICMD_NONE = 0 +const int AICMD_IDLE = 1 +const int AICMD_RUN = 2 +const int AICMD_WALK = 3 +const int AICMD_ANIM = 4 +const int AICMD_USE = 5 +const int AICMD_CALL = 6 +const int AICMD_WSIGHT = 7 +const int AICMD_ANIMNW = 8 +const int AICMD_SLEEP = 9 +const int AICMD_TURN = 10 +const int AICMD_TURNBY = 11 +const int AICMD_SHOOT = 12 +const int AICMD_SHOOTNW = 13 +const int AICMD_SAY = 14 +const int AICMD_END = 15 + +const int TACTICS_DUMMY = 0 +const int TACTICS_IDLE = 1 +const int TACTICS_COMBAT = 2 //changing waypoints when target is not in LOF +const int TACTICS_COVER = 3 //take cover +const int TACTICS_COVERCOMBAT = 4 //changing waypoints only when attacked/not covered +const int TACTICS_GUARDCOMBAT = 5 //starts as guard. Become combatant after alerted +const int TACTICS_ROAM = 6 +const int TACTICS_BERSERK = 7 //boss, fighter + +const int PATH_OK = 1 +const int PATH_LOST_TARGET = 2 +const int PATH_NOT_FOUND = 4 +const int PATH_FINISHED = 5 + +const int WP_USED_ON_ENEMY = 0x80000000 +const int WP_USED_OFF_ENEMY = 0x7fffffff + +const string AICmdNames[16] = { + "NONE", + "IDLE", + "RUN", + "WALK", + "ANIM", + "USE", + "CALL", + "WAITSIGHT", + "ANIMNW", + "SLEEP", + "TURN", + "TURNBY", + "SHOOT", + "SHOOTNW", + "SAY", + "END"} + +const string AITacticsNames[8] = { + "TACTICS_DUMMY", + "TACTICS_IDLE", + "TACTICS_COMBAT", + "TACTICS_COVER", + "TACTICS_COVERCOMBAT", + "TACTICS_GUARDCOMBAT", + "TACTICS_ROAM"} + +//global counter, to make it 'random' on every monster +//unfortunately useless, as we don't have various animations :-( +int CombatWalkCount = 0 +int CreatureCount = 0 + +//idle types +const int it_default = 0 +const int it_fight = 1 +const int it_lost = 2 + +const float AI_PATHREFRESH = 2.0 //update refresh in seconds +const float AI_REFRESH = 4 //for innerloops with UpdatePath +const float AI_SLOWREFRESH = 20 //for idle-methods + +const int ObservedBufferSize = 8 + + +#include "scripts/class_creature/ai.h" + +//----------------------------------------------------------------- +// TODO: celou tuhle vec predelat na dynamicky sphere triggery a notifikace bude provedena prez eventy +//----------------------------------------------------------------- +void NotifyNoises(ExtClass actor, vector origin, float radius, int noises) +{ + float lasttime + ExtClass lastactor + int lastnoises + vector lastorigin + + int mask = noises & lastnoises + + if(VectorLengthSq(origin - lastorigin) < 16.0 * 16.0) + { + if(actor == lastactor) + { + if(mask <= lastnoises) + { + if(lasttime > currenttime - 0.5) + { + return + } + } + } + } + + lastactor = actor + lastnoises = noises + lasttime = currenttime + lastorigin = origin + + CreatureClass mc[64], cc + int num = SphereQuery(origin, radius, mc, 64, TFL_VISIBLE|TFL_USER6) + + mask = FL_WAIT4TRIGGER | FL_FRIENDLY + + for(int n = 0; n < num; n++) + { + cc = mc[n] + + if(IsInherited(cc, CCreatureClass)) + { + if(!cc.flags & mask && cc.flags & FL_HEAR) + { + //velmi hrube, netestuje ani detail brushe -> temer PHS + //TODO: real PHS + if(P2PVisibilityEx(origin, GetOrigin(cc), TRACE_VISTEST)) + cc.NotifyNoise(actor, origin, noises) + } + } + } +} + +//--------------------------------------------------------------------------------- +bool SpeechManager::Say(CreatureClass owner, int type) +{ + float d + + float dist = -1 + int worst + +// Print(String(owner._name + " trying to say " + itoa(type))) + + for(int n = 0; n < SPEAKERS_COUNT; n++) + { + if(Emit[type][n]) + { + d = Dist[type][n] + if(d > dist) + { + dist = d + worst = n + } + } + + //didn't someone say this recently? + d = currenttime - SpeakTime[type][n] + if(d < 0.5) + return false + } + + vector v + + v = World.Player.CurrentPos - owner.CurrentPos + + d = v * v //distsq + + if(dist > 22000 && d < dist) + { + //isn't someone too far, that we can replace him? + Dist[type][worst] = d + Speakers[type][worst] = owner + return true + } + + for(n = 0; n < SPEAKERS_COUNT; n++) + { + if(Speakers[type][n] == NULL) + { + Speakers[type][n] = owner + SpeakTime[type][n] = currenttime + Emit[type][n] = true + Dist[type][n] = d + return true + } + } + return false +} + +//--------------------------------------------------------------------------------- +void SpeechManager::Update() +{ + for(int type = 0; type < ST_SIZEOF; type++) + { + for(int n = 0; n < SPEAKERS_COUNT; n++) + { + if(Emit[type][n]) + { + Emit[type][n] = false + + AICreatureClass cc = Speakers[type][n] +// Print(String(cc._name + " saying " + itoa(type))) + PlaySound(Speakers[type][n], cc.SSet.GetSound(type), SF_ONCE) + continue + } + + float d = currenttime - SpeakTime[type][n] + if(d > 2) + { + Speakers[type][n] = NULL + } + } + } +} + +//--------------------------------------------------------------------------------- +void info_squad::M_Activate(ExtClass other) +{ + for(local int n = 0; n < NumMembers; n++) + { + AICreatureClass ai = Members[n] + if(other != ai && ai.status < STATE_DIE) + ai.M_Activate(this) + } + if(!bActivated) + { + bActivated = true + CallMethods(this, OnActivate) + } +} + +//--------------------------------------------------------------------------------- +void info_squad::OnMemberActivate(CreatureClass cc) +{ + if(!flags & 1) + return + + M_Activate(cc) +} + +//--------------------------------------------------------------------------------- +void info_squad::OnMemberKilled(CreatureClass cc) +{ + Alive-- + + CallMethods(this, OnKill) + + if(Alive == 0) + { + CallMethods(this, OnKillOff) + return + } + + //if(!flags & 4) + //{ + if(Alive == 1) + CallMethods(this, OnLastMan) + +// return + //} + + AICreatureClass best = NULL + float bestdist = 9999 * 9999 + + //find nearest team-mate to announce kill + for(int n = 0; n < NumMembers; n++) + { + AICreatureClass ai = Members[n] + if(ai != cc && ai.status < STATE_DIE) + { + vector vdist = cc.CurrentPos - ai.CurrentPos + float dist = vdist * vdist + + if(dist < bestdist) + { + bestdist = dist + best = ai + } + } + } + + if(best) + { + if(Alive == 1) + { + best.Say(ST_SQUADLASTMAN) + CallMethods(this, OnLastMan) + } + else + { + best.Say(ST_TEAMMATEKILLED) + } + } +} + +//--------------------------------------------------------------------------------- +void info_squad::OnMemberAttacked(CreatureClass cc, CreatureClass attacker, vector pos) +{ + AICreatureClass aicc = cc + + if(bAttacked) + { + bAttacked = true + aicc.Say(ST_SQUADATTACKED) + } + + if(!flags & 2) + return + + for(int n = 0; n < NumMembers; n++) + { + AICreatureClass ai = Members[n] + if(ai != cc && ai.status < STATE_DIE) + { + ai.AIAddEvent(AIE_SQUADATTACKED, pos, attacker) + } + } +} + +//--------------------------------------------------------------------------------- +void info_squad::EOnLoaded(MinClass other, int extra) +{ + string str = members + + NumMembers = 0 + while(true) + { + string ainame + + if(ParseStringEx(str, ainame) != 3) + break + + AICreatureClass ai = FindClass(ainame) + + if(ai == NULL) + { + DPrint("info_squad '" + _name + "' contains nonexistent entity '" + ainame + "'") + ErrorNum++ + } + else + { + if(!IsInherited(ai, CAICreatureClass)) + { + DPrint("info_squad '" + _name + "' contains '" + ainame + "' of type '" + ClassName(ai) + "'") + ErrorNum++ + } + else + { + ai.Squad = this + Members[NumMembers++] = ai + if(NumMembers >= 64) + { + DPrint("info_squad '" + _name + "' has too much entities") + ErrorNum++ + break + } + } + } + + if(ParseStringEx(str, ainame) == 0) + break + + if(ainame != ",") + { + DPrint("info_squad '" + _name + "' syntax error") + ErrorNum++ + break + } + } + + Alive = NumMembers + + CallMethods(this, OnLoad) +} + +//================================================================================= +class FacialAnimationPlayer extends MinClass +{ + vobject Anim + vobject MorphObj + ExtClass ActorEntity + string id + int hsnd + float starttime + +//----------------------------------------------------------------- + void ApplyMorph(int bone, string name) + { + vector mat[4] + float weight + + GetBoneMatrix(this, bone, mat) + weight = mat[3][2] / 32 + SetMorphState(ActorEntity, name, weight) +/* +int lframe + +if(name == "QW")// && id == "3_1_Arn0002") +{ + float tt = currenttime-starttime * 30 + + int frame = tt + if(frame!=lframe) + { + lframe=frame + Print(String(itoa(frame) + " " + id + " " + ftoa(weight))) + } +} +*/ + } + +//----------------------------------------------------------------- + void EOnAnimEnd(MinClass other, int extra) + { + ClearEventMask(this, EV_FRAME) + + SetAnimSlot(this, 0, VNULL, 0, 0, NULL, 30, AF_ONCE) + + if(Anim) + { + ReleaseObject(Anim, true) + Anim = VNULL + } + + SetMorphState(ActorEntity, "AI", 0.0) + SetMorphState(ActorEntity, "BMP", 0.0) + SetMorphState(ActorEntity, "CDG", 0.0) + SetMorphState(ActorEntity, "E", 0.0) + SetMorphState(ActorEntity, "FV", 0.0) + SetMorphState(ActorEntity, "O", 0.0) + SetMorphState(ActorEntity, "QW", 0.0) + SetMorphState(ActorEntity, "U", 0.0) + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + BumpFrame(this, ftime, false) + + ApplyMorph(B_BrowsDown_L, "BrowsDown_L") + ApplyMorph(B_BrowsDown_R, "BrowsDown_R") + ApplyMorph(B_BrowsUp_L, "BrowsUp_L") + ApplyMorph(B_BrowsUp_R, "BrowsUp_R") + ApplyMorph(B_BrowsUpSide_L, "BrowsUpSide_L") + ApplyMorph(B_BrowsUpSide_R, "BrowsUpSide_R") + ApplyMorph(B_Privreni_L, "Privreni_L") + ApplyMorph(B_Privreni_R, "Privreni_R") + ApplyMorph(B_Angry, "Angry") + ApplyMorph(B_Sad, "Sad") + ApplyMorph(B_AI, "AI") + ApplyMorph(B_BMP, "BMP") + ApplyMorph(B_CDG, "CDG") + ApplyMorph(B_E, "E") + ApplyMorph(B_FV, "FV") + ApplyMorph(B_O, "O") + ApplyMorph(B_QW, "QW") + ApplyMorph(B_U, "U") + } + +//----------------------------------------------------------------- + void StopAnim() + { + ClearEventMask(this, EV_FRAME) + + SetMorphState(ActorEntity, "AI", 0) + SetMorphState(ActorEntity, "BMP", 0) + SetMorphState(ActorEntity, "CDG", 0) + SetMorphState(ActorEntity, "E", 0) + SetMorphState(ActorEntity, "FV", 0) + SetMorphState(ActorEntity, "O", 0) + SetMorphState(ActorEntity, "QW", 0) + SetMorphState(ActorEntity, "U", 0) + } + +//----------------------------------------------------------------- + bool PlayAnim(string anm, int hs) + { + hsnd = hs + starttime = currenttime + id = anm + string lipsyncanim = "cutscene/dialogs/" + anm + ".anm" + + Anim = GetObject(lipsyncanim) + if(Anim) + { + SetAnimSlot(this, 0, Anim, 0, 0, NULL, 30, AF_ONCE) + SetEventMask(this, EV_FRAME) + } + } + +//----------------------------------------------------------------- + void FacialAnimationPlayer(MinClass actor) + { + ActorEntity = actor + MorphObj = GetObject("obj/morphs.xob") + SelectObject(this, MorphObj) + + SetEventMask(this, EV_ANIMEND) + } + +//----------------------------------------------------------------- + void ~FacialAnimationPlayer() + { + if(Anim) + { + ReleaseObject(Anim, true) + Anim = VNULL + } + + SetObject(VNULL) + ReleaseObject(MorphObj, true) + } +} + diff --git a/Alpha Prime/Mod/scripts/class_creature/boss.h b/Alpha Prime/Mod/scripts/class_creature/boss.h new file mode 100644 index 0000000..8faf466 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_creature/boss.h @@ -0,0 +1,756 @@ +//================================================================================= +class item_weapon_boss extends FireWeaponClass +{ +//----------------------------------------------------------------- + void OnActionEnd() + { + if(Action == 1) //shot + { + EndAction() + } + + EndAction() + } + +//----------------------------------------------------------------- + int PrimaryFire(vector target) + { + if(CheckForAmmo() == false) //zistime ci mame strelivo na vystrel + return false + + Ammo-- + int sfl = ClearFlags(Owner, TFL_SOLID) + vector targ, dir + float prec = 0 + + if(Flash) + Flash.Switch(true) + + vector start + + start = GetMatrix(this, 3) + + dir = target - start + VectorNormalize(dir) + + Shooter shoter = Shooters[0] + ShotStor.shooter = Owner + target = target - start + VectorNormalize(target) + target = target * 8192 + start + ShotStor.from = start + ShotStor.to = target + ShotStor.dir = dir + + ShotStor.precision = PrecisionFlawMax + + if(Flash) + ShotStor.VisualsFrom = GetMatrix(Flash, 3) + else + ShotStor.VisualsFrom = start + + shoter.Fire(ShotStor) + SetFlags(Owner, sfl) + + if(ActionSound) + EndSound(ActionSound) + + ActionSound = PlaySound(Owner, Sounds[0], SF_ONCE) + + if(AttackAnim) + { + SetAnimSlot(Owner, s_weapon, AttackAnim, 10.0, 10.0, NULL, 30, AF_ONCE|AF_RESET|AF_BLENDOUT) + } + + return true + } + +//----------------------------------------------------------------- + int SecondaryFire(vector target) + { + return false + } + +//----------------------------------------------------------------- + int Action(int n, vector targ) + { + if(!CanAct(n)) + return false + + Ammo = 100 //FIXME + + if(PrimaryFire(targ)) + { + Action = 0 + return true + } + + Action = 0 + return false + } + +//----------------------------------------------------------------- + void item_weapon_boss() + { + ClassNum = CBossWeapon + + AmmoPerMagazine = PistolAmmoPerMagazine + AmmoType = AmmoPistol + Ammo = -1 + NumActions = 1 + + NumShooters = 1 + Shooters[0] = new ShooterProjectile(this, AMMO_ROCKETBOSS) + + ADelay[0] = 1.5 //primary attack + RicSndSkip = 3 + + ShotStor.NumBullets = 1 + ShotStor.MarkSize = -1 + ShotStor.precision = 0.04 + ShotStor.StreakWidth = 12 + ShotStor.StreakLength = 30 + ShotStor.StreakSpeed = 5000 + ShotStor.StreakShader = 3 + ShotStor.damage = WDmgBoss + ShotStor.power = 2 + ShotStor.CameraHitFactor = 1 + ShotStor.RicDecalType = DE_PLASMA //DE_BULLET, DE_PLASMA + ShotStor.RicSndType = SE_PLASMA //SE_BULLET, SE_PLASMA + ShotStor.RicParticlesType = PE_PLASMA //PE_BULLET, PE_PLASMA + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + AttackAnim = GetObject("anm/boss/C_Fire_primary.anm") + + Flash = new weapon_flash(this, 0.1, "-90 0 0", 1) + Flash.rangle = ZeroVec + + InitSounds(WS_WeaponBoss) + } +} + +#ifndef DEMO +//================================================================================= +class creature_boss extends AICreatureClass +{ +misc_particle_effector ParticleEmitor +int EmitorSound + +//----------------------------------------------------------------- +void SoundFirstSight() +{ + Sound(6, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundSuspicious() +{ + Sound(6, SF_ONCE) +} + +//----------------------------------------------------------------- +/* +void SoundDeath() +{ + Sound(21, SF_ONCE) +} +*/ +//----------------------------------------------------------------- +void SoundPain() +{ + Sound(20, SF_ONCE) +} + +//----------------------------------------------------------------- +void CreateBody() +{ + dBodyCreate(this, ZeroVec, BC_NONE) + + vector min, max + GetBoundBox(this, min, max) + + geom = dGeomCreateCapsule(23, Vector(0, 0, 13)) + vector mat[4] = {"1 0 0", "0 1 0", "0 0 1", "0 0 -3"} + + dBodyAddGeom(this, geom, mat, "material/creatureflesh") + dBodySetMass(this, ZeroVec, 90) +} + +//----------------------------------------------------------------- +void SetHeadOrientation(float pitch, float yaw) +{ + float lquat[4], quat[4] + float lquat2[4], quat2[4] + vector mat[4] + + if(pitch || yaw) + { + clamp pitch<-45, 45> + clamp yaw<-110, 110> + + QuatRotationRollPitchYaw(quat, Vector(yaw * -0.5, 0, pitch * -0.2)) + //QuatRotationRollPitchYaw(quat, ZeroVec) + +// QuatRotationRollPitchYaw(quat2, Vector(yaw * -0.3, 0, pitch * -0.7)) + QuatRotationRollPitchYaw(quat2, Vector(yaw * -0.5, 0, pitch * -0.8)) + } + else + { + QuatIdentity(quat) + QuatIdentity(quat2) + } + + QuatLerp(lquat, PLookQuat, quat, ftime * 9) + QuatLerp(lquat2, PLookQuat2, quat2, ftime * 9) + + if(PLookQuat[0] != lquat[0] || PLookQuat[1] != lquat[1] || PLookQuat[2] != lquat[2] || PLookQuat[3] != lquat[3]) + { + QuatMatrix(lquat, mat) + SetBoneGlobal(this, B_Spine1, mat) + QuatCopy(lquat, PLookQuat) + } + + if(PLookQuat2[0] != lquat2[0] || PLookQuat2[1] != lquat2[1] || PLookQuat2[2] != lquat2[2] || PLookQuat2[3] != lquat2[3]) + { + QuatMatrix(lquat2, mat) + SetBoneGlobal(this, B_RightArmRoll, mat) + QuatCopy(lquat2, PLookQuat2) + } +} + +//----------------------------------------------------------------- +bool TestShootFilter(ExtClass other, vector raypos, vector raydir) +{ + switch(other.ClassType) + { + case ClassTypeMiscPhysicsGlass: + return false + + case ClassTypeMiscShootDetector: + return other.IsShot(raypos, raydir) + + case ClassTypeMiscShootingShield: + return other.IsShot(raypos, raydir) + } + + return true +} +//----------------------------------------------------------------- +CreatureClass TestShoot(ExtClass enemy, vector to) +{ + MinClass cent = NULL + float endplane[4] + + vector ttpos + vector from = GetMatrix(CurrentWeapon, 3) + vector off1 = GetMatrix(CurrentWeapon, 0) * 0.75 + vector off2 = GetMatrix(CurrentWeapon, 2) * 0.75 + + int fl = ClearFlags(this, TFL_SOLID) + +//1st try + shootpos = to + "0 0 20" + + ttpos = shootpos - off1 - off2 + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from - off1 - off2, ttpos) + TraceLineEx(DEFAULT, from - off1 - off2, ttpos, ZeroVec, ZeroVec, cent, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, &TestShootFilter) + if(cent == enemy) + { + SetFlags(this, fl) + return cent + } + ttpos = shootpos + off1 - off2 + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from + off1 - off2, ttpos) + TraceLineEx(DEFAULT, from + off1 - off2, ttpos, ZeroVec, ZeroVec, cent, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, &TestShootFilter) + if(cent == enemy) + { + SetFlags(this, fl) + return cent + } + ttpos = shootpos + off2 + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from + off2, ttpos) + TraceLineEx(DEFAULT, from + off2, ttpos, ZeroVec, ZeroVec, cent, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, &TestShootFilter) + if(cent == enemy) + { + SetFlags(this, fl) + return cent + } + +//2nd try + shootpos = to + + ttpos = shootpos - off1 - off2 + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from - off1 - off2, ttpos) + TraceLineEx(DEFAULT, from - off1 - off2, ttpos, ZeroVec, ZeroVec, cent, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, &TestShootFilter) + if(cent == enemy) + { + SetFlags(this, fl) + return cent + } + ttpos = shootpos + off1 - off2 + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from + off1 - off2, ttpos) + TraceLineEx(DEFAULT, from + off1 - off2, ttpos, ZeroVec, ZeroVec, cent, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, &TestShootFilter) + if(cent == enemy) + { + SetFlags(this, fl) + return cent + } + ttpos = shootpos + off2 + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from + off2, ttpos) + TraceLineEx(DEFAULT, from + off2, ttpos, ZeroVec, ZeroVec, cent, endplane, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_DETAIL|TRACE_PATCH, &TestShootFilter) + + SetFlags(this, fl) + return cent +} + +//----------------------------------------------------------------- +bool CanHitTarget(vector tpos) +{ + if(atype != t_idle) + return false + + vector mat[4] + GetBoneMatrix(this, B_RightHand, mat) + + float dot + vector aimvec1, aimvec2 + + aimvec2 = mat[2] * -1 + dot = UpVec * aimvec2 + + //gun is pointing mostly vertically + if(fabs(dot) > 0.5) + return false + + aimvec1 = tpos - mat[3] + + dot = aimvec1 * aimvec1 + if(dot < 96*96) + return false + + aimvec1[2] = 0 + VectorNormalize(aimvec1) + + aimvec2[2] = 0 + VectorNormalize(aimvec2) + + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mat[3], mat[2] * 64 + mat[3]) + //AddDShape(SHAPE_LINE, 0xfff00fff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mat[3], aimvec2 * 64 + mat[3]) + + dot = aimvec1 * aimvec2 + + if(dot < 0.89) + return false + + return true +} + +//----------------------------------------------------------------- +void FlameOn() +{ + if(EmitorSound) + { + EndSound(EmitorSound) + EmitorSound = 0 + } + + ParticleEmitor.Switch(true) + EmitorSound = PlaySound(this, CurrentWeapon.Sounds[3], 0) +} + +//----------------------------------------------------------------- +void FlameOff() +{ + ParticleEmitor.Switch(false) + if(EmitorSound) + { + EndSound(EmitorSound) + EmitorSound = 0 + } +} + +//----------------------------------------------------------------- +void AIChase() +{ + Attacker.AddAttacker(this) + SetState(s_combat) + + SetAnimState(t_run) + local bool stand = false + + while(IsState(STATE_CHASE)) + { + AISleep(AI_REFRESH) + + if(Attacker.status >= STATE_DIE) + { + ShootOff() + AIKillEvents() + SwitchFSM(STATE_RETURN) + FlameOff() + return + } + + local float enemydist = AttackerDistance() + + if(!stand) + { + int res + + if(enemydist < 256) + res = UpdatePath(t_run, 0.5) + else + res = UpdatePath(t_run, 2.0) + + if(res != PATH_OK && res != PATH_FINISHED) + { + //Print("beginlosttarget") + ShootOff() + BeginCombatTarget(Attacker) + FlameOff() + return + } + + CPosition area + + area = GetWPos() + + if(!IsConnected(Attacker.GetWPos(), area)) + { + ShootOff() + BeginCombatTarget(Attacker) + FlameOff() + return + } + } + + enemydist = AttackerDistance() + + if(enemydist > AttackDist) + { + ShootOff() + SwitchFSM(STATE_GUARD) + FlameOff() + return + } + + if(bLongRange && enemydist > AttackDistMin) //prepni na longrange + { + ShootOff() + FlameOff() + + if(StateAge(STATE_CLOSECOMBAT) > 3.5 && DistanceBetween(Attacker) < 256.0 && InFront(Attacker, 0.5)) + { + SwitchFSM(STATE_CLOSECOMBAT) + } + else + { + SwitchFSM(STATE_LR_ATTACK) + } + + return + } + + float dot = facevec * DistanceVector + if(dot > 0.85 && enemydist < 128) + { + if(!ParticleEmitor.SwitchStatus) + { + FlameOn() + } + } + else + { + if(ParticleEmitor.SwitchStatus) + { + FlameOff() + } + } + + if(stand) + { + //some hysteresis, to avoid oscilation + if(enemydist > AttackDistClose + 24 || !CheckDirectPath(Attacker)) + { + SetAnimState(t_run) + stand = false + } + else + { + if(CurrentWeapon.Action && ASet.Anims[a_combat_idle_fire]) + SetAnimState(t_idle_fire) + else + SetAnimState(t_idle) + + TurnByAnim(Attacker, 30) + } + } + else + { + if(enemydist <= AttackDistMin) + { + if(!bShooting) + ShootOn(0, true) + + if(enemydist <= AttackDistClose && CheckDirectPath(Attacker)) + { + SetAnimState(t_idle) + stand = true + ResetTurn() + } + } + else + { + if(bShooting) + ShootOff() + } + } + } + ShootOff() + FlameOff() +} + + ShotStorage FlameParms +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(ParticleEmitor.SwitchStatus) + { + vector mat[4] + GetBoneMatrix(this, B_Hlava, mat) + + vector from = mat[3] + vector to = GetOrigin(Attacker) + vector dir = to - from + VectorNormalize(dir) +/* + vector dir = mat[2] * -1 + "0 0 0.35" + VectorNormalize(dir) + vector to = dir * 128 + from +*/ + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, from, to) + + float plane[4] + + int pfl = ClearFlags(this, TFL_SOLID) + + if(TraceLineEx(DEFAULT, from, to, ZeroVec, ZeroVec, other, plane, NULL, NULL, TRACE_DEFAULT|TRACE_BONES, NULL) < 1) + { + if(other.ClassType == ClassTypeCreature) + { + FlameParms.from = from + FlameParms.VisualsFrom = from + FlameParms.to = to + FlameParms.dir = dir + FlameParms.shooter = this + FlameParms.damage = WDmgBoss2 * ftime + FlameParms.ID = World.ShootID++ + FlameParms.Bone = g_iTraceBone + FlameParms.Shoot(other) + } + } + SetFlags(this, pfl) + } + } + +//----------------------------------------------------------------- + void TraceEnd() + { + /* + vector mat[4], mid + GetBoneMatrix(this, B_LeftHand, mat) + mid = mat[3] + GetBoneMatrix(this, B_RightHand, mat) + mid = mid + mat[3] * 0.5 + + misc_particle_effector eff = new misc_particle_effector +// eff.SetParms("particle/bosshit.ptc", mid, true, false) + eff.SetParms("particle/tachyonexplode.ptc", mid, true, false) + eff.Switch(true) +*/ + iTraceHit = 0 + CurrentWeapon.TraceEnd() + } + + +//----------------------------------------------------------------- +int AIIdle(local ExtClass target, local int itype = it_default, local float wakedist = 0) +{ + SetAnimState(t_idle) + local float ft = 0 + local int prevs = status + local int res = 0 + + ResetTurn() + while(RestTime != 0 && IsState(prevs)) + { + if(ShowAI) + SetWidgetText(WAI, 4, "AIIdle " + ftoa(RestTime)) + + if(target && wakedist > 0) + { + if(Distance(target) < wakedist) + { + res = 1 + goto getout + } + } + + AISleep(AI_SLOWREFRESH) + ft += AI_SLOWREFRESH + + if(ft >= 100) + { + if(ShowAI) + SetWidgetText(WAI, 4, "AIIdle " + ftoa(RestTime) + " IdleVar") + + ft = 0 + + int anim = -1 + + switch(itype) + { + case it_default: + if(astate == s_combat) + anim = a_combat_idle_var + rand(0, NumCombatIdleVarAnims) + else + { + if(astate == s_alert) + anim = a_alert_idle_var + rand(0, NumAlertIdleVarAnims) + else + anim = a_relax_idle_var + rand(0, NumRelaxIdleVarAnims) + } + break + + case it_fight: + if(astate == s_combat) + anim = a_combat_idle_var + rand(0, NumCombatIdleVarAnims) + else + { + if(astate == s_alert) + anim = a_alert_idle_var + rand(0, NumAlertIdleVarAnims) + else + anim = a_relax_idle_var + rand(0, NumRelaxIdleVarAnims) + } + break + + case it_lost: + anim = a_lost_idle_var + rand(0, NumLostIdleAnims) + break + } + + if(anim >= 0) + { + PlayAnimWait(s_idlevar, anim, 10.0, g_all, 30, AF_ONCE) + } + } + + if(target) + { + ft += TurnByAnim(target, 50) + } + } + +getout: + if(ShowAI) + SetWidgetText(WAI, 4, "") + + return res +} + +//----------------------------------------------------------------- + void ~creature_boss() + { + delete FlameParms + delete ParticleEmitor + } + +//----------------------------------------------------------------- + void creature_boss() + { + if(!SoundSetName) + SoundSetName = "Boss" + + DefaultAnimSetName = "Boss" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "" + RagdollMass = 200 + + bLongRange = true + bShortRange = true + bNoLOFLatency = true + + AttackDistMin = 300 + AttackDistClose = 128 + AttackDist = 2048 + + fMinCosForSlowTurn = cos(120 * DEG2RAD) + fMaxStrafeDistance = 72 + bAlignOnGround = true + fZDamper = 10 + fADamper = 15 + + fMaxRange = 768 + + fCloseHitRange = 80 + + LookAxis = -3 + LookBone = B_Head + + ShapeIndex = 2 + + fShootpointTimeout = 5.0 + fNotInLOFTimeout = 3.5 + + FSType = FSPlayer + + Health = BossHealth + + MinAttacksInRow[0] = 1 + MaxAttacksInRow[0] = 1 + MinAttackDelay[0] = 2.5 + MaxAttackDelay[0] = 2.5 + MinRestAfterAttack[0] = 2 + MaxRestAfterAttack[0] = 3 + + MinAttacksInRow[1] = 1 + MaxAttacksInRow[1] = 1 + MinAttackDelay[1] = 2.5 + MaxAttackDelay[1] = 2.5 + MinRestAfterAttack[1] = 2 + MaxRestAfterAttack[1] = 3 + + fMinBulletRain = 25 + + CurrentWeapon = new item_weapon_boss() + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + + //Jabbovina - nemame pivot, takze je zbran otocena uplne blbe + SetAngles(CurrentWeapon, "180 0 90") + MainObject = GetObject("obj/creatures/boss/boss.xob") + SetObject(MainObject, _materialremap) + + ParticleEmitor = new misc_particle_effector + ParticleEmitor.SetParms("particle/boss_firestream.ptc", ZeroVec, true, false) + SetAngles(ParticleEmitor, "180 0 0") + AddChild(this, ParticleEmitor, p_lhand) + ParticleEmitor.Switch(false) + + FlameParms = new ShotStorage + FlameParms.HurtType = HT_FLAME + FlameParms.NumBullets = 1 + FlameParms.MarkSize = 32 + FlameParms.RicDecalType = DE_BULLET + FlameParms.RicSndType = SE_BULLET + FlameParms.RicParticlesType = PE_BULLET + FlameParms.CameraHitFactor = 0 + FlameParms.power = 30 + } +} + +#endif \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/class_creature/humanoids.h b/Alpha Prime/Mod/scripts/class_creature/humanoids.h new file mode 100644 index 0000000..ab762c2 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_creature/humanoids.h @@ -0,0 +1,984 @@ +//================================================================================= +class creature_technician1 extends HumanoidNPC +{ +//----------------------------------------------------------------- + void creature_technician1() + { + if(!SoundSetName) + SoundSetName = "Technician" + + DefaultAnimSetName = "Technician_pistol" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 67 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = TechnicianHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 2 + MaxRestAfterAttack[0] = 2.75 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 10 + MinAttackDelay[1] = 0.5 + MaxAttackDelay[1] = 0.75 + MinRestAfterAttack[1] = 2.85 + MaxRestAfterAttack[1] = 3.85 + + fMinBulletRain = 3 + + CurrentWeapon = new item_weapon_pistol(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgTechnician + + const string t1models[2] = {"obj/creatures/technicist/technicist.xob", "obj/creatures/technicist3/technicist3.xob"} + MainObject = GetObject(t1models[rand(0, 2)]) + SetObject(MainObject, _materialremap) + } +} + +//================================================================================= +class creature_technician2 extends HumanoidNPC +{ +//----------------------------------------------------------------- + void creature_technician2() + { + if(!SoundSetName) + SoundSetName = "Technician" + + DefaultAnimSetName = "Technician_pistol" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 48 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = TechnicianHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 2 + MaxRestAfterAttack[0] = 2.95 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 10 + MinAttackDelay[1] = 0.5 + MaxAttackDelay[1] = 0.85 + MinRestAfterAttack[1] = 2.9 + MaxRestAfterAttack[1] = 3.9 + + fMinBulletRain = 2.89 + + CurrentWeapon = new item_weapon_pistol(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgTechnician + + const string t2models[2] = {"obj/creatures/technicist2/technicist2.xob", "obj/creatures/technicist4/technicist4.xob"} + MainObject = GetObject(t2models[rand(0, 2)]) + SetObject(MainObject, _materialremap) + } +} + +//================================================================================= +class creature_guard1 extends HumanoidNPC +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void RFootstep() + { + Footstep(-1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void LFootstep() + { + Footstep(1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void creature_guard1() + { + if(!SoundSetName) + SoundSetName = "Guard" + + DefaultAnimSetName = "Guard" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 57 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = GuardHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1.5 + MaxRestAfterAttack[0] = 2.1 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 15 + MinAttackDelay[1] = 0.35 + MaxAttackDelay[1] = 0.72 + MinRestAfterAttack[1] = 2.1 + MaxRestAfterAttack[1] = 2.2 + + fMinBulletRain = 3 + + CurrentWeapon = new item_weapon_shotgun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgGuard1 + + MainObject = GetObject("obj/creatures/guard/guard.xob") + SetObject(MainObject, _materialremap) + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + } +} + +//================================================================================= +class creature_guard2 extends HumanoidNPC +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } +//----------------------------------------------------------------- + + + void RFootstep() + { + Footstep(-1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void LFootstep() + { + Footstep(1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void creature_guard2() + { + if(!SoundSetName) + SoundSetName = "Guard" + + DefaultAnimSetName = "Guard" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 57 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = GuardHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1.9 + MaxRestAfterAttack[0] = 2.1 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 15 + MinAttackDelay[1] = 0.3 + MaxAttackDelay[1] = 0.6 + MinRestAfterAttack[1] = 2.2 + MaxRestAfterAttack[1] = 2.4 + + fMinBulletRain = 2.98 + + CurrentWeapon = new item_weapon_machinegun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgGuard2 + + MainObject = GetObject("obj/creatures/guard/guard.xob") + SetObject(MainObject, "$remap 'guard' 'guard2';") + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + } +} + +//================================================================================= +class creature_lighttrooper extends HumanoidNPC +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void RFootstep() + { + Footstep(-1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void LFootstep() + { + Footstep(1) + Sound(51, SF_ONCE) + } + + +//----------------------------------------------------------------- + void creature_lighttrooper() + { + if(!SoundSetName) + SoundSetName = "LightTrooper" + + DefaultAnimSetName = "LightTrooper" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 59 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = LightTrooperHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1.1 + MaxRestAfterAttack[0] = 2 + + MinAttacksInRow[1] = 7 + MaxAttacksInRow[1] = 16 + MinAttackDelay[1] = 0.21 + MaxAttackDelay[1] = 0.66 + MinRestAfterAttack[1] = 1.9 + MaxRestAfterAttack[1] = 2.1 + + fMinBulletRain = 3.02 + SmallPainGroup = g_smallpain + + CurrentWeapon = new item_weapon_machinegun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgLightTrooper + + MainObject = GetObject("obj/creatures/lighttrooper/lighttrooper.xob") + SetObject(MainObject, "$remap 'EnemyLights1' 'EnemyLights1_blue';$remap 'EnemyLights2' 'EnemyLights2_blue';") + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + + GetSpeechSet("Trooper") + } +} + +//================================================================================= +class creature_lighttrooper2 extends HumanoidNPC +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void RFootstep() + { + Footstep(-1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void LFootstep() + { + Footstep(1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void creature_lighttrooper2() + { + if(!SoundSetName) + SoundSetName = "LightTrooper" + + DefaultAnimSetName = "Guard" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 63 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = LightTrooperHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1 + MaxRestAfterAttack[0] = 2 + + MinAttacksInRow[1] = 6 + MaxAttacksInRow[1] = 18 + MinAttackDelay[1] = 0.205 + MaxAttackDelay[1] = 0.35 + MinRestAfterAttack[1] = 1.9 + MaxRestAfterAttack[1] = 2.2 + + fMinBulletRain = 3.88 + SmallPainGroup = g_smallpain + + CurrentWeapon = new item_weapon_shotgun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgLightTrooper2 + + MainObject = GetObject("obj/creatures/lighttrooper/lighttrooper.xob") + SetObject(MainObject, "$remap 'LightTrooper' 'LightTrooper2';$remap 'LightTrooperHelmet' 'LightTrooperHelmet2';$remap 'EnemyLights1' 'EnemyLights1_red';$remap 'EnemyLights2' 'EnemyLights2_red';") + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + GetSpeechSet("Trooper") + } +} + +//================================================================================= +class creature_lighttrooper3 extends AISniperClass +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void RFootstep() + { + Footstep(-1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void LFootstep() + { + Footstep(1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void creature_lighttrooper3() + { + if(!SoundSetName) + SoundSetName = "LightTrooper" + + DefaultAnimSetName = "LightTrooper" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 65 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = LightTrooperHealth + + MinAttacksInRow[0] = 5 + MaxAttacksInRow[0] = 7 + MinAttackDelay[0] = 0.3 + MaxAttackDelay[0] = 0.3 + MinRestAfterAttack[0] = 2 + MaxRestAfterAttack[0] = 3 + + MinAttacksInRow[1] = 8 + MaxAttacksInRow[1] = 10 + MinAttackDelay[1] = 0.5 + MaxAttackDelay[1] = 1.0 + MinRestAfterAttack[1] = 2.6 + MaxRestAfterAttack[1] = 3.6 + + fMinBulletRain = 2.66 + SmallPainGroup = g_smallpain + + CurrentWeapon = new item_weapon_sniperrifle(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgLightTrooper3 + + MainObject = GetObject("obj/creatures/lighttrooper/lighttrooper.xob") + SetObject(MainObject, "$remap 'LightTrooper' 'LightTrooper3';$remap 'LightTrooperHelmet' 'LightTrooperHelmet3'") + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + + GetSpeechSet("Trooper") + } +} + +//================================================================================= +class creature_heavytrooper_ft extends HumanoidNPC +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- +void AITakeCover() +{ + local int prevstatus = status + + SetState(s_combat) + SetAnimState(t_idle) + TurnByAnim(Attacker, 10) + ShootOff() + + PlayAnimWait(s_walk - 1, a_combat_cover, 20.0, g_all, 30, AF_ONCE) + PlayAnim(s_walk - 1, a_combat_cover + 1, 5.0, g_all, 30, 0) + + local float timeout = 150 + + if(prevstatus == STATE_COVERFROMDANGER) + timeout = 300 + + while(timeout > 0 && IsState(prevstatus)) + { + if(prevstatus == STATE_COVERFROMDANGER) + { + if(AIEventAge(AIE_GRENADE) > 2.0) + break + } + + timeout -= AI_REFRESH + AISleep(AI_REFRESH) + } + + PlayAnimWait(s_walk - 1, a_combat_cover + 2, 20.0, g_all, 30, AF_ONCE|AF_BLENDOUT) + + if(IsState(prevstatus)) + SwitchFSM(STATE_GUARD) + + BulletRainCounter = 0 +} + +//----------------------------------------------------------------- +void AITakeCoverFromDanger() +{ + AITakeCover() +} + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void RFootstep() + { + Footstep(-1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void LFootstep() + { + Footstep(1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void creature_heavytrooper_ft() + { + if(!SoundSetName) + SoundSetName = "HeavyTrooperFT" + + DefaultAnimSetName = "HeavyTrooperFT" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/metal" + RagdollDef = "FatHumanoid" + RagdollMass = 100 + + bLongRange = false + bShortRange = true + + FSType = FSPlayer + + Health = HeavyTrooperFTHealth + + MinAttacksInRow[0] = 25 + MaxAttacksInRow[0] = 30 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1 + MaxRestAfterAttack[0] = 2 + + MinAttacksInRow[1] = 9 + MaxAttacksInRow[1] = 18 + MinAttackDelay[1] = 0.2 + MaxAttackDelay[1] = 0.2 + MinRestAfterAttack[1] = 2.5 + MaxRestAfterAttack[1] = 3.5 + + AttackDistMin = 245 + + fMinBulletRain = 16.9 + SmallPainGroup = g_smallpain + + CurrentWeapon = new item_weapon_flamethrower(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgHeavyTrooperFT + + MainObject = GetObject("obj/creatures/heavytrooper/heavytrooper.xob") + SetObject(MainObject, "$remap 'EnemyLights1' 'EnemyLights1_red';$remap 'EnemyLights2' 'EnemyLights2_red';") + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + + GetSpeechSet("Trooper") + + CurrentWeapon.Ammo = -1 + } +} + +//================================================================================= +class creature_heavytrooper_rl extends AISniperClass +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void RFootstep() + { + Footstep(-1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void LFootstep() + { + Footstep(1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void creature_heavytrooper_rl() + { + if(!SoundSetName) + SoundSetName = "HeavyTrooperRL" + + DefaultAnimSetName = "HeavyTrooperRL" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/metal" + RagdollDef = "FatHumanoid" + RagdollMass = 97 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = HeavyTrooperRLHealth + + MinAttacksInRow[0] = 1 + MaxAttacksInRow[0] = 3 + MinAttackDelay[0] = 1.0 + MaxAttackDelay[0] = 1.0 + MinRestAfterAttack[0] = 1.1 + MaxRestAfterAttack[0] = 2.2 + + MinAttacksInRow[1] = 1 + MaxAttacksInRow[1] = 3 + MinAttackDelay[1] = 0.9 + MaxAttackDelay[1] = 0.9 + MinRestAfterAttack[1] = 2.2 + MaxRestAfterAttack[1] = 3.2 + + fMinBulletRain = FLT_MAX + SmallPainGroup = g_smallpain + + CurrentWeapon = new item_weapon_rocketlauncher(this) + + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgHeavyTrooperRL + + MainObject = GetObject("obj/creatures/heavytrooper/heavytrooper.xob") + SetObject(MainObject, "$remap 'HeavyTrooper' 'HeavyTrooper2';$remap 'HeavyTrooperHelmet' 'HeavyTrooperHelmet2'") + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + GetSpeechSet("Trooper") + } +} + +//================================================================================= +class creature_heavycommander extends HumanoidNPC +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void RFootstep() + { + Footstep(-1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void LFootstep() + { + Footstep(1) + Sound(51, SF_ONCE) + } + +//----------------------------------------------------------------- + void creature_heavycommander() + { + if(!SoundSetName) + SoundSetName = "HeavyCommander" + + DefaultAnimSetName = "LightTrooper" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 60 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = CommanderHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 25 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1.8 + MaxRestAfterAttack[0] = 2.2 + + MinAttacksInRow[1] = 9 + MaxAttacksInRow[1] = 19 + MinAttackDelay[1] = 0.22 + MaxAttackDelay[1] = 0.71 + MinRestAfterAttack[1] = 2.2 + MaxRestAfterAttack[1] = 3.3 + + fMinBulletRain = FLT_MAX + SmallPainGroup = g_smallpain + + CurrentWeapon = new item_weapon_machinegun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgCommander + + const string hcmodels[2] = {"obj/creatures/heavycommander/heavycommander.xob", "obj/creatures/heavycommander2/heavycommander2.xob"} + MainObject = GetObject(hcmodels[rand(0, 2)]) + + SetObject(MainObject, _materialremap) + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + } +} diff --git a/Alpha Prime/Mod/scripts/class_creature/npc.h b/Alpha Prime/Mod/scripts/class_creature/npc.h new file mode 100644 index 0000000..9259c86 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_creature/npc.h @@ -0,0 +1,821 @@ +//================================================================================= +class HumanoidNPC extends AICreatureClass +{ +//----------------------------------------------------------------- +void SoundFirstSight() +{ + Sound(6, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundSuspicious() +{ + Sound(6, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundDeath() +{ + Sound(21, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundPain() +{ + Sound(20, SF_ONCE) +} + +//----------------------------------------------------------------- +void CreateBody() +{ + dBodyCreate(this, ZeroVec, BC_NONE) + + vector min, max + GetBoundBox(this, min, max) + + //float thick = max[0] - min[0] * 0.5 + float thick = 8.0 + float zheight = max[2] - min[2] * 0.5 - thick + + geom = dGeomCreateCapsule(thick, Vector(0, 0, zheight)) + + dBodyAddGeom(this, geom, g_vIdentMatrix, "material/creatureflesh") + dBodySetMass(this, ZeroVec, 90) +} + +//----------------------------------------------------------------- +void SetHeadOrientation(float pitch, float yaw) +{ + float lquat[4], quat[4] + float lquat2[4], quat2[4] + vector mat[4] + + if(pitch || yaw) + { + clamp pitch<-45, 45> + clamp yaw<-110, 110> + + QuatRotationRollPitchYaw(quat, Vector(yaw * -0.8, 0, pitch * -0.2)) + QuatRotationRollPitchYaw(quat2, Vector(yaw * -0.3, 0, pitch * -0.7)) + } + else + { + QuatIdentity(quat) + QuatIdentity(quat2) + } + + QuatLerp(lquat, PLookQuat, quat, ftime * 9) + QuatLerp(lquat2, PLookQuat2, quat2, ftime * 9) + + if(PLookQuat[0] != lquat[0] || PLookQuat[1] != lquat[1] || PLookQuat[2] != lquat[2] || PLookQuat[3] != lquat[3]) + { + QuatMatrix(lquat, mat) + SetBoneGlobal(this, B_Spine1, mat) + QuatCopy(lquat, PLookQuat) + } + + if(PLookQuat2[0] != lquat2[0] || PLookQuat2[1] != lquat2[1] || PLookQuat2[2] != lquat2[2] || PLookQuat2[3] != lquat2[3]) + { + QuatMatrix(lquat2, mat) + SetBoneGlobal(this, B_Head, mat) + QuatCopy(lquat2, PLookQuat2) + } +} + +//----------------------------------------------------------------- +void HumanoidNPC() +{ + ClassNum = 0 + + flags |= FL_CANOPENDOORS + + fMinCosForSlowTurn = cos(120 * DEG2RAD) + fMaxStrafeDistance = 72 + bAlignOnGround = false + fZDamper = 10 + fADamper = 15 + + LookAxis = -2 + LookBone = B_Hlava + + ShapeIndex = 0 + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoidtest" + RagdollMass = 50 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + +} +} + +//================================================================================= +class AISniperClass extends HumanoidNPC +{ +//----------------------------------------------------------------- +//snipers don't care about height or AttackerLKP +//----------------------------------------------------------------- +float AttackerDistance2() +{ + if(Attacker == NULL) + return 10000000 //FIXME: shouldn't happen!!!??? + + vector from, t + + from = CurrentPos - HHVec + + t = GetOrigin(Attacker) - from + + DistanceVector = t + DistanceVector[2] = 0 + VectorNormalize(DistanceVector) + + if(fabs(t[2]) < Height) + t[2] = 0 + + return VectorLength(t) +} + +//----------------------------------------------------------------- +bool LRAttack() +{ + SetAnimState(t_idle) + + Attacker.AddAttacker(this) + +local bool crouched = false +bool ret = true + + while(true) + { + Wait(Stopped == false) + + if(!IsState(STATE_LR_ATTACK)) + { + ret = false + goto getout + } + AttackStatus = 1 + + //turn to attacker if we need that + TurnByAnim(Attacker, 10) + + Sleep(AI_REFRESH) + if(!IsState(STATE_LR_ATTACK)) + { + ret = false + goto getout + } + + //we can reload now. Try it + if(CurrentWeapon.NumActions >= 2 && CurrentWeapon.Ammo < 2) + { + bShooting = false + + Wait(CurrentWeapon.CanAct(2)) + + if(!IsState(STATE_LR_ATTACK)) + { + ret = false + goto getout + } + + //may changed meanwhile + if(CurrentWeapon.Ammo < 2) + { + ReloadGun() + } + } + + SetAnimState(t_idle) + local int prevs = status + + if(!crouched) + { + PlayAnimWait(s_walk - 1, a_crouch + 1, 10.0, g_all, 30, AF_ONCE) + crouched = true + } + PlayAnim(s_walk - 1, a_crouch + 0, 10.0, g_all, 30, 0) + + NotInLOFTime = 0 + ShootOn(0, true) + local int res = 0 + while(IsState(prevs)) + { + float dist = AttackerDistance2() + + //We're too near to Attacker + if(dist < AttackDistMin) + { + res = 1 + break + } + + float dot = DistanceVector * facevec + + if(dot < 0.5) // >60' + { + res = 2 + break + } + + + if(NotInLOFTime > 5) + { + break + } + + if(CurrentWP && !IsCurrentWPValid(false)) + { + break + } + + if(ShowAI) + SetWidgetText(WAI, 4, "Shoot-Idle " + ftoa(NotInLOFTime)) + + Sleep(AI_REFRESH) + } + ShootOff() + + if(!IsState(STATE_LR_ATTACK) || IsKilled(STATE_RETURN)) + { + ret = false + break + } + + //just turn to attacker + if(res == 2) + { + PlayAnimWait(s_walk - 1, a_crouch + 2, 10.0, g_all, 30, AF_ONCE) + crouched = false + + continue + } + + if(res == 1 && bShortRange) //prepni na shortrange + { + CPosition warea = GetWPos() + if(IsConnected(warea, Attacker.GetWPos())) + { + if(BeginPath(Attacker, false) == PATH_OK) + { + SwitchFSM(STATE_CHASE) + ret = false + break + } + } + } + + local info_waypoint wp = FindWaypoint(CurrentWP, AttackerLKP, AttackDistMin, 512, 2, Attacker) + + if(wp != NULL && CurrentWP != wp) + { + crouched = false + PlayAnimWait(s_walk - 1, a_crouch + 2, 10.0, g_all, 30, AF_ONCE) +/* +if(_name == "heavyTrooper0") +{ + Print(wp) + Print(CurrentWP) +} +*/ + Say(ST_CHANGINGWP) + LRNextSP(wp) + + SetAnimState(t_idle) + + if(!IsState(STATE_LR_ATTACK)) + { + ret = false + break + } + } + else + { + Sleep(frand(MinAttackDelay[iAttackType], MaxAttackDelay[iAttackType])) //at least time for shoot repeat + } + Sleep(AI_REFRESH) //avoid deadlock + } + +getout: + if(crouched) + { + PlayAnimWait(s_walk - 1, a_crouch + 2, 10.0, g_all, 30, AF_ONCE) + } + + return ret +} + +//----------------------------------------------------------------- +void AILongRangeAttack() +{ + SetState(s_combat) + AttackStatus = 1 + + Sleep(AI_REFRESH) + + LRAttack() +} + +} + +//================================================================================= +class creature_faggioli extends HumanoidNPC +{ +//----------------------------------------------------------------- + void creature_faggioli() + { + if(!SoundSetName) + SoundSetName = "Faggioli" + + DefaultAnimSetName = "LightTrooper" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 60 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = FaggioliHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 3 + MaxRestAfterAttack[0] = 3.5 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 10 + MinAttackDelay[1] = 0.5 + MaxAttackDelay[1] = 1.0 + MinRestAfterAttack[1] = 4 + MaxRestAfterAttack[1] = 5 + + fMinBulletRain = 1.5 + + CurrentWeapon = new item_weapon_machinegun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgFaggioli + + MainObject = GetObject("obj/creatures/prospector/prospector.xob") + SetObject(MainObject, _materialremap) + } +} + +//================================================================================= +class creature_warren extends HumanoidNPC +{ +//----------------------------------------------------------------- + void creature_warren() + { + if(!SoundSetName) + SoundSetName = "Warren" + + DefaultAnimSetName = "LightTrooper" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 62 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = WarrenHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 2 + MaxRestAfterAttack[0] = 3 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 10 + MinAttackDelay[1] = 0.29 + MaxAttackDelay[1] = 0.72 + MinRestAfterAttack[1] = 3 + MaxRestAfterAttack[1] = 4 + + fMinBulletRain = 3 + + CurrentWeapon = new item_weapon_machinegun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgWarren + + MainObject = GetObject("obj/creatures/waren/waren.xob") + SetObject(MainObject, _materialremap) + } +} + +//================================================================================= +class creature_NPCcommander extends HumanoidNPC +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void creature_NPCcommander() + { + if(!SoundSetName) + SoundSetName = "NPCCommander" + + DefaultAnimSetName = "LightTrooper" + + GetHurtFactors(HumanHurtFactors) + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 60 + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + Health = NPCcommanderHealth + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1.8 + MaxRestAfterAttack[0] = 2.2 + + MinAttacksInRow[1] = 9 + MaxAttacksInRow[1] = 19 + MinAttackDelay[1] = 0.22 + MaxAttackDelay[1] = 0.71 + MinRestAfterAttack[1] = 2.2 + MaxRestAfterAttack[1] = 3.3 + + fMinBulletRain = 3.5 + + CurrentWeapon = new item_weapon_machinegun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_rhand) + CurrentWeapon.ShotStor.damage = WDmgNPCcommander + + MainObject = GetObject("obj/creatures/commander/commander.xob") + SetObject(MainObject, _materialremap) + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + } +} + +//================================================================================= +class creature_puppet extends HumanoidNPC +{ + string weapon + string _materialremap + FacialAnimationPlayer LipsyncEnt + bool lefthanded + float fEyesTarget, fEyesWeight, fEyesSpeed + +//----------------------------------------------------------------- + void M_Say(ExtClass other) + { + UpdateEntity(this) + int hsnd = World.Dialog(this, other._value, SF_NOTEST) + + if(hsnd) + { + LipsyncEnt.PlayAnim(other._value, hsnd) + } + } + +//----------------------------------------------------------------- + void M_Shoot(ExtClass other) + { + string tokens[8] + + int nt = ParseString(other._value, tokens) + + if(nt < 1) + return + + ExtClass ec = FindClass(tokens[0]) + + int bone = B_Spine + + if(nt >= 3 && tokens[2]) + { + if(!GetValue(NULL, "B_" + tokens[2], 0, bone)) + return + } + + int numshots = 5 + + if(nt >= 5 && tokens[4]) + { + numshots = atoi(tokens[4]) + } + + while(numshots) + { + if(CurrentWeapon.CanAct(1)) + { + vector bmat[4] + if(!GetBoneMatrix(ec, bone, bmat)) + break + + CurrentWeapon.Action(1, bmat[3]) + numshots-- + } + Sleep(5) + } + } + +//----------------------------------------------------------------- + void M_Stop(ExtClass other) + { + ClearEventMask(this, EV_FRAME) + } + + float NextBlinkTime, StartBlinkTime + float BlinkLength +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(fEyesTarget != -1) + { + if(fEyesWeight != fEyesTarget) + { + if(fEyesSpeed == 0) + { + fEyesWeight = fEyesTarget + } + else + { + float finc = ftime * (1 / fEyesSpeed) + if(fEyesTarget < fEyesWeight) + { + fEyesWeight = fEyesWeight - finc + if(fEyesWeight < fEyesTarget) + fEyesWeight = fEyesTarget + } + else + { + fEyesWeight = fEyesWeight + finc + if(fEyesWeight > fEyesTarget) + fEyesWeight = fEyesTarget + } + } + SetMorphState(this, "Mrkani_L", fEyesWeight) + SetMorphState(this, "Mrkani_R", fEyesWeight) + } + return + } + + if(Health == 0) + { + fEyesWeight = 0 + SetMorphState(this, "Mrkani_L", 0) + SetMorphState(this, "Mrkani_R", 0) + return + } + + if(currenttime > NextBlinkTime) + { + StartBlinkTime = currenttime + NextBlinkTime = currenttime + frand(3.0, 4.7) + + if(rand(0,100) > 80) + BlinkLength = M_PI * 2 + else + BlinkLength = M_PI + } + + float t = currenttime - StartBlinkTime * 15.0 + + if(t < BlinkLength) + { + + fEyesWeight = fabs(sin(t)) + + SetMorphState(this, "Mrkani_L", fEyesWeight) + SetMorphState(this, "Mrkani_R", fEyesWeight) + } + } + +//----------------------------------------------------------------- + void BeforeInit() + { + if(Health == 0) + Health = TechnicianHealth + + if(!SoundSetName) + SoundSetName = "Technician" + + DefaultAnimSetName = "Technician_pistol" + + switch(weapon) + { + case "item_weapon_dummy": + CurrentWeapon = new item_weapon_dummy() + break + + case "item_weapon_pistol": + CurrentWeapon = new item_weapon_pistol(this) + break + + case "item_weapon_machinegun": + CurrentWeapon = new item_weapon_machinegun(this) + break + + case "item_weapon_shotgun": + CurrentWeapon = new item_weapon_shotgun(this) + break + + case "item_weapon_sniperrifle": + CurrentWeapon = new item_weapon_sniperrifle(this) + break + + case "item_weapon_rocketlauncher": + CurrentWeapon = new item_weapon_rocketlauncher(this) + break + + case "item_weapon_flamethrower": + CurrentWeapon = new item_weapon_flamethrower(this) + break + + case "item_weapon_jackhammer": + CurrentWeapon = new item_weapon_jackhammer(this) + break + + default: + CurrentWeapon = new item_weapon_dummy() + break + } + + CurrentWeapon.Pick(this) + if(lefthanded) + SelectItem(CurrentWeapon, p_lhand) + else + SelectItem(CurrentWeapon, p_rhand) + + CurrentWeapon.ShotStor.damage = WDmgTechnician + + if(!model) + model = "obj/creatures/technicist/technicist.xob" + + MainObject = GetObject(model) + SetObject(MainObject, _materialremap) + + if(strstr(model, "livia.xob") != -1) + { + vector headmat[4] = {"1.075 0 0", "0 1 0", "0 0 0.94", ZeroVec} +// SetBoneMatrix(this, B_Head, headmat) + SetBoneMatrix(this, B_Neck, headmat) + } + } + +//----------------------------------------------------------------- + void EOnSoundEnd(MinClass other, int extra) + { + for(int n = 0; n < 4; n++) + { + if(World.DlgSound[n] == extra) + { + //it was cutscene dialog. Stop Lipsync player! + World.DlgSound[n] = 0 + World.DlgID[n] = "" + LipsyncEnt.StopAnim() + return + } + } + } + +//----------------------------------------------------------------- +void M_Hide(ExtClass other) +{ + Show(false) + for(int n = 0; n < sizeof(CSoundID); n++) + { + if(CSoundID[n]) + EndSound(CSoundID[n]) + } +} + +//----------------------------------------------------------------- +void M_OpenEyes(ExtClass other) +{ + fEyesTarget = 0.0 + fEyesSpeed = atof(other._value) +} + +//----------------------------------------------------------------- +void M_CloseEyes(ExtClass other) +{ + fEyesTarget = 1.0 + fEyesSpeed = atof(other._value) +} + +//----------------------------------------------------------------- +void EndCutscene() +{ + ClearEventMask(this, EV_FRAME) +} + +//----------------------------------------------------------------- +void BeginCutscene() +{ + SetEventMask(this, EV_FRAME) +} + +//----------------------------------------------------------------- + void creature_puppet() + { + GetHurtFactors(HumanHurtFactors) + + fEyesTarget = -1.0 + fEyesWeight = 0.0 + + RagdollMaterial = "material/flesh" + RagdollDef = "humanoid2" + RagdollMass = 50 + + DefaultAnimSetName = "LightTrooper" + + bLongRange = true + bShortRange = false + + FSType = FSPlayer + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1.8 + MaxRestAfterAttack[0] = 2.2 + + MinAttacksInRow[1] = 9 + MaxAttacksInRow[1] = 18 + MinAttackDelay[1] = 0.5 + MaxAttackDelay[1] = 0.95 + MinRestAfterAttack[1] = 2.2 + MaxRestAfterAttack[1] = 3.8 + + fMinBulletRain = 3.1 + + ClearFlags(this, TFL_USER6) + SetKind(this, DEFAULT) + SetEventMask(this, EV_SOUNDEND) + LipsyncEnt = new FacialAnimationPlayer(this) + } + + void ~creature_puppet() + { + //delete LipsyncEnt + } + +} + +#include "scripts/class_creature/humanoids.h" diff --git a/Alpha Prime/Mod/scripts/class_creature/robots.h b/Alpha Prime/Mod/scripts/class_creature/robots.h new file mode 100644 index 0000000..3569d61 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_creature/robots.h @@ -0,0 +1,1450 @@ + +//================================================================================= +class item_weapon_spider extends FireWeaponClass +{ +//----------------------------------------------------------------- + void OnActionEnd() + { + if(Action == 1) //shot + { + EndAction() + } + + EndAction() + } + +//----------------------------------------------------------------- + int Action(int n, vector targ) + { + if(!CanAct(n)) + return false + + Ammo = 100 //FIXME + + if(PrimaryFire(targ)) + { + Action = 0 + return true + } + + Action = 0 + return false + } + +//----------------------------------------------------------------- + void item_weapon_spider() + { + ClassNum = CDronWeapon + SelectObject(this, MainObject) + + AmmoPerMagazine = PistolAmmoPerMagazine + AmmoType = AmmoPistol + Ammo = 1000 + NumActions = 1 + + Shooters[0] = new ShooterBullets(this, 1) + NumShooters = 1 + + ADelay[0] = 0.1 //primary attack + RicSndSkip = 3 + + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 6.57 + ShotStor.precision = 0.04 + ShotStor.StreakWidth = 16.8 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 72 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 5003 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 3 + ShotStor.damage = WDmgSpiderRobot + ShotStor.power = 2 + ShotStor.CameraHitFactor = 1 + ShotStor.RicDecalType = DE_PLASMA //DE_BULLET, DE_PLASMA + ShotStor.RicSndType = SE_PLASMA //SE_BULLET, SE_PLASMA + ShotStor.RicParticlesType = PE_PLASMA //PE_BULLET, PE_PLASMA + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + Flash = new weapon_flash(this, 0.1, "-90 0 0", 1) + Flash.rangle = ZeroVec + + InitSounds(WS_WeaponSpider) + } +} + +//================================================================================= +class creature_heavyspider extends AICreatureClass +{ +//----------------------------------------------------------------- +void SoundFirstSight() +{ + Sound(6, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundSuspicious() +{ + Sound(6, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundDeath() +{ + Sound(21, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundPain() +{ + Sound(20, SF_ONCE) +} + +//----------------------------------------------------------------- + void SetBBoxInfo() + { + Height = 48 + HHeight = 23 + HHVec = Vector(0, 0, HHeight) + Radius = 23 + Mins = "-23 -23 -23" + Maxs = "23 23 23" + + SetBoundBox(this, Mins, Maxs) + } + +//----------------------------------------------------------------- + void CreateBody() + { + dBodyCreate(this, ZeroVec, BC_NONE) + + geom = dGeomCreateSphere(23) + + dBodyAddGeom(this, geom, g_vIdentMatrix, "material/creaturemetal") + + dBodySetMass(this, ZeroVec, 250) + } + + vobject hitobj + MinClass hitent + float lasthittime + vector hitup + HLIGHT hitlight + +//----------------------------------------------------------------- + void OnHit() + { + if(hitent == NULL) + { + hitent = new MinClass + hitent.SetObject(hitobj, "$remap 'dron01_hit' 'heavyspider01_hit';") + } + + if(hitlight) + { + RemoveLight(hitlight) + } + + hitlight = AddLight(hitent,0,LFL_DYNAMIC|LFL_POINT, 0, 100, "50 50 200") + SetFlags(hitent, TFL_VISIBLE|TFL_FULLMATRIX) + vector mat[4] + GetBoneMatrix(this, B_Body, mat) + SetMatrix(hitent, mat) + + lasthittime = currenttime + + hitup[0] = 0 + hitup[1] = cos(currenttime * 50) + hitup[2] = sin(currenttime * 50) + } + +//----------------------------------------------------------------- + void OnDie() + { + if(hitlight) + { + RemoveLight(hitlight) + } + + if(hitent) + { + delete hitent + hitent = NULL + } + + vector mat[4] + GetBoneMatrix(this, B_Podvozek, mat) + + light_effect leff = new light_effect(mat[3], 0, 150, "20 20 255", 0) + leff.Flash(1, true) + + misc_particle_effector eff = new misc_particle_effector + eff.SetParms("particle/steam_smoke.ptc", ZeroVec, true, 2) + AddChild(this, eff, 7) + + eff = new misc_particle_effector() + + eff.SetParms("particle/tachyonexplode3.ptc", GetMatrix(this, 3), true, 2) + + ClearEventMask(this, EV_VISIBLE) + } + +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + if(lasthittime && hitent) + { + float td = currenttime - lasthittime + + const float maxtime = 0.1 + + if(td > maxtime) + { + lasthittime = 0 + ClearFlags(hitent, TFL_VISIBLE) + if(hitlight) + RemoveLight(hitlight) + } + else + { + float c = maxtime - td + clamp c<0, maxtime> + + c *= 255.0 / maxtime + hitent.Color = ARGBF(c,c,c,c) + + c *= 1 / 255 + SetLightEx(hitlight, 0, 100, "20 20 255" * c); + + vector mat[4] + GetBoneMatrix(this, B_Podvozek, mat) + + vector center = GetMatrix(this, 3)//mat[3] + vector front = World.CameraPos - center + VectorNormalize(front) + + vector right = front * hitup + vector up = right * front + + mat[0] = front * 1.75 + mat[1] = right * 1.75 + mat[2] = up * 1.75 + mat[3] = center + SetMatrix(hitent, mat) + } + } + + return 0 + } + +//----------------------------------------------------------------- + void SetHeadOrientation(float pitch, float yaw) + { + float lquat[4], quat[4] + float lquat2[4], quat2[4] + vector mat[4] + + if(pitch || yaw) + { + clamp pitch<-45, 45> + //prepare quaternion for head rotation. Transform is in local space of object, + //so axes are always the same + QuatRotationRollPitchYaw(quat, Vector(-yaw, 0, 0)) + QuatRotationRollPitchYaw(quat2, Vector(0, 0, -pitch)) + } + else + { + QuatIdentity(quat) + QuatIdentity(quat2) + } + + mat[3] = ZeroVec + + QuatLerp(lquat, PLookQuat, quat, ftime * 9) + QuatMatrix(lquat, mat) + SetBoneGlobal(this, B_Hlava, mat) + + QuatLerp(lquat2, PLookQuat2, quat2, ftime * 9) + QuatMatrix(lquat2, mat) + SetBoneMatrix(this, B_Hlava2, mat) + + QuatCopy(lquat, PLookQuat) + QuatCopy(lquat2, PLookQuat2) + } + +//----------------------------------------------------------------- + bool CanHitTarget(vector tpos) + { + return true + } + +//----------------------------------------------------------------- + void creature_heavyspider() + { + ClassNum = 0 + Health = HeavySpiderHealth + + flags |= FL_CANOPENDOORS + + if(!SoundSetName) + SoundSetName = "HeavySpider" + + DefaultAnimSetName = "HeavySpider" + + RagdollMaterial = "material/metal" + RagdollDef = "heavyspider" + RagdollMass = 240 + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 25 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1.8 + MaxRestAfterAttack[0] = 2.8 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 15 + MinAttackDelay[1] = 0.4 + MaxAttackDelay[1] = 0.8 + MinRestAfterAttack[1] = 2 + MaxRestAfterAttack[1] = 4 + + fMinBulletRain = 10 + bFlameResistent = true + + CurrentWeapon = new item_weapon_spider() + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_pivot0) + + bLongRange = true + bShortRange = false + + fMinCosForSlowTurn = cos(60 * DEG2RAD) + fMaxStrafeDistance = 76 + bAlignOnGround = false + fZDamper = 10 + fADamper = 15 + + fYawLimit = 360 + + LookAxis = 3 + LookBone = B_Hlava2 + + MainObject = GetObject("obj/creatures/heavyspider01/heavyspider01.xob") + SelectObject(this, MainObject) + + hitobj = GetObject("obj/creatures/dron01/dron01_hit.xob") + + ShapeIndex = 2 + AgentCost = 10 + + FSType = FSSpiderRobot + } +} + +//================================================================================= +class item_weapon_securityspider extends FireWeaponClass +{ +//----------------------------------------------------------------- + void OnActionEnd() + { + if(Action == 1) //shot + { + EndAction() + } + + EndAction() + } + +//----------------------------------------------------------------- + int Action(int n, vector targ) + { + if(!CanAct(n)) + return false + + Ammo = 100 //FIXME + + if(PrimaryFire(targ)) + { + Action = 0 + return true + } + + Action = 0 + return false + } + +//----------------------------------------------------------------- + void item_weapon_securityspider() + { + ClassNum = CDronWeapon + SelectObject(this, MainObject) + + AmmoPerMagazine = PistolAmmoPerMagazine + AmmoType = AmmoPistol + Ammo = 1000 + NumActions = 1 + + Shooters[0] = new ShooterBullets(this, 1) + NumShooters = 1 + + ADelay[0] = 0.2 //primary attack + RicSndSkip = 3 + + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 4 + ShotStor.precision = 0.040 + ShotStor.StreakWidth = 14.4 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 72 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 4993 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 3 + ShotStor.damage = WDmgSecuritySpider1 + ShotStor.power = 2 + ShotStor.CameraHitFactor = 1 + ShotStor.RicDecalType = DE_PLASMA //DE_BULLET, DE_PLASMA + ShotStor.RicSndType = SE_PLASMA //SE_BULLET, SE_PLASMA + ShotStor.RicParticlesType = PE_PLASMA //PE_BULLET, PE_PLASMA + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + Flash = new weapon_flash(this, 0.1, "-90 0 0", 1) + Flash.rangle = ZeroVec + + InitSounds(WS_WeaponSpider) + } +} + +//================================================================================= +class creature_securityspider1 extends AICreatureClass +{ + + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- +void SoundFirstSight() +{ + Sound(22, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundSuspicious() +{ + Sound(23, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundDeath() +{ + Sound(21, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundPain() +{ + Sound(20, SF_ONCE) +} + +//----------------------------------------------------------------- +bool CanHitTarget(vector tpos) +{ + //return true, if we are at the good angle + vector mat[4] + GetMatrix4(CurrentWeapon, mat) + + float dot + vector aimvec1, aimvec2 + + aimvec2 = mat[1] + dot = UpVec * aimvec2 + + aimvec1 = tpos - mat[3] + aimvec1[2] = 0 + VectorNormalize(aimvec1) + + aimvec2[2] = 0 + VectorNormalize(aimvec2) + + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mat[3], mat[2] * 64 + mat[3]) + //AddDShape(SHAPE_LINE, 0xfff00fff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mat[3], aimvec2 * 64 + mat[3]) + + dot = aimvec1 * aimvec2 + + if(dot < 0.89) + return false + + return true +} + +//----------------------------------------------------------------- + void CreateBody() + { + dBodyCreate(this, ZeroVec, BC_NONE) + + geom = dGeomCreateSphere(20) + + dBodyAddGeom(this, geom, g_vIdentMatrix, "material/creaturemetal") + + dBodySetMass(this, ZeroVec, 250) + } + + vobject hitobj + MinClass hitent + float lasthittime + vector hitup + HLIGHT hitlight + +//----------------------------------------------------------------- + void OnHit() + { + if(hitent == NULL) + { + hitent = new MinClass + hitent.SetObject(hitobj, "$remap 'dron01_hit' 'heavyspider01_hit';") + } + + if(hitlight) + { + RemoveLight(hitlight) + } + + hitlight = AddLight(hitent,0,LFL_DYNAMIC|LFL_POINT, 0, 100, "50 50 200") + SetFlags(hitent, TFL_VISIBLE|TFL_FULLMATRIX) + vector mat[4] + GetBoneMatrix(this, B_Body, mat) + SetMatrix(hitent, mat) + + lasthittime = currenttime + + hitup[0] = 0 + hitup[1] = cos(currenttime * 50) + hitup[2] = sin(currenttime * 50) + } + +//----------------------------------------------------------------- + void OnDie() + { + if(hitlight) + { + RemoveLight(hitlight) + } + + if(hitent) + { + delete hitent + hitent = NULL + } + + vector mat[4] + GetBoneMatrix(this, B_Podvozek, mat) + + light_effect leff = new light_effect(mat[3], 0, 150, "20 20 255", 0) + leff.Flash(1, true) + + misc_particle_effector eff = new misc_particle_effector + eff.SetParms("particle/steam_smoke.ptc", ZeroVec, true, 2) + AddChild(this, eff, 7) + + eff = new misc_particle_effector() + + eff.SetParms("particle/tachyonexplode3.ptc", GetMatrix(this, 3), true, 2) + } + +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + + + if(lasthittime && hitent) + { + float td = currenttime - lasthittime + + const float maxtime = 0.1 + + if(td > maxtime) + { + lasthittime = 0 + ClearFlags(hitent, TFL_VISIBLE) + if(hitlight) + RemoveLight(hitlight) + } + else + { + float c = maxtime - td + clamp c<0, maxtime> + + c *= 255.0 / maxtime + hitent.Color = ARGBF(c,c,c,c) + + c *= 1 / 255 + SetLightEx(hitlight, 0, 100, "20 20 255" * c); + + vector mat[4] + GetBoneMatrix(this, B_Podvozek, mat) + + vector center = GetMatrix(this, 3) + vector front = World.CameraPos - center + VectorNormalize(front) + + vector right = front * hitup + vector up = right * front + + mat[0] = front * 1.75 + mat[1] = right * 1.75 + mat[2] = up * 1.75 + mat[3] = center + SetMatrix(hitent, mat) + } + } + + return 0 + } + +//----------------------------------------------------------------- + void SetHeadOrientation(float pitch, float yaw) + { + float lquat[4], quat[4] + vector mat[4] + + if(pitch || yaw) + { + clamp pitch<-35, 35> + clamp yaw<-60, 60> + + QuatRotationRollPitchYaw(quat, Vector(-yaw, 0, -pitch)) + } + else + { + QuatIdentity(quat) + } + + QuatLerp(lquat, PLookQuat, quat, ftime * 9) + + QuatMatrix(lquat, mat) + SetBoneGlobal(this, B_Spine, mat) + + QuatCopy(lquat, PLookQuat) + } + +//----------------------------------------------------------------- + void creature_securityspider1() + { + ClassNum = 0 + Health = SecuritySpiderHealth + + flags |= FL_CANOPENDOORS + + if(!SoundSetName) + SoundSetName = "SecuritySpider" + + DefaultAnimSetName = "SecuritySpider" + + RagdollMaterial = "material/metal" + RagdollDef = "securityspider" + RagdollMass = 75 + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1.8 + MaxRestAfterAttack[0] = 2.8 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 10 + MinAttackDelay[1] = 0.4 + MaxAttackDelay[1] = 0.9 + MinRestAfterAttack[1] = 2 + MaxRestAfterAttack[1] = 4 + + fMinBulletRain = 25 + bFlameResistent = true + + CurrentWeapon = new item_weapon_securityspider() + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_pivot0) + CurrentWeapon.ShotStor.damage = WDmgSecuritySpider1 + + SetAngles(CurrentWeapon, "0 180 0") + + bLongRange = true + bShortRange = false + + fMinCosForSlowTurn = cos(60 * DEG2RAD) + fMaxStrafeDistance = 76 + bAlignOnGround = false + fZDamper = 10 + fADamper = 15 + + fYawLimit = 240 + + LookAxis = -3 + LookBone = B_Hlava + + MainObject = GetObject("obj/creatures/securityspider01/securityspider01.xob") + SetObject(MainObject, "$remap 'EnemyLights1' 'EnemyLights1_red';$remap 'EnemyLights2' 'EnemyLights2_blue'") + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + + hitobj = GetObject("obj/creatures/dron01/dron01_hit.xob") + + ShapeIndex = 1 + + FSType = FSSpiderRobot + } +} + +//================================================================================= +class item_weapon_dron extends FireWeaponClass +{ +//----------------------------------------------------------------- + void OnActionEnd() + { + if(Action == 1) //shot + { + EndAction() + } + + EndAction() + } + +//----------------------------------------------------------------- + int Action(int n, vector targ) + { + if(!CanAct(n)) + return false + + Ammo = 100 //FIXME + + if(PrimaryFire(targ)) + { + Action = 0 + return true + } + + Action = 0 + return false + } + +//----------------------------------------------------------------- + void item_weapon_dron() + { + ClassNum = CDronWeapon + SelectObject(this, MainObject) + + AmmoPerMagazine = PistolAmmoPerMagazine + AmmoType = AmmoShotgun + Ammo = AmmoPerMagazine + NumActions = 1 + RicSndSkip = 3 + + Shooters[0] = new ShooterBullets(this, 1) + NumShooters = 1 + + ShotStor.damage = WDmgDron + ShotStor.power = 3 + ShotStor.CameraHitFactor = 0.2 + ShotStor.NumBullets = 2 + ShotStor.MarkSize = 6 + ShotStor.precision = 0.0402 + ShotStor.StreakWidth = 7.2 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 72 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 5000 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 2 + ShotStor.RicDecalType = DE_PLASMA //DE_BULLET, DE_PLASMA + ShotStor.RicSndType = SE_PLASMA //SE_BULLET, SE_PLASMA + ShotStor.RicParticlesType = PE_PLASMA //PE_BULLET, PE_PLASMA + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + InitSounds(WS_WeaponDron) + } +} + +//================================================================================= +class creature_dron extends AICreatureClass +{ + int iColorBright + int iColorEye + int iColorEngine + int iColorFlare1 + int iColorFlare2 + int iColorFlare3 + + vobject hitobj + MinClass hitent + float lasthittime + vector hitup + HLIGHT hitlight + misc_particle_effector EngineEffect + hsound hs + int LastFrame + float LastNotifyTime //kdy jsme naposledy informovali AI o hluku + +//----------------------------------------------------------------- +void SoundSuspicious() +{ + Sound(26, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundFirstSight() +{ + Sound(29, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundDeath() +{ + Sound(24, SF_ONCE) + Sound(30, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundPain() +{ + Sound(25, SF_ONCE) + Sound(31, SF_ONCE) +} + +//----------------------------------------------------------------- +bool CanHitTarget(vector tpos) +{ + vector aimvec1 = tpos - CurrentPos + aimvec1[2] = 0 + VectorNormalize(aimvec1) + + //AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mat[3], mat[2] * 64 + mat[3]) + //AddDShape(SHAPE_LINE, 0xfff00fff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mat[3], aimvec2 * 64 + mat[3]) + + float dot = aimvec1 * facevec + + if(dot < 0.95) + return false + + return true +} + + +//----------------------------------------------------------------- + void SetBBoxInfo() + { + Height = 48 + HHeight = 24 + HHVec = Vector(0, 0, HHeight) + Radius = 12 + Mins = "-12 -12 -20" + Maxs = "12 12 20" + + SetBoundBox(this, Mins, Maxs) + } + +//----------------------------------------------------------------- + void SetHeadOrientation(float pitch, float yaw) + { + float lquat[4], quat[4] + vector mat[4] + + if(pitch || yaw) + { + clamp pitch<-45, 45> + + //prepare quaternion for head rotation. Transform is in local space of object, + //so axes are always the same + QuatRotationRollPitchYaw(quat, Vector(-yaw, 0, -pitch)) + } + else + { + QuatIdentity(quat) + } + + QuatLerp(lquat, PLookQuat, quat, ftime * 9) + + QuatMatrix(lquat, mat) + SetBoneGlobal(this, B_Body, mat) + + QuatCopy(lquat, PLookQuat) + } + +//----------------------------------------------------------------- + void CreateBody() + { + dBodyCreate(this, ZeroVec, BC_NONE) + + geom = dGeomCreateCapsule(12, Vector(0, 0, 12)) + + dBodyAddGeom(this, geom, g_vIdentMatrix, "material/creaturemetal") + + dBodySetMass(this, ZeroVec, 100) + } + +//----------------------------------------------------------------- + void OnHit() + { + if(hitent == NULL) + { + hitent = new MinClass + SelectObject(hitent, hitobj) + } + + if(hitlight) + { + RemoveLight(hitlight) + } + + hitlight = AddLight(hitent,0,LFL_DYNAMIC|LFL_POINT, 0, 100, "200 100 50") + SetFlags(hitent, TFL_VISIBLE|TFL_FULLMATRIX) + vector mat[4] + GetBoneMatrix(this, B_Body, mat) + SetMatrix(hitent, mat) + + lasthittime = currenttime + + hitup[0] = 0 + hitup[1] = cos(currenttime * 50) + hitup[2] = sin(currenttime * 50) + } + +//----------------------------------------------------------------- + void OnDie() + { + if(EngineEffect) + { + delete EngineEffect + EngineEffect = NULL + } + + if(hitlight) + { + RemoveLight(hitlight) + } + + if(hitent) + { + delete hitent + hitent = NULL + } + + vector mat[4] + GetBoneMatrix(this, B_Body, mat) + + light_effect leff = new light_effect(mat[3], 0, 150, "255 20 20", 0) + leff.Flash(1, true) + + iColorBright = 0 + iColorEye = 0 + iColorEngine = 0 + iColorFlare1 = 0 + iColorFlare2 = 0 + iColorFlare3 = 0 + ClearEventMask(this, EV_VISIBLE) + + misc_particle_effector eff = new misc_particle_effector + eff.SetParms("particle/steam_smoke.ptc", ZeroVec, true, 2) + AddChild(this, eff, 7) + + eff = new misc_particle_effector() + + dBodyDestroy(this) + dGeomDestroy(geom) + + GetBoneMatrix(this, B_Body, mat) + + SetBone(this, B_Layer1, ZeroVec, ZeroVec, 1.0) + + SetOrigin(this, mat[3]) + UpdateEntity(this) + + dBodyCreate(this, ZeroVec, BC_NONE) + geom = dGeomCreateSphere(8) + dBodyAddGeom(this, geom, g_vIdentMatrix, "material/rigidmetal") + dBodyInteractionLayer(this, ET_DEFAULT) + + dBodySetMass(this, ZeroVec, 20) + dBodyActive(this, true, true) + + SetFlags(this, TFL_FULLMATRIX) + + eff = new misc_particle_effector() + eff.SetParms("particle/tachyonexplode.ptc", GetMatrix(this, 3), true, 2) + + SetAnimSlot(this, s_walk, VNULL, 4.0, 1, NULL, 0, 0) + + SetEventMask(this, EV_CONTACT|EV_SOUNDEND) + } + +//----------------------------------------------------------------- +// Cela tahle sracka je prudce temporalni. Pozdeji vyresit asi nahrazenim potvory za +// misc_physics_object +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + if(!hs) //nemame impact sound, tak proc se zdrzovat + { + return + } + + if(other == World.Player) + return + + float TargetFrame = g_FPS * MinImpactSoundsDelay //zvuky nesmu hrat kratko po sebe + int TF = LastFrame + TargetFrame + + if(g_iViewFrame <= TF) + return + + vector ImpNorm = c.GetNormalImpulse() + vector VelBefore, VelAfter + float VelLngBefore = c.GetRelativeVelocityBefore(VelBefore) + + float ImpNormLng = VectorLength(ImpNorm) + ImpNormLng /= (float)20 + + if(VelLngBefore < 0) + VelLngBefore = -VelLngBefore + +// vector Vel = GetVelocity(this) +// float VelLng = VectorLength(Vel) + + float MinNormLng = 20 * 0.002 + float MinVelLngBefore = 20 * 0.00675 + + if(ImpNormLng > MinNormLng && VelLngBefore > MinVelLngBefore) + { + int ps = PlaySound(this, hs, SF_ONCE) + float vol = VelLngBefore + clamp vol<0, 1> + LastFrame = g_iViewFrame + + //teoreticky by se to melo limitovat jen od urcite hlasitosti, ale z hlediska gameplaye + //chce proste player odlakat potvoru hozenym predmetem a ne spekulovat, jak velky ramus + //musi udelat, aby potvora zareagovala + float diff = currenttime - LastNotifyTime + if(diff > 2.0) + { + LastNotifyTime = currenttime + NotifyNoises(this, GetMatrix(this, 3), NOISERANGE_PHYSICS, NOISE_PHYSICS) + } + + vol = LinearVol(vol) + SetSoundVolume(ps, vol) + } + } +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + if(lasthittime) + { + float td = currenttime - lasthittime + + const float maxtime = 0.1 + + if(td > maxtime) + { + lasthittime = 0 + ClearFlags(hitent, TFL_VISIBLE) + if(hitlight) + RemoveLight(hitlight) + } + else + { + float c = maxtime - td + clamp c<0, maxtime> + + c *= 255.0 / maxtime + hitent.Color = ARGBF(c,c,c,c) + + c *= 1 / 255 + SetLightEx(hitlight, 0, 100, "200 100 50" * c); + + vector mat[4] + GetBoneMatrix(this, B_Body, mat) + + vector center = mat[3] + vector front = World.CameraPos - center + VectorNormalize(front) + + vector right = front * hitup + vector up = right * front + + mat[0] = front + mat[1] = right + mat[2] = up + + SetMatrix(hitent, mat) + } + } + + if(status < STATE_DIE) + { + int jbc = tab(wave, g_fTime * 2) + iColorBright = ARGBF(255, jbc, jbc, jbc) + + iColorEye = ARGBF(0, 200, 100, 0) + iColorEngine = ARGBF(0, 255, 0, 0) + iColorFlare1 = ARGBF(sin(g_fTime * 10) + 20 * 64, 220, 100, 0) + iColorFlare2 = ARGBF(sin(g_fTime * 25) + 20 * 64, 130, 150, 170) + iColorFlare3 = ARGBF(sin(g_fTime * 3) + 20 * 64, 220, 100, 0) + } + return 0 + } + +//----------------------------------------------------------------- + void ~creature_dron() + { + if(EngineEffect) + { + delete EngineEffect + EngineEffect = NULL + } + } + +//----------------------------------------------------------------- + void creature_dron() + { + Health = Dron1Health + + flags |= FL_CANOPENDOORS + + Humanoid = false + + if(!SoundSetName) + SoundSetName = "Dron" + + DefaultAnimSetName = "Dron" + + MinAttacksInRow[0] = 8 + MaxAttacksInRow[0] = 12 + MinAttackDelay[0] = 0.3 + MaxAttackDelay[0] = 0.3 + MinRestAfterAttack[0] = 2 + MaxRestAfterAttack[0] = 2 + + MinAttacksInRow[1] = 5 + MaxAttacksInRow[1] = 10 + MinAttackDelay[1] = 0.9 + MaxAttackDelay[1] = 0.9 + MinRestAfterAttack[1] = 2 + MaxRestAfterAttack[1] = 4 + + fMinBulletRain = 1.1 + fShootpointTimeout = 2 + bFlameResistent = true + + CurrentWeapon = new item_weapon_dron() + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_pivot0) + + bLongRange = true + bShortRange = false + + fZDamper = 10 + bAlignOnGround = false + fMinCosForSlowTurn = cos(120 * DEG2RAD) + fMaxStrafeDistance = 80 + + LookBone = B_Body + LookAxis = -3 + MainObject = GetObject("obj/creatures/dron01/dron01.xob") + SetObject(MainObject, "$remap 'dron01_eye' 'null'; $remap 'dron01_engine' 'null'") + + hitobj = GetObject("obj/creatures/dron01/dron01_hit.xob") + + ShapeIndex = 0 + + hs = GetSoundEx("physic_metal_default", 1, SF_3D) + + EngineEffect = new misc_particle_effector + EngineEffect.SetParms("particle/dron_drive.ptc", "0 -7 5", false, 0) + SetAngles(EngineEffect, "0 0 45") + + AddChild(CurrentWeapon, EngineEffect, 0) + + FSType = FSNone + } +} + +//================================================================================= +class ServiceBot extends AICreatureClass +{ +//----------------------------------------------------------------- +void SoundFirstSight() +{ + Sound(6, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundSuspicious() +{ + Sound(6, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundDeath() +{ + Sound(21, SF_ONCE) +} + +//----------------------------------------------------------------- +void SoundPain() +{ + Sound(20, SF_ONCE) +} + +//----------------------------------------------------------------- + void CreateBody() + { + dBodyCreate(this, ZeroVec, BC_NONE) + + geom = dGeomCreateCapsule(8, Vector(0, 0, 19.5)) + + dBodyAddGeom(this, geom, g_vIdentMatrix, "material/creaturemetal") + + dBodySetMass(this, ZeroVec, 150) + } + +//----------------------------------------------------------------- + void SetHeadOrientation(float pitch, float yaw) + { + float lquat[4], quat[4] + float lquat2[4], quat2[4] + vector mat[4] + + if(pitch || yaw) + { + clamp pitch<-45, 45> + clamp yaw<-110, 110> + + QuatRotationRollPitchYaw(quat, Vector(yaw * -0.8, 0, pitch * -0.2)) + QuatRotationRollPitchYaw(quat2, Vector(yaw * -0.3, 0, pitch * -0.7)) + } + else + { + QuatIdentity(quat) + QuatIdentity(quat2) + } + + QuatLerp(lquat, PLookQuat, quat, ftime * 9) + QuatLerp(lquat2, PLookQuat2, quat2, ftime * 9) + + QuatMatrix(lquat, mat) + SetBoneGlobal(this, B_Spine1, mat) + + QuatMatrix(lquat2, mat) + SetBoneGlobal(this, B_Head, mat) + + QuatCopy(lquat, PLookQuat) + QuatCopy(lquat2, PLookQuat2) + } + +//----------------------------------------------------------------- + void ServiceBot() + { + flags |= FL_CANOPENDOORS + + RagdollMaterial = "material/metal" + RagdollDef = "humanoidtest" + RagdollMass = 70 + + bLongRange = true + bShortRange = true + bFlameResistent = false + + fMinCosForSlowTurn = cos(60 * DEG2RAD) + fMaxStrafeDistance = 72 + bAlignOnGround = false + fZDamper = 10 + fADamper = 15 + + LookAxis = -2 + LookBone = B_Hlava + + ShapeIndex = 0 + + SmallPainGroup = g_smallpain + + FSType = FSHumanoidRobot + } +} + +//================================================================================= +class creature_servicebot1 extends ServiceBot +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void creature_servicebot1() + { + if(!SoundSetName) + SoundSetName = "ServiceBot" + + DefaultAnimSetName = "ServiceBot" + + Health = ServiceBot1Health + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1 + MaxRestAfterAttack[0] = 2 + + MinAttacksInRow[1] = 6 + MaxAttacksInRow[1] = 12 + MinAttackDelay[1] = 0.2 + MaxAttackDelay[1] = 0.48 + MinRestAfterAttack[1] = 2.1 + MaxRestAfterAttack[1] = 2.3 + + fMinBulletRain = 3.09 + + CurrentWeapon = new item_weapon_machinegun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_pivot0) + CurrentWeapon.ShotStor.damage = WDmgServiceBot1 + + MainObject = GetObject("obj/creatures/servicebot01/servicebot_01.xob") + SelectObject(this, MainObject) + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + } +} + + +//================================================================================= +class creature_servicebot2 extends ServiceBot +{ + float LightsAnimTimer + int LightsAnimFrame + float LightsFadeOutTimer + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status < STATE_DIE) + { + LightsAnimTimer += ftime + + if(LightsAnimTimer >= 0.25) //4 virtualne FPS + { + LightsAnimTimer -= 0.25 + LightsAnimFrame = LightsAnimFrame + 1 % 4 + UVAnim = 0.25 * LightsAnimFrame + } + } + else + { + LightsFadeOutTimer += ftime * 0.3 + + if(LightsFadeOutTimer >= 1) + { + LightsFadeOutTimer = 1 + ClearEventMask(this, EV_VISIBLE) + } + else + SetEventMask(this, EV_VISIBLE) + + float Intensity = 1 - LightsFadeOutTimer * 255 + int iIntensity = Intensity + Color2 = ARGB(0, iIntensity, iIntensity, iIntensity) //staticke svetielka // abgr + } + } + +//----------------------------------------------------------------- + void creature_servicebot2() + { + if(!SoundSetName) + SoundSetName = "ServiceBot" + + DefaultAnimSetName = "SecurityBot" //servicebot + + Health = ServiceBot2Health + + MinAttacksInRow[0] = 15 + MaxAttacksInRow[0] = 20 + MinAttackDelay[0] = 0.1 + MaxAttackDelay[0] = 0.1 + MinRestAfterAttack[0] = 1 + MaxRestAfterAttack[0] = 1.4 + + MinAttacksInRow[1] = 6 + MaxAttacksInRow[1] = 12 + MinAttackDelay[1] = 0.18 + MaxAttackDelay[1] = 0.36 + MinRestAfterAttack[1] = 1.5 + MaxRestAfterAttack[1] = 1.7 + + fMinBulletRain = 4.1 + + CurrentWeapon = new item_weapon_shotgun(this) + CurrentWeapon.Pick(this) + SelectItem(CurrentWeapon, p_pivot0) + CurrentWeapon.ShotStor.damage = WDmgServiceBot2 + + + MainObject = GetObject("obj/creatures/servicebot01/servicebot_02.xob") + SetObject(MainObject, "$remap 'EnemyLights1' 'EnemyLights1_red';$remap 'EnemyLights2' 'EnemyLights2_red';") + Color2 = 0xffffffff //svetielka + SetEventMask(this, EV_VISIBLE) + } +} diff --git a/Alpha Prime/Mod/scripts/class_creature/vssver.scc b/Alpha Prime/Mod/scripts/class_creature/vssver.scc new file mode 100644 index 0000000..81877c9 Binary files /dev/null and b/Alpha Prime/Mod/scripts/class_creature/vssver.scc differ diff --git a/Alpha Prime/Mod/scripts/class_func.h b/Alpha Prime/Mod/scripts/class_func.h new file mode 100644 index 0000000..46c5c78 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_func.h @@ -0,0 +1,2863 @@ + +//================================================================================= +class func_terrain extends ExtClass +{ + string model + + void func_terrain() + { + SetFlags(this, TFL_VISIBLE) + SetObject(GetObject(model), "") + } +} + +//================================================================================= +class DoorClass extends FuncClass +{ + float speed + float wait + string baseanim + string beforeopenanim + string aftercloseanim + string startsound + string endsound + string openingsound + string startsound2 + string endsound2 + + DoorClass ParentDoor //parent u dvojkridlovych dveri + trigger_motion MotionTrigger //interny trigger + float WayLength, timer + float ReverseOpenDir //managuje smer otvarania + vector FaceNormOnClosed //kolmica na plochu dveri v zavretej polohe + string OnOpen, OnOpened, OnClose, OnClosed + vobject BeforeOpenAnim + vobject AfterCloseAnim + vobject BaseAnim + hsound Sounds[5] + int LoopSound + string physparent + ExtClass PhysParent + dJoint FixJoint + float ClosingProblemTime + +#ifdef EDITOR + void EditorOpened() + { + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + vector Angs = Vector(0, angle, 0) + SetTransformEx(Angs, coords) + UpdateEntity(this) + } +#endif + + void UpdateAgent(bool act) + { + //we don't want to place pathengine agents here!!! + } + +//--------------------------------------------------------------------------------- + void M_SetWait(ExtClass other) + { + wait = atof(other._value) + } + +//--------------------------------------------------------------------------------- + void FixCurrentPosition(bool fix) + { + if(fix) + { + if(PhysParent == World) + ActivateBody(false) + else + { + if(!FixJoint) + FixJoint = dJointCreateFixed(PhysParent, this, GetMatrix(this, 3), true, 0) + + ActivateBody(true) + } + } + else + { + if(PhysParent != World) + { + if(FixJoint) + { + dJointDestroy(FixJoint) + FixJoint = 0 + } + } + ActivateBody(true) + } + } + +//--------------------------------------------------------------------------------- + int GetFace(MinClass ent) //zisti na ktorej strane dveri sme + { + vector vec = GetMatrix(ent, 3) - coords + + float dot = vec * FaceNormOnClosed + + if(dot > 0) + return 0 + + return 1 + } + +//--------------------------------------------------------------------------------- + vector GetFaceNorm() + { + return GetMatrix(this, 1) //normala kolma na plochu dveri + } + + //--------------------------------------------------------------------------------- + void SetOpenDir(MinClass actor) + { + int FacePos = GetFace(actor) + + if(FacePos) + ReverseOpenDir = -1 + else + ReverseOpenDir = 1 + } + +//--------------------------------------------------------------------------------- + bool Opening() + { + } + +//--------------------------------------------------------------------------------- + bool Closing() + { + } + +//--------------------------------------------------------------------------------- + void BeforeOpen() + { + } + +//--------------------------------------------------------------------------------- + void BeforeClose() + { + } + +//---------------------------------------------------------------------------- + void AfterClosed() + { + } + +//---------------------------------------------------------------------------- + void CreateJoints() + { + } + +//---------------------------------------------------------------------------- + void DestroyJoints() + { + } + +//---------------------------------------------------------------------------- + void Open() + { + ActionNum = 1 + if(BeforeOpenAnim && status == 0) + { + SetAnimSlot(this, 0, BeforeOpenAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + SetStatus(-1) + SetEventMask(this, EV_FRAME) + PlaySound(this, Sounds[0], SF_ONCE) + CallMethods(this, OnOpen) + return + } + + BeforeOpen() + SetStatus(1) + FixCurrentPosition(false) + ClearFlags(this, TFL_AREACLOSED) + + if(status == 0) //uz sme to pustili na zaciatku animacie + PlaySound(this, Sounds[0], SF_ONCE) + + if(!LoopSound) + LoopSound = PlaySound(this, Sounds[2], 0) + + SetEventMask(this, EV_FRAME) + CallMethods(this, OnOpen) + } + +//---------------------------------------------------------------------------- + void Opened() + { + ActionNum = 0 + SetStatus(3) + timer = wait //bude sa odpocitavat timer + + FixCurrentPosition(true) + + PlaySound(this, Sounds[1], SF_ONCE) + EndSound(LoopSound) + LoopSound = 0 + + if(wait == -1) //pocas waitingu musi bezat onframe + ClearEventMask(this, EV_FRAME) + + CallMethods(this, OnOpened) + } + +//---------------------------------------------------------------------------- + void Close() + { + if(status == 2) + return + + ActionNum = 1 + BeforeClose() + SetStatus(2) + FixCurrentPosition(false) + PlaySound(this, Sounds[3], SF_ONCE) + ClosingProblemTime = 0 + + SetEventMask(this, EV_FRAME) + CallMethods(this, OnClose) + } + +//---------------------------------------------------------------------------- + void Closed() + { + ActionNum = 0 + SetStatus(0) + + FixCurrentPosition(true) + + SetFlags(this, TFL_AREACLOSED) + EndSound(LoopSound) + LoopSound = 0 + + if(AfterCloseAnim) + { + SetAnimSlot(this, 0, AfterCloseAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + PlaySound(this, Sounds[4], SF_ONCE) + SetStatus(-2) + return + } + + ClearEventMask(this, EV_FRAME) + PlaySound(this, Sounds[4], SF_ONCE) + CallMethods(this, OnClosed) + AfterClosed() + } + +//--------------------------------------------------------------------------------- + void M_Open(ExtClass other) + { + Activate(0, other) //nevolame priamo Open() pretoze v activate mame funkcnosti na otvorenie susednych dveri + podmienky na animacie atd. + } + +//--------------------------------------------------------------------------------- + void M_Close(ExtClass other) + { + Close() + } + +//----------------------------------------------------------------- + MinClass CreatureInTrigger() + { + if(MotionTrigger) + { + MinClass insiders[32] + + int count = TriggerInsiders(MotionTrigger, insiders) + + for(int n = 0; n < count; n++) + { + MinClass cc = insiders[n] + + if(cc.ClassType != ClassTypeCreature) + continue + + if(cc.status == STATE_DEAD) + continue + + return cc + } + } + return NULL + } + +//----------------------------------------------------------------- + bool Waiting() + { + //pokud je wait -1, tak cekame porad + if(wait > 0) + { + if(CreatureInTrigger()) + { + timer = wait + return false + } + + timer -= ftime * 100 + } + else + { + FixCurrentPosition(true) +// ClearEventMask(this, EV_FRAME) + return false + } + + if(timer <= 0)//hotovo + { + if(ParentDoor) + { + if(ParentDoor.timer <= 0) //pokial susedne dvere uz nemaju nikoho v triggeri mozeme sa zavriet inac by na seba cakali navzajom do nekonecna + return true + } + else + return true + } + + return false + } + +//---------------------------------------------------------------------------- + void CreateInternalTrigger() + { +//vytvorime interny trigger na otvaranie/zatvaranie + vector ext = ZeroVec + ext[0] = DoorTriggerOverrunSide //presah do strany + ext[1] = DoorTriggerOverrunFront //presah dopredu/dozadu + + vector tmins = mins - ext + vector tmaxs = maxs + ext + + bool NeedOBB = true + + if(PhysParent == World) + { + if(angle == 0 || angle == 90 || angle == 180 || angle == 270 || angle == 360) + NeedOBB = false + + if(angle == -90 || angle == -180 || angle == -270 || angle == -360) + NeedOBB = false + } + + if(NeedOBB == false) //optimalizacia aby sa zbytocne nevytvaral trigger s OBB_COLLISION + { + tmins = VectorMatrixMultiply3(Matrix, tmins) + tmaxs = VectorMatrixMultiply3(Matrix, tmaxs) + + float f = tmins[0] + + if(f > tmaxs[0]) + { + tmins[0] = tmaxs[0] + tmaxs[0] = f + } + + f = tmins[1] + + if(f > tmaxs[1]) + { + tmins[1] = tmaxs[1] + tmaxs[1] = f + } + + f = tmins[2] + + if(f > tmaxs[2]) + { + tmins[2] = tmaxs[2] + tmaxs[2] = f + } + + mins = VectorMatrixMultiply3(Matrix, mins) //pretransformujeme aj toto aby sme mai pri hladani sparovanych dveri skutocne BBoxy + maxs = VectorMatrixMultiply3(Matrix, maxs) + + f = mins[0] + + if(f > maxs[0]) + { + mins[0] = maxs[0] + maxs[0] = f + } + + f = mins[1] + + if(f > maxs[1]) + { + mins[1] = maxs[1] + maxs[1] = f + } + + f = mins[2] + + if(f > maxs[2]) + { + mins[2] = maxs[2] + maxs[2] = f + } + } + + MotionTrigger = new trigger_motion(this, tmins, tmaxs) + +// mins = coords + mins //budu sa podla toho hladat sparovane dvere +// maxs = coords + maxs + + if(NeedOBB) + { + SetAngles(MotionTrigger, Vector(0, angle, 0)) //pri zapornych hodnotach angle bude trigger akoby o polovicu mensi. mozno bug + SetFlags(MotionTrigger, TFL_OBBCOLLISION) +// Shape dshape = AddDShape(SHAPE_BBOX, 0x2200ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, tmins, tmaxs) +// dshape.SetMatrix(Matrix) + } +// else +// AddDShape(SHAPE_BBOX, 0x2200ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, coords + tmins, coords + tmaxs) + + if(PhysParent != World) + AddChild(this, MotionTrigger, 0) + else + SetOrigin(MotionTrigger, coords) + } + +//---------------------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { +// AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, StartPos, EndPos) + if(status < 0) //bezi animacka + BumpFrame(this, ftime, 0) + + if(status == 0) + { + FixCurrentPosition(true) + return + } + + if(status == 1) //opening + { + ActivateBody(true) + + if(Opening() == true) + Opened() + + return + } + + if(status == 2) //closing + { + ActivateBody(true) + + if(Closing() == true) + Closed() + + return + } + + if(status == 3) //waiting + { + if(Waiting() == true) + Close() + } + } + +//----------------------------------------------------------------- + void SearchNeighbourDoors() + { + DoorClass ec + vector ext = "1 1 1" //k presnym bboxom pridame iba minimum aby sme omylom nenasli ine dvere + + //najdi vsechny dotykajici se entity, ktere chteji byt slinkovany + for(ec = GetNextEntity(NULL, CDoorClass); ec != NULL; ec = GetNextEntity(ec, CDoorClass)) + { + if(ec != this && ec.ClassNum == ClassNum && !ec.flags & 32) //nesmieme sparovat dvere s flagom 32 + { + if(CheckBoundBox(coords + mins - ext, coords + maxs + ext, ec.coords + ec.mins - ext, ec.coords + ec.maxs + ext) == true) + { + if(ParentDoor == NULL) + ParentDoor = ec + + if(ec.ParentDoor == NULL) + ec.ParentDoor = this + } + } + } + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + if(!flags & 32) //nesmu byt sparovane s inymi dverami + SearchNeighbourDoors() + + if(baseanim) + { + BaseAnim = GetObject(beforeopenanim) + SetAnimSlot(this, 0, BaseAnim, 0, 0, NULL, 30, AF_RESET) + } + + if(beforeopenanim) + BeforeOpenAnim = GetObject(beforeopenanim) + + if(aftercloseanim) + AfterCloseAnim = GetObject(aftercloseanim) + + if(BeforeOpenAnim || AfterCloseAnim) + SetEventMask(this, EV_ANIMEND) + + UpdateEntity(this) + FaceNormOnClosed = GetMatrix(this, 1) + CallMethods(this, OnLoad) + } + +//---------------------------------------------------------------------------- + void EOnAnimEnd(MinClass other, int extra) + { + SetAnimSlot(this, 0, BaseAnim, 0, 0, NULL, 30, AF_RESET) + + if(status == -1) + { + Open() + + if(ParentDoor && !ParentDoor.BeforeOpenAnim) //pokial susedne dvere nemali animacku tak sa otvaraju az teraz + ParentDoor.Open() + + return + } + + if(status == -2) //tato animacka bola len pre oko ale status musime vynulovat + { + SetStatus(0) + CallMethods(this, OnClosed) + } + } + +//---------------------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + PhysParent = FindClass(physparent) + + if(!PhysParent) + PhysParent = World + else + AddToParent(PhysParent) //sme zavisly na tejto entite + + if(wait == 0) + wait = 200 + + if(speed == 0) + speed = 200 + + if(!flags & 1) + SetFlags(this, TFL_AREACLOSED) + + if(startsound) + Sounds[0] = GetSoundEx(startsound, 1, SF_3D) //dvere sa zacinaju otvarat + + if(endsound) + Sounds[1] = GetSoundEx(endsound, 1, SF_3D) //dvere sa otvorili (dorazili na koniec) + + if(openingsound) + Sounds[2] = GetSoundEx(openingsound, 1, SF_3D) //lool. hraje ked sa otvaraju aj ked sa zatvaraju + + if(startsound2) + Sounds[3] = GetSoundEx(startsound2, 1, SF_3D) //ked sa zacinaju zatvarat + + if(endsound2) + Sounds[4] = GetSoundEx(endsound2, 1, SF_3D) //ked sa zavreli + + } + +//---------------------------------------------------------------------------- + void DoorClass() + { + ReverseOpenDir = 1 //default direction + SetFlags(this, TFL_AREASPLITTER | TFL_SOLID | TFL_OBBCOLLISION) + SetPickable(false) + } + +//---------------------------------------------------------------------------- + void OnParentRemove() + { + DestroyJoints() //prejointujeme sa na world + PhysParent = World + CreateJoints() + } + +//---------------------------------------------------------------------------- + void ~DoorClass() + { + DestroyJoints() + + if(MotionTrigger) + { + delete MotionTrigger + MotionTrigger = NULL + } + RemoveFromParent() + } +} + + +class func_door extends DoorClass +{ + float dirangle //ma vecsiu prioritu ako angle. pokial pouzito tak urcuje smer pohybu + float dist //o kolko maju presahovat cez zarubne + vector direction //smer pohybu + vector StartPos, EndPos, CurPos + vector StartPosLocal, EndPosLocal, DirectionLocal + dJoint JointSliding, JointLinearLimit, JointAngularLimit + +#ifdef EDITOR + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + SetTransformEx(Angs, Pos) + UpdateMainVisualizer() + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } + + void CreateEditorVisuals() + { + } +#endif + +//--------------------------------------------------------------------------------- + void M_SetDist(ExtClass other) + { + if(status != 0) //jointy setupujeme iba v zakladnej poze + return + + float NewDist = atof(other._value) + float dif = NewDist - dist + WayLength -= dif //preshah zarubni + dist = NewDist + + StartPos = coords + EndPos = direction * WayLength + EndPos = coords + EndPos + + float HalfLength = WayLength * 0.5 + vector JointPos = coords + + if(JointLinearLimit) + { + dJointDestroy(JointLinearLimit) + JointLinearLimit = 0 + } + + JointLinearLimit = dJointCreateLinearLimit(World, JointPos, this, JointPos + (direction * -HalfLength), HalfLength, 0) + + StartPosLocal = PhysParent.CoordToLocal(StartPos) + EndPosLocal = PhysParent.CoordToLocal(EndPos) + } + +//--------------------------------------------------------------------------------- + void SetGravityDir(float OpenDir) + { + if(direction[2] != 1 && direction[2] != -1) + return + + float Gravity = -9.8 * ReverseOpenDir + + if(OpenDir != 1) + Gravity = -Gravity + + vector GravityDir = direction * Gravity + dBodySetGravity(this, GravityDir) + } + +//--------------------------------------------------------------------------------- + void CleaningArea(vector MovementDir, float ClosingProgress) + { + if(!MotionTrigger) + return + + if(MotionTrigger.CleaningFrame == World.ActualFrame) //u dvojkridlovych dveri to budu robit iba jedny z nich + return + + MotionTrigger.CleaningFrame = World.ActualFrame + vector mins, maxs, InsMins, InsMaxs + GetCBoundBox(this, mins, maxs) + vector offset = MovementDir * ClosingProgress * -WayLength + mins = mins + offset + maxs = maxs + offset + mins = mins - "8 8 8" + maxs = maxs + "8 8 8" + +// AddDShape(SHAPE_BBOX, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mins, maxs) + + vector MyCenter = maxs - mins + MyCenter = MyCenter * 0.5 + MyCenter = mins + MyCenter + vector FaceNorm = GetFaceNorm() //default + vector CleaningDir + MinClass insiders[32] + MinClass insider + float dot + vector off + int count = TriggerInsiders(MotionTrigger, insiders) + bool CleaningDirIsKnown = false + int n + + //vytah medzi tymi entitami bohuzial neni pretoze je deaktivovany +/* for(n = 0; n < count; n++) //zistime ci medzi entitami neni vytah. ak ano tak potom je CleaningDir jasny + { + insider = insiders[n] + + if(ClassName(insiders[n]) == "func_plat") + { + vector pos = GetMatrix(insiders[n], 3) + pos[2] = MyCenter[2] + off = pos - MyCenter + dot = off * FaceNorm + + if(dot < 0) + CleaningDir = -FaceNorm + else + CleaningDir = FaceNorm + + CleaningDirIsKnown = true + break + } + }*/ + + for(n = 0; n < count; n++) + { + insider = insiders[n] + //Print(insider) + + if(insider == World.Player) + continue + + if(insider == this) + continue + + if(ParentDoor && insider == ParentDoor) + continue + + bool IsRigidBody = insider.IsRigidBody() + bool IsRagdoll = false + + if(!IsRigidBody) + { + if(IsInherited(insider, CCreatureClass)) + { + CreatureClass cc = insider + + if(!cc.ragdollActive) + continue + + IsRagdoll = true + } + else + continue + } + else + { + if(VectorLength(GetVelocity(insider)) > 100) //nemiesame sa do toho co sa rychle pohybuje + continue + } + + GetCBoundBox(insider, InsMins, InsMaxs) + + if(!CheckBoundBox(mins, maxs, InsMins, InsMaxs)) + continue + + if(!CleaningDirIsKnown) //ak este neni jasne na ktoru stranu to je potrebne vytlacit tak vyberieme stranu na ktoru sme blizsie + { + vector center = InsMaxs - InsMins + center = center * 0.5 + center = InsMins + center + off = center - MyCenter + dot = off * FaceNorm + + if(dot < 0) + CleaningDir = -FaceNorm + else + CleaningDir = FaceNorm + } + + float ForceScale + vector CleaningForce + + if(IsRagdoll) + { + CreatureClass rag = insider + + for(int b = 0; b < sizeof(rag.RBones); b++) + { + RBone CurBone = rag.RBones[b] + + if(CurBone) + { + vector BonePos = GetMatrix(CurBone, 3) + InsMins = BonePos - "8 8 8" + InsMaxs = BonePos + "8 8 8" + + if(!CheckBoundBox(mins, maxs, InsMins, InsMaxs)) + continue + + ForceScale = 50 * dBodyGetMass(CurBone) + CleaningForce = CleaningDir * ForceScale + dBodyApplyImpulse(CurBone, CleaningForce) + } + } + } + else + { + ForceScale = 100 * dBodyGetMass(insider) + CleaningForce = CleaningDir * ForceScale + dBodyApplyForce(insider, CleaningForce) + } + } + } + +//--------------------------------------------------------------------------------- + void BeforeOpen() + { + SetGravityDir(1) + } + +//--------------------------------------------------------------------------------- + void BeforeClose() + { + SetGravityDir(-1) + } + +//--------------------------------------------------------------------------------- + bool Opening() + { + CurPos = GetMatrix(this, 3) + + vector CurPosLocal = PhysParent.CoordToLocal(CurPos) + float FromStart = VectorLength(StartPosLocal - CurPosLocal) + vector MoveDirection = PhysParent.VectorToParent(DirectionLocal) + vector ParentMat[4] + + if(FromStart < WayLength) + { + dBodyApplyForce(this, MoveDirection * speed) + return false + } + + vector RealEndPos = PhysParent.CoordToParent(EndPosLocal) + vector mat[4] + GetMatrix4(this, mat) + mat[3] = RealEndPos//EndPos + SetTransform(mat) + return true + } + +//--------------------------------------------------------------------------------- + bool Closing() + { + CurPos = GetMatrix(this, 3) + vector CurPosLocal = PhysParent.CoordToLocal(CurPos) + float FromEnd = VectorLength(EndPosLocal - CurPosLocal) + vector MoveDirection = PhysParent.VectorToParent(DirectionLocal) + vector ParentMat[4] + + if(FromEnd < WayLength) + { + float WayRate = FromEnd / WayLength + clamp WayRate<0, 1> + WayRate = 1 - WayRate + CleaningArea(MoveDirection, WayRate) +/* float Vel = VectorLength(GetVelocity(this)) //nemoze byt pouzite na vsetkych dverach pretoze na OnClose moze visiet dolezita akcia + + if(Vel < 20) + { + ClosingProblemTime += ftime + + if(ClosingProblemTime > 2) + { + ClosingProblemTime = 0 + SetStatus(1) + return false + } + }*/ + + vector Force = MoveDirection * -speed + dBodyApplyForce(this, Force) + return false + } + + vector RealStartPos = PhysParent.CoordToParent(StartPosLocal) + vector mat[4] + GetMatrix4(this, mat) + mat[3] = RealStartPos//StartPos + SetTransform(mat) + return true + } + +//----------------------------------------------------------------- + void Activate(int flag, MinClass other) //implementace virtualni funkce + { + if(flag == 1) //zavolal to interny trigger + { + if(flags & DisableFuncFlag) + return + + if(!flags & 16) //musi mat AutoOpen flag + return + + if(other.ClassType != ClassTypeCreature) //interny trigger detekuje vsetko fyzikalne koli cleaningu ale dvere otvaraju iba potvory a player + return + + if(other.ClassNum != ClassNumPlayer) + return + } + + if(status != 0 && status != 2) //zaroven je to ochrana proti rekurzivnemu volaniu medzi dverami! + return + + if(flag == 1 && other.ClassNum == ClassNumPlayer) + { + NotifyNoises(other, GetMatrix(other, 3), NOISERANGE_PHYSICS, NOISE_PHYSICS) + } + + if(!BeforeOpenAnim && ParentDoor && ParentDoor.BeforeOpenAnim) //jediny pripad kedy nevolame open + status = status + else + Open() + + if(ParentDoor != NULL) + { + bool ParentOpen = false //ked maju obidvoje dvere animacku alebo obidvoje nemaju tak mozeme aktivovat druhe dvere. inac budu druhe dvere + + if(BeforeOpenAnim && ParentDoor.BeforeOpenAnim) + ParentOpen = true + + if(!BeforeOpenAnim && !ParentDoor.BeforeOpenAnim) + ParentOpen = true + + if(BeforeOpenAnim && !ParentDoor.BeforeOpenAnim) + ParentOpen = false + + if(!BeforeOpenAnim && ParentDoor.BeforeOpenAnim) + ParentOpen = true + + if(ParentDoor.status != 0 && ParentDoor.status != 2) //aby si nevolali Activate rekurzivne! + ParentOpen = false + + if(ParentOpen) + ParentDoor.Activate(0, other) + } + } + +//--------------------------------------------------------------------------------- + void EOnJointBreak(class other, int extra) //ked sa utrhne joint. volane obidvom spojenym body + { + if(extra == JointSliding || extra == JointLinearLimit) + { + if(JointSliding) + dJointDestroy(JointSliding) + + if(JointAngularLimit) + dJointDestroy(JointAngularLimit) + + if(JointLinearLimit) + dJointDestroy(JointLinearLimit) + + JointSliding = 0 + JointLinearLimit = 0 + JointAngularLimit = 0 + + dBodySetMass(this, ZeroVec, mass) //Defaultny inertia + ClearEventMask(this, EV_FRAME) + SetStatus(0) + } + } + +//----------------------------------------------------------------- +/* void EOnContact(MinClass other, Contact c) + { + vector Cpos = c.Position + vector Pos = GetMatrix(this, 3) + Cpos[2] = Pos[2] + vector vec2 = Pos - Cpos + VectorNormalize(vec2) + float dot = fabs(GetMatrix(this, 1) * vec2) //normala po ktorej jazdia dvere + + if(dot < 0.05) //je to dotyk v smere pohybu dveri + { + if(status == 2) + { + SetStatus(1) + PlaySound(this, Sounds[3], SF_ONCE) + } + } + }*/ + +//---------------------------------------------------------------------------- + void CreateJoints() + { + if(rb) + { + vector JointPos = coords// + (direction * WayLength) + + if(!JointSliding) + JointSliding = dJointCreateSliding(PhysParent, this, JointPos, direction, false, 0) //tu uz nema nekonecny inertia takze musime zaistit aby sa to nepretacalo + + if(PhysParent != World) + { + if(!JointAngularLimit) + { + vector axis = GetMatrix(this, 2) + JointAngularLimit = dJointCreateAngularLimit(PhysParent, axis, this, axis, 0, 0) + } + } + + float HalfLength = WayLength * 0.5 + JointLinearLimit = dJointCreateLinearLimit(PhysParent, JointPos, this, JointPos + (direction * -HalfLength), HalfLength, 0) + } + } + +//---------------------------------------------------------------------------- + void DestroyJoints() + { + if(FixJoint) + { + dJointDestroy(FixJoint) + FixJoint = 0 + } + + if(JointSliding) + { + dJointDestroy(JointSliding) + JointSliding = 0 + } + + if(JointAngularLimit) + { + dJointDestroy(JointAngularLimit) + JointAngularLimit = 0 + } + + if(JointLinearLimit) + { + dJointDestroy(JointLinearLimit) + JointLinearLimit = 0 + } + } + +//---------------------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CreateJoints() + + StartPosLocal = PhysParent.CoordToLocal(StartPos) + EndPosLocal = PhysParent.CoordToLocal(EndPos) + DirectionLocal = PhysParent.VectorToLocal(direction) + + if(PhysParent != World && rb) + FixCurrentPosition(true) + } + +//---------------------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(!model) + model = "obj/debug/dvere_OriginDoluVRohu.xob" + + MainObject = GetObject(model) + SetObject(MainObject, _materialremap) + + GetBoundBox(this, mins, maxs) + vector sizes = maxs - mins + + if(dirangle != 0) //ma vecsiu prioritu ako angle + direction = GetDirectionFromAngle(dirangle) + else + direction = GetDirectionFromAngle(angle) + + if(dirangle == -1 || dirangle == -2) + WayLength = sizes[2] //pre pohyb hore a dole to je jasne + else + WayLength = sizes[0] //toto je osa po ktorej jazdia dvere. fixna dohoda ze tak budu vymodelovane + + if(dist == 0) + dist = 2 + + if(speed == 0) + speed = 200 + + if(WayLength < dist) //stale sa niekto cuduje ze sa mu to chova divne ked tam vlozi nezmysel + dist = 0 + + WayLength -= dist //preshah zarubni + + StartPos = coords + EndPos = direction * WayLength + EndPos = coords + EndPos +// AddDShape(SHAPE_BBOX, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, StartPos - "4 4 4", StartPos + "4 4 4") +// AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, EndPos - "4 4 4", EndPos + "4 4 4") + + vector mat[4] + RollPitchYawMatrix2(Vector(0, angle, 0), mat) + mat[3] = coords + SetTransform(mat) + SetOrigin(this, coords) + + if(mass == 0) + SetMass(40) + + if(CreateRigidBody(GEOMTYPE_NONE, "", model) == true) + { + dBodyInteractionLayer(this, ET_DOOR) + + if(PhysParent == World) + dBodySetInertiaTensor(this, ZeroVec, ZeroVec) + + CreateInternalTrigger() + + dBodyCreatePhysXShadow(this, 2, true) + } + + + + if(display && !Display) + { + Display = new func_display(this, display, false) //musi sa vytvarat az ked ma entita selectnuty object! + SetEventMask(this, EV_VISIBLE) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY_DISP + } + ClearFlags(this, TFL_TOUCHTRIGGERS) //clearujeme po tom co sa v rigidbodyclasse zaplo v CreateRigidBody() + } + +//---------------------------------------------------------------------------- + void func_door() + { + ClassNum = ClassNumDoor + Show(true) + SetEventMask(this, EV_JOINTBREAK|EV_INIT) + } + +//---------------------------------------------------------------------------- + void ~func_door() + { + DestroyJoints() + RemoveBodyAndGeom() + + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + + +//================================================================================= +class func_door_rot extends DoorClass +{ + int axis + float openingangle + vector StartAxis, EndAxis + int StartAxisIndex //ktora osa matice bola pouzita pre StartAxis + dJoint JointHinge, JointAngLimit + +#ifdef EDITOR + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + vector angs = ZeroVec + angs[axis] = Angs[1] + SetTransformEx(angs, Pos) + UpdateMainVisualizer() + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } + + void CreateEditorVisuals() + { + } +#endif + + //--------------------------------------------------------------------------------- + void SetOpenDir(MinClass actor) + { + int FacePos = GetFace(actor) + + if(FacePos) + ReverseOpenDir = -1 + else + ReverseOpenDir = 1 + + if(axis == 2) //vynimka + ReverseOpenDir = -ReverseOpenDir + } + +//--------------------------------------------------------------------------------- + void BeforeOpen() + { + if(status != 0) //nemozeme menit angular limit pokial dvere niesu v zavretej polohe + return //toto nastane iba v pripade ze dvere sa zatvaraju smerom k nam a pocas toho im zavolame open() + + if(JointAngLimit) + { + dJointDestroy(JointAngLimit) + JointAngLimit = 0 + } + + vector JointPos = coords + vector AxisForAngularLimit + + float X, Y, x, y + + if(axis == 0) + { + x = StartAxis[2] + y = StartAxis[0] + } + + if(axis == 1) + { + x = StartAxis[0] + y = StartAxis[1] + } + + if(axis == 2) + { + x = StartAxis[1] + y = StartAxis[2] + } + + float TargetAngle = openingangle * DEG2RAD + + X = x * cos(TargetAngle * ReverseOpenDir) + X += y * sin(TargetAngle * ReverseOpenDir) + + Y = -x * sin(TargetAngle * ReverseOpenDir) + Y += y * cos(TargetAngle * ReverseOpenDir) + + if(axis == 0) + { + EndAxis[0] = Y + EndAxis[1] = 0 + EndAxis[2] = X + } + + if(axis == 1) + { + EndAxis[0] = X + EndAxis[1] = Y + EndAxis[2] = 0 + } + + if(axis == 2) + { + EndAxis[0] = 0 + EndAxis[1] = X + EndAxis[2] = Y + } + + float HalfTargetAngle = TargetAngle * 0.5 + AxisForAngularLimit = StartAxis + EndAxis + VectorNormalize(AxisForAngularLimit) + +/* Print(StartAxis) + Print(EndAxis) + Print(AxisForAngularLimit)*/ +/* + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE, JointPos, AxisForAngularLimit * 128.0 + JointPos) + AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE, JointPos, StartAxis * 128.0 + JointPos) + AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE, JointPos, EndAxis * 128.0 + JointPos)*/ + + JointAngLimit = dJointCreateAngularLimit(World, EndAxis, this, AxisForAngularLimit, HalfTargetAngle, 0) + } + +//--------------------------------------------------------------------------------- + void AfterClosed() + { + if(flags & 16) //open on trigger + { + MinClass cc = CreatureInTrigger() + + if(cc) + { + SetOpenDir(cc) + Open() + + if(ParentDoor != NULL) + ParentDoor.Open() + } + } + } + +//--------------------------------------------------------------------------------- + bool Opening() + { + vector CurAxis = GetMatrix(this, StartAxisIndex) +// vector cc = coords + "0 0 0.2" +// AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_ONCE, cc, CurAxis * 128.0 + cc) + + float ff = CurAxis * EndAxis + + if(ff >= 0.9999) + return true + + float spd = speed * ReverseOpenDir + vector ForceAxis + + switch(axis) + { + case 0: + ForceAxis = GetMatrix(this, 0) * -spd + break + + case 1: + ForceAxis = GetMatrix(this, 1) * -spd + break + + case 2: + ForceAxis = GetMatrix(this, 1) * spd + break + } + dBodyApplyForce(this, ForceAxis) + return false + } + +//--------------------------------------------------------------------------------- + bool Closing() + { + vector CurAxis = GetMatrix(this, StartAxisIndex) +// vector cc = coords + "0 0 0.2" +// AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_ONCE, cc, CurAxis * 128.0 + cc) + + float ff = CurAxis * StartAxis + + if(ff >= 0.9999) //vznikaju drobne nepresnosti takze takto + return true + + float spd = speed * ReverseOpenDir + vector ForceAxis + + switch(axis) + { + case 0: + ForceAxis = GetMatrix(this, 0) * spd + break + + case 1: + ForceAxis = GetMatrix(this, 1) * spd + break + + case 2: + ForceAxis = GetMatrix(this, 1) * -spd + break + } + + dBodyApplyForce(this, ForceAxis) + return false + } + +//----------------------------------------------------------------- + void Activate(int flag, MinClass other) //implementace virtualni funkce + { + if(flag == 1) //zavolal to interny trigger. + { + if(!flags & 16) //musi mat AutoOpen flag + return + + if(status != 0 && status != 2) //zaroven je to ochrana proti rekurzivnemu volaniu medzi dverami! + return + + int FacePos = GetFace(other) + + if(status == 2) //ked sa dvere prave zatvaraju smerom od nas tak nemozeme volat Open() koli angular limitu + { + if(FacePos == 0 && ReverseOpenDir == -1) + return + + if(FacePos == 1 && ReverseOpenDir == 1) + return + } + + SetOpenDir(other) //mozeme si byt isti ze other je nejaka creatura takze nastavime aj SetOpenDir() + } + + if(!BeforeOpenAnim && ParentDoor && ParentDoor.BeforeOpenAnim) //jediny pripad kedy nevolame open + status = status + else + Open() + + if(ParentDoor != NULL) + { + bool ParentOpen = false //ked maju obidvoje dvere animacku alebo obidvoje nemaju tak mozeme aktivovat druhe dvere. inac budu druhe dvere + + if(BeforeOpenAnim && ParentDoor.BeforeOpenAnim) + ParentOpen = true + + if(!BeforeOpenAnim && !ParentDoor.BeforeOpenAnim) + ParentOpen = true + + if(BeforeOpenAnim && !ParentDoor.BeforeOpenAnim) + ParentOpen = false + + if(!BeforeOpenAnim && ParentDoor.BeforeOpenAnim) + ParentOpen = true + + if(ParentDoor.status != 0 && ParentDoor.status != 2) //aby si nevolali Activate rekurzivne! + ParentOpen = false + + if(ParentOpen) + ParentDoor.Activate(1, other) + } + } + +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + if(status == 2) + SetStatus(1) + } + +//--------------------------------------------------------------------------------- + void EOnJointBreak(class other, int extra) //ked sa utrhne joint. volane obidvom spojenym body + { + if(extra == JointHinge || extra == JointAngLimit) + { + if(JointHinge) + dJointDestroy(JointHinge) + + if(JointAngLimit) + dJointDestroy(JointAngLimit) + + JointHinge = 0 + JointAngLimit = 0 + + dBodySetMass(this, ZeroVec, mass) //Defaultny inertia + ClearEventMask(this, EV_FRAME) + SetStatus(0) + } + } + +//---------------------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(!model) + model = "obj/debug/dvere_OriginDoluVRohu.xob" //dveretest_Rot.xob + + MainObject = GetObject(model) + SetObject(MainObject, _materialremap) + + GetBoundBox(this, mins, maxs) + vector sizes = maxs - mins + + if(speed == 0) + speed = 200 + + if(openingangle == 0) + openingangle = 90 + + axis = 1 //default + + if(flags & 2) + axis = 0 + + if(flags & 4) + axis = 1 + + if(flags & 8) + axis = 2 + + vector Angs = ZeroVec + Angs[axis] = angle + + vector mat[4] + RollPitchYawMatrix2(Angs, mat) + mat[3] = coords + SetTransform(mat) + SetOrigin(this, coords) + + if(CreateRigidBody(GEOMTYPE_NONE, "", model) == true) + { + dBodyInteractionLayer(this, ET_DOOR) + FixCurrentPosition(true) + + vector JointPos = coords + vector AxisForHinge + + if(axis == 0) + AxisForHinge = Matrix[1] + + if(axis == 1) + AxisForHinge = Matrix[2] + + if(axis == 2) + AxisForHinge = Matrix[0] + + if(axis == 0) + StartAxisIndex = 2 + + if(axis == 1) + StartAxisIndex = 0 + + if(axis == 2) + StartAxisIndex = 2 + + StartAxis = Matrix[StartAxisIndex] + + JointHinge = dJointCreateHinge(World, this, JointPos, AxisForHinge, false, 0) + + // AddDShape(SHAPE_LINE, 0xffff555, SS_NOZUPDATE|SS_DOUBLESIDE, JointPos, AxisForHinge * 64.0 + JointPos) + // AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE, JointPos, AxisForAngularLimit * 64.0 + JointPos) + + CreateInternalTrigger() + dBodyCreatePhysXShadow(this, 2, true) + } + + if(display && !Display) + { + Display = new func_display(this, display, false) //musi sa vytvarat az ked ma entita selectnuty object! + SetEventMask(this, EV_VISIBLE) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY_DISP + } + ClearFlags(this, TFL_TOUCHTRIGGERS) //clearujeme po tom co sa v rigidbodyclasse zaplo v CreateRigidBody() + } + +//---------------------------------------------------------------------------- + void func_door_rot() + { + ClassNum = ClassNumRotDoor + Show(true) + SetEventMask(this, EV_JOINTBREAK|EV_INIT) + } + +//---------------------------------------------------------------------------- + void ~func_door_rot() + { + if(JointHinge) + dJointDestroy(JointHinge) + + if(JointAngLimit) + dJointDestroy(JointAngLimit) + + RemoveBodyAndGeom() + + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + +//================================================================================= +class misc_shoot_detector extends ExtClass +{ + vector coords + string model + vector mins, maxs + string OnShot, OnShotFail + int flags + int ShotWait + float angle, angle2, angle3 + +//----------------------------------------------------------------- + int IsShot(vector rayorigin, vector raydirection) + { + if(flags & 2) + return true + + if(ShotWait == 0) + { + ShotWait = 50 + + if(!flags & 1) //once + { + SetEventMask(this, EV_TIMER) + SetTimer(this, this, ShotWait, EV_TIMER, 0, true) + } + CallMethods(this, OnShot) + } + + return false + } + +//----------------------------------------------------------------- + int Shoot(ShotStorage shot) + { + if(shot.HurtType != HT_SHOT) + return 0 + + CreatureClass shooter = shot.shooter + WeaponClass wc = NULL + + if(shooter && IsInherited(shooter, CCreatureClass) + wc = shooter.CurrentWeapon + + if(!wc) + return 0 + + if(ShotWait > 0) + return 0 + +// if(wc.Owner != World.Player) +// return 0 + + switch(wc.ClassNum) + { + case CPistol: + if(!flags & 4) + return 0 + break + + case CMachinegun: + if(!flags & 8) + return 0 + break + + case CShotgun: + if(!flags & 16) + return 0 + break + + case CSniperRifle: + if(!flags & 32) + return 0 + break + + case CGrenade: + if(!flags & 64) + return 0 + break + + case CJackHammer: + if(!flags & 128) + return 0 + break + + case CDronWeapon: + if(!flags & 1024) + return 0 + break + +/* case CSpiderWeapon: + if(!flags & 2048) + return 0 + break*/ + + default: + CallMethods(this, OnShotFail) + return 0 + break + } + + ShotWait = 50 + CallMethods(this, OnShot) + + if(flags & 1) //once + return 0 + + SetEventMask(this, EV_TIMER) + SetTimer(this, this, ShotWait, EV_TIMER, 0, true) + } +//----------------------------------------------------------------- + + void EOnTimer(MinClass other, int extra) + { + ShotWait = 0 + ClearEventMask(this, EV_TIMER) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(mins == ZeroVec) + mins = "-16 -16 -16" + + if(maxs == ZeroVec) + maxs = "16 16 16" + + ClassType = ClassTypeMiscShootDetector + CreateModel(this, mins, maxs) + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + SetFlags(this, TFL_SOLID|TFL_OBBCOLLISION) + } + +//----------------------------------------------------------------- + void ~misc_shoot_detector() + { + RemoveModel(this) + } +} + +//================================================================================= +/* +func_rotating +speed - rychlost. defaultne 200 +flags - X,Y osa 4,8 +*/ +//================================================================================= +class func_rotating extends ExtClass +{ + int flags + vector vel + float StartAngle + vector vec + float speed + vobject MainObject + string model + vector coords + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + vec = vel * ftime + vec = vec + GetAngles(this) + SetAngles(this, vec) + return + } + +//----------------------------------------------------------------- + void M_Start(ExtClass other) + { + SetEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void M_Stop(ExtClass other) + { + ClearEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + + void EOnInit(MinClass other, int extra) + { + if(model) + { + MainObject = GetObject(model) + SelectObject(this, MainObject) + } + + int fl + float f + + //defaults + if( speed == 0) + speed = 200 + + ClassNum = ClassNumRotating + + if(flags & 4) + { + fl = 0 + } + else + { + if(flags & 8) + fl = 2 + else + fl = 1 + } + + f = 1 + vel[fl] = f + + if(flags & 2) + vel = -vel + + vel = vel * speed + + if(flags & 1) + ClearEventMask(this, EV_FRAME) + else + SetEventMask(this, EV_FRAME) + + if(StartAngle != 0) + { + vec[fl] = StartAngle + SetAngles(this, vec) + } + SetOrigin(this, coords) + + if(display && !Display) + { + Display = new func_display(this, display, false) //musi sa vytvarat az ked ma entita selectnuty object! + SetEventMask(this, EV_VISIBLE) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY_DISP + } + } + + void func_rotating() + { + SetEventMask(this, EV_LOADED | EV_INIT) + } + + void ~func_rotating() + { + if(MainObject) + { + ReleaseObject(MainObject, 0) + MainObject = VNULL + } + } +} + + + + + + +class misc_random_caller extends ExtClass +{ + vector coords + string OnTimer + float minwait, maxwait + bool SpawnEnabled + + void RandomizeWait() + { + if(SpawnEnabled) + SetTimer(this, this, frand(minwait, maxwait), EV_TIMER, 0, true) + } + + void M_Start(ExtClass other) + { + SpawnEnabled = true + SetEventMask(this, EV_TIMER) + RandomizeWait() + } + + void M_Stop(ExtClass other) + { + SpawnEnabled = false + ClearEventMask(this, EV_TIMER) + } + + void EOnTimer(MinClass other, int extra) + { + RandomizeWait() + CallMethods(this, OnTimer) + } + + void EOnLoaded(MinClass other, int extra) + { + if(minwait == 0) + minwait = 300 + + if(maxwait == 0) + maxwait = 600 + + SetOrigin(this, coords) + CallMethods(this, OnLoad) + } + + void misc_random_caller() + { + SetEventMask(this, EV_LOADED) + } +} + +//========================================================================== +/* + diffusemap + anim func_image image_frame + "textures/texture1.tga" + "textures/texture2.tga" + "textures/texture3.tga" +*/ + +class func_image extends ExtClass +{ + int image_frame + string model + vector coords + float angle, angle2, angle3 + int numimages + vobject MainObject + string _materialremap + +//-------------------------------------------------------------------------- + void M_SetImage(ExtClass other) + { + image_frame = atoi(other._value) + } + +//-------------------------------------------------------------------------- + void M_Increment(ExtClass other) + { + image_frame++ + + if(image_frame >= numimages) + image_frame = 0 + } + +//-------------------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(!model) + model = "obj/static/display02_small.xob" + + MainObject = GetObject(model) + + if(MainObject) + { + SetObject(MainObject, _materialremap) + } + + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + Show(true) + ClearFlags(this, TFL_SOLID) + } + +//-------------------------------------------------------------------------- + void func_image() + { + SetEventMask(this, EV_INIT) + } +} + +//========================================================================== +class func_plat extends FuncClass +{ + int flags + float length + float speed + float dirangle + float angle2, angle3 + vector direction + vector EndPos + vector CurPos + dJoint JointPrismatic, JointLinLimit, JointMotor + string OnEnd, OnStart, OnBeginToStart, OnBeginToEnd + string anim1, anim2 + vobject anm1, anm2 + float AnimFrame + string sound1 + string sound2 + hsound Sounds[2] + int hsnd0 + float WorkingTime + +#ifdef EDITOR + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + angle3 = Angs[0] + angle = Angs[1] + angle2 = Angs[2] + SetTransformEx(Vector(angle3, angle, angle2), Pos) + UpdateMainVisualizer() + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } + + void CreateEditorVisuals() + { + } +#endif + +//--------------------------------------------------------------------------------- + void SetGravityDir(float OpenDir) + { + float Gravity = 9.8 * OpenDir + vector GravityDir = direction * Gravity + dBodySetGravity(this, GravityDir) + } + +//------------------------------------------------------------------- + void ToEndPos() + { + if(CurPos == EndPos) + return + + if(JointMotor) + dJointDestroy(JointMotor) + + JointMotor = dJointCreateLinearMotor(World, this, direction, speed, 50000) + + SetEventMask(this, EV_FRAME) +// SetGravityDir(-1) + ActivateBody(true) + + if(anm1) + { + SetAnimSlot(this, 0, anm1, 0, 0, NULL, 30, AF_RESET) + SetFrame(this, 0, AnimFrame) + } + + if(Sounds[0]) + { + if(!hsnd0) + hsnd0 = PlaySound(this, Sounds[0], 0) + } + + status = 1 + WorkingTime = 0 + CallMethods(this, OnBeginToEnd) + } + +//------------------------------------------------------------------- + void ToStartPos() + { + if(CurPos == coords) + return + + if(JointMotor) + dJointDestroy(JointMotor) + + JointMotor = dJointCreateLinearMotor(World, this, direction, -speed , 50000) + + SetEventMask(this, EV_FRAME) +// SetGravityDir(1) + ActivateBody(true) + + if(anm2) + { + SetAnimSlot(this, 0, anm2, 0, 0, NULL, 30, AF_RESET) + SetFrame(this, 0, AnimFrame) + } + + if(Sounds[0]) + { + if(!hsnd0) + hsnd0 = PlaySound(this, Sounds[0], 0) + } + + status = 2 + WorkingTime = 0 + CallMethods(this, OnBeginToStart) + } + +//------------------------------------------------------------------- + void M_ToEnd(ExtClass other) + { + ToEndPos() + } + +//------------------------------------------------------------------- + void M_ToStart(ExtClass other) + { + ToStartPos() + } + +//------------------------------------------------------------------- + void M_SwitchPos(ExtClass other) + { + if(status != 0) + return + + if(CurPos == coords) + { + ToEndPos() + return + } + + if(CurPos == EndPos) + { + ToStartPos() + return + } + } + +//------------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + CurPos = GetMatrix(this, 3) + vector vel = GetVelocity(this) + float Mdot = vel * direction + float CurDist, VelLng + WorkingTime += ftime + + if(status == 1) + { + CurDist = VectorLength(CurPos - coords) + + if(CurDist >= length || Mdot < 0) + { + if(CurDist >= length) //iba ak sme naozaj na konci + { + SetVelocity(this, ZeroVec) + CurPos = EndPos + SetOrigin(this, EndPos) + ActivateBody(false) + ClearEventMask(this, EV_FRAME) + status = 0 + + if(JointMotor) + { + dJointDestroy(JointMotor) + JointMotor = 0 + } + + if(hsnd0) + { + EndSound(hsnd0) + hsnd0 = 0 + } + + if(Sounds[1]) + PlaySound(this, Sounds[1], SF_ONCE) + + CallMethods(this, OnEnd) + return + } + + if(WorkingTime > 1 && CurDist < length) //prekazka zabranila dokonceniu tak ho posleme nazad + { + VelLng = VectorLength(vel) + + if(VelLng > 1) + ToStartPos() + } + + return + } + } + + if(status == 2) + { + CurDist = VectorLength(CurPos - EndPos) + + if(CurDist >= length || Mdot > 0) + { + if(CurDist >= length) + { + SetVelocity(this, ZeroVec) + CurPos = coords + SetOrigin(this, coords) + ActivateBody(false) + ClearEventMask(this, EV_FRAME) + status = 0 + + if(JointMotor) + { + dJointDestroy(JointMotor) + JointMotor = 0 + } + + if(hsnd0) + { + EndSound(hsnd0) + hsnd0 = 0 + } + + if(Sounds[1]) + PlaySound(this, Sounds[1], SF_ONCE) + + CallMethods(this, OnStart) + return + } + + if(WorkingTime > 1 && CurDist < length) //prekazka zabranila dokonceniu tak ho posleme nazad + { + VelLng = VectorLength(vel) + + if(VelLng > 1) + ToEndPos() + } + + return + } + } + + ActivateBody(true) + AnimFrame = BumpFrame(this, ftime, 0) + } + +//------------------------------------------------------------------- + void CreateJoints() + { + if(!rb) + return + + if(!JointPrismatic) + JointPrismatic = dJointCreatePrismatic(World, this, coords, direction, false, 0) + + if(!JointLinLimit) + { + float HalfLength = length * 0.5 + vector MidlePos = direction * HalfLength + MidlePos = coords + MidlePos + + JointLinLimit = dJointCreateLinearLimit(World, MidlePos, this, coords, HalfLength, 0) + } + } + +//------------------------------------------------------------------- + void DestroyJoints() + { + if(JointPrismatic) + { + dJointDestroy(JointPrismatic) + JointPrismatic = 0 + } + + if(JointLinLimit) + { + dJointDestroy(JointLinLimit) + JointLinLimit = 0 + } + + if(JointMotor) + { + dJointDestroy(JointMotor) + JointMotor = 0 + } + } + +//------------------------------------------------------------------- + void M_SetLength(ExtClass other) + { + if(status != 0) + return + + if(CurPos != coords) //iba z pociatocnej polohy + return + + length = atof(other._value) + EndPos = direction * length + EndPos = coords + EndPos + CurPos = coords + DestroyJoints() + CreateJoints() + } + +//------------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//------------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(length == 0) + length = 64 + + if(speed == 0) + speed = 50 + + direction = GetDirectionFromAngle(dirangle) + EndPos = direction * length + EndPos = coords + EndPos + CurPos = coords + + if(!model) + model = "obj/elevators/elevator_01.xob" + + MainObject = GetObject(model) + + if(MainObject) + { + SelectObject(this, MainObject) + + if(anim1) + anm1 = GetObject(anim1) + + if(anim2) + anm2 = GetObject(anim2) + + SetTransformEx(Vector(angle3, angle, angle2), coords) + + if(CreateRigidBody(GEOMTYPE_NONE, "", model) == true) + { + CreateJoints() + ActivateBody(false) + dBodyInteractionLayer(this, ET_DOOR) + dBodySetGravity(this, ZeroVec) + } + SetPickable(false) + Show(true) + } + + if(!sound1) + sound1 = "SOUND/DOOR/door_01_START" + + if(!sound2) + sound2 = "SOUND/EFFECTS/Explosion_flash_01" + + Sounds[0] = GetSoundEx(sound1, 1, SF_3D) + Sounds[1] = GetSoundEx(sound2, 1, SF_3D) + + if(display && !Display) + { + Display = new func_display(this, display, false) //musi sa vytvarat az ked ma entita selectnuty object! + SetEventMask(this, EV_VISIBLE) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY_DISP + } + SetFlags(this, TFL_TOUCHTRIGGERS) + } + +//------------------------------------------------------------------- + void func_plat() + { + SetEventMask(this, EV_INIT | EV_LOADED) + SetFlags(this, TFL_SOLID) + } + +//------------------------------------------------------------------- + void ~func_plat() + { + DestroyJoints() + RemoveBodyAndGeom() + + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + + + + +//================================================================================= +//================================================================================= +class PumpDevice extends RigidBodyClass +{ + string model + float angle, angle2, angle3 + vector coords + float PumpTimer + float PistonHeight + vobject MainObject + string pumpsound, joinsound, unjoinsound + hsound PumpSound, JoinSound, UnJoinSound + +#ifdef EDITOR + void EditorOpened() + { + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + angle2 = atof(GetKeyValue("angle2")) + angle3 = atof(GetKeyValue("angle3")) + vector Angs = Vector(angle3, angle, angle2) + + if(GetParent() == NULL) + SetTransformEx(Angs, coords) + + UpdateEntity(this) + } + + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + if(GetParent() == NULL) //normalny stav + SetTransformEx(Angs, Pos) + else //zrejme je na niecom naparentena + { + ClearFlags(this, TFL_FULLMATRIX) + SetOrigin(this, Pos) + SetAngles(this, Angs) + } + + UpdateMainVisualizer() + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } + + void CreateEditorVisuals() + { + } +#endif + +//----------------------------------------------------------------- + void Activate(int fl, ExtClass other) //aktivacia sa podarila + { + PumpTimer = 1 + func_display disp = Display + + if(disp) + disp.RunAction("PUMP") + + if(JoinSound) + PlaySound(this, JoinSound, SF_ONCE) + } +/* +//----------------------------------------------------------------- + void ActivateEnd() + { + if(UnJoinSound) + PlaySound(this, UnJoinSound, SF_ONCE) + } +*/ +//----------------------------------------------------------------- + void ActivateFail(int fl, ExtClass other) //aktivacia sa nepodarila. na vypis hlasok co k tomu potrebujes atd. + { + } + +//----------------------------------------------------------------- + void OnPump() + { + } + +//----------------------------------------------------------------- + void ActivateProcess(int fl, ExtClass other) + { + if(CanActivate(0, World.Player)/*PlayerOxygen < PlayerMaxOxygen*/) + { + OnPump() + } + } + +//----------------------------------------------------------------- + void ActivateProcessEnd() //skoncilo volanie ActivateProcess() + { + func_display disp = Display + + if(disp) + disp.RunAction("IDLE") + + if(UnJoinSound) + PlaySound(this, UnJoinSound, SF_ONCE) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void BeforeInit() + { + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + BeforeInit() + SetPickable(false) + + MainObject = GetObject(model) + + if(MainObject) + SetObject(MainObject, _materialremap) + + SetTransformEx(Vector(angle3, angle, angle2), coords) + SetAngles(this, Vector(angle3, angle, angle2)) + CreateRigidBody(GEOMTYPE_NONE, "", model) + + PumpSound = GetSoundEx(pumpsound, 1, SF_3D) + JoinSound = GetSoundEx(joinsound, 1, SF_3D) + UnJoinSound = GetSoundEx(unjoinsound, 1, SF_3D) + + if(display && !Display) + { + Display = new func_display(this, display, false) //musi sa vytvarat az ked ma entita selectnuty object! + SetEventMask(this, EV_VISIBLE) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY_DISP + } + ClearFlags(this, TFL_TOUCHTRIGGERS) //clearujeme po tom co sa v rigidbodyclasse zaplo v CreateRigidBody() + } + +//----------------------------------------------------------------- + void PumpDevice() + { + ClassType = ClassTypeFunc + PistonHeight = 4.8 //aby bol v hornej polohe + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY + + SetEventMask(this, EV_INIT | EV_LOADED) + SetFlags(this, TFL_VISIBLE) + } + +//----------------------------------------------------------------- + void ~PumpDevice() + { + RemoveBodyAndGeom() + + if(MainObject) + { + ReleaseObject(MainObject, 0) + MainObject = VNULL + } + } +} + + +//================================================================================= +class func_oxygen_device extends PumpDevice +{ +//----------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(other.ClassNum == ClassNumPlayer) + { + CreatureClass pla = other + + if(pla.GetOxygen() < PlayerMaxOxygen) + return ACT_ENABLE + } + + return ACT_DISABLE + } + +//----------------------------------------------------------------- + void OnPump() + { + CreatureClass pla = World.Player + pla.AddOxygen(OxygenPumpUpSpeed * ftime) + + PistonHeight += ftime * 10 + float PistonPos = sin(PistonHeight) + PistonPos += 1 + PistonPos *= 0.5 + PistonPos *= 9.6 //zdvih + SetBone(this, B_OxDev_pist, ZeroVec, Vector(0, 0, -PistonPos), 1) + + PumpTimer += ftime + if(PumpTimer >= 0.33333) + { + PumpTimer = 0 + + if(PumpSound) + PlaySound(this, PumpSound, SF_ONCE) + } + } + +//----------------------------------------------------------------- + void BeforeInit() + { + if(!model) + model = "obj/static/OxygenDevice.xob" + + if(!display) + display = "displays/OxygenDevice.dpl" + + if(!pumpsound) + pumpsound = "OxygenPumpUp" + + if(!joinsound) + joinsound = "OxygenDeviceJoin" + + if(!unjoinsound) + unjoinsound = "OxygenDeviceUnjoin" + } +} + + + +//================================================================================= +class func_health_device extends PumpDevice +{ + float health, MaxHealth + +//----------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(health > 0) + return ACT_ENABLE +/* + if(other.ClassNum == ClassNumPlayer) + { + CreatureClass pla = other + + if(health > 0 && pla.Health < PlayerMaxHealth) + return ACT_ENABLE + }*/ + + return ACT_DISABLE + } + +//----------------------------------------------------------------- + void UpdateBar() + { + float rate = health / MaxHealth + clamp rate<0, 1> + float PistonPos = rate * 9.6 //zdvih + SetBone(this, B_OxDev_pist, ZeroVec, Vector(0, 0, -9.6 + PistonPos), 1) + } + +//----------------------------------------------------------------- + void OnPump() + { + CreatureClass pla = World.Player + if(health <= 0 || pla.Health >= PlayerMaxHealth) + return + + float ToAdd = HealthPumpUpSpeed * ftime + clamp ToAdd<0, health> + float res = pla.Health + ToAdd + + if(res > PlayerMaxHealth) + ToAdd -= res - PlayerMaxHealth + + clamp ToAdd<0, PlayerMaxHealth> + pla.AddHealth(ToAdd) + health -= ToAdd + + if(health <= 0 && Display) + { + func_display disp = Display + disp.RunAction("EMPTY") + } + + UpdateBar() + + PumpTimer += ftime + if(PumpTimer >= 0.33333) + { + PumpTimer = 0 + + if(PumpSound) + PlaySound(this, PumpSound, SF_ONCE) + } + } + +//----------------------------------------------------------------- + void ActivateProcessEnd() //skoncilo volanie ActivateProcess() + { + func_display disp = Display + + if(disp && health > 0) //inak tam uz visi EMPTY + disp.RunAction("IDLE") + + if(UnJoinSound) + PlaySound(this, UnJoinSound, SF_ONCE) + } + +//----------------------------------------------------------------- + void BeforeInit() + { + if(!model) + model = "obj/static/HealthDevice.xob" + + if(!display) + display = "displays/healthdevice.dpl" + + if(!pumpsound) + pumpsound = "OxygenPumpUp" + + if(!joinsound) + joinsound = "OxygenDeviceJoin" + + if(!unjoinsound) + unjoinsound = "OxygenDeviceUnjoin" + + CreatureClass pla = World.Player + MaxHealth = HealthDeviceHealth[pla.GetDifficultyLevel()] + health = MaxHealth + UpdateBar() + } +} + +//======================================================================== +class func_trigger extends ExtClass +{ + int flags + vector coords + float angle, angle2, angle3 + string model + string anm1, anm2 + string sound1, sound2 + string OnStartPos, OnEndPos, OnRunToStart, OnRunToEnd + vobject MainObject + vobject anims[2] + hsound sounds[2] + int CurSide + int status + bool ActivateEnabled + +//----------------------------------------------------------------- + void SetCurAnimStartPos() + { + SetAnimSlot(this, 0, anims[CurSide], 0, 0, NULL, 30, AF_ONCE) + } + +//----------------------------------------------------------------- + void CallPosEvent() + { + int HumanLookSide = CurSide + + if(flags & 1) + HumanLookSide = 1 - HumanLookSide + + if(HumanLookSide == 0) + CallMethods(this, OnStartPos) + else + CallMethods(this, OnEndPos) + } + +//----------------------------------------------------------------- + void Start() + { + if(anims[CurSide]) + { + SetAnimSlot(this, 0, anims[CurSide], 0, 0, NULL, 30, AF_ONCE) + SetEventMask(this, EV_FRAME) + status = 1 + PlaySound(this, sounds[CurSide], SF_ONCE) + + int HumanLookSide = CurSide + + if(flags & 1) + HumanLookSide = 1 - HumanLookSide + + if(HumanLookSide == 0) + CallMethods(this, OnRunToEnd) + else + CallMethods(this, OnRunToStart) + } + } + +//----------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(other.ClassNum != ClassNumPlayer) + return ACT_DISABLE + + if(!ActivateEnabled) + return ACT_DISABLE + + if(status != 0) + return ACT_DISABLE + + if(!anims[CurSide]) + return ACT_DISABLE + + return ACT_ENABLE + } + +//----------------------------------------------------------------- + void Activate(int flag, MinClass other) //implementace virtualni funkce + { + Start() + } + +//------------------------------------------------------------------------ + void M_Enable(ExtClass other) + { + ActivateEnabled = true + } + +//------------------------------------------------------------------------ + void M_SwitchPos(ExtClass other) + { + Start() + } + +//------------------------------------------------------------------------ + void M_Disable(ExtClass other) + { + ActivateEnabled = false + } + +//------------------------------------------------------------------------ + void EOnAnimEnd(MinClass other, int extra) + { + if(extra == 0) + { + int OtherAnim = 1 - CurSide + + if(anims[OtherAnim]) //nahodime hned druhu animacku ak ju mame + { + CurSide = OtherAnim + SetCurAnimStartPos() + ClearEventMask(this, EV_FRAME) + status = 0 + CallPosEvent() + } + } + } + +//------------------------------------------------------------------------ + void EOnFrame(MinClass other, int extra) + { + if(status == 1) //iny pripad nemoze nastat ale istota + BumpFrame(this, ftime, 0) + } + +//------------------------------------------------------------------------ + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//------------------------------------------------------------------------ + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + + if(!model) + model = "obj/static/switch_device_1_handle.xob" + + if(!anm1) + anm1 = "obj/static/switch_device_1_handle.anm" + + if(!anm2) + anm2 = "obj/static/switch_device_1_handle_up.anm" + + if(!sound1) + sound1 = "paka01_activating" + + if(!sound2) + sound2 = "paka01_deactivating" + + if(flags & 1) //start v opacnej pozicii + CurSide = 1 + + MainObject = GetObject(model) + + if(MainObject) + { + SetObject(MainObject, "") + anims[0] = GetObject(anm1) + anims[1] = GetObject(anm2) + sounds[0] = GetSoundEx(sound1, 1, SF_3D) + sounds[1] = GetSoundEx(sound2, 1, SF_3D) + } + + ActivateEnabled = true + + if(anims[CurSide]) + { + SetCurAnimStartPos() + BumpFrame(this, 0, 0) + CallPosEvent() + } + else + { + string MissingAnim = anm1 + if(CurSide == 1) + MissingAnim = anm2 + + DPrint(String("Missing anim " + MissingAnim + " in entity " + _name)) + } + } + +//------------------------------------------------------------------------ + void func_trigger() + { + ClassType = ClassTypeFunc + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY + + ClassType = ClassTypeFunc + SetEventMask(this, EV_INIT | EV_LOADED | EV_ANIMEND) + SetFlags(this, TFL_VISIBLE | TFL_SOLID | TFL_OBBCOLLISION | TFL_DYNAMICBBOX) + } +} \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/class_info.h b/Alpha Prime/Mod/scripts/class_info.h new file mode 100644 index 0000000..3c1d0b2 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_info.h @@ -0,0 +1,2643 @@ +const float PATH_SEGMENT = 16 + +class info_path; + +int CurvePath(info_path path, info_path next, vector pts[], float minsegment); +info_path FindPrev(info_path p); + +#ifdef EDITOR + int wprec //recursion stopper +#endif + +//================================================================================= +class info_path extends ExtClass +{ + vector coords + string OnArrival + string link + string prev + float FloatTest + +//----------------------------------------------------------------- +#ifdef EDITOR + Shape line + + void DestroyCustomVisuals() + { + if(line) + { + line.Destroy() + line = NULL + } + } + + void UpdateCustomVisuals() + { + DestroyCustomVisuals() + + vector curve[24] + int numcurved + + numcurved = CurvePath(this, NULL, curve, PATH_SEGMENT) + + if(numcurved) + line = AddDLines(0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, curve, numcurved) + + info_path next = FindClass(link) + + if(wprec) + return + + if(next) + { + if(!wprec) + { + wprec++ + next.UpdateCustomVisuals() + wprec-- + } + } + + next = FindPrev(this) + + if(next) + { + if(!wprec) + { + wprec++ + next.UpdateCustomVisuals() + wprec-- + } + + next = FindPrev(next) + + if(next) + { + if(!wprec) + { + wprec++ + next.UpdateCustomVisuals() + wprec-- + } + } + } + } + + void CreateCustomVisuals() + { + DestroyCustomVisuals() + + vector curve[24] + int numcurved + numcurved = CurvePath(this, NULL, curve, PATH_SEGMENT) + if(numcurved) + line = AddDLines(0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, curve, numcurved) + } +#endif + +//----------------------------------------------------------------- + void M_SetLink(ExtClass other) + { + info_path p = FindClass(other._value) + + if(p && IsInherited(p, CInfoPath) + { + link = p._name + p.prev = _name + } + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + info_path p = FindPrev(this) + + if(p) + prev = p._name + + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + } + +//----------------------------------------------------------------- + void info_path() + { + SetEventMask(this, EV_INIT|EV_LOADED) + } +} + +//----------------------------------------------------------------- +info_path FindPrev(info_path p) +{ + for(info_path ec = GetNextEntity(NULL, CInfoPath); ec != NULL; ec = GetNextEntity(ec, CInfoPath)) + { + if(ec.link == p._name) + return ec + } + return NULL +} + +//----------------------------------------------------------------- +// z aktualniho waypointu, predchoziho a dvou nasledujicich prolozi +// krivku po segmentech maximalni delky minsegment +//----------------------------------------------------------------- +int CurvePath(info_path path, info_path next, vector pts[], float minsegment) +{ + //ending point + if(next == NULL) + { + next = FindClass(path.link) + if(next == NULL) + return 0 + } + + vector pos0, pos1, pos2, pos3 + + pos1 = GetOrigin(path) + pos2 = GetOrigin(next) + + //at least 2 points + pts[0] = pos1 + pts[1] = pos2 + + vector vec1 = pos2 - pos1 + float length = VectorNormalize(vec1) + + //it's too short. Don't curve at all + if(length <= minsegment) + return 2 + + //previous + info_path prev + + if(path.prev) + prev = FindClass(path.prev) + else + prev = FindPrev(path) + + if(prev) + pos0 = GetOrigin(prev) + else + pos0 = pos1 - (pos1 - pos2) + + info_path next2 = NULL + info_path next3 + + next2 = FindClass(next.link) + + if(next2) + pos3 = GetOrigin(next2) + else + pos3 = pos2 + (pos2 - pos1) + + vector vec0 = pos1 - pos0 + vector vec2 = pos3 - pos2 + VectorNormalize(vec0) + VectorNormalize(vec2) + + //is it curved enough? + float d0 = vec0 * vec1 + float d1 = vec2 * vec2 + + if(d0 >= 0.9999 && d1 >= 0.9999) + return 2 + + int numcurved = length + (minsegment - 1) / minsegment + clamp numcurved<0, sizeof(pts)> + + for(int n = 0; n < numcurved; n++) + { + pts[n] = CatmullRom(pos0, pos1, pos2, pos3, n / (numcurved - 1)) + } + + return numcurved +} + +const int KS_NONE = 0 +const int KS_STOP = 1 +const int KS_UPDATE = 2 +const int KS_IDLE = 3 + +const int KS_FORWARD = 4 +const int KS_BACKWARD = 5 + +//================================================================================= +class Keyframer extends _serializable +{ + float speed + string OnForward, OnBack, OnBeginStop, OnStop + + vector CarrierOffset + float CarrierAngle + hsound MotorSound, StartSound, StopSound + int StartSnd, MotorSnd, StopSnd + bool Updated + int status + + ExtClass Owner + info_path Current, Next + info_path LastWaypoint + + vector NextVec, PrevVec + vector Curve[24] + int NumCurved + int CurrentSegment + vector PathDir + float PathLength + + float TargetVelocity + float CurrentVelocity + float LastVelocityTime + + bool unlockz + + vector CurrentMatrix[4] + bool NeedStopEvent + +//----------------------------------------------------------------- + void Stop(bool immed) + { + if(TargetVelocity == 0) + return + + TargetVelocity = 0 + status = KS_STOP + + if(immed) + { + CurrentVelocity = 0 + NeedStopEvent = false +// Print("Begin stop") + CallMethods(Owner, OnBeginStop) +// Print("Stop") + CallMethods(Owner, OnStop) + } + else + { +/* bool StopEvent = false + + if(Owner) + { + float RealSpeed = VectorLength(GetVelocity(Owner)) + + if(RealSpeed > 0 && status != KS_STOP) + StopEvent = true + }*/ + +/* if(StopEvent) + { + status = KS_STOP + + if(StopSound) + { + if(!StopSnd) + PlaySound(Owner, StopSound, SF_ONCE) + } + NeedStopEvent = true + CallMethods(Owner, OnBeginStop) + }*/ + NeedStopEvent = true + + if(StopSound) + { + if(!StopSnd) + PlaySound(Owner, StopSound, SF_ONCE) + } + +// Print("Begin stop") + CallMethods(Owner, OnBeginStop) + } + } + +//----------------------------------------------------------------- + void Forward() + { + if(TargetVelocity > 0) + return + + LastVelocityTime = -1 + + TargetVelocity = speed + StartSnd = 0 +// Print("Need Forward") + } + +//----------------------------------------------------------------- + void Back() + { + if(TargetVelocity < 0) + return + + LastVelocityTime = -1 + + TargetVelocity = -speed + StartSnd = 0 +// Print("Need Backward") + } + +//----------------------------------------------------------------- + void SetSpeed(float sp) + { + speed = sp + } + +//----------------------------------------------------------------- + void ProcessWaypoint(info_path p) + { + //jeste jsme ho neopustili + if(LastWaypoint == p) + return + + LastWaypoint = p + CallMethods(Owner, p.OnArrival) + } + +//----------------------------------------------------------------- + bool _Update(float vel, vector origin, float dt) + { + //najdi presny bod na poloprimce + vector from = Curve[CurrentSegment] + + float dist = PathDir * origin + dist = PathDir * from - dist + clamp dist + + vector intersect = from + (PathDir * -dist) + + vector totarget + float tdot + + //zjisti jestli jsme uz na konci segmentu + if(vel > 0) + totarget = Curve[CurrentSegment + 1] - intersect + else + totarget = intersect - Curve[CurrentSegment] + + VectorNormalize(totarget) + tdot = totarget * PathDir + + bool nextwp = false + //uz jsme tam, nebo jsme to dokonce prejeli + if(tdot <= 0) + { + info_path nextpath + + if(vel > 0) + { + //jsme na konci krivky? + int nc = NumCurved - 2 + if(CurrentSegment >= nc) + { + ProcessWaypoint(Next) + nextpath = FindClass(Next.link) + if(nextpath == NULL) + return false + + nextwp = true + Current = Next + Next = nextpath + NumCurved = CurvePath(Current, Next, Curve, PATH_SEGMENT) + CurrentSegment = 0 + NextVec = ZeroVec + PrevVec = ZeroVec + } + else + CurrentSegment++ + } + else + { + //jsme na zacatku krivky? + if(CurrentSegment <= 0) + { + ProcessWaypoint(Current) + nextpath = FindClass(Current.prev) + if(nextpath == NULL) + return false + + nextwp = true + Next = Current + Current = nextpath + NumCurved = CurvePath(Current, Next, Curve, PATH_SEGMENT) + CurrentSegment = NumCurved - 2 + NextVec = ZeroVec + PrevVec = ZeroVec + } + else + CurrentSegment-- + } + + //vektor aktualniho segmentu + PathDir = Curve[CurrentSegment + 1] - Curve[CurrentSegment] + PathLength = VectorNormalize(PathDir) + + //bod intersekce uz nesouhlasi, ihned prepocitej. + //kdybysme to nechali na dalsi krok, tak tam pak bude neprijemny skok + from = Curve[CurrentSegment] + + dist = PathDir * origin + dist = PathDir * from - dist + clamp dist + intersect = from + (PathDir * -dist) + } + + //nepotkali jsme zadny waypoint, tak to vyresetuj + if(!nextwp) + { + LastWaypoint = NULL + } + + //uprav uhel, aby korespondoval s trasou: + + //jak jsme daleko na aktualnim segmentu (0...1) + tdot = from * PathDir + tdot = intersect * PathDir - tdot / PathLength + clamp tdot<0, 1> + + vector prevvec, nextvec + + vector pts[24] + + if(vel > 0) + { + //vezmi vektor nasledujiciho segmentu a interpoluj + nc = CurrentSegment + 2 + if(nc < NumCurved) + { + nextvec = Curve[CurrentSegment + 2] - Curve[CurrentSegment + 1] + VectorNormalize(nextvec) + } + else + { + if(NextVec == ZeroVec) + { + //jsme na konci krivky, musime si predpocitat dalsi usek + if(Next) + { + //TODO: HMPF!!! :-P + CurvePath(Next, NULL, pts, PATH_SEGMENT) + + NextVec = pts[1] - pts[0] + VectorNormalize(NextVec) + } + else + { + NextVec = PathDir + } + } + nextvec = NextVec + } + + //interpoluj + nextvec = nextvec - PathDir * tdot + PathDir + } + else + { + //vezmi vektor predchoziho segmentu a interpoluj + if(CurrentSegment > 0) + { + prevvec = Curve[CurrentSegment] - Curve[CurrentSegment - 1] + VectorNormalize(prevvec) + } + else + { + if(PrevVec == ZeroVec) + { + nextpath = FindClass(Current.prev) + if(nextpath) + { + //TODO: HMPF!!! :-P + nc = CurvePath(nextpath, Current, pts, PATH_SEGMENT) + + PrevVec = pts[nc - 1] - pts[nc - 2] + VectorNormalize(PrevVec) + } + else + { + PrevVec = PathDir + } + } + prevvec = PrevVec + } + + tdot = 1 - tdot + //interpoluj + nextvec = prevvec - PathDir * tdot + PathDir + } + + vector angs = Vector2Angles(nextvec) + + if(unlockz) + { + RollPitchYawMatrix(Vector(0, angs[1] + CarrierAngle, angs[0]), CurrentMatrix) + } + else + { + RollPitchYawMatrix(Vector(0, angs[1] + CarrierAngle, 0), CurrentMatrix) + } + + //spocitej novou pozici z aktualni pozice + rychlosti + float scale = vel * dt + CurrentMatrix[3] = PathDir * scale + intersect + return true + } + +//----------------------------------------------------------------- + bool IsOK() + { + if(Current && Next) + return true + + return false + } + +//----------------------------------------------------------------- + void ProcessEvents() + { + if(CurrentVelocity == 0) + { + if(MotorSnd) + { + EndSound(MotorSnd) + MotorSnd = 0 + } + + if(status == KS_STOP) //uz sme zacali zastavovat + { + if(NeedStopEvent) + { + NeedStopEvent = false + CallMethods(Owner, OnStop) +// Print("Stop") + } + } + } + else + { + if(Owner) + { + float RealSpeed = VectorLength(GetVelocity(Owner)) + + if(TargetVelocity > 0) //je poziadavka na chod dopredu + { + if(status != KS_FORWARD) + { + if(RealSpeed > 5) //az ked mame rychlost tak vykoname OnStart a zapiname status KS_FORWARD + { + status = KS_FORWARD + + if(StartSound && !StartSnd) + StartSnd = PlaySound(Owner, StartSound, SF_ONCE) + + CallMethods(Owner, OnForward) +// Print("OnForward") + } + } + } + + if(TargetVelocity < 0) //je poziadavka na chod dozadu + { + if(status != KS_BACKWARD) + { + if(RealSpeed > 5) //az ked mame rychlost tak vykoname OnStart a zapiname status KS_FORWARD + { + status = KS_BACKWARD + + if(StartSound && !StartSnd) + StartSnd = PlaySound(Owner, StartSound, SF_ONCE) + + CallMethods(Owner, OnBack) +// Print("OnBackward") + } + } + } + + if(MotorSound && status != KS_STOP) + { + if(!MotorSnd) + MotorSnd = PlaySound(Owner, MotorSound, 0) + + float maxsp = fabs(speed) + float freqrate = fabs(CurrentVelocity) / maxsp + clamp freqrate<0, 1> + float freq = 6000 + (freqrate * 4000) + float vol = 0.2 + (freqrate * 0.8) + SetSoundFrequency(MotorSnd, freq) + SetSoundVolume(MotorSnd, LinearVol(vol)) + } + } + } + + if(status != KS_STOP) + { + float RealSpeed2 = VectorLength(GetVelocity(Owner)) + + if(RealSpeed2 == 0) + { + Stop(true) +// Print("Zachranny stop") + } + } + } + +//----------------------------------------------------------------- + int Update(vector pos, float dt) + { + ProcessEvents() + + if(!IsOK()) + { + return KS_IDLE + } + + if(CurrentVelocity < TargetVelocity) + { + CurrentVelocity = dt * 90 + CurrentVelocity + clamp CurrentVelocity + } + else + { + if(CurrentVelocity > TargetVelocity) + { + CurrentVelocity = dt * -90 + CurrentVelocity + clamp CurrentVelocity + } + } + + clamp CurrentVelocity<-speed, speed> + + if(LastVelocityTime == -1) + LastVelocityTime = currenttime + + if(CurrentVelocity != 0) + LastVelocityTime = currenttime + + float d = currenttime - LastVelocityTime + + if(d > 1.5) + { + return KS_IDLE + } + + if(!_Update(CurrentVelocity, pos, dt)) + { +// TargetVelocity = 0 +// CurrentVelocity = 0 + + if(Updated) + { + Updated = false + return KS_STOP + } + Updated = false + return KS_NONE + } + Updated = true + return KS_UPDATE + } + +//----------------------------------------------------------------- + void Keyframer(ExtClass other, vector coords, float angle, hsound snd1, hsound snd2, hsound snd3) + { + Owner = other + status = KS_STOP + info_path best = NULL + float bestdist = 99999 * 99999 + for(info_path ec = GetNextEntity(NULL, CInfoPath); ec != NULL; ec = GetNextEntity(ec, CInfoPath)) + { + vector off = coords - ec.coords + float dist = off * off + if(dist < bestdist) + { + bestdist = dist + best = ec + } + } + + Current = best + + if(Current) + Next = FindClass(Current.link) + + if(Current && Next) + { + NumCurved = CurvePath(Current, Next, Curve, PATH_SEGMENT) + + //offset od stredu trainu do pozice na kolejnici + CarrierOffset = Current.coords - coords + + //vektor aktualniho segmentu + PathDir = Curve[1] - Curve[0] + PathLength = VectorNormalize(PathDir) + CurrentSegment = 0 + + vector angs = Vector2Angles(PathDir) + CarrierAngle = angle - angs[1] + } + + StartSound = snd1 + MotorSound = snd2 + StopSound = snd3 + + LastVelocityTime = -1 + } +} + +//================================================================================= +class func_train extends RigidBodyClass +{ + vector coords + float angle, angle2, angle3 + float speed + string _materialremap + string model + string motorsound, startsound, stopsound + string OnForward, OnBack, OnBeginStop, OnStop + + vobject MainObject + vector CarrierOffset + float CarrierAngle + + hsound MotorSound, StartSound, StopSound + int MotorSnd, StartSn + bool Updated + + Keyframer keyframer + + Constraint ManipPointConstraint1, ManipPointConstraint2, ManipPointConstraint3 + Constraint ManipAngConstraint1, ManipAngConstraint2, ManipAngConstraint3 + +#ifdef EDITOR + void EditorOpened() + { + ActivateBody(false) + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + angle2 = atof(GetKeyValue("angle2")) + angle3 = atof(GetKeyValue("angle3")) + SetTransformEx(Vector(angle3, angle, angle2), coords) + UpdateEntity(this) + } + + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + SetTransformEx(Angs, Pos) + UpdateMainVisualizer() + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } +#endif + +//--------------------------------------------------------------------------------- + void ActivateBody(bool stat) + { + if(!rb) + return + + if(stat) + { + dBodyActive(this, true, true) + SetEventMask(this, EV_CONTACT|EV_SIMULATE) + + if(impactsounds) + SetEventMask(this, EV_SOUNDEND) //koli zvukom + } + else + { + dBodyActive(this, false, false) + SetVelocity(this, ZeroVec) + dBodySetAngularVelocity(this, ZeroVec) + + ClearEventMask(this, EV_CONTACT|EV_SIMULATE) + ClearEventMask(this, EV_SOUNDEND) //koli zvukom + } + } + +//----------------------------------------------------------------- + void M_Stop(ExtClass other) + { + if(other._value == "true") + keyframer.Stop(true) + else + keyframer.Stop(false) + } + +//----------------------------------------------------------------- + void M_Forward(ExtClass other) + { + ActivateBody(true) //zapina aj OnSimulate + keyframer.Forward() + } + +//----------------------------------------------------------------- + void M_Back(ExtClass other) + { + ActivateBody(true) //zapina aj OnSimulate + keyframer.Back() + } + +//----------------------------------------------------------------- + void M_SetSpeed(ExtClass other) + { + keyframer.SetSpeed(atof(other._value)) + } + +//----------------------------------------------------------------- + void EOnTick(MinClass other, int extra) + { + if(KeyState(KC_NUMPAD4)) + { + ClearKey(KC_NUMPAD4) + M_Forward(this) + } + else + { + if(KeyState(KC_NUMPAD5)) + { + ClearKey(KC_NUMPAD5) + _value = "false" + M_Stop(this) + } + else + { + if(KeyState(KC_NUMPAD6)) + { + ClearKey(KC_NUMPAD6) + M_Back(this) + } + } + } + } + + void UpdateConstraints() + { + vector mat[4] + GetMatrix4(this, mat) + vector TargetPoint = keyframer.CurrentMatrix[3] + vector ErrOff = mat[3] - TargetPoint + float ErrDot + ErrOff = ErrOff * 0.5 + + if(ManipPointConstraint1) + { + ManipPointConstraint1.setPoint(TargetPoint) + ManipPointConstraint1.setConstraintError(ErrOff[0]) + dConstraintInsert(ManipPointConstraint1) + } + + if(ManipPointConstraint2) + { + ManipPointConstraint2.setPoint(TargetPoint) + ManipPointConstraint2.setConstraintError(ErrOff[1]) + dConstraintInsert(ManipPointConstraint2) + } + + if(ManipPointConstraint3) + { + ManipPointConstraint3.setPoint(TargetPoint) + ManipPointConstraint3.setConstraintError(ErrOff[2]) + dConstraintInsert(ManipPointConstraint3) + } +//-- + vector rot = RotationVectorTo(keyframer.CurrentMatrix, mat) + + if(ManipAngConstraint1) + { + vector axis = ManipAngConstraint1.getAxis1() + ErrDot = ManipAngConstraint1.getAxis1() * rot + ManipAngConstraint1.setPoint(TargetPoint) + ManipAngConstraint1.setConstraintError(ErrDot) + dConstraintInsert(ManipAngConstraint1) + } + + if(ManipAngConstraint2) + { + ErrDot = ManipAngConstraint2.getAxis1() * rot + ManipAngConstraint2.setPoint(TargetPoint) + ManipAngConstraint2.setConstraintError(ErrDot) + dConstraintInsert(ManipAngConstraint2) + } + + if(ManipAngConstraint3) + { + ErrDot = ManipAngConstraint3.getAxis1() * rot + ManipAngConstraint3.setPoint(TargetPoint) + ManipAngConstraint3.setConstraintError(ErrDot) + dConstraintInsert(ManipAngConstraint3) + } + } + +//----------------------------------------------------------------- + void EOnSimulate(MinClass other, float dt) + { + vector origin = GetMatrix(this, 3) + + int rs = keyframer.Update(origin, dt) + + if(rs != KS_IDLE) + { + dBodyActive(this, true, true) + + if(dBodyIsActive(this)) + UpdateConstraints() + } + + switch(rs) + { + case KS_IDLE: + ActivateBody(false) //vypina aj OnSimulate + return + + case KS_STOP: + keyframer.Stop(true) + return + + case KS_NONE: + return + +// case KS_UPDATE: +// UpdateConstraints() + } + } + +//----------------------------------------------------------------- + void DeleteConstraints() + { + if(ManipPointConstraint1) + { + ManipPointConstraint1.destroy() + ManipPointConstraint1 = NULL + } + + if(ManipPointConstraint2) + { + ManipPointConstraint2.destroy() + ManipPointConstraint2 = NULL + } + + if(ManipPointConstraint3) + { + ManipPointConstraint3.destroy() + ManipPointConstraint3 = NULL + } + + if(ManipAngConstraint1) + { + ManipAngConstraint1.destroy() + ManipAngConstraint1 = NULL + } + + if(ManipAngConstraint2) + { + ManipAngConstraint2.destroy() + ManipAngConstraint2 = NULL + } + + if(ManipAngConstraint3) + { + ManipAngConstraint3.destroy() + ManipAngConstraint3 = NULL + } + } + +//----------------------------------------------------------------- + void CreateConstraints() + { + if(!ManipPointConstraint1) + { + ManipPointConstraint1 = dConstraintCreatePoint() + ManipPointConstraint2 = dConstraintCreatePoint() + ManipPointConstraint3 = dConstraintCreatePoint() + ManipAngConstraint1 = dConstraintCreateAngular() + ManipAngConstraint2 = dConstraintCreateAngular() + ManipAngConstraint3 = dConstraintCreateAngular() + + ManipPointConstraint1.setBody1(World) + ManipPointConstraint1.setBody2(this) + ManipPointConstraint2.setBody1(World) + ManipPointConstraint2.setBody2(this) + ManipPointConstraint3.setBody1(World) + ManipPointConstraint3.setBody2(this) + + ManipPointConstraint1.setAxis("1 0 0") + ManipPointConstraint2.setAxis("0 1 0") + ManipPointConstraint3.setAxis("0 0 1") + //-- + ManipAngConstraint1.setBody1(World) + ManipAngConstraint1.setBody2(this) + ManipAngConstraint2.setBody1(World) + ManipAngConstraint2.setBody2(this) + ManipAngConstraint3.setBody1(World) + ManipAngConstraint3.setBody2(this) + + ManipAngConstraint1.setAxis1("1 0 0") + ManipAngConstraint2.setAxis1("0 1 0") + ManipAngConstraint3.setAxis1("0 0 1") + + ManipAngConstraint1.setAxis2("1 0 0") + ManipAngConstraint2.setAxis2("0 1 0") + ManipAngConstraint3.setAxis2("0 0 1") + } + } + +//----------------------------------------------------------------- + void EOnLoad(MinClass other, int extra) + { + CreateConstraints() + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(speed == 0) + speed = 100 + + if(!model) + model = "obj/vehicles/transporter_01_body.xob" + + if(impactsounds == 3) //user do kluca nic nenastavil tak my to chceme defaultne vypnute + impactsounds = 0 + + MainObject = GetObject(model) + SetObject(MainObject, _materialremap) + + SetTransformEx(Vector(angle3, angle, angle2), coords) + SetOrigin(this, coords) + + if(startsound) + StartSound = GetSoundEx(startsound, 1, SF_3D) + + if(motorsound) + MotorSound = GetSoundEx(motorsound, 1, SF_3D|SF_FREQCONTROL) + + if(stopsound) + StopSound = GetSoundEx(stopsound, 1, SF_3D) + + keyframer = new Keyframer(this, coords, angle, StartSound, MotorSound, StopSound) + + keyframer.OnForward = OnForward + keyframer.OnBack = OnBack + keyframer.OnBeginStop = OnBeginStop + keyframer.OnStop = OnStop + keyframer.SetSpeed(speed) + + if(CreateRigidBody(GEOMTYPE_NONE, "", model)) + { + dBodyInteractionLayer(this, ET_DOOR) + + if(keyframer.IsOK()) + { + ActivateBody(true) //zapina aj OnSimulate + SetEventMask(this, EV_TICK) + } + else + ActivateBody(false) + + CreateConstraints() + dBodySetGravity(this, ZeroVec) + } + + SetEventMask(this, EV_LOADED|EV_ONLOAD) + ClearFlags(this, TFL_TOUCHTRIGGERS) //Isn't good idea + } + +//----------------------------------------------------------------- + void func_train() + { + ClassType = ClassTypeFuncTrain + SetEventMask(this, EV_INIT) + SetFlags(this, TFL_VISIBLE|TFL_SOLID|TFL_NOSHADOW) + SetPickable(false) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_NONE + } + +//----------------------------------------------------------------- + void ~func_train() + { + DeleteConstraints() + + delete keyframer + //destroy action + ClearEventMask(this, EV_SIMULATE) + RemoveBodyAndGeom() + + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + +//================================================================================= +class func_keyframer extends ExtClass +{ + vector coords + float angle, angle2, angle3 + float speed + string motorsound, startsound, stopsound + string OnForward, OnBack, OnBeginStop, OnStop + + hsound MotorSound, StartSound, StopSound + int MotorSnd + + int flags + Keyframer keyframer + +#ifdef EDITOR + void EditorOpened() + { + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + angle2 = atof(GetKeyValue("angle2")) + angle3 = atof(GetKeyValue("angle3")) + SetMatrixEx(this, Vector(angle3, angle, angle2), coords) + UpdateEntity(this) + } + + void OnPositionChangingInEditor(vector pos, vector angs) + { + SetMatrixEx(this, angs, pos) + UpdateMainVisualizer() + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } +#endif + +//----------------------------------------------------------------- + void M_Stop(ExtClass other) + { + if(other._value == "true") + keyframer.Stop(true) + else + keyframer.Stop(false) + } + +//----------------------------------------------------------------- + void M_Forward(ExtClass other) + { + SetEventMask(this, EV_FRAME) + keyframer.Forward() + } + +//----------------------------------------------------------------- + void M_Back(ExtClass other) + { + SetEventMask(this, EV_FRAME) + keyframer.Back() + } + +//----------------------------------------------------------------- + void M_SetSpeed(ExtClass other) + { + keyframer.SetSpeed(atof(other._value)) + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + vector origin = GetMatrix(this, 3) + + int rs = keyframer.Update(origin, ftime) + + switch(rs) + { + case KS_IDLE: + SetVelocity(this, ZeroVec) + ClearEventMask(this, EV_FRAME) + return + + case KS_STOP: + keyframer.Stop(true) + return + + case KS_NONE: + return + + case KS_UPDATE: + //TODO: behave according entities attached to us + //dBodySetTargetFrame(this, keyframer.CurrentMatrix, dt, true) + SetMatrix(this, keyframer.CurrentMatrix) + } + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(speed == 0) + speed = 100 + + SetFlags(this, TFL_FULLMATRIX) + SetMatrixEx(this, Vector(angle3, angle, angle2), coords) + + if(startsound) + StartSound = GetSoundEx(startsound, 1, SF_3D) + + if(motorsound) + MotorSound = GetSoundEx(motorsound, 1, SF_3D|SF_FREQCONTROL) + + if(stopsound) + StopSound = GetSoundEx(stopsound, 1, SF_3D) + + keyframer = new Keyframer(this, coords, angle, StartSound, MotorSound, StopSound) + + keyframer.OnForward = OnForward + keyframer.OnBack = OnBack + keyframer.OnBeginStop = OnBeginStop + keyframer.OnStop = OnStop + keyframer.SetSpeed(speed) + + if(flags & 1) + keyframer.unlockz = true + + if(keyframer.IsOK()) + { + SetEventMask(this, EV_FRAME) + } + } + +//----------------------------------------------------------------- + void func_keyframer() + { + SetEventMask(this, EV_INIT|EV_LOADED) + } + + void ~func_keyframer() + { + delete keyframer + } +} + +//================================================================================= +class info_cubemap extends ExtClass +{ + vector coords + int size + +#ifdef EDITOR + int vflags + vobject sphere + + void AfterReloadInEditor() //Bolo uz volane init aj loaded. editor s tym skoncil + { + UpdateEntity(this) + UpdateCubeMap(this, size, _name) + } + + void DestroyCustomVisuals() + { + if(sphere) + { + ReleaseObject(sphere, 0) + sphere = VNULL + } + } + + void CreateCustomVisuals() + { + DestroyCustomVisuals() + sphere = GetObject("obj/debug/DebugSphere.xob") + SelectObject(this, sphere) + SetFlags(this, TFL_VISIBLE) + } +#endif + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + clamp size<0, 6> + } + +//----------------------------------------------------------------- + void ~info_envcube() + { + } + + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + SetEventMask(this, EV_INIT|EV_LOADED) + } + +//----------------------------------------------------------------- + void info_envcube() + { + SetEventMask(this, EV_INIT|EV_LOADED) + } +} + +//================================================================================= +class info_null extends ExtClass +{ + float angle, angle2, angle3 + vector coords + int extra + string linkname + +/* +#ifdef EDITOR + vobject obj + +//----------------------------------------------------------------- + void DebugVisualize(bool stat) + { + if(stat) + { + if(!obj) + obj = GetObject("obj/pointing_arow.xob") + + SelectObject(this, obj) + SetFlags(this, TFL_VISIBLE | TFL_OBBCOLLISION | TFL_SOLID) + } + else + ClearFlags(this, TFL_VISIBLE | TFL_OBBCOLLISION | TFL_SOLID) + } + +//----------------------------------------------------------------- + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + SetOrigin(this, coords) + SetAngles(this, Angs) + } +//----------------------------------------------------------------- + void ~info_null() + { + if(obj) + ReleaseObject(obj, 0) + } +#endif +*/ + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + ClassType = ClassTypeInfo + ClassNum = ClassNumNull + SetOrigin(this, coords) + + SetAngles(this, Vector(angle3, angle, angle2)) + } + + void info_null() + { + SetEventMask(this, EV_INIT|EV_LOADED) + } +} + +//================================================================================= +class info_notnull extends ExtClass +{ + vector coords +} + +//================================================================================= +// nulova entita, jen pro odecitani orientace pivotu +class info_pivot extends _eclass +{ +} + +//================================================================================= +ExtClass FindClassByLink(string link) +{ + if(link == "") + return NULL + + info_null ec = FindClass(link) + if(ec == NULL) + { + ec = GetNextEntity(NULL, CInfoNull) + + while(ec) + { + if(ec.linkname == link) + break + + ec = GetNextEntity(ec, CInfoNull) + } + } + return ec +} + +//================================================================================= +class info_script extends ExtClass +{ +string OnScript +string Parms[16] +int Lengths[16] +int NumParms +vector coords +string script + +//----------------------------------------------------------------- + void M_Exec(ExtClass other) + { + if(other._value) + { + CallMethods(other, PrepareScript(script, other._value, Parms, Lengths, NumParms)) + return + } + + CallMethods(other, script) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(ExtClass other, int extra) + { + SetOrigin(this, coords) + + triminplace(OnScript) + + NumParms = 0 + + int s = strstr(OnScript, "(") + + if(s == 0) + { + s = strstr(OnScript, ")") + if(s < 0) + return + + string str = substr(OnScript, 1, s - 1) + script = substr(OnScript, s + 1, strlen(OnScript) - s - 1) + + while(true) + { + s = strstr(str, ",") + + if(s >= 0) + { + string p = substr(str, 0, s) + Lengths[NumParms] = triminplace(p) + Parms[NumParms++] = p + str = substr(str, s + 1, strlen(str) - s - 1) + } + else + { + Lengths[NumParms] = triminplace(str) + Parms[NumParms++] = str + break + } + } + return + } + script = OnScript + } +} + +//================================================================================= +class info_switch extends ExtClass +{ + string OnExec1, OnExec2, OnExec3, OnExec4 + string OnExec5, OnExec6, OnExec7, OnExec8 + + string OnChange, BeforeExec, AfterExec + + string execs[8] + + int selected + int execsnum + + vector coords + +//----------------------------------------------------------------- + void M_Random(ExtClass other) + { + if(other._value) + { + int s = strstr(other._value, ",") + + if(s >= 0) + { + int lo, hi + + lo = atoi(substr(other._value, 0, s)) + hi = atoi(substr(other._value, s + 1, strlen(other._value) - s - 1)) + + if(lo >= 1 && lo <= 8 && hi >= 1 && hi <= 8 && lo <= hi) + { + selected = rand(lo, hi + 1) + CallMethods(this, OnChange) + } + } + } + } + +//----------------------------------------------------------------- + void M_Switch(ExtClass other) + { + int n = atoi(other._value) + if(n >= 1 && n <= 8) + { + selected = n + CallMethods(this, OnChange) + } + } + +//----------------------------------------------------------------- + void M_SwitchInc(ExtClass other) + { + int n = atoi(other._value) + n = selected + n + + if(n > execsnum) + n = 1 + + if(n < 1) + n = execsnum + + if(n >= 1 && n <= 8) + { + selected = n + CallMethods(this, OnChange) + } + } + +//----------------------------------------------------------------- + void M_Exec(ExtClass other) + { + int sel = selected + + if(other._value) + { + int n = atoi(other._value) + if(n >= 1 && n <= 8) + sel = n + } + + CallMethods(this, BeforeExec) + CallMethods(this, execs[sel - 1]) + CallMethods(this, AfterExec) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(ExtClass other, int extra) + { + SetOrigin(this, coords) + + if(selected == 0) + selected = 1 + + if(execsnum == 0) + execsnum = 8 + + execs[0] = OnExec1 + execs[1] = OnExec2 + execs[2] = OnExec3 + execs[3] = OnExec4 + execs[4] = OnExec5 + execs[5] = OnExec6 + execs[6] = OnExec7 + execs[7] = OnExec8 + } +} + +//================================================================================= +class info_counter extends ExtClass +{ + string OnCount, OnIncrement, OnDecrement, OnFail, OnCountFail + int flags + int count, cnt, cnt2 + int parm + int LastParm + vector coords + MinClass Entities[20] + + void ClearList() + { + cnt2 = 0 + LastParm = 0 + + for(int n = 0; n < sizeof(Entities); n++) + Entities[n] = NULL + } + + void CountTest() + { + if(cnt2 == count) //ak uz bol pokus z kazdej entity ale nebolo to spravne poradie + { + ClearList() + CallMethods(this, OnCountFail) + } + } + + void M_Increment(ExtClass other) + { + parm = atoi(other._value) + + bool IsInList = false + for(int n = 0; n < cnt2; n++) + { + if(Entities[n] == other) + IsInList = true + } + + if(!IsInList) + Entities[cnt2++] = other + + if(flags & 2) //pripad ked napriklad potrebujeme postlacat viac tlacitok v spravnom poradi + { + if(parm > 0) + { + if(parm < LastParm) + { + CallMethods(this, OnFail) + CountTest() + return + } + else + { + int tmp = LastParm + 1 + + if(parm != tmp) + { + CallMethods(this, OnFail) + CountTest() + return + } + else + LastParm = parm + } + } + } + + CallMethods(this, OnIncrement) + + if(++cnt == count) + { + CallMethods(this, OnCount) + return + } + + int ii = count + 1 + if(cnt == ii && flags & 1) + { + cnt = 0 + LastParm = 0 + } + + CountTest() + } + + void M_Decrement(ExtClass other) + { + cnt-- + CallMethods(this, OnDecrement) + + if(cnt < 0 && flags & 1) + { + cnt = count + CallMethods(this, OnCount) + } + } + + void M_SetCounter(ExtClass other) + { + cnt = atoi(other._value) + ClearList() + } + + void M_Refresh(ExtClass other) + { + if(cnt == count) + CallMethods(this, OnCount) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + + void EOnInit(ExtClass other, int extra) + { + SetOrigin(this, coords) + } +} + +//================================================================================= +class info_portal extends ExtClass +{ + string OnEnable, OnDisable + + void M_Enable(ExtClass other) + { + World.pPathFinder.SwitchPortal(_name, true) + CallMethods(this, OnEnable) + } + + void M_Disable(ExtClass other) + { + World.pPathFinder.SwitchPortal(_name, false) + CallMethods(this, OnDisable) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + + void info_portal() + { + } +} + +//================================================================================= +class info_connection extends ExtClass +{ +vector coords +float angle +string OnArrival +int type + +//----------------------------------------------------------------- +#ifdef EDITOR + Shape line + + void DestroyCustomVisuals() + { + if(line) + { + line.Destroy() + line = NULL + } + } + + void CreateCustomVisuals() + { + DestroyCustomVisuals() + + ExtClass next = FindClass(link) + + if(next) + { + vector from = GetMatrix(this, 3) + UpVec + + line = AddDBridgeArrow(from, GetMatrix(next, 3) + UpVec, 4.0, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP) + } + } + + void UpdateCustomVisuals() + { + DestroyCustomVisuals() + CreateCustomVisuals() + + if(wprec == 0) + { + for(local info_connection ec = GetNextEntity(NULL, CInfoConnection); ec != NULL; ec = GetNextEntity(ec, CInfoConnection)) + { + if(ec != this) + { + if(ec.link == _name) + { + wprec++ + ec.UpdateCustomVisuals() + wprec-- + } + } + } + } + } + +#endif + +/* + void M_Enable(ExtClass other) + { + World.pPathFinder.SwitchPortal(_name, true) + CallMethods(this, OnEnable) + } + + void M_Disable(ExtClass other) + { + World.pPathFinder.SwitchPortal(_name, false) + CallMethods(this, OnDisable) + } +*/ +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetEventMask(this, EV_LOADED) + SetOrigin(this, coords) + SetAngles(this, Angles(angle)) + UpdateEntity(this) + } + +//----------------------------------------------------------------- + void info_connection() + { + } +} + +//================================================================================= +class info_waypoint extends ExtClass +{ +vector coords, floor +float angle +int flags +int used +string firstsound + +int cost +float coverfov +float radius +float enemyradius +float enemyfov +float reusetime +string aitype + +string OnArrival, OnDeparture + +float lastusetime +int tcost //per search cost + +vector facevec, rightvec +int node + +#ifdef EDITOR + Shape line + + void UpdateCustomVisuals() + { + DestroyCustomVisuals() + CreateCustomVisuals() + + int rec + + if(wprec == 0) + { + for(local info_waypoint ec = GetNextEntity(NULL, CInfoWaypoint); ec != NULL; ec = GetNextEntity(ec, CInfoWaypoint)) + { + if(ec != this) + { + if(ec.link == _name) + { + wprec++ + ec.UpdateCustomVisuals() + wprec-- + } + } + } + } + } + + void DestroyCustomVisuals() + { + if(line) + { + line.Destroy() + line = NULL + } + } + + void CreateCustomVisuals() + { + DestroyCustomVisuals() + + ExtClass next = FindClass(link) + + if(next) + { + vector from = GetMatrix(this, 3) + UpVec + + line = AddDArrow(from, GetMatrix(next, 3) + UpVec, 4.0, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP) + } + } + +#endif +//----------------------------------------------------------------- + void M_Enable(ExtClass other) + { + used &= 0xbfffffff + } + +//----------------------------------------------------------------- + void M_Disable(ExtClass other) + { + used |= 0x40000000 + } + +//----------------------------------------------------------------- + CPosition GetWPos() + { + if(WPosition) + return WPosition + + WPosition = new CPosition + + if(!World.pPathFinder.PositionForPoint(floor + "0 0 32", WPosition)) + { + delete WPosition + WPosition = NULL + } + + return WPosition + } + +//----------------------------------------------------------------- + bool TraceFilter(ExtClass other) + { + if(IsInherited(other, CExtClass) == true) + return true + + return false + } + +//----------------------------------------------------------------- + void Init() + { + if(!_name || substr(_name, 0, 1) == "@") + return + +#ifdef DEVELOPER + ExtClass other = FindClass(link) + if(other) + { + if(other.ClassType != CTypeInfoWaypoint) + { + DPrint("info_waypoint " + _name + " linked to: " + other._name) + ErrorNum++ + } + } +#endif + + if(flags & 0x10000) + { + floor = coords + } + else + { + floor = coords - "0 0 128" + float plane[4] + + // TraceLineEx(PLAYER, coords + "0 0 4", floor, ZeroVec, ZeroVec, NULL, plane, NULL, NULL, TRACE_DEFAULT, NULL) + if(TraceLineEx(PLAYER, coords + "0 0 4", floor, ZeroVec, ZeroVec, NULL, plane, NULL, NULL, TRACE_DEFAULT, NULL) >= 1) + { + DPrint("info_waypoint " + _name + " too high above floor") + ErrorNum++ + } + } + +//Print(String(_name + Vector2String(floor))) + + SetOrigin(this, coords) + SetAngles(this, Angles(angle)) + UpdateEntity(this) + + if(WPosition) + { + delete WPosition + WPosition = NULL + } + + //is it disabledonstart? + if(flags & 0x40000000) + used |= 0x40000000 + + facevec = Yaw2Vector(angle) + rightvec = facevec * UpVec +/* + vector coord = coords + "0 0 16" + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_TRANSP, coord, facevec * 32 + coord) + AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_TRANSP, coord, leftvec * 32 + coord) + */ +/* + vector coord = coords + "0 0 16" + if(flags & 1) + { + AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_TRANSP, coord - "3 3 3", coord + "3 3 3") + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_TRANSP, coord, facevec * 32 + coord) + } + else + { + if(flags & 2) + { + AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZUPDATE|SS_TRANSP, coord - "3 3 3", coord + "3 3 3") + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_TRANSP, coord, facevec * 32 + coord) + } + }*/ + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + Init() + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetEventMask(this, EV_LOADED) + + if(coverfov == 0) + coverfov = cos(45 * DEG2RAD) + else + coverfov = cos(coverfov * 0.5 * DEG2RAD) + + if(reusetime == 0) + reusetime = 500 + + lastusetime = currenttime * 100 - 1000 + + if(enemyradius == 0) + enemyradius = 64 + + if(enemyfov) + enemyfov = cos(enemyfov * 0.5 * DEG2RAD) + } + +//----------------------------------------------------------------- + void info_waypoint() + { + ClassType = CTypeInfoWaypoint + } + +//----------------------------------------------------------------- + void ~info_waypoint() + { + if(node) + { + World.pPathFinder.UnlinkWaypoint(this, node) + } + } +} + +//================================================================================= +class info_squad extends ExtClass +{ +vector coords +float angle +string members +int flags +string OnActivate, OnKill, OnKillOff, OnLastMan +int Alive + +bool bActivated, bAttacked +CreatureClass Members[64] +int NumMembers + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra); + void OnMemberActivate(CreatureClass cc); + void OnMemberAttacked(CreatureClass cc, CreatureClass attacker, vector pos); + void OnMemberKilled(CreatureClass cc); + //seeks for visible actor somewhere in facevec direction from actor 'fromactor' + CreatureClass FindCommander(CreatureClass fromactor, ExtClass target); + + void M_Activate(ExtClass other); + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + SetAngles(this, Angles(angle)) + SetEventMask(this, EV_LOADED) + } +} + +//================================================================================= +class info_wpgroup extends ExtClass +{ +vector coords +float angle +string waypoints + +info_waypoint PWaypoints[64] +int NumWaypoints + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + string str = waypoints + int lastgroup = -1 + info_waypoint lastwaypoint = NULL + + NumWaypoints = 0 + while(true) + { + string wpname + + if(ParseStringEx(str, wpname) != 3) + break + + info_waypoint wp = FindClass(wpname) + + if(wp == NULL) + { + DPrint("info_wpgroup '" + _name + "' contains nonexistent waypoint '" + wpname + "'") + ErrorNum++ + } + else + { + if(!IsInherited(wp, CInfoWaypoint)) + { + DPrint("info_wpgroup '" + _name + "' contains '" + wpname + "' of type '" + ClassName(wp) + "'") + ErrorNum++ + } + else + { + wp.GetWPos() + + if(wp.WPosition) + { + if(lastgroup != -1 && wp.WPosition.group != lastgroup) + { + DPrint("info_wpgroup '" + _name + "' contains waypoint '" + wpname + "' from different nav-group than " + lastwaypoint._name) + ErrorNum++ + } + lastgroup = wp.WPosition.group + lastwaypoint = wp + } + + PWaypoints[NumWaypoints++] = wp + if(NumWaypoints >= 64) + { + DPrint("info_wpgroup '" + _name + "' has too much waypoints") + ErrorNum++ + break + } + } + } + + if(ParseStringEx(str, wpname) == 0) + break + + if(wpname != ",") + { + DPrint("info_wpgroup '" + _name + "' syntax error '" + wpname + "' of type '" + ClassName(wp) + "'") + ErrorNum++ + break + } + } + + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + SetAngles(this, Angles(angle)) + SetEventMask(this, EV_LOADED) + } + +//----------------------------------------------------------------- + void info_wpgroup() + { + ClassType = CTypeInfoWpGroup + } +} + +//================================================================================= +class info_sound extends ExtClass +{ +int flags +vector coords +string sound + +float RndWaitMin +float RndWaitMax +float RandomTime +hsound Sound +int Psound +bool repeat + +float NextVolume +float FadeSpeed +float CurrentVolume + +//----------------------------------------------------------------- + + void Play() + { + int sflags = 0 + + if(flags & 1) + sflags = sflags | SF_ONCE + + if(flags & 2) + sflags = sflags | SF_AMBIENT + + if(flags & 8) + sflags = sflags | SF_HALFRANGE + else + { + if(flags & 16) + sflags = sflags | SF_QUARTERRANGE + } + + if(repeat) //repeat play + { + if(!flags & 1) + sflags = sflags | SF_ONCE + + RandomTime = frand(RndWaitMin, RndWaitMax) + SetEventMask(this, EV_TIMER) + SetTimer(this, this, RandomTime, EV_TIMER, 0, true) + } + + Psound = PlaySound(this, Sound, sflags) + + //toto je umyslne. Viditelne entity ziskavaji vyhodu rychleho testovani slysitelnosti + SetFlags(this, TFL_VISIBLE) + } + + void EOnFrame(MinClass other, int extra) + { + CurrentVolume += ftime * FadeSpeed + + if(FadeSpeed > 0) + { + if(CurrentVolume >= NextVolume) + { + CurrentVolume = NextVolume + ClearEventMask(this, EV_FRAME) + } + SetSoundVolume(Psound, LinearVol(CurrentVolume)) + return + } + + if(FadeSpeed < 0) + { + if(CurrentVolume <= NextVolume) + { + CurrentVolume = NextVolume + ClearEventMask(this, EV_FRAME) + } + SetSoundVolume(Psound, LinearVol(CurrentVolume)) + } + } + + void M_SetVolume(ExtClass other) + { + CurrentVolume = atof(other._value) + + if(CurrentVolume > 100) + CurrentVolume = 100 + + CurrentVolume *= 0.01 + SetSoundVolume(Psound, LinearVol(CurrentVolume)) + } + + void M_VolumeFade(ExtClass other) + { + string parms[8] + int nump = ParseString(other._value, parms) + + if(nump != 3) + return + + NextVolume = atof(parms[0]) + + if(NextVolume > 100) + NextVolume = 100 + + NextVolume *= 0.01 + FadeSpeed = atof(parms[2]) + FadeSpeed *= 0.01 + + if(FadeSpeed == 0) + FadeSpeed = 0.01 + + FadeSpeed = 1 / FadeSpeed + + if(NextVolume < CurrentVolume) + FadeSpeed = -FadeSpeed + + SetEventMask(this, EV_FRAME) + } + + void M_Play(ExtClass other) + { + Play() + } + + void M_Stop(ExtClass other) + { + if(Psound && !repeat) //nahodne zvuky nechame dohrat + { + EndSound(Psound) + Psound = 0 + } + + ClearEventMask(this, EV_TIMER) + } + + vector RandomPos() + { + vector RndVec + RndVec[0] = frand(-1, 1) + RndVec[1] = frand(-1, 1) + RndVec[2] = frand(-1, 1) + VectorNormalize(RndVec) + RndVec = RndVec * frand(20, 200) + return RndVec + } + +//----------------------------------------------------------------- + void EOnTimer(MinClass other, int extra) + { + if(flags & 4) + { + if(!flags & 2) + { + vector Spos = GetOrigin(World.Player) + RandomPos() + SetOrigin(this, Spos) + } + } + + Play() + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + UpdateEntity(this) + + if(RndWaitMin > 0 || RndWaitMax > 0) + { + repeat = true + + if(RndWaitMin == 0) + RndWaitMin = 200 + + if(RndWaitMax == 0) + RndWaitMax = 300 + } + + int gf + + if(flags & 2) + gf = 0 + else + gf = SF_3D + + if(sound) + Sound = GetSoundEx(sound, 1, gf) + + CurrentVolume = 1 + } +} + +//============================================================== +class info_hack extends ExtClass +{ + vector coords + string OnLogin, OnLogout + string name, description + string HackCameraFrom + float hackingtime + float logintime + int flags + info_null HackCameraOwner + +//-------------------------------------------------------------- + void M_Enable(ExtClass other) + { + status = 0 + } + +//-------------------------------------------------------------- + void M_Disable(ExtClass other) + { + status = 1 + } + +//-------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//-------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + HackCameraOwner = FindClass(HackCameraFrom) + + if(!HackCameraOwner) //ak nechame 0 = nesizujeme kameru = okamzity login a logout + logintime = 0 + + if(hackingtime == 0) + hackingtime = 200 + + HackInterf.HackingTime = hackingtime * 0.01 //v interface to mame v sekundach ale v entite dodrzime standard v milisekundach + + if(HackCameraOwner && !IsInherited(HackCameraOwner, CInfoNull)) + { + HackCameraOwner = NULL + DPrint("Bad entity type in key HackCameraFrom in " + _name + ". Only info_null is allowed!") + } + } + +//-------------------------------------------------------------- + void info_hack(); +} + +//============================================================== +class HackInterfaceCustom extends HackInterface +{ + info_hack Owner + int NumLogins + +//-------------------------------------------------------------- + bool CanHacking() + { + if(NumLogins > 0 && Owner.flags & 1) //once flag + return false + + if(Owner.status == 1) + return false + + return true + } + +//--------------------------------------------------------------------------------- + int CanLogin() + { + if(CurHackingTime != HackingTime) + return false + + return 1 - Owner.status + } + +//--------------------------------------------------------------------------------- + bool NeedLogOut() //ked entita uz nechce aby bol player nalogovany + { + return false + } + +//-------------------------------------------------------------- + void LogIn() + { + NumLogins++ + CallMethods(Owner, Owner.OnLogin) + } + +//-------------------------------------------------------------- + void LogOut() + { + CallMethods(Owner, Owner.OnLogout) + } + +//--------------------------------------------------------------------------------- + float GetMaxLoginTime() + { + return Owner.logintime + } + +//--------------------------------------------------------------------------------- + bool SetCameraFromNull(int camera) + { + if(!Owner.HackCameraOwner) + return false + + info_null camown = Owner.HackCameraOwner + vector mat[4] + RollPitchYawMatrix2(Vector(-camown.angle3, camown.angle, camown.angle2) + EarthquakeAng, mat) + mat[3] = GetMatrix(camown, 3) + EarthquakeOff + SetCameraEx(camera, mat) + return true + } + +//--------------------------------------------------------------------------------- + void OnFrame() + { + SetCameraFromNull(0) + } + +//--------------------------------------------------------------------------------- + bool SetHackPreviewCamera() + { + return SetCameraFromNull(1) + } + +//--------------------------------------------------------------------------------- + void BeforeInit() + { + name = Owner.name + description = Owner.description +// IconName = "C" + NameIndex + IconType = 2 + } + +//-------------------------------------------------------------- + void HackInterfaceCustom(MinClass owner) + { + Owner = owner + } +} + +void info_hack::info_hack() +{ + SetEventMask(this, EV_INIT|EV_LOADED) + HackInterf = new HackInterfaceCustom(this) +} + + + + +//================================================================================= +class info_impacter extends ExtClass +{ + float angle, angle2, angle3 + vector coords + string ImpactTarget + string OnLoad + ExtClass Target + +//----------------------------------------------------------------- + void M_Impact(ExtClass other) + { + if(!Target) + return + + float impactpower = atof(other._value) + vector force = GetMatrix(this, 0) * impactpower + dBodyApplyImpulseAt(Target, force, GetMatrix(this, 3)) + } + +//------------------------------------------------------------------------- + void EOnLoaded(ExtClass other, int extra) + { + Target = FindClass(ImpactTarget) + + if(Target && !Target.IsRigidBody()) + { + DPrint(String("info_impacter: ") + Target._name + String(" without rigid body.")) + Target = NULL + } + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + ClassType = ClassTypeInfo + ClassNum = ClassNumNull + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + } + +//----------------------------------------------------------------- + void info_impacter() + { + SetEventMask(this, EV_INIT|EV_LOADED) + } +} \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/class_info_cutscene.h b/Alpha Prime/Mod/scripts/class_info_cutscene.h new file mode 100644 index 0000000..06bd21f --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_info_cutscene.h @@ -0,0 +1,1253 @@ + +//SCENE_ROOT = 0 +const int B_LW_Camera1 = 1 +const int B_LW_Camera1_zoom = 2 +const int B_LW_Camera2 = 3 +const int B_LW_Camera2_zoom = 4 +const int B_LW_Camera3 = 5 +const int B_LW_Camera3_zoom = 6 +const int B_LW_Camera4 = 7 +const int B_LW_Camera4_zoom = 8 +const int B_LW_Camera5 = 9 +const int B_LW_Camera5_zoom = 10 +const int B_LW_Camera6 = 11 +const int B_LW_Camera6_zoom = 12 +const int B_LW_Camera7 = 13 +const int B_LW_Camera7_zoom = 14 +const int B_LW_Camera8 = 15 +const int B_LW_Camera8_zoom = 16 +const int B_LW_Camera9 = 17 +const int B_LW_Camera9_zoom = 18 +const int B_LW_Camera10 = 19 +const int B_LW_Camera10_zoom = 20 +const int B_LW_Camera11 = 21 +const int B_LW_Camera11_zoom = 22 +const int B_LW_Camera12 = 23 +const int B_LW_Camera12_zoom = 24 +const int B_LW_Camera13 = 25 +const int B_LW_Camera13_zoom = 26 +const int B_LW_Camera14 = 27 +const int B_LW_Camera14_zoom = 28 +const int B_LW_Camera15 = 29 +const int B_LW_Camera15_zoom = 30 + +vector g_AnimCameraPos, g_AnimCameraAngs + +float UpdateAnimCamera(MinClass owner, int CamBone, vector offset) +{ + float atime = BumpFrame(owner, ftime, 0) + UpdateEntity(owner) + vector ang + vector mat[4] + GetBoneMatrix(owner, CamBone - 1, mat) + + //convert from LW + ang = MatrixAngles(mat) + + vector pos + pos[0] = mat[3][1] + float ff = mat[3][0], fg + pos[1] = -ff + pos[2] = mat[3][2] + + ff = ang[0] + fg = ang[2] + ang[0] = -fg + ang[2] = -ff + + g_AnimCameraPos = pos + offset + g_AnimCameraAngs = ang + + //FOV je na druhe kosti + GetBoneMatrix(owner, CamBone, mat) + SetCameraVerticalFOV(0, mat[3][2] * 0.03125 * RAD2DEG) + + return atime +} + +//----------------------------------------------------------------- +bool FromDirector +bool GrabVideo +int LastVideoFrame + + +widget DProgressBar,DProgressBar2,DTime +widget CTopBand,CBottomBand,CFlash +float SLength +bool DirPause +int InCutscene + +//----------------------------------------------------------------- +class info_cutscene extends ExtClass +{ +string OnStart, OnEnd +vector angles +string name +int flags + +tparse tp +int line +float scenetime, lasttime +int ntokens +vector coords + +MinClass target +int lpath,tpath +float band +int timescale + +float yaw +int fcol +float fadetime, fadetimer + +string tokens[100] +vobject CameraAnim, CameraHierarchy + +int mode +bool disabled + +vector CameraAngles, CameraPos + +string HoldID +bool IsRunning + + +void LoadFlashWidget(int sort) +{ + if(CFlash) + DestroyWidget(CFlash) + + CFlash = NULL + CFlash = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_SOURCEALPHA | WF_BLEND, 0xffffffff, sort) + LoadWidgetImage(CFlash, 0, "gfx/white.tga") +} + +//----------------------------------------------------------------- +int NextLine() +{ + string token + + ntokens = ParseLine(tp, line, tokens) + if(ntokens < 2) + return false + + token = tokens[0] + lasttime = atof(token) + + token = tokens[1] + if(token != ":") + { + DPrint("Expected ':' in cutscene") + return false + } + return true +} + +//----------------------------------------------------------------- +void CameraRun(string num) +{ + mode = atoi(num) +} + +//----------------------------------------------------------------- +void CameraFPS(string fps) +{ + SetAnimSlot(this, 0, CameraAnim, 0, 1, NULL, atoi(fps), AF_FORCEFPS) +} + +//----------------------------------------------------------------- +void CameraSeek(string frame) +{ + scenetime = atof(frame) + lasttime = scenetime + SetFrame(this, 0, scenetime) +} + +//----------------------------------------------------------------- +void LoadCamera(string name) +{ + vobject cam = GetObject(name) + + if(cam) + { + if(CameraAnim) + ReleaseObject(CameraAnim, 0) + + CameraAnim = cam + + if(!CameraHierarchy) + { + CameraHierarchy = GetObject("obj/camera.xob") + SelectObject(this, CameraHierarchy) + SetEventMask(this, EV_ANIMEND) + } + SetAnimSlot(this, 0, CameraAnim, 0, 1, NULL, 30, AF_ONCE|AF_RESET) + + //HACK: supress transformation of object skeleton + SetFlags(this, TFL_NOBILLBOARD) + + //co s tou svini je??? + SetOrigin(this, "1 1 1") + SetOrigin(this, coords) + BumpFrame(this,0,0) + UpdateEntity(this) + } +} + +//----------------------------------------------------------------- +bool Loop + +int Run() +{ + //HACK: something very bad happened to our hero + if(World.Player.status == STATE_DEAD) + return false + + + if(band < 100) + { + band = ftime * 100 + band + clamp band<0,100> + + SetWidgetPos(CTopBand, 0, 0, 800, band) + + SetWidgetPos(CBottomBand, 0, 600 - band, 800, band) + } + +#ifdef _XBOX + if(JoyButtonState(JB_START)) + { + ClearJoyButton(JB_START) +#else + if(KeyState(KC_ESCAPE)) + { + ClearKey(KC_ESCAPE) +#endif + if(!flags & 1) + { + World.CutSceneSkip = true + World.OnCutSceneSkip() + } + HoldID = "" + } +#ifdef DEVELOPER +//update progress bar + if(FromDirector) + { + if(GrabVideo && LastVideoFrame != scenetime) + { + LastVideoFrame = scenetime + if(scenetime > 0) + { + //AppendVideoFrame() + MakeScreenshot(String("video/" + _name + "_" + itoal(scenetime - 1, 5) + ".tga")) + } + } + + float w = scenetime * 800 / SLength + clamp w<0,800> + + SetWidgetPos(DProgressBar2, 0,580,w,20) + SetWidgetText(DTime, 0, itoa(scenetime)) + + w = scenetime * 800 / SLength + clamp w<0,760> + SetWidgetPos(DTime, w, 580, 40, 20) + + if(KeyState(KC_UP)) + { + timescale = timescale + 10 + clamp timescale<10,1000> + } + + if(KeyState(KC_DOWN)) + { + timescale = timescale - 10 + clamp timescale<10,1000> + } + + if(KeyState(KC_RIGHT)) + timescale = 100 + + if(KeyState(KC_SPACE)) + { + ClearKey(KC_SPACE) + DirPause = 1 - DirPause + return true + } + + if(KeyState(KC_RETURN)) + { + ClearKey(KC_RETURN) + line = 0 + scenetime = 0 + target = NULL + NextLine() + return true + } + + if(DirPause != false) + return true + } +#endif + + if(!World.CutSceneSkip && HoldID) + { + if(World.IsDialogActive(HoldID)) + return true + HoldID = "" + } + + //when skipping, don't move camera + if(!World.CutSceneSkip) + { + if(mode == 0) //static camera + { + scenetime = ftime * timescale + scenetime + + if(link) + { + MinClass cl + cl = FindClass(link) + if(cl != NULL) + { + vector v = GetMatrix(cl, 3) - CameraPos + float f = v[2] + v[2] = -f + CameraAngles = Vector2Angles(v) + } + } + } + else //lightwave camera + { + scenetime = UpdateAnimCamera(this, mode * 2, coords) + CameraPos = g_AnimCameraPos + CameraAngles = g_AnimCameraAngs + } + + World.CameraPos = CameraPos + EarthquakeOff + World.CameraAngs = CameraAngles + EarthquakeAng + World.CameraNorm = Angles2Vector(World.CameraAngs) + SetCamera(World.CameraPos, World.CameraAngs) + } + + if(fcol > 0) + { + fcol -= ftime * 600 + if(fcol <= 0) + { + fcol = 0 + ShowWidget(CFlash, false) + } + else + SetWidgetColor(CFlash, ARGB(fcol,fcol,fcol,fcol)) + } + + if(fadetime != 0) + { + if(fadetime > 0 && fadetimer < fadetime) + { //fadein + fadetimer += ftime * 100 + clamp fadetimer<0, fadetime> + float alp = fadetimer / fadetime * 255.0 + SetWidgetColor(CFlash, ARGB(alp, 0, 0, 0)) + if(fadetimer == fadetime) + fadetime = 0 + } + else + { //fadeout + fadetimer -= ftime * 100 + alp = fadetimer / fadetime * -255.0 + 255.0 + SetWidgetColor(CFlash, ARGB(alp, 0, 0, 0)) + + if(fadetimer < fadetime) + { + fadetime = 0 + ShowWidget(CFlash, false) + } + } + } + + if(Loop && !World.CutSceneSkip) + return true + + //time to execute line + while(World.CutSceneSkip || scenetime >= lasttime) + { + int t, st, lt + string token,token1,token2,token3,token4 + bool fskip = false + + t = 2 + while(t < ntokens) + { + token = tokens[t++] + + //method call + if(t < ntokens && tokens[t] == ".") + { + string uv = tostr(34) + + while(t < ntokens && tokens[t] != ";") + { + token2 = tokens[t++] + if(substr(token2, 0, 1) == uv) + token += substr(token2, 1, strlen(token2) - 2) + else + token += token2 + } + + if(World.CutSceneSkip && strstr(token, ".Say(") != -1) + goto next + + if(!fskip) + CallMethods(this, token) + goto next + } + + switch(token) + { + case "debug": + debug + break + + case "precache": + if(t >= ntokens) + goto err + GetObject(tokens[t++]) + break + + case "disable_enemies": + DisableEnemies(false) + break + + case "enable_enemies": + EnableEnemies() + break + + case "fskip": + fskip = World.CutSceneSkip + break + + case "fadein": + if(t >= ntokens) + goto err + + token = tokens[t++] + + int sort = 118 + + if(tokens[t] == "onback") + { + sort = 11 + t++ + } + + if(!World.CutSceneSkip) + { + LoadFlashWidget(sort) + ShowWidget(CFlash, true) + SetWidgetColor(CFlash, 0x00000000) + fadetime = atof(token) + fadetimer = 0 + } + break + + case "fadeout": + if(t >= ntokens) + goto err + + token = tokens[t++] + + sort = 118 + + if(tokens[t] == "onback") + { + sort = 11 + t++ + } + + if(!World.CutSceneSkip) + { + LoadFlashWidget(sort) + ShowWidget(CFlash, true) + SetWidgetColor(CFlash, 0xff000000) + fadetime = -atof(token) + fadetimer = 0 + } + break + + case "flash": + if(!World.CutSceneSkip) + { + LoadFlashWidget(118) + ShowWidget(CFlash, true) + SetWidgetColor(CFlash, 0xffffffff) + fcol = 255 + } + break + + case "end": + return false + break + +#ifdef DEVELOPER + case "pause": + DirPause = 1 - DirPause + break +#endif + case "change_level": + if(t >= ntokens) + goto err + t++ + DPrint("Cutscene: change_level is obsolete command. Use worldspawn.ChangeLevel instead") + break + + case "camera": + if(t >= ntokens) + goto err + + token = tokens[t++] + if(!World.CutSceneSkip) + LoadCamera(token) + break + + case "camera_seek": + if(t >= ntokens) + goto err + + token = tokens[t++] + if(!World.CutSceneSkip) + CameraSeek(token) + break + + case "camera_fps": + if(t >= ntokens) + goto err + + token = tokens[t++] + if(!World.CutSceneSkip) + CameraFPS(token) + break + + case "camera_play": + if(t >= ntokens) + goto err + + token = tokens[t++] + if(!World.CutSceneSkip) + CameraRun(token) + break + + case "camera_stop": + mode = 0 + scenetime = 0 + break + + case "hold": + if(t >= ntokens) + goto err + + token = tokens[t++] + if(!World.CutSceneSkip) + HoldID = itoal(atoi(token), 4) + break + + case "loop": + Loop = true + break + + case "say": + if(t >= ntokens) + goto err + + token = tokens[t++] + + if(!World.CutSceneSkip) + World.Dialog(World, token, SF_AMBIENT) + break + + case "shutup": + World.CloseCutSceneDialog() + break + + default: + DPrint("Unknown cutscene command " + token) + } +next:; + if(token != "fskip") + fskip = false + + if(t < ntokens) + { + token = tokens[t] + if(token != ";") + goto err + + t++ + } + } + + line++ + + if(!NextLine()) + return false + + if(HoldID) + return true + } + + return true + +err: + DPrint("Error in cutscene on line" + itoa(line)) + return false +} + +//----------------------------------------------------------------- +void CleanupScene() +{ + if(tp) + { + EndParse(tp) + tp = NULL + } + + if(lpath) + { + RemoveBezier(lpath) + lpath = NULL + } + + if(tpath) + { + RemoveBezier(tpath) + tpath = NULL + } +} + +hsound CachedSounds[128] +int NumCachedSounds + +CreatureClass CachedPuppets[16] +int NumCachedPuppets + +//----------------------------------------------------------------- +void Precache(tparse t) +{ + int line = 0 + + NumCachedSounds = 0 + NumCachedPuppets = 0 + + while(true) + { + int ntokens = ParseLine(t, line, tokens) + + if(ntokens <= 0) + return + + int n = 2 + while(n < ntokens) + { + string token = tokens[n++] + + //skip method call + if(n < ntokens && tokens[n] == ".") + { + if(n > 0) + { + CreatureClass ec = FindClass(tokens[n - 1]) + if(ec && ClassName(ec) == "creature_puppet") + { + for(int p = 0; p < NumCachedPuppets; p++) + { + if(CachedPuppets[p] == ec) + break + } + + if(p == NumCachedPuppets) + { + CachedPuppets[NumCachedPuppets++] = ec + LoadSoundSet(ec.SoundSetName, ec.CSounds) + } + } + } + + if(tokens[n + 1] == "Say") + { + CachedSounds[NumCachedSounds] = GetSoundEx(tokens[n + 3], 0, SF_NOERROR) + if(CachedSounds[NumCachedSounds]) + NumCachedSounds++ + } + + while(n < ntokens && tokens[n] != ";") + n++ + } + + if(n >= ntokens) + break + + switch(token) + { + case "say": + CachedSounds[NumCachedSounds] = GetSoundEx(RemoveQuotes(tokens[n]), 0, SF_NOERROR) + if(CachedSounds[NumCachedSounds]) + NumCachedSounds++ + n++ + break + + case "camera": + // Print(String("camera " + tokens[n])) + n++ + break + + default: + //skip command + while(n < ntokens && tokens[n] != ";") + n++ + break + } + } + line++ + } +} + +widget TempMessage +bool IsFinal + +//----------------------------------------------------------------- +void StartScene() +{ + InCutscene++ + IsRunning = true + + string sname = "cutscene/" + name + ".scn" + if(!name) + sname ="cutscene/default.scn" + + tp = BeginParse(sname) + if(tp == NULL) + { + DPrint("Error loading cutscene " + sname) + ClearEventMask(this,EV_ALL) + return + } + + Precache(tp) + + disabled = true + + line = 0 + scenetime = 0 + mode = 0 + Loop = false + + target = NULL + NextLine() + + World.CutScene = true + World.CutSceneSkip = false + World.ShowCursor = false + + for(ExtClass ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + ec.BeginCutscene() + + band = 0 + + //World.pfov = r_fovy + //fov = World.pfov * 2 + yaw = 0 + + fadetime = 0 + fadetimer = 0 + + SetWidgetPos(CTopBand,0,0,0,0) + SetWidgetPos(CBottomBand,0,0,0,0) + ShowWidget(CTopBand,true) + ShowWidget(CBottomBand,true) + + World.CloseCutSceneDialog() + World.StopDialogs() + + HoldID = "" + + if(!IsFinal) + { + if(!TempMessage) + { + TempMessage = CreateWidget(WTYPE_TEXT, 400, 5, 380, 40, WF_SOURCEALPHA|WF_BLEND|WF_RALIGN, ARGB(255,255,202,0), 10000) + SetFont(TempMessage, MainFont) + SetWidgetText(TempMessage, 0, "Temporal cutscene placeholder") + SetWidgetText(TempMessage, 1, "Please, don't report anything about it") + ShowWidget(TempMessage, true) + } + } + +#ifndef DEVELOPER + timescale = 100 +#endif +} + +//----------------------------------------------------------------- +void M_Start(ExtClass other) +{ +#ifdef EDITOR + if(World.EditorActive) + return +#endif + + ExtClass player + + //HACK: something very bad happened to our hero + if(World.Player.status == STATE_DEAD) + return + + if(disabled) + return + + SetEventMask(this, EV_FRAME) + StartScene() + CallMethods(this, OnStart) +} + +//----------------------------------------------------------------- +void EndScene() +{ + InCutscene-- + clamp InCutscene<0, InCutscene> + IsRunning = false + + World.ShowCursor = true + World.CutScene = false + World.CutSceneSkip = false + SetCameraVerticalFOV(0, DefaultFOV) + + if(FromDirector) + { + ShowWidget(DProgressBar,false) + ShowWidget(DProgressBar2,false) + ShowWidget(DTime,false) + } + + World.StopDialogs() + World.CloseCutSceneDialog() + + ShowWidget(CTopBand,false) + ShowWidget(CBottomBand,false) + ShowWidget(CFlash,false) + FromDirector = false + + for(ExtClass ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + ec.EndCutscene() + + for(int n = 0; n < NumCachedSounds; n++) + { + if(CachedSounds[n]) + { + ReleaseSound(CachedSounds[n]) + CachedSounds[n] = HNULL + } + } + + for(n = 0; n < NumCachedPuppets; n++) + { + CreatureClass cc = CachedPuppets[n] + + for(int s = 0; s < sizeof(cc.CSounds); s++) + { + if(cc.CSounds[s]) + { + ReleaseSound(cc.CSounds[s]) + } + } + } + + if(TempMessage) + { + DestroyWidget(TempMessage) + TempMessage = NULL + } +} + +//----------------------------------------------------------------- +void EOnFrame(MinClass other, int extra) +{ +#ifdef EDITOR + if(World.EditorActive) + return +#endif + + if(Run() == false) + { +#ifdef DEVELOPER + if(GrabVideo) + { + //CloseVideoStream() + GrabVideo = false + } +#endif + ClearEventMask(this, EV_FRAME) + CleanupScene() + EndScene() + CallMethods(this, OnEnd) + } +} + +void LoadWidgets() +{ + if(CTopBand == NULL) + { + CTopBand = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 85, WF_SOURCEALPHA | WF_BLEND, 0xffffffff, 12) + LoadWidgetImage(CTopBand, 0, "gfx/black.tga") + CBottomBand = CreateWidget(WTYPE_IMAGE, 0, 515, 800, 85, WF_SOURCEALPHA | WF_BLEND, 0xffffffff, 12) + LoadWidgetImage(CBottomBand, 0, "gfx/black.tga") + } + + LoadFlashWidget(118) +} + +void EOnLoad(MinClass other, int extra) +{ + LoadWidgets() + + if(tp > 0) //ak pred sejvom bezala tak ju pustime znova + { + disabled = false + M_Start(this) + } +} + +//----------------------------------------------------------------- +void EOnLoaded(MinClass other, int extra) +{ + CallMethods(this, OnLoad) +} + +void EOnInit(MinClass other, int extra) +{ + ClearEventMask(this, EV_FRAME) + SetEventMask(this, EV_SOUNDEND) + SetFlags(this, TFL_NOBILLBOARD) + timescale = 100 + SetOrigin(this, coords) + + LoadWidgets() + + CameraPos = coords + if(angles != ZeroVec) + CameraAngles = angles + +} + +//----------------------------------------------------------------- +void info_cutscene() +{ + SetEventMask(this, EV_INIT|EV_ONLOAD) +} + +//----------------------------------------------------------------- +void ~info_cutscene() +{ + if(IsRunning) + EndScene() + + if(CTopBand) + ShowWidget(CTopBand,false) + + if(CBottomBand) + ShowWidget(CBottomBand,false) + + if(CFlash) + ShowWidget(CFlash,false) + + if(DProgressBar) + ShowWidget(DProgressBar,false) + if(DProgressBar2) + ShowWidget(DProgressBar2,false) + if(DTime) + ShowWidget(DTime,false) + + if(TempMessage) + { + DestroyWidget(TempMessage) + TempMessage = NULL + } + + CleanupScene() +} + +//----------------------------------------------------------------- +int Length() +{ +int length = 0 + + tparse t = BeginParse("cutscene/" + name + ".scn") + if(t) + { + int line = 0 + + while(true) + { + if(ParseLine(t, line, tokens) == 0) + break + + int l = atoi(tokens[0]) + if(l > length) + length = l + + line++ + } + + EndParse(t) + } + + return length +} + +} + +//----------------------------------------------------------------- +// DIRECTOR +//----------------------------------------------------------------- +#ifdef DEVELOPER + +int EScenes[20] +string Scenes[20] +widget WScenes[20] +int NumScenes +int DirectorActive +int DirCursor + +void CleanupDirector() +{ + int n = 0 + + while(n < NumScenes) + { + DestroyWidget(WScenes[n]) + n = n + 1 + } +} + +//----------------------------------------------------------------- +void ShowDirector(WorldClass wc) +{ + int n = 0 + + while(n < NumScenes) + { + ShowWidget(WScenes[n],true) + n = n + 1 + } + + DirectorActive = true +} + +//----------------------------------------------------------------- +void HideDirector(WorldClass wc) +{ + int n = 0 + + while(n < NumScenes) + { + ShowWidget(WScenes[n],false) + n = n + 1 + } + + DirectorActive = false +} + +//----------------------------------------------------------------- +void ProcessDirector(WorldClass wc) +{ +int p +info_cutscene cs + + p = KeyState(KC_ESCAPE) + p = p | KeyState(KC_F11) + + if(p) + { + ClearKey(KC_ESCAPE) + ClearKey(KC_F11) + HideDirector(wc) + return + } + + + if(KeyState(KC_UP)) + { + ClearKey(KC_UP) + + p = DirCursor + + DirCursor = DirCursor - 1 + if(DirCursor < 0) + DirCursor = NumScenes - 1 + + SetWidgetImage(WScenes[p], 0) + SetWidgetImage(WScenes[DirCursor], 1) + } + + if(KeyState(KC_DOWN)) + { + ClearKey(KC_DOWN) + + p = DirCursor + + DirCursor = DirCursor + 1 + if(DirCursor >= NumScenes) + DirCursor = 0 + + SetWidgetImage(WScenes[p], 0) + SetWidgetImage(WScenes[DirCursor], 1) + } + + if(KeyState(KC_E)) + { + ClearKey(KC_E) + + cs = EScenes[DirCursor] + Edit("cutscene/" + cs.name + ".scn",0) + } + + if(KeyState(KC_RETURN)) + { + ClearKey(KC_RETURN) + HideDirector(wc) + cs = EScenes[DirCursor] + cs.disabled = false + + SLength = cs.Length() + if(SLength <= 0) + return + + ShowWidget(DProgressBar,true) + ShowWidget(DProgressBar2,true) + ShowWidget(DTime,true) + + FromDirector = true + GrabVideo = false + + if(KeyState(KC_LSHIFT)) + { + //OpenVideoStream() + GrabVideo = true + LastVideoFrame = -1 + //d_fixedtimeslice = 1000.0 / 30 + } + cs.M_Start(cs) + } +} + +//----------------------------------------------------------------- +void InitDirector(WorldClass wc) +{ +int y = 32 + + NumScenes = 0 + + ctype ct = Type("info_cutscene") + for(info_cutscene cl = GetNextEntity(NULL, ct); cl != NULL; cl = GetNextEntity(cl, ct)) + { + Scenes[NumScenes] = cl.name + + widget w = CreateWidget(WTYPE_TEXT, 64, y, 672, 20, WF_SOURCEALPHA | WF_BLEND, 0xffffffff, 120) + SetWidgetColor(w, 0xffffffff) + LoadWidgetImage(w, 0, "gfx/black.tga") + LoadWidgetImage(w, 1, "gfx/gray.tga") + + EScenes[NumScenes] = (int)cl + WScenes[NumScenes] = w + SetWidgetText(w, 0, cl.name) + + y = y + 24 + NumScenes++ + } + + if(NumScenes == 0) + return + + DProgressBar = CreateWidget(WTYPE_IMAGE, 0, 580, 800, 20, WF_SOURCEALPHA | WF_BLEND, 0xffffffff, 120) + LoadWidgetImage(DProgressBar, 0, "gfx/black.tga") + DProgressBar2 = CreateWidget(WTYPE_IMAGE, 0, 580, 800, 20, WF_SOURCEALPHA | WF_BLEND, 0xffffffff, 121) + LoadWidgetImage(DProgressBar2, 0, "gfx/gray.tga") + + DTime = CreateWidget(WTYPE_TEXT, 0, 580, 40, 20, WF_SOURCEALPHA | WF_BLEND, 0xffffffff, 122) + LoadWidgetImage(DTime, 0, "gfx/black.tga") + SetWidgetText(DTime, 0, "000") + + DirCursor = 0 + SetWidgetImage(WScenes[DirCursor], 1) +} +#endif + + + + + + + + + + + +class misc_camera_player extends ExtClass +{ + vector coords + string anim + vobject CameraHierarchy, CameraAnim + + void M_Start(ExtClass other) + { + SetEventMask(this, EV_FRAME) + } + + void M_Stop(ExtClass other) + { + ClearEventMask(this, EV_FRAME) + } + + void EOnFrame(MinClass other, int extra) + { + UpdateAnimCamera(this, 2, ZeroVec) + World.CameraPos = g_AnimCameraPos + World.CameraAngs = g_AnimCameraAngs + World.CameraNorm = Angles2Vector(World.CameraAngs) + SetCamera(World.CameraPos, World.CameraAngs) + + vector mat[4] + RollPitchYawMatrix(World.CameraAngs, mat); + mat[3] = World.CameraPos + SetCameraEx(1, mat) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + + void EOnInit(MinClass other, int extra) + { + CameraAnim = GetObject(anim) + CameraHierarchy = GetObject("obj/camera.xob") + SelectObject(this, CameraHierarchy) +// SetEventMask(this, EV_ANIMEND) + if(CameraAnim) + SetAnimSlot(this, 0, CameraAnim, 0, 1, NULL, 18, 0) + + //co s tou svini je??? + SetOrigin(this, "1 1 1") + SetOrigin(this, ZeroVec/*coords*/) + BumpFrame(this, 0, 0) + UpdateEntity(this) + } + + void ~misc_camera_player() + { + if(CameraAnim) + ReleaseObject(CameraAnim, 0) + } +} diff --git a/Alpha Prime/Mod/scripts/class_item.h b/Alpha Prime/Mod/scripts/class_item.h new file mode 100644 index 0000000..05fdc06 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_item.h @@ -0,0 +1,367 @@ + +//================================================================= +class item_misc extends ItemClass +{ +//--------------------------------------------------------------------------------------------------------- + void CanActivate(int fl, ExtClass other) + { + if(status == 0 && Definition.pickable && World.NumFlyingItems == 0) // //Definition.pickable znamena ze sa ma rozletiet k playerovi. + return ACT_ENABLE + + return ACT_DISABLE + } + +//--------------------------------------------------------------------------------------------------------- + void Activate(int fl, ExtClass other) + { + if(World.ManipEntity == this) + return + + status = 1 + SetPickable(false) + SetEventMask(this, EV_FRAME) +// PlaySound(this, g_sCommonSounds[8], SF_ONCE) + RemoveBodyAndGeom() + World.NumFlyingItems++ + } + +//----------------------------------------------------------------- + int Pick(CreatureClass owner) + { + Show(false) + owner.PickItem(ClassNum, true) + World.InfDialog.ShowMessage("#You_picked " + Definition.name) + SetOrigin(this, coords) + CallMethods(this, OnPick) + + CreatureClass pla = World.Player + pla.RemoveInteractionAdept(this) +#ifndef EDITOR + delete this +#endif + return 0 + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(name == "") + name = "plechovka_mala" + + if(ActivateDist == 0) + ActivateDist = 50 + + ClassNum = World.ItemColPtr.GetItemIndex(name) + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + MainObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) + + if(!MainObject) + return + + if(!Definition.pickable) + ActivateMethod = ACT_NONE + + SelectObject(this, MainObject) + Show(true) + vector angles = Vector(angle3, angle, angle2) + + if(Definition.physics == true) //item je definovany ako fyzikalny + { + SetTransformEx(angles, coords) + + if(CreateRigidBody(GEOMTYPE_NONE, "", Definition.model) == true) + ActivateBody(true) + } + else + { + SetOrigin(this, coords) + SetAngles(this, angles) + } + } +} + + +//================================================================= +class item_ammo extends item_misc +{ + int type + +//--------------------------------------------------------------------------------------------------------- + void PlayFlySound() + { + PlaySound(this, g_sCommonSounds[1], SF_ONCE) + } + +//--------------------------------------------------------------------------------------------------------- + void CanActivate(int fl, ExtClass other) + { + if(status != 0 || !Definition.pickable || World.NumFlyingItems != 0) // //Definition.pickable znamena ze sa ma rozletiet k playerovi. + return ACT_DISABLE + + if(IsInherited(other, CCreatureClass)) + { + CreatureClass cc = other + if(cc.ClassNum == ClassNumPlayer) + { + if(cc.Ammo[type] >= MaxAmmos[type]) //ClassNum a AmmoType na seba presne sedia takze mozeme indexovat podla jedneho aj druheho + return ACT_DISABLE + } + } + return ACT_ENABLE + } + +//--------------------------------------------------------------------------------------------------------- + void Activate(int fl, ExtClass other) + { + if(World.ManipEntity == this) + return + + status = 1 + SetPickable(false) + RemoveBodyAndGeom() + SetEventMask(this, EV_FRAME) + World.NumFlyingItems++ + } + +//----------------------------------------------------------------- + int GetQuantity() + { + return 0 + } + +//----------------------------------------------------------------- + int Pick(CreatureClass owner) + { + Owner = owner + owner.PickAmmo(type, GetQuantity()) + World.InfDialog.ShowMessage("#You_picked " + Definition.name) + SetOrigin(this, coords) + Show(false) + CallMethods(this, OnPick) + + CreatureClass pla = World.Player + pla.RemoveInteractionAdept(this) + +#ifndef EDITOR + delete this +#endif + return 0 + } +} + +//================================================================= +class item_ammo_gun extends item_ammo +{ +//----------------------------------------------------------------- + int GetQuantity() + { + CreatureClass pla = World.Player + return AmmoGunQuantity[pla.GetDifficultyLevel()] + } + +//----------------------------------------------------------------- + void item_ammo_gun() + { + name = "ammo_pistol" + type = AmmoPistol + } +} + +//================================================================= +class item_ammo_shotgun extends item_ammo +{ +//----------------------------------------------------------------- + int GetQuantity() + { + CreatureClass pla = World.Player + return AmmoShotgunQuantity[pla.GetDifficultyLevel()] + } + +//----------------------------------------------------------------- + void item_ammo_shotgun() + { + name = "ammo_Shotgun" + type = AmmoShotgun + } +} + +//================================================================= +class item_ammo_machinegun extends item_ammo +{ +//----------------------------------------------------------------- + int GetQuantity() + { + CreatureClass pla = World.Player + return AmmoMachinegunQuantity[pla.GetDifficultyLevel()] + } + +//----------------------------------------------------------------- + void item_ammo_machinegun() + { + name = "ammo_Machinegun" + type = AmmoMachinegun + } +} + +//================================================================= +class item_ammo_sniperrifle extends item_ammo +{ +//----------------------------------------------------------------- + int GetQuantity() + { + CreatureClass pla = World.Player + return AmmoSniperRifleQuantity[pla.GetDifficultyLevel()] + } + +//----------------------------------------------------------------- + void item_ammo_sniperrifle() + { + name = "ammo_SniperRifle" + type = AmmoSniperRifle + } +} + +//================================================================= +class item_ammo_rocketlauncher extends item_ammo +{ +//----------------------------------------------------------------- + int GetQuantity() + { + CreatureClass pla = World.Player + return AmmoRocketLauncherQuantity[pla.GetDifficultyLevel()] + } + +//----------------------------------------------------------------- + void item_ammo_rocketlauncher() + { + name = "ammo_RocketLauncher" + type = AmmoRocketLauncher + } +} + +//================================================================= +class item_ammo_flamethrower extends item_ammo +{ +//----------------------------------------------------------------- + int GetQuantity() + { + CreatureClass pla = World.Player + return AmmoFlameThrowerQuantity[pla.GetDifficultyLevel()] + } + +//----------------------------------------------------------------- + void item_ammo_flamethrower() + { + name = "ammo_FlameThrower" + type = AmmoFlameThrower + } +} +//================================================================= +class item_hubbardium extends item_misc +{ +//--------------------------------------------------------------------------------------------------------- + void PlayFlySound() + { + PlaySound(this, g_sCommonSounds[8], SF_ONCE) + } + +//--------------------------------------------------------------------------------------------------------- + void Activate(int fl, ExtClass other) + { + if(World.ManipEntity == this) + return + + CreatureClass cc = other + + if(cc.GetBulletTime() >= BulletTimeMax) //neberieme to ked to nepotrebujeme doplnit + return + + status = 1 + SetPickable(false) + RemoveBodyAndGeom() + SetEventMask(this, EV_FRAME) + World.NumFlyingItems++ + } + +//----------------------------------------------------------------- + int Pick(CreatureClass owner) + { + Owner = owner + owner.PickAmmo(-1, 0) + World.InfDialog.ShowMessage("#You_picked " + Definition.name) + SetOrigin(this, coords) + Show(false) + CallMethods(this, OnPick) + + CreatureClass pla = World.Player + pla.RemoveInteractionAdept(this) +#ifndef EDITOR + delete this +#endif + return 0 + } + +//----------------------------------------------------------------- + void item_hubbardium() + { + name = "Hubbardium" + } +} + +//================================================================= +class item_medikit extends item_misc +{ +//--------------------------------------------------------------------------------------------------------- + void OnPickPhysicaly() + { + } + +//--------------------------------------------------------------------------------------------------------- + void PlayFlySound() + { + PlaySound(this, g_sCommonSounds[1], SF_ONCE) + } + +//--------------------------------------------------------------------------------------------------------- + void Activate(int fl, ExtClass other) + { + CreatureClass cc = other + + if(cc.Health >= cc.MaxHealth) //neberieme to ked to nepotrebujeme doplnit + return + + if(World.ManipEntity == this) + return + + status = 1 + SetPickable(false) + RemoveBodyAndGeom() + SetEventMask(this, EV_FRAME) + World.NumFlyingItems++ + } + +//----------------------------------------------------------------- + int Pick(CreatureClass owner) + { + Owner = owner + CreatureClass pla = owner + owner.AddHealth(MedikitHealth[pla.GetDifficultyLevel()]) + World.InfDialog.ShowMessage("#You_picked " + Definition.name) + SetOrigin(this, coords) + Show(false) + CallMethods(this, OnPick) + + pla.RemoveInteractionAdept(this) +#ifndef EDITOR + delete this +#endif + return 0 + } + +//----------------------------------------------------------------- + void item_medikit() + { + name = "Medikit" + } +} + diff --git a/Alpha Prime/Mod/scripts/class_item_weapon.h b/Alpha Prime/Mod/scripts/class_item_weapon.h new file mode 100644 index 0000000..c6d4e85 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_item_weapon.h @@ -0,0 +1,4992 @@ +void ShotEffects(ShotStorage stor, MinClass target, vector pos, vector norm, int sparm); + +const int WP_IDLE = 1 +const int WP_RUN = 2 +const int WP_SPRINT = 3 +const int WP_RELOAD = 4 +const int WP_CROUCH = 5 + +//================================================================ +class ShotStorageWeapon extends ShotStorage +{ + int Shoot(ExtClass other) + { + if(IsInherited(other, CExtClass) == false) + return SR_NONE +/* + if(other.ClassType == ClassTypeCreature) + { + ExtClass ext = shooter + CreatureClass cc = ext.Owner + damage *= DmgTab[shooter.ClassNum][other.ClassNum] + } +*/ + return other.Shoot(this) + } +} + +//----------------------------------------------------------------- + void ShotBullets(ShotStorage parms, func tracefilter) + { + vector To = parms.to + int content, sparm + ExtClass other + float plane[4] + + parms.ID = World.ShootID++ + + for(int n = 0; n < parms.NumBullets; n++) + { + parms.to = To //parms.to sa musi v kazdom cykle zmenit ale tu ho stale navratime na povodnu hodnotu + + if(parms.precision != 0) + { + float maxerr = VectorLength(parms.to - parms.from) * parms.precision + + //presnost musi byt "narusena" v rovine kolme na smer strely + vector right = parms.dir * UpVec + vector up = right * parms.dir + + right = right * frand(-maxerr, maxerr) + up = up * frand(-maxerr, maxerr) + + parms.to = parms.to + up + right + parms.dir = parms.to - parms.from + VectorNormalize(parms.dir) + } + + if(TraceLineEx(DEFAULT, parms.from, parms.to, ZeroVec, ZeroVec, other, plane, content, sparm, TRACE_RAGDOLLS|TRACE_DEFAULT|TRACE_BONES, tracefilter) >= 1) + continue + +#ifdef WEAPONDEBUG + AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, parms.from, parms.to) +#endif + +// int impact = SURF_NOMARKS | SURF_NOIMPACT & sparm + int impact = SURF_NOIMPACT & sparm + + if(impact != 0) + continue + + if(g_iTraceBone >= 64) + parms.Bone = -1 + else + parms.Bone = g_iTraceBone + +/* if(parms.shooter != World.Player) + { + float TraceDist = VectorLength(parms.to - parms.from) + float DamageDistScale = TraceDist / 509 + clamp DamageDistScale<0, 1> + DamageDistScale = 1 - DamageDistScale + + float OrginalDamage = parms.damage //musime zapametat co tam bolo pretoze sa to tam musi po zavolani Shoot() vratit + float DistanceDamage = OrginalDamage * 3 * DamageDistScale + parms.damage *= 3 +// parms.damage += DistanceDamage + }*/ + +/* float OrginalDamage = parms.damage + + if(parms.shooter != World.Player) + parms.damage *= 2*/ + + if(parms.Shoot(other) == SR_HIT) + { + vector norm = Vector(plane[0], plane[1], plane[2]) + + if(strstr(g_strTraceShader, "pipe") != -1 ) + { + misc_particle_effector eff = new misc_particle_effector + eff.SetParms("particle/steam_smoke.ptc", ZeroVec, true, 2) + vector mat[4] + vector vec1, vec2 + vec1[0] = norm[1] + vec1[1] = norm[2] + vec1[2] = norm[0] + vec2 = norm * vec1 + VectorNormalize(vec2) + vec1 = vec2 * norm + + mat[0] = vec1 + mat[1] = vec2 + mat[2] = norm + mat[3] = norm * 0.2 + parms.to + SetFlags(eff, TFL_FULLMATRIX) + SetMatrix(eff, mat) + } + + if(other.ClassType == ClassTypeWorld || IsInherited(other, CRigidBodyClass) || IsInherited(other, CCreatureClass)) + { + //shooter is always ClassTypeCreature + if(parms.shooter.ClassNum == ClassNumPlayer) + { + NotifyNoises(parms.shooter, parms.to, NOISERANGE_PHYSICS, NOISE_SHOOT) + } + + ShotEffects(parms, other, parms.to, norm, sparm) + } + } + +// if(parms.shooter != World.Player) +// parms.damage = OrginalDamage + } + } + +//----------------------------------------------------------------- +bool Projectile::CreateBody() +{ + size *= 0.5 + vector Mins = Vector(-size, -size, -size) + vector Maxs = Vector(size, size, size) + SetBoundBox(this, Mins, Maxs) //podla bboxu sa vytvara RB + SetMass(5) + return CreateRigidBody(GEOMTYPE_SPHERE, "material/default", model) +} + +//----------------------------------------------------------------- +void Projectile::Fire(ShotStorage ShotStor) +{ + SStorage = ShotStor + damage = ShotStor.damage + from = ShotStor.from + target = ShotStor.to + dir = target - from + length = VectorNormalize(dir) + + vector Vec2 + Vec2[0] = dir[1] + Vec2[1] = dir[2] + Vec2[2] = dir[0] + vector Vec3 = dir * Vec2 + + vector mat[4] + mat[0] = dir + mat[1] = Vec2 + mat[2] = Vec3 + mat[3] = from + SetTransform(mat) + CreateBody() + + BeforeFire() + ActivateBody(true) + dBodyApplyImpulse(this, dir * speed) + SetEventMask(this, EV_FRAME) +} + +//----------------------------------------------------------------- +void Projectile::Projectile(int version) +{ + ModifyParms(version) //zmeny kedy staci zmenit parametre nastavime tu (inac spravit novy class!) + + if(model) + MainObject = GetObject(model) + + if(MainObject) + { + SelectObject(this, MainObject) + Show(true) + } + + InitStorage() +} + +//================================================================================ +class ProjectileRocket extends Projectile +{ + float timer + int LightHandle + float ImpactScale + misc_effect_glow Corona + misc_particle_effector smoke + float FromStart + MinClass LightStorage + int ExplosionLook + +//----------------------------------------------------------------- + void BeforeFire() + { + timer = 200 + speed = 4000 * ImpactScale + + if(model == "obj/weapons/grenade.xob") + SetObject(MainObject, "$remap 'obj/weapons/grenade' 'obj/weapons/grenade_NoFPS';$remap 'obj/weapons/grenadeLights' 'obj/weapons/grenadeLights_NoFPS';") + } + +//----------------------------------------------------------------- + void Fire(ShotStorage ShotStor) + { + SStorage = ShotStor + damage = ShotStor.damage + from = ShotStor.from + target = ShotStor.to + dir = target - from + length = VectorNormalize(dir) + + vector Vec2 + Vec2[0] = dir[1] + Vec2[1] = dir[2] + Vec2[2] = dir[0] + vector Vec3 = dir * Vec2 + + vector mat[4] + mat[0] = Vec3 + mat[1] = dir + mat[2] = Vec2 + mat[3] = from + SetTransform(mat) + CreateBody() + + BeforeFire() + + vector Gravity = dir * 10 + dBodySetGravity(this, Gravity) + ActivateBody(true) + dBodyApplyImpulse(this, Gravity * 500) + SetEventMask(this, EV_CONTACT) + + //FIX! + //dBodyInteractionLayer(this, ET_WORLD|ET_DEFAULT|ET_PLAYER|ET_NPC|ET_DOOR) + + if(this.IsRigidBody() && ShotStor.shooter.IsRigidBody()) + { + ColBlockOtherBody = ShotStor.shooter + block = dBodyCollisionBlock(this, ColBlockOtherBody) + + if(ShotStor.shooter.ClassType == ClassTypeCreature) //mohol by to byt este turret + ColBlockOtherBody.AddProjectileDependence(this) + else + AddToParent(ColBlockOtherBody) //sme zavisli na tejto entite + } + + smoke.Switch(true) + } + +//----------------------------------------------------------------- + bool CreateBody() + { + SetMass(5) + bool body = CreateRigidBody(GEOMTYPE_NONE, "", model) + return body + } + +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + vector origin = GetMatrix(this, 3) + + if(!LightHandle) + LightHandle = AddLight(LightStorage, 0, LFL_POINT | LFL_DYNAMIC | LFL_CHEAP, 0, 128, "255 100 0") + + Show(false) + + if(smoke) + smoke.Switch(false) + + delete Corona + Corona = NULL + + timer = 25 + + ClearEventMask(this, EV_CONTACT) + SetEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + timer -= ftime * 100 + vector LightOff = GetMatrix(this, 0) * -30 + SetOrigin(LightStorage, GetMatrix(this, 3) + LightOff) + + if(status == 0) + { + RemoveColBlock(true) + RemoveBodyAndGeom() + ClearFlags(this, TFL_SOLID) + World.ApplyExplosion(SStorage.shooter, GetMatrix(this, 3), 128, 300, damage, ExplosionLook) + PlaySound(this, Sound1, SF_ONCE) + status = 1 + } + + float rate + vector color + + if(status == 1) + { + rate = timer / 25 + rate = 1 - rate + color = "255 100 0" + color = color * rate + SetLightEx(LightHandle, 0, 128, color) + + if(timer > 0) + return + + status = 2 + timer = 150 + } + + if(status == 2) + { + rate = timer / 150 + color = "255 100 0" + color = color * rate + SetLightEx(LightHandle, 0, 128, color) + + if(timer <= 0) + { + RemoveLight(LightHandle) + LightHandle = 0 + timer = 100 + status = 3 + } + } + + if(status == 3) //musime este pockat az dohraje zvuk + { + if(timer <= 0) + delete this + } + } + +//----------------------------------------------------------------- + void InitStorage() + { + LightStorage = new MinClass() + Sound1 = GetSoundEx("Weap_Grenade_expl", 1, SF_3D) + Corona = new misc_effect_glow() + Corona.maxalpha = 1.0 +// Corona.minalpha = 1.0 +// Corona.flags |= 1 //vis test + Corona.SetParms(ZeroVec, 15, "sprites/corona/flarered1.spr") + AddChild(this, Corona, 0) + + smoke = new misc_particle_effector() + smoke.SetParms("particle/rocket_smoke.ptc", ZeroVec, true, 1) + AddChild(this, smoke, 2) + SetAngles(smoke, "90 0 0") + + ClearEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void ModifyParms(int version) + { + switch(version) + { + case 1: + model = "obj/physics/tachyonsphere.xob" + size = 2 + ExplosionLook = 1 + break + + case 2: //playerov raketomet + model = "obj/weapons/rocket.xob" + size = 2 + ExplosionLook = 1 + break + case 3: //heavy turret + model = "obj/weapons/rocket.xob" + size = 2 + ExplosionLook = 3 + break + } + } + +//----------------------------------------------------------------- + void ProjectileRocket(int version) + { + } + +//---------------------------------------------------------------------------- + void OnParentRemove() + { + RemoveColBlock(true) + } + +//----------------------------------------------------------------- + void ~ProjectileRocket() + { + RemoveColBlock(true) + + if(Corona) + { + delete Corona + Corona = NULL + } + + if(smoke) + { + delete smoke + smoke = NULL + } + + if(LightStorage) + { + delete LightStorage + LightStorage = NULL + } + + RemoveBodyAndGeom() + + if(MainObject) + ReleaseObject(MainObject, 0) + + RemoveFromParent() + } +} + + + +//================================================================================ +class ProjectileTachyonGrenade extends Projectile +{ + dlight_dynamic DiscoLight + int LightHandle + misc_effect_glow Corona + float timer + +//--------------------------------------------------------------------------------- + int Shoot(ShotStorage shot) //v superclasse sa limituje sila aby to nemalo velke rychlosti + { + if(shot.HurtType != HT_SHOT) + return 0 + + if(rb) + { + vector vec = shot.dir * shot.power + dBodyApplyImpulseAt(this, vec, shot.to) + } + return 1 + } + +//----------------------------------------------------------------- + void ModifyParms(int version) + { + switch(version) + { + case 1: + model = "obj/physics/tachyonsphere.xob" + size = 2 + break + + case 2: + model = "obj/weapons/grenade.xob" + size = 2 + break + } + } + +//----------------------------------------------------------------- + bool CreateBody() + { + SetMass(5) + return CreateRigidBody(GEOMTYPE_NONE, "", model) + dBodyInteractionLayer(this, ET_GRENADE) + } + +//----------------------------------------------------------------- + void InitStorage() + { + Sound1 = GetSoundEx("Weap_Tachyon_expl", 1, SF_3D) + Corona = new misc_effect_glow() + Corona.maxalpha = 1.0 + Corona.flags |= 1 //vis test + Corona.SetParms(ZeroVec, 30, "sprites/corona/lightblue2.spr") + + DiscoLight = new dlight_dynamic() + DiscoLight.texture = "textures/lightcube/fluidsmall.dds" + DiscoLight.intensity = 300 + DiscoLight.radius = 120 + DiscoLight._color = "0.211793 0.764687 1.000000" + Throw(DiscoLight, this, EV_INIT, 0) + DiscoLight.M_SwitchOn(this) + UpdateEntity(DiscoLight) + + misc_particle_effector effector = new misc_particle_effector() + effector.SetParms("particle/tachyondust.ptc", ZeroVec, true, 1) + + AddChild(this, Corona, 0) + AddChild(this, DiscoLight, 1) + AddChild(this, effector, 2) + + timer = 400 + speed = 4000 + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + timer -= ftime * 100 + + if(status == 0) + { + if(timer <= 0) + { + if(World.ManipEntity == this) + { + CreatureClass cc = World.Player + cc.DropManipEntity(true) + } + + vector origin = GetMatrix(this, 3) + DiscoLight.M_SwitchOff(this) //vyhadzuje svetlo +// misc_particle_effector explode = new misc_particle_effector() +// explode.SetParms("particle/tachyonexplode.ptc", origin, true, 2) + LightHandle = AddLight(this, 0, LFL_POINT | LFL_DYNAMIC | LFL_CHEAP, 40, 128, "255 100 0") + Show(false) + + delete Corona + Corona = NULL + + delete DiscoLight + DiscoLight = NULL + + RemoveBodyAndGeom() + World.ApplyExplosion(SStorage.shooter, GetMatrix(this, 3), 96, 300, damage, 6) + PlaySound(this, Sound1, SF_ONCE) + status = 1 + timer = 25 + } + return + } + + float rate + vector color + + if(status == 1) + { + rate = timer / 25 + rate = 1 - rate + color = "255 100 0" + color = color * rate + SetLightEx(LightHandle, 0, 128, color) + + if(timer <= 0) + { + status = 2 + timer = 150 + } + } + + if(status == 2) + { + rate = timer / 150 + color = "255 100 0" + color = color * rate + SetLightEx(LightHandle, 0, 65, color) + + if(timer <= 0) + { + RemoveLight(LightHandle) + LightHandle = 0 + timer = 100 + status = 4 + } + } + + if(status == 4) //musime este pockat az dohraje zvuk + { + if(timer <= 0) + delete this + } + } + +//----------------------------------------------------------------- + void ProjectileTachyonGrenade(int version) + { + } + +//----------------------------------------------------------------- + void ~ProjectileTachyonGrenade() + { + if(Corona) + delete Corona + + if(DiscoLight) + delete DiscoLight + + RemoveBodyAndGeom() + + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + +//================================================================================ +class ProjectileGrenade extends Projectile +{ + float timer + int LightHandle + float ImpactScale + dlight_dynamic DiscoLight + misc_effect_glow Corona + DynamicOverlaySprite RefractionSprite + MinClass LightStorage + +//----------------------------------------------------------------- + void BeforeFire() + { + timer = 200 + speed = 4000 * ImpactScale + + if(model == "obj/weapons/grenade.xob") + SetObject(MainObject, "$remap 'obj/weapons/grenade' 'obj/weapons/grenade_NoFPS';$remap 'obj/weapons/grenadeLights' 'obj/weapons/grenadeLights_NoFPS';") + + Corona = new misc_effect_glow() + Corona.maxalpha = 1.0 +// Corona.minalpha = 1.0 +// Corona.flags |= 1 //vis test + Corona.SetParms(ZeroVec, 15, "sprites/corona/flarered1.spr") + AddChild(this, Corona, 0) + } + +//--------------------------------------------------------------------------------- + int Shoot(ShotStorage shot) //v superclasse sa limituje sila aby to nemalo velke rychlosti + { + if(shot.HurtType != HT_SHOT) + return 0 + + if(rb) + { + vector vec = shot.dir * shot.power + dBodyApplyImpulseAt(this, vec, shot.to) + } + return 1 + } + +//----------------------------------------------------------------- + bool CreateBody() + { + SetMass(5) + bool body = CreateRigidBody(GEOMTYPE_NONE, "", model) + + if(body) + dBodyInteractionLayer(this, ET_GRENADE) + + return body + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + timer -= ftime * 100 + SetOrigin(LightStorage, GetMatrix(this, 3) + "0 0 30") + + if(status == 0) + { + if(timer <= 0) + { + if(World.ManipEntity == this) + { + CreatureClass cc = World.Player + cc.DropManipEntity(true) + } + + vector origin = GetMatrix(this, 3) +// misc_particle_effector explode = new misc_particle_effector() +// explode.SetParms("particle/explosion1.ptc", origin, true, 2) + LightHandle = AddLight(LightStorage, 0, LFL_POINT | LFL_DYNAMIC | LFL_CHEAP, 0, 128, "255 100 0") + Show(false) + DiscoLight.M_SwitchOff(this) //vyhadzuje svetlo + + delete Corona + Corona = NULL + + delete DiscoLight + DiscoLight = NULL + + RemoveBodyAndGeom() + ClearFlags(this, TFL_SOLID) + World.ApplyExplosion(SStorage.shooter, GetMatrix(this, 3), 96, 300, damage, 1) + PlaySound(this, Sound1, SF_ONCE) + status = 1 + timer = 25 + } + else + return + } + + float rate + vector color + + if(status == 1) + { + rate = timer / 25 + rate = 1 - rate + color = "255 100 0" + color = color * rate + SetLightEx(LightHandle, 0, 128, color) + + if(timer <= 0) + { + status = 2 + timer = 100 + } + } + + if(status == 2) + { + rate = timer / 100 + color = "255 100 0" + color = color * rate + SetLightEx(LightHandle, 0, 128, color) + + if(timer <= 0) + { + RemoveLight(LightHandle) + LightHandle = 0 + status = 4 + timer = 100 + } + } + + if(status == 4) //musime este pockat az dohraje zvuk + { + if(timer <= 0) + delete this + } + } + +//----------------------------------------------------------------- + void InitStorage() + { + LightStorage = new MinClass + Sound1 = GetSoundEx("Weap_Grenade_expl", 1, SF_3D) + + DiscoLight = new dlight_dynamic() + DiscoLight.texture = "textures/lightcube/fluidsmall.dds" + DiscoLight.intensity = 550 + DiscoLight.radius = 120 + DiscoLight._color = "1 0.4 0.1" + Throw(DiscoLight, this, EV_INIT, 0) + DiscoLight.M_SwitchOn(this) + UpdateEntity(DiscoLight) + SetOrigin(DiscoLight, ZeroVec) + + AddChild(this, DiscoLight, 1) //na nule bude corona + } + +//----------------------------------------------------------------- + void ModifyParms(int version) + { + switch(version) + { + case 1: + model = "obj/physics/tachyonsphere.xob" + size = 2 + break + + case 2: + model = "obj/weapons/grenade.xob" + size = 2 + break + } + } + +//----------------------------------------------------------------- + void ProjectileGrenade(int version) + { + } + +//----------------------------------------------------------------- + void ~ProjectileGrenade() + { + if(RefractionSprite) + { + delete RefractionSprite + RefractionSprite = NULL + } + + if(Corona) + { + delete Corona + Corona = NULL + } + + if(DiscoLight) + { + delete DiscoLight + DiscoLight = NULL + } + + if(LightStorage) + { + delete LightStorage + LightStorage = NULL + } + + RemoveBodyAndGeom() + + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + + + + + +const int AMMO_BULLETS1 = 1 +const int AMMO_GRENADE1 = 2 +const int AMMO_ROCKET1 = 3 +const int AMMO_ROCKET2 = 4 + +//achjo :-/ +const int AMMO_ROCKETBOSS = 5 + +class Shooter extends _serializable +{ + ExtClass Owner +// float Damage //kolko to uberie energie +// float Power //jaky visualny bordel to urobi (sila impaktu po zasahu napriklad) + int Type //identifikator toho co z toho bude lietat. + +//------------------------------------------------------------- + void Fire(ShotStorage ShotStor) + { + } + +//------------------------------------------------------------- + void Saturate() + { + } +} + +//============================================================= +class ShooterBullets extends Shooter +{ +//------------------------------------------------------------- + void Fire(ShotStorage ShotStor) + { + ExtClass actor = ShotStor.shooter + ShotBullets(ShotStor, actor.WTraceFilter) + +// if(Type == AMMO_BULLETS1) //kazde strelivo ma svoje vlastnosti +// { +// Damage = WDmgWeaponTest +// Power = 10 + +// if(actor != World.Player) //tie shotery pravdepodobne zrusim pretoze ztracaju zmysel +// str.snd = PlaySound(str.SoundBase, g_sCommonSounds[10], 0) +// } + } + +//------------------------------------------------------------- + void ShooterBullets(ExtClass owner, int ammotype) + { + Owner = owner + Type = ammotype //nemylit s AmmoType u zbrane! + } +} + +//============================================================= +class ShooterProjectile extends Shooter +{ + void Fire(ShotStorage ShotStor) + { + vector vec1 = ShotStor.dir + vector vec2, vec3 + vec2[0] = vec1[1] + vec2[1] = vec1[2] + vec2[2] = vec1[0] + vec3 = vec1 * vec2 + + vector mat[4] + mat[0] = vec3 + mat[1] = vec1 + mat[2] = vec2 + mat[3] = ShotStor.from + Projectile proj + + if(Type == AMMO_GRENADE1) //kazde strelivo ma svoje vlastnosti + { + proj = new ProjectileTachyonGrenade(1) + Throw(proj, World, EV_INIT, 0) + proj.SetTransform(mat) + proj.Fire(ShotStor) + return + } + + if(Type == AMMO_ROCKET1) + { + proj = new ProjectileRocket(2) + Throw(proj, World, EV_INIT, 0) + proj.SetTransform(mat) + proj.Fire(ShotStor) + return + } + + if(Type == AMMO_ROCKET2) + { + proj = new ProjectileRocket(3) + Throw(proj, World, EV_INIT, 0) + proj.SetTransform(mat) + proj.Fire(ShotStor) + return + } + + if(Type == AMMO_ROCKETBOSS) + { + proj = new ProjectileRocket(2) + Throw(proj, World, EV_INIT, 0) + proj.SetTransform(mat) + proj.Fire(ShotStor) + return + } + } + +//------------------------------------------------------------- + void Saturate() + { + } + +//------------------------------------------------------------- + void ShooterProjectile(ExtClass owner, int ammotype) + { + Owner = owner + Type = ammotype + } +} + +//================================================================================= +class weapon_flash extends Particle +{ + float time,ttime + int LightHandle + MinClass LightOwner + vobject obj + float intens + int toggle + int frames + vector adisp + vector rangle //osa, pod kterou se plamen otaci + misc_particle_effector particles + int RotAxis + +//----------------------------------------------------------------- + void Switch(bool set) + { + if(set) + { +// AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, GetMatrix(LightOwner, 3) + "-1 -1 -1", GetMatrix(LightOwner, 3) + "1 1 1") + //force light change, even if FPS is too low + if(intens == 50) + intens = 30 + else + intens = 50 + + frames = 0 + time = ttime + SetFlags(this, TFL_VISIBLE) + SetEventMask(this, EV_FRAME) + + if(LightHandle == 0) + LightHandle = AddLight(LightOwner, 0, LFL_POINT | LFL_DYNAMIC | LFL_CHEAP, 150, 90, "255 100 0") + + if(particles) + { + particles.Restart() + particles.Switch(true) + } + return + } + + ClearFlags(this, TFL_VISIBLE) + ClearEventMask(this, EV_FRAME) + + if(LightHandle) + { + RemoveLight(LightHandle) + LightHandle = 0 + } + + if(particles) + particles.Switch(false) + } + +//----------------------------------------------------------------- + int EOnFrame(MinClass other, int extra) + { + float f = time / ttime * intens * 0.03 + + if(LightHandle) + SetLightEx(LightHandle,150 , 90, "255 100 0" * f) + + time = time - ftime + frames++ + + if(frames > 2) + { + if(time < 0) + Switch(false) + } + + float alp = intens * frand(2,4) + clamp alp<0, 255> + Color = ARGB(alp, 255, 255, 255) + + vector rot = adisp + rot[RotAxis] = rot[RotAxis] + frand(-90,90) + SetAngles(this, rot) + return + } + +//----------------------------------------------------------------- + void ~weapon_flash() + { + if(LightOwner) + delete LightOwner + + if(particles) + { + delete particles + particles = NULL + } + + if(obj) + ReleaseObject(obj, 0) + } + +//----------------------------------------------------------------- + void OnPick(ExtClass owner) + { + particles = new misc_particle_effector + + if(owner.ClassNum == ClassNumPlayer) + { + SetObject(obj, "$remap 'obj/weapons/weaflash1' 'obj/weapons/weaflash1_fps'") + particles.SetParms("particle/weaponflash1player.ptc", ZeroVec, true, 0) + SetRenderViewMask(this, 0x0001) + } + else + { + SetObject(obj) + particles.SetParms("particle/weaponflash1.ptc", ZeroVec, true, 0) + } + + particles.Switch(false) + AddChild(this, particles, 4) + SetAngles(particles, "90 0 0") + } + +//----------------------------------------------------------------- + void weapon_flash(MinClass owner, float stime, vector adisplacement, int RotationAxis) + { + obj = GetObject("obj/weapons/weaflash1.xob") + SetObject(obj) + AddChild(owner, this, p_pivot0) + SetAngles(this, adisplacement) + adisp = adisplacement + RotAxis = RotationAxis + + LightOwner = new MinClass() + AddChild(owner, LightOwner, 3) + SetOrigin(LightOwner, "-3 10 5") //je treba nastavit svetlo na ine miesto + ttime = stime + rangle = "0 1 0" + } +} + + + +const int PRIMARY = 0 +const int SECONDARY = 1 + +//================================================================================= +class WeaponClass extends ItemClass +{ + ExtClass Spawner + info_pivot pivot0 + info_pivot pivot1 + + int Ammo //aktualny stav nabojov + int AmmoType + int AmmoPerMagazine + int Action + float ActionTime + int NumActions + bool Automatic[2] //true = staci drzat a ono to opakovakuje fire + int CrossHair + int ShellType + + vobject DummyObject //model ked to lezi v mape ako item + vobject ReloadAnim, AttackAnim, AttackAnim2 + vobject CustomReloadAnim // custom animace pro potvory + vobject SelectAnim, UnselectAnim, IdleAnim, AimAnim, WalkAnim + vobject WeapIdleAnim, WeapAttackAnim, WeapReloadAnim + vobject IdleVarAnims[3] + + int ActionSound + weapon_flash Flash + + hsound Sounds[5] + int Attacks[32] + int NumAttacks + float ADelay[4] //doba zopakovani + float BulletRainIncrement + + CreatureClass Owner //override + + bool IsPlayerWeapon + + int AttackID //index do combat collection (jen pro steel weapons) + int PartFlags + int Part //ktera cast utoku probiha + int NumParts + + vector Target + +#ifdef EDITOR + void EditorOpened() + { + if(_name && Owner == NULL && rb) + { + ActivateBody(false) + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + angle2 = atof(GetKeyValue("angle2")) + angle3 = atof(GetKeyValue("angle3")) + SetTransformEx(Vector(angle3, angle, angle2), coords) + UpdateEntity(this) + } + } + +//----------------------------------------------------------------- + bool CanEdit() + { + if(Owner) + return false + + return true + } +#endif + +//----------------------------------------------------------------- + bool CanUpdateOwnerAnim() + { + return true + } + +//----------------------------------------------------------------- + void SetAction(int act) + { + Action = act + ActionTime = 0 + + if(Action) + SetEventMask(this, EV_FRAME) + else + ClearEventMask(this, EV_FRAME) + + if(Action) + { + if(Owner && MainObject) + SetAnimSlot(this, s_walk - 1, VNULL, 10.0, 0, NULL, 30, 0) //idle var musi skoncit aby po skonceni animacie prave zacinajucej akcie nebezal + } + } + +//----------------------------------------------------------------- + void SetTarget(vector targ, float precision) + { + Target = targ + } + +//----------------------------------------------------------------- + void EOnExtra(ExtClass other, int extra) + { + } + +//----------------------------------------------------------------- + int ChoiceCover(WeaponClass wp) + { + return 0 + } + +//----------------------------------------------------------------- + void BeginUnselect() + { + } + +//----------------------------------------------------------------- + void BeginSelect() + { + } + +//----------------------------------------------------------------- + void EndAction() + { + SetAction(0) + + if(Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, VNULL, 10.0, 0, NULL, 0, 0) + else + SetAnimSlot(Owner, s_weapon, VNULL, 10.0, 0, NULL, 0, 0) + + if(MainObject) + SetAnimSlot(this, 0, VNULL, 10.0, 0, NULL, 0, 0) //vyhodime pripadny reload alebo fire anim + } + +//----------------------------------------------------------------- + void OnActionEnd() + { + } + +//----------------------------------------------------------------- + void InterruptAction() + { + EndAction() + } + +//----------------------------------------------------------------- + void SetUpgradeLevel(int l) + { + } + +//----------------------------------------------------------------- + void TraceStart() + { + } + +//----------------------------------------------------------------- + void TraceEnd() + { + } + +//----------------------------------------------------------------- + void ShootAction() + { + } + +//----------------------------------------------------------------- + void ShootAction2() + { + } + +//----------------------------------------------------------------- + int Reload() + { + return 0 + } + +//----------------------------------------------------------------- + bool CanSelect() + { + if(Ammo == 0 && Owner.Ammo[AmmoType] == 0) + return false + + return true + } + +//----------------------------------------------------------------- + void Select() + { + SetAngles(this, ZeroVec) + SetOrigin(this, ZeroVec) + SetFlags(this, TFL_VISIBLE) + Owner.UpdateHUD(1) + + if(MainObject) + SetAnimSlot(this, 0, VNULL, 0, 0, NULL, 30, AF_RESET) //vyhodime pripadny reload alebo fire anim + + BumpFrame(this, ftime, 0) + } + +//----------------------------------------------------------------- + void Unselect() + { + SetAction(0) + ClearFlags(this, TFL_VISIBLE) + } + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + } + +//--------------------------------------------------------------------------------------------------------- + void CanActivate(int fl, ExtClass other) + { + if(status != 0 || World.NumFlyingItems != 0) + return ACT_DISABLE + + if(IsInherited(other, CCreatureClass)) + { + CreatureClass cc = other + if(cc.ClassNum == ClassNumPlayer) + { + WeaponClass wc = cc.GetWeaponPointer(ClassNum) + + if(wc && cc.Ammo[AmmoType] >= MaxAmmos[ClassNum]) + return ACT_DISABLE + } + } + return ACT_ENABLE + } + +//--------------------------------------------------------------------------------------------------------- + void Activate(int fl, ExtClass other) + { + if(World.ManipEntity == this) + return + + status = 1 + SetPickable(false) + SetEventMask(this, EV_FRAME) +// PlaySound(this, g_sCommonSounds[8], SF_ONCE) + RemoveBodyAndGeom() + World.NumFlyingItems++ + } + +//--------------------------------------------------------------------------------------------------------- + void AddPickedAmmo(int num) + { + if(Owner) + { + int OwnAmmo = Owner.Ammo[AmmoType] + num + clamp OwnAmmo<0, MaxAmmos[ClassNum]> + Owner.Ammo[AmmoType] = OwnAmmo + } + } + +//================================================================================= + int Pick(CreatureClass owner) + { + status = 0 + Owner = owner + int MagazineAmmo, OtherAmmo + owner.RemoveInteractionAdept(this) + + if(Flash) + Flash.OnPick(owner) + + local WeaponClass wc = owner.GetWeaponPointer(ClassNum) + + if(owner.ClassNum == ClassNumPlayer) + { + SetBoundBox(this, "-16 -16 -16", "16 16 16") //hack - zbran musi byt porad viditelna, i kdyz je cela ve zdi + ClearFlags(this, TFL_SOLID) //nesmie byt solidna. nefunguje koli tomu sialenemu boxu crouch + SetRenderViewMask(this, 0x0001) + + //toto by uz nikdy nemalo nastat ale pre istotu keby sa niekde nieco zmenilo + if(!wc && Spawner && Spawner != owner) //ked to je enemacka zbran a player taku este nema tak si musi najprv vytvorit vlastnu koli inemu modelu, partiklom atd. + { + MagazineAmmo = Ammo //enemaci zahadzuju zbrane s takym mnozstvom nabojov ktore presahuje AmmoPerMagazine + clamp MagazineAmmo<0, AmmoPerMagazine> + OtherAmmo = Ammo - MagazineAmmo + wc = owner.CreateWeapon(ClassNum, OtherAmmo, MagazineAmmo) //musi si rovnaku zbran a naboje z tejto zbrane premiestnime do zasobniku novej zbrane + Ammo = 0 + wc.Pick(owner) + } + } + + //if already present, add just ammo + if(wc) + { + if(Spawner != Owner) + wc.AddPickedAmmo(Ammo) //nech maju zbrane moznost si to managovat po svojom (granat) + + owner.PickWeapon(this) + owner.UpdateHUD(1) //ammo bar + +#ifdef EDITOR + if(Spawner) + delete this + else + Show(false) +#else + delete this +#endif + return false + } + else //zbran este nemame + { + if(!Spawner) //iba v pripade ze zbran berieme zo zeme tak rozpocitame naboje zo zbrane do zasobniku a zbytok ownerovi. ked si zbran vytvara player/potvora tak uz to rozdelene je!!! + { + MagazineAmmo = Ammo //enemaci zahadzuju zbrane s takym mnozstvom nabojov ktore presahuje AmmoPerMagazine + clamp MagazineAmmo<0, AmmoPerMagazine> + OtherAmmo = Ammo - MagazineAmmo + Owner.Ammo[AmmoType] = OtherAmmo + Ammo = MagazineAmmo + } + } + + if(DummyObject) //zbran bola volne polozena v levele s dummy modelom takze selektneme normalny model + { + ClearFlags(this, TFL_FULLMATRIX) + SelectModel(owner) + Show(false) + } + + SetAngles(this, ZeroVec) + SetOrigin(this, ZeroVec) + ClearEventMask(this, EV_VISIBLE | EV_FRAME) + ClearFlags(this, TFL_VISIBLE|TFL_NOSHADOW) + owner.PickWeapon(this) + CallMethods(this, OnPick) + return true + } + +//----------------------------------------------------------------- + void EOnSoundEnd(MinClass other, int extra) + { + if(extra == ActionSound) + ActionSound = 0 + } + +//----------------------------------------------------------------- + bool CanAct(int n) + { + if(n < 1 || n > NumActions) + return false + + if(Action) + { + if(ActionTime < ADelay[Action - 1]) + return false + } + + return true + } + +//----------------------------------------------------------------- + void InitSounds(string names[]) + { + for(int n = 0; n < sizeof(names); n++) + { + if(names[n]) + Sounds[n] = GetSoundEx(names[n], 1, SF_3D) + } + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(Action) + ActionTime += ftime + + BumpFrame(this, ftime, 0) + } + +//----------------------------------------------------------------- + void EOnAnimEnd(MinClass other, int extra) + { + if(extra > 100) //event bol poslany z playera (skoncila animacka ruk) + { + extra -= 100 //cislo slotu + + if(Action > 0) + OnActionEnd() + + return + } + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) //volane iba pri vzniku z mapy + { + if(DummyObject) + { + if(ActivateDist == 0) + ActivateDist = 50 + + if(Definition.physics == true) //item je definovany ako fyzikalny + { + SetTransformEx(Vector(angle3, angle, angle2), coords) + + if(CreateRigidBody(GEOMTYPE_NONE, "", Definition.model) == true) + ActivateBody(true) + } + else + { + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + } + Show(true) + } + } + +//----------------------------------------------------------------- + void WeaponClass() + { + SetEventMask(this, EV_ANIMEND|EV_ONLOAD|EV_LOADED) + SetFlags(this, TFL_VISIBLE) + + ADelay[0] = 0.2 + ADelay[1] = 0.2 + ADelay[2] = 0.2 + ADelay[3] = 0.2 + } + +//----------------------------------------------------------------- + void SetIdleAnim(string anim) + { + if(IdleAnim) + ReleaseObject(IdleAnim, 0) + + IdleAnim = GetObject(anim) + } + +//----------------------------------------------------------------- + void ~WeaponClass() + { + if(Flash) + delete Flash + + if(ReloadAnim) + ReleaseObject(ReloadAnim, 0) + + if(CustomReloadAnim) + ReleaseObject(CustomReloadAnim, 0) + + if(SelectAnim) + ReleaseObject(SelectAnim,0) + + if(UnselectAnim) + ReleaseObject(UnselectAnim,0) + + if(IdleAnim) + ReleaseObject(IdleAnim,0) + + if(AimAnim) + ReleaseObject(AimAnim, 0) + + if(AttackAnim) + ReleaseObject(AttackAnim, 0) + + if(AttackAnim2) + ReleaseObject(AttackAnim2, 0) + + if(WeapIdleAnim) + ReleaseObject(WeapIdleAnim, 0) + + if(WeapAttackAnim) + ReleaseObject(WeapAttackAnim, 0) + + if(WeapReloadAnim) + ReleaseObject(WeapReloadAnim, 0) + + for(int n = 0; n < sizeof(IdleVarAnims); n++) + { + if(IdleVarAnims[n]) + ReleaseObject(IdleVarAnims[n], 0) + } + + if(pivot0) + delete pivot0 + + if(pivot1) + delete pivot1 + } +} + + +//================================================================================= +class FireWeaponClass extends WeaponClass +{ + int toload //how much load after reload anim + ShotStorageWeapon ShotStor + Shooter Shooters[4] + int NumShooters + float KickUp[2] + float PrecisionFlawMax //maximalna odchylka od presnej strelby. + float PrecisionFlawMin + vector ExactAimOffset + vector ExactAimAngOffset + float ExactAimFOV + int RicSndSkip + +#ifdef WEAPONDEBUG + int DLines[32] +#endif + +//----------------------------------------------------------------- + void OnExactAimInterpolate(float rate) + { + } + +//----------------------------------------------------------------- + void LoadMagazine() + { + Ammo += toload + Owner.Ammo[AmmoType] = Owner.Ammo[AmmoType] - toload + + if(Owner.Ammo[AmmoType] < 0) //nikdy by sa nemalo stat ale istota je istota. zaporne ammo by bolo docela trapas + Owner.Ammo[AmmoType] = 0 + + toload = 0 +// PlaySound(this, Sounds[1], SF_ONCE|SF_QUARTERRANGE) + } + +//----------------------------------------------------------------- + void ReloadAction() //z animhooku playera + { + LoadMagazine() + Owner.UpdateHUD(1) //ammo bar + } + +//----------------------------------------------------------------- + bool CheckForAmmo() + { + if(Ammo != -1 && Ammo == 0) + { + PlaySound(this, Sounds[2], SF_ONCE) //nie velmi stastne umiestnenie + KEY(P_ATTACK, true) +// KEY(S_ATTACK, true) + return false + } + return true + } + +//----------------------------------------------------------------- + void OnActionEnd() //akcia skoncila cela bez prerusenia. volane z animendu playera + { + int FinishedAction = Action + EndAction() //zrusi animacky a Action na 0 + + if(FinishedAction == 1) //primary fire + { + if(CheckForAmmo() == false) //autoreload + { + if(Reload()) + SetAction(2) + else + { + if(Owner.ClassNum == ClassNumPlayer) + { + Owner.WeaponChange(Owner.GetBestAvailableWeapon(), true) + } + } + } + return + } + + if(FinishedAction == 2) //primary reload + { + SetAction(0) + return + } + + if(FinishedAction == 3) //secondary fire + { + if(CheckForAmmo() == false) //autoreload + { + if(Reload()) + SetAction(2) + } + return + } + } + +//----------------------------------------------------------------- + int Reload() + { + if(Ammo == AmmoPerMagazine) + return false + + int a = Owner.Ammo[AmmoType] + + if(a <= 0) + return false + + toload = a + clamp toload<0, AmmoPerMagazine> + + int miss = AmmoPerMagazine - Ammo + + clamp toload<0, miss> + + if(Owner.ClassNum == ClassNumPlayer) + { + if(ReloadAnim) + { + SetAnimSlot(Owner.Hands, s_weapon - 1, VNULL, 10.0, 0, NULL, 30, AF_RESET) + SetAnimSlot(Owner.Hands, s_weapon, ReloadAnim, 10.0, 0, NULL, 30, AF_ONCE) + goto done + } + } + else + { + if(CustomReloadAnim) + { + SetAnimSlot(Owner, s_weapon, CustomReloadAnim, 10.0, 0, BoneMasks[g_reload], 30, AF_ONCE) + goto done + } + } + + LoadMagazine() + Owner.UpdateHUD(1) //ammo bar + SetAction(0) + +done:; + if(Owner && Owner.ClassNum == ClassNumPlayer) + { + if(WeapReloadAnim) + SetAnimSlot(this, 0, WeapReloadAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + + PlaySound(Owner, Sounds[1], SF_ONCE) + return true + } + +//----------------------------------------------------------------- + int PrimaryFire(vector target) + { + if(CheckForAmmo() == false) //zistime ci mame strelivo na vystrel + return false + + //infinite ammo + if(Ammo != -1) + Ammo-- + + int sfl = ClearFlags(Owner, TFL_SOLID) + vector targ, dir + float prec = 0 + + if(ShellType) + { + if(Owner.ClassNum == ClassNumPlayer) + { + //zvuk bude vydavat kazda druha + World.ThrowShell(pivot1, Owner, ShellType, 30, Ammo & 1) + } + else + { + //kazdou druhou + if(Ammo & 1) + World.ThrowShell(pivot1, Owner, ShellType, 30, false) + } + } + + if(Flash && !World.CutSceneSkip) + Flash.Switch(true) + + vector start + + if(Owner.ClassNum == ClassNumPlayer) + start = g_CamMat[3] + else + start = GetMatrix(this, 3) + + dir = target - start + VectorNormalize(dir) + + Shooter shoter = Shooters[0] + ShotStor.shooter = Owner + target = target - start + VectorNormalize(target) + target = target * 8192 + start + ShotStor.from = start + ShotStor.to = target + ShotStor.dir = dir + + if(Owner.ClassNum == ClassNumPlayer) + { + float FlawDiff = PrecisionFlawMax - PrecisionFlawMin + ShotStor.precision = PrecisionFlawMin + (FlawDiff * World.Cross.GetPrecisionScale()) + } + else + ShotStor.precision = PrecisionFlawMax + + if(Flash) + ShotStor.VisualsFrom = GetMatrix(Flash, 3) + else + ShotStor.VisualsFrom = start + + int RicSndType = ShotStor.RicSndType + + if(RicSndType != -1) //od niecoho nechcem zvuky vobec + { + if(RicSndSkip != 0 && rand(0, RicSndSkip)) //kazda zbran urcuje kolko ric zvukov sa bude pustat + ShotStor.RicSndType = -1 + } + + shoter.Fire(ShotStor) + + ShotStor.RicSndType = RicSndType //vratime co tam bolo + SetFlags(Owner, sfl) + + if(Owner != World.Player && !World.CutSceneSkip) //player to pusta po uspesnom Action() + { + if(ActionSound) + EndSound(ActionSound) + + ActionSound = PlaySound(Owner, Sounds[0], SF_ONCE) + } + + if(AttackAnim) + { + if(Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, AttackAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + + if(Owner && Owner.ClassNum == ClassNumPlayer) + { + if(WeapAttackAnim) + SetAnimSlot(this, 0, WeapAttackAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + + return true + } + +//----------------------------------------------------------------- + int SecondaryFire(vector target) + { + return false + } + +//----------------------------------------------------------------- + int Action(int n, vector targ) + { + if(!CanAct(n)) + return false + + if(Action) //CanAct niekedy vrati true aj ked akcia bezi a ta sa musi okamzite zrusit + InterruptAction() + + switch(n) + { + case 1: + if(PrimaryFire(targ)) + { + SetAction(n) + return true + } + break + + case 2: + if(Reload()) + { + SetAction(n) + return true + } + break + + case 3: //sekundarny mod + if(SecondaryFire(targ)) + { + SetAction(n) + return true + } + } + + SetAction(0) + return false + } + +//----------------------------------------------------------------- + void FireWeaponClass() + { + pivot0 = new info_pivot + AddChild(this, pivot0, p_pivot0) + + pivot1 = new info_pivot + AddChild(this, pivot1, p_pivot1) + + ShotStor = new ShotStorageWeapon + ShotStor.BulletRainInc = 1.0 + ShotStor.HurtType = HT_SHOT + CrossHair = 0 + } + + void ~FireWeaponClass() + { + delete ShotStor + ShotStor = NULL + + for(int n = 0; n < NumShooters; n++) + { + delete Shooters[n] + Shooters[n] = NULL + } + } +} + +//================================================================================= +class item_weapon_dummy extends FireWeaponClass +{ +//----------------------------------------------------------------- + bool CanSelect() + { + return true + } + +//================================================================================= + int Pick(CreatureClass owner) + { + status = 0 + Owner = owner + owner.RemoveInteractionAdept(this) + ClearFlags(this, TFL_VISIBLE|TFL_NOSHADOW) + owner.PickWeapon(this) + return true + } + +//----------------------------------------------------------------- + void OnActionEnd() + { + EndAction() + } + +//----------------------------------------------------------------- + int Action(int n, vector targ) + { + SetAction(0) + return false + } + +//----------------------------------------------------------------- + void item_weapon_dummy() + { + ClearEventMask(this, EV_INIT) + ClassNum = CDummyWeapon + AmmoType = AmmoJackHammer + IsPlayerWeapon = true + NumActions = 0 + CrossHair = 3 //ziadny + } +} + + + +//================================================================================= +class item_weapon_jackhammer extends FireWeaponClass +{ + vobject SwingAnim[2] + vobject AttackAnims[4] + +//----------------------------------------------------------------- + bool CanSelect() + { + return true + } + +//----------------------------------------------------------------- + bool CheckForAmmo() + { + return true + } + +//----------------------------------------------------------------- + bool CanAct(int n) + { +// if(Action) +// return false + + return true + } + +//----------------------------------------------------------------- + void ShootAction() + { + int sfl = ClearFlags(Owner, TFL_SOLID) + vector targ, dir = World.CameraNorm + float prec = 0 + + vector start = g_CamMat[3] + vector target = dir * 48 + target = start + target + + Shooter shoter = Shooters[0] + ShotStor.shooter = Owner + ShotStor.from = start + ShotStor.to = target + ShotStor.dir = dir + ShotStor.precision = 0 + ShotStor.VisualsFrom = start + shoter.Fire(ShotStor) + SetFlags(Owner, sfl) + + if(ActionSound) + EndSound(ActionSound) + + ActionSound = PlaySound(Owner, Sounds[0], SF_ONCE) + } + +//----------------------------------------------------------------- + void EndAction() + { + SetAction(0) + + if(Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, VNULL, 10.0, 0, NULL, 0, 0) + else + SetAnimSlot(Owner, s_weapon, VNULL, 10.0, 0, NULL, 0, 0) + + if(MainObject) + SetAnimSlot(this, 0, VNULL, 0, 0, NULL, 30, 0) //vyhodime pripadny reload alebo fire anim + } + +//----------------------------------------------------------------- + int PrimaryFire(vector target) + { +// if(!ActionSound) +// ActionSound = PlaySound(Owner, Sounds[0], 0) + + int content, sparm + ExtClass other + float plane[4] + vobject anim = VNULL + target = World.CameraNorm * 48 + target = World.CameraPos + target + + if(TraceLineEx(DEFAULT, World.CameraPos, target, ZeroVec, ZeroVec, other, plane, content, sparm, TRACE_RAGDOLLS|TRACE_DEFAULT|TRACE_BONES, Owner.WTraceFilter) >= 1) + { + anim = SwingAnim[rand(0, 2)] + PlaySound(Owner, Sounds[1], SF_ONCE) + } + else + anim = AttackAnims[rand(0, 4)] + + if(anim && Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, anim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + + return true + } + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + if(spawner) //berieme to rovno do ruk pretoze entita nebola vytvorena z mapy + { + DummyObject = VNULL //system itemov objekt po skonceni mapy maze + + if(spawner.ClassNum == ClassNumPlayer) + SelectObject(this, MainObject) + else + SetObject(MainObject, "$remap 'hammer_fps' 'hammer';") + } + else //bude lezat v levele ako fyzikalny objekt + SelectObject(this, DummyObject) + } + +//----------------------------------------------------------------- + void item_weapon_jackhammer(ExtClass spawner) + { + Spawner = spawner + IsPlayerWeapon = true + + AmmoType = AmmoJackHammer + name = "CJackHammer" + ClassNum = World.ItemColPtr.GetItemIndex(name) //ClassNum = CJackHammer + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + MainObject = GetObject("obj/weapons/hammer.xob") //normalny model + DummyObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) //dummy model ked je zbran volne v mape ako item + + SelectModel(spawner) + + Shooters[0] = new ShooterBullets(this, AMMO_BULLETS1) //primarna strelba (samopal) + NumShooters = 1 + NumActions = 1 + + PrecisionFlawMin = 0 + PrecisionFlawMax = 0 + RicSndSkip = 0 + + ADelay[0] = 0.25 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //primary attack 7 shots per second + + ShotStor.damage = WDmgJackHammer + ShotStor.BulletRainInc = 5.0 + ShotStor.power = 30 + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 3.9 + ShotStor.StreakLength = 0 //nechceme streak + ShotStor.RicDecalType = DE_PLASMA //DE_BULLET, DE_PLASMA + ShotStor.RicSndType = SE_HAMMER //SE_BULLET, SE_PLASMA + ShotStor.RicParticlesType = PE_PLAYERPLASMA + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + SetAngles(pivot0, "90 0 0") + + IdleAnim = GetObject("anm/player/hands/Hammer_Idle.anm") //player + WalkAnim = GetObject("anm/player/hands/Hammer_Walk.anm") //player + ReloadAnim = GetObject("anm/player/hands/Pistol_reload.anm") //player +// AttackAnim = GetObject("anm/player/hands/Hammer_hit_01.anm") //player +// AttackAnim2 = GetObject("anm/player/hands/Hammer_hit_02.anm") //player + AttackAnims[0] = GetObject("anm/player/hands/Hammer_hit_01.anm") + AttackAnims[1] = GetObject("anm/player/hands/Hammer_hit_02.anm") +// AttackAnims[2] = GetObject("anm/player/hands/Hammer_hit_03.anm") + AttackAnims[2] = GetObject("anm/player/hands/Hammer_hit_01.anm") + AttackAnims[3] = GetObject("anm/player/hands/Hammer_hit_04.anm") + SwingAnim[0] = GetObject("anm/player/hands/Hammer_swing_01.anm") + SwingAnim[1] = GetObject("anm/player/hands/Hammer_swing_02.anm") + SelectAnim = GetObject("anm/player/hands/Hammer_In.anm") //player + UnselectAnim = GetObject("anm/player/hands/Hammer_Out.anm") //player + + IdleVarAnims[0] = GetObject("anm/player/hands/JackHammer_idle_var1.anm") //player + IdleVarAnims[1] = GetObject("anm/player/hands/JackHammer_idle_var2.anm") //player + +// WeapAttackAnim = GetObject("anm/weapons/Pistol_fire.anm") + WeapIdleAnim = GetObject("anm/weapons/JackHammer_idle.anm") +// WeapReloadAnim = GetObject("anm/weapons/Pistol_reload.anm") + + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + + InitSounds(WS_WeaponHammer) + SetEventMask(this, EV_ANIMEND) + + KickUp[PRIMARY] = 0 //ako to dviha zbran pri strelbe + KickUp[SECONDARY] = 0 + Automatic[PRIMARY] = false + Automatic[SECONDARY] = false + } + + void ~item_weapon_jackhammer() + { + int n + + for(n = 0; n < sizeof(SwingAnim); n++) + { + if(SwingAnim[n]) + ReleaseObject(SwingAnim[n], 0) + } + + for(n = 0; n < sizeof(AttackAnims); n++) + { + if(AttackAnims[n]) + ReleaseObject(AttackAnims[n], 0) + } + } +} + +//================================================================================= +class item_weapon_pistol extends FireWeaponClass +{ +//----------------------------------------------------------------- + bool CheckForAmmo() + { + if(Ammo != -1 && Ammo == 0) //pistol ma len primarne strelivo ale + { + PlaySound(this, Sounds[2], SF_ONCE) + return false + } + return true + } +/* +//----------------------------------------------------------------- + int SecondaryFire(vector target) + { + return false + + if(CheckForAmmo() == false) //secondary mod u pistole pouziva naboje z primary!!!!! + return false + + Ammo-- + int sfl = ClearFlags(Owner, TFL_SOLID) + + vector targ, dir + float prec = 0 + + if(ShellType) + World.ThrowShell(pivot1, Owner, ShellType, 30, true) + + Flash.Switch(true) + + vector start + + if(Owner.ClassNum == ClassNumPlayer) + start = g_CamMat[3] + else + start = GetMatrix(this, 3) + + dir = target - start + VectorNormalize(dir) + + Shooter shoter = Shooters[0] + ShotStor.shooter = Owner + ShotStor.from = start + ShotStor.to = target + ShotStor.dir = dir + ShotStor.VisualsFrom = GetMatrix(Flash, 3) + + if(Owner.ClassNum == ClassNumPlayer) + { + float FlawDiff = PrecisionFlawMax - PrecisionFlawMin + ShotStor.precision = PrecisionFlawMin + (FlawDiff * World.Cross.GetPrecisionScale()) + } + else + ShotStor.precision = PrecisionFlawMax + + shoter.Fire(ShotStor) + + SetFlags(Owner, sfl) + + EndSound(ActionSound) + ActionSound = PlaySound(Owner, Sounds[0], SF_ONCE) + + if(AttackAnim && Owner.Hands) + { + SetAnimSlot(Owner.Hands, s_weapon, AttackAnim2, 10.0, 1, NULL, 30, AF_ONCE|AF_RESET) + + if(WeapAttackAnim) + SetAnimSlot(this, 0, WeapAttackAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + + return true + } +*/ + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + if(spawner) //berieme to rovno do ruk pretoze entita nebola vytvorena z mapy + { + DummyObject = VNULL //system itemov objekt po skonceni mapy maze + if(spawner.ClassNum == ClassNumPlayer) + SetObject(MainObject, "$remap 'pistol' 'pistol_fps';$remap 'pistol_ammo' 'pistol_ammo_fps';$remap 'pistol_effect' 'pistol_effect_fps';") + else + SetObject(MainObject) + } + else //bude lezat v levele ako fyzikalny objekt + SelectObject(this, DummyObject) + } + +//----------------------------------------------------------------- + void item_weapon_pistol(ExtClass spawner) + { + Spawner = spawner + IsPlayerWeapon = true + + name = "CPistol" + ClassNum = World.ItemColPtr.GetItemIndex(name) //ClassNum = CPistol + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + MainObject = GetObject("obj/weapons/pistol.xob") //normalny model + else + MainObject = GetObject("obj/weapons/pistol_enemy.xob") + + DummyObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) //dummy model ked je zbran volne v mape ako item + ShellType = 1 +// AimAnim = GetObject("anm/player/hands/Pistol_aim.anm") + + SelectModel(Spawner) + + AmmoPerMagazine = PistolAmmoPerMagazine + Ammo = AmmoPerMagazine + AmmoType = AmmoPistol + NumActions = 3 + + Shooters[0] = new ShooterBullets(this, AMMO_BULLETS1) //primarna strelba (samopal) + NumShooters = 1 + + PrecisionFlawMin = 0.002 + PrecisionFlawMax = 0.025 + RicSndSkip = 0 + + ExactAimOffset = "-4.965 -2 0" + ExactAimAngOffset = "0 -2 0" + ExactAimFOV = 16 + + ADelay[0] = 0.22 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //primary attack 7 shots per second + ADelay[1] = 1.8 //reload + ADelay[2] = 0.10 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //secondary attack + + ShotStor.damage = WDmgGun + ShotStor.BulletRainInc = 2.44 + ShotStor.power = 10.75 + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 6.8 + ShotStor.StreakWidth = 5 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 85 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 1750 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 3 + ShotStor.RicDecalType = DE_BULLET + ShotStor.RicSndType = SE_BULLET + if(spawner && spawner.ClassNum != ClassNumPlayer) + ShotStor.RicParticlesType = PE_BULLET + else + ShotStor.RicParticlesType = PE_PLAYERBULLET + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + Flash = new weapon_flash(this, 0.1, "90 0 0", 1) + + IdleAnim = GetObject("anm/player/hands/Pistol_idle.anm") //player + WalkAnim = GetObject("anm/player/hands/Pistol_idle.anm") //player + ReloadAnim = GetObject("anm/player/hands/Pistol_reload.anm") //player + AttackAnim = GetObject("anm/player/hands/Pistol_fire.anm") //player + AttackAnim2 = GetObject("anm/player/hands/Pistol_fire.anm") //player + SelectAnim = GetObject("anm/player/hands/Pistol_in.anm") //player + UnselectAnim = GetObject("anm/player/hands/Pistol_out.anm") //player + CustomReloadAnim = GetObject("anm/civil_pistol/c_reload.anm") //enemies + + IdleVarAnims[0] = GetObject("anm/player/hands/Pistol_idle_var1.anm") //player + IdleVarAnims[1] = GetObject("anm/player/hands/Pistol_idle_var2.anm") //player + + WeapAttackAnim = GetObject("anm/weapons/Pistol_fire.anm") + WeapIdleAnim = GetObject("anm/weapons/Pistol_idle.anm") + WeapReloadAnim = GetObject("anm/weapons/Pistol_reload.anm") + + InitSounds(WS_WeaponGun) + SetEventMask(this, EV_ANIMEND) + + KickUp[PRIMARY] = 0.609 //ako to dviha zbran pri strelbe + KickUp[SECONDARY] = 0.4 + Automatic[PRIMARY] = false + Automatic[SECONDARY] = false + } +} + +//================================================================================= +class item_weapon_machinegun extends FireWeaponClass +{ + int RotSnd + float RotAngle + float RotSpeed + float MaxRotSpeed + misc_particle_effector SmokeEffector + float SmokePower + float OrginalEffectTime + +//----------------------------------------------------------------- + int SecondaryFire(vector target) + { + return false + } + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + if(spawner) //berieme to rovno do ruk pretoze entita nebola vytvorena z mapy + { + DummyObject = VNULL //system itemov objekt po skonceni mapy maze + if(spawner.ClassNum == ClassNumPlayer) + { + SetObject(MainObject, "$remap 'gatlingLE' 'gatlingLE_fps';") + + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + else + SetObject(MainObject) + } + else //bude lezat v levele ako fyzikalny objekt + SelectObject(this, DummyObject) + } + +//----------------------------------------------------------------- + void SetAction(int act) + { +/* if(act != 1) + { + if(ActionSound) + { + EndSound(ActionSound) + ActionSound = 0 + } + }*/ + + Action = act + ActionTime = 0 + + if(Action) + SetEventMask(this, EV_FRAME) + + if(Action) + { + if(Owner && MainObject) + SetAnimSlot(this, s_walk - 1, VNULL, 10.0, 0, NULL, 30, 0) //idle var musi skoncit aby po skonceni animacie prave zacinajucej akcie nebezal + } + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(status > 0) //prebieha pick zbrane v superclase + return + + MaxRotSpeed = 1440 + + if(Action == 1) + { + SmokePower += ftime * 0.5 + + RotSpeed = MaxRotSpeed +// RotSpeed += ftime * 8000 + + if(RotSpeed >= MaxRotSpeed) + RotSpeed = MaxRotSpeed + + if(RotSnd) + { + EndSound(RotSnd) + RotSnd = 0 + } + } + else + { + RotSpeed -= ftime * 450 + + if(RotSpeed <= 0) + { + RotSpeed = 0 + + if(!Action) + ClearEventMask(this, EV_FRAME) + } + else + { + if(!KEY(P_ATTACK, false)) + { + if(!RotSnd) + { + RotSnd = PlaySound(this, Sounds[3], SF_ONCE|SF_QUARTERRANGE) + clamp SmokePower<0, 1> + float EffectTime = OrginalEffectTime * SmokePower + /* + SmokeEffector.SetParmToEffectors(EP_EFFECT_TIME, EffectTime) + + SmokeEffector.Restart() + SmokeEffector.Switch(true)*/ + } + + SmokePower = 0 + } + } + } + + RotAngle += RotSpeed * ftime + + if(RotAngle > 360) + RotAngle = RotAngle - 360 + + SetBone(this, B_Rotor, Vector(0, RotAngle, 0), ZeroVec, 1) + } + +//----------------------------------------------------------------- + void item_weapon_machinegun(ExtClass spawner) + { + Spawner = spawner + IsPlayerWeapon = true + + name = "CMachinegun" + ClassNum = World.ItemColPtr.GetItemIndex(name) + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + MainObject = GetObject("obj/weapons/gatlingLE.xob") + else + MainObject = GetObject("obj/weapons/gatlingLE_enemy.xob") + + DummyObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) + ShellType = 1 + + SelectModel(Spawner) + + AmmoPerMagazine = MachinegunAmmoPerMagazine + Ammo = AmmoPerMagazine + AmmoType = AmmoMachinegun + + NumActions = 4 + NumShooters = 1 + + Shooters[0] = new ShooterBullets(this, AMMO_BULLETS1) //primarna strelba (samopal) +// Shooters[1] = new ShooterProjectile(this, AMMO_GRENADE1) //sekundarna (granat) + + PrecisionFlawMin = 0.002906 + if(spawner && spawner.ClassNum != ClassNumPlayer) + PrecisionFlawMax = 0.0406 + else + PrecisionFlawMax = 0.02654 + + RicSndSkip = 3 + + ExactAimOffset = "-2.935 -1.85 0" + ExactAimAngOffset = "0 0 0" + ExactAimFOV = 16 + + ADelay[0] = 0.09 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //promary attack + ADelay[1] = 1.7 //reload + ADelay[2] = 0.85 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //secondary attack + + ShotStor.damage = WDmgMachinegun + ShotStor.BulletRainInc = 1.3 + ShotStor.power = 9.29 + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 5 + ShotStor.StreakWidth = 6 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 95 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 1800 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 2 + ShotStor.RicDecalType = DE_PLASMA + ShotStor.RicSndType = SE_BULLET + if(spawner && spawner.ClassNum != ClassNumPlayer) + ShotStor.RicParticlesType = PE_BULLET + else + ShotStor.RicParticlesType = PE_PLAYERBULLET + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + Flash = new weapon_flash(this, 0.1, "90 0 0", 1) + + //PLAYER + IdleAnim = GetObject("anm/player/hands/GatlingLE_idle.anm") + WalkAnim = GetObject("anm/player/hands/GatlingLE_walk.anm") + ReloadAnim = GetObject("anm/player/hands/GatlingLE_reload.anm") + AttackAnim = GetObject("anm/player/hands/GatlingLE_fire.anm") + CustomReloadAnim = GetObject("anm/combattest/c_reload.anm") + + SelectAnim = GetObject("anm/player/hands/GatlingLE_in.anm") + UnselectAnim = GetObject("anm/player/hands/GatlingLE_out.anm") + IdleVarAnims[0] = GetObject("anm/player/hands/GatlingLE_idle_var1.anm") + IdleVarAnims[1] = GetObject("anm/player/hands/GatlingLE_idle_var2.anm") + WeapReloadAnim = GetObject("anm/weapons/GatlingLE_reload.anm") + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + { + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + + InitSounds(WS_WeaponMachinegun) + SetEventMask(this, EV_ANIMEND) + + SmokeEffector = new misc_particle_effector + SmokeEffector.SetParms("particle/GatlingLE_smoke.ptc", "-2 11 4", true, 1) + SmokeEffector.Switch(false) + GetEffectorParm(SmokeEffector, 0, EP_EFFECT_TIME, OrginalEffectTime) + AddChild(this, SmokeEffector, 4) + + KickUp[PRIMARY] = 0.203 //ako to dviha zbran pri strelbe + KickUp[SECONDARY] = 0.402 + Automatic[PRIMARY] = true + Automatic[SECONDARY] = false + } + +//----------------------------------------------------------------- + void ~item_weapon_machinegun() + { + if(SmokeEffector) + { + delete SmokeEffector + SmokeEffector = NULL + } + } +} + +//================================================================================= +class item_weapon_shotgun extends FireWeaponClass +{ + int CurReloadAnim + vobject ReloadAnim2, ReloadAnim3 //ReloadAnim - nabeh, ReloadAnim2 nabijanie (loop), ReloadAnim3 - dobeh + +//----------------------------------------------------------------- + bool CanAct(int n) + { + if(n < 1 || n > NumActions) + return false + + if(Action) + { + if(Action == 2 && n == 2) + return false + + if(Action == 2 && Ammo > 0) //reload sa musi dat prerusit pokial mame aspon jeden naboj + return true + + if(ActionTime < ADelay[Action - 1]) + return false + } + + return true + } + +//----------------------------------------------------------------- + void EndAction() + { + SetAction(0) + CurReloadAnim = 0 + + if(Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, VNULL, 20.0, 0, NULL, 0, 0) + + if(MainObject) + SetAnimSlot(this, 0, VNULL, 0, 0, NULL, 30, 0) //vyhodime pripadny reload alebo fire anim + } + +//----------------------------------------------------------------- + void PlayLastReloadAnim() + { + SetAnimSlot(Owner.Hands, s_weapon, ReloadAnim3, 0, 0, NULL, 30, AF_ONCE) + + if(Owner && Owner.ClassNum == ClassNumPlayer) + { + if(WeapReloadAnim) //s poslednym kusom animujeme aj zbran + SetAnimSlot(this, 0, WeapReloadAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + + PlaySound(this, Sounds[4], SF_ONCE) + } + +//----------------------------------------------------------------- + void OnActionEnd() //akcia skoncila cela bez prerusenia. volane z animendu playera + { + int FinishedAction = Action + + if(FinishedAction == 1) //primary fire + { + EndAction() //zrusi animacky a Action na 0 + + if(CheckForAmmo() == false) //autoreload + { + if(Reload()) + SetAction(2) + else + { + if(Owner.ClassNum == ClassNumPlayer) + { + Owner.WeaponChange(Owner.GetBestAvailableWeapon(), true) + } + } + } + return + } + + if(FinishedAction == 2) //primary reload + { + if(CurReloadAnim == 1) //skoncila prva animacka (nabeh) + { + if(Ammo < AmmoPerMagazine && Owner.Ammo[AmmoType] > 0) //ak potrebujeme dalej dobijat a mame z coho + { + SetAnimSlot(Owner.Hands, s_weapon, ReloadAnim2, 0, 0, NULL, 30, AF_ONCE) + CurReloadAnim = 2 + } + else + { + PlayLastReloadAnim() + CurReloadAnim = 3 + } + + return + } + + if(CurReloadAnim == 2) //skoncila druha animacka (loop) + { + if(Ammo < AmmoPerMagazine && Owner.Ammo[AmmoType] > 0) //ak potrebujeme dalej dobijat a mame z coho + SetAnimSlot(Owner.Hands, s_weapon, ReloadAnim2, 0, 0, NULL, 30, AF_ONCE) + else + { + PlayLastReloadAnim() + CurReloadAnim = 3 + } + return + } + + if(CurReloadAnim == 3) //skoncila tretia animacka (dobeh) + { + CurReloadAnim = 0 + EndAction() //zrusi animacky a Action na 0 + return + } + + SetAction(0) + return + } + } + +//----------------------------------------------------------------- + int Reload() + { + if(Ammo == AmmoPerMagazine) + return false + + int a = Owner.Ammo[AmmoType] + + if(a <= 0) + return false + + if(ReloadAnim && Owner.Hands) + { + SetAnimSlot(Owner.Hands, s_weapon - 1, VNULL, 10.0, 0, NULL, 30, AF_RESET) + SetAnimSlot(Owner.Hands, s_weapon, ReloadAnim, 10.0, 0, NULL, 30, AF_ONCE) + CurReloadAnim = 1 + } + else + { + toload = a + clamp toload<0, AmmoPerMagazine> + int miss = AmmoPerMagazine - Ammo + clamp toload<0, miss> + LoadMagazine() + Owner.UpdateHUD(1) //ammo bar + SetAction(0) + } + + PlaySound(Owner, Sounds[1], SF_ONCE) + return true + } + +//----------------------------------------------------------------- + void ReloadAction() //preposlane z animhooku playera + { + toload = 1 //maly hack spracialne koli shotgunu + LoadMagazine() + toload = 0 //load magazine sa vola este na konci celej akcie ale tam uz bude toload = 0 + Owner.UpdateHUD(1) //ammo bar + PlaySound(Owner, Sounds[3], SF_ONCE) + } + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + if(spawner) //berieme to rovno do ruk pretoze entita nebola vytvorena z mapy + { + DummyObject = VNULL //system itemov objekt po skonceni mapy maze + if(spawner.ClassNum == ClassNumPlayer) + { + SetObject(MainObject, "$remap 'obj/weapons/Shotgun' 'obj/weapons/Shotgun_fps';$remap 'obj/weapons/Shotgun_effect' 'obj/weapons/Shotgun_effect_fps';") + + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + else + SetObject(MainObject) + } + else //bude lezat v levele ako fyzikalny objekt + SelectObject(this, DummyObject) + } + +//----------------------------------------------------------------- + void item_weapon_shotgun(ExtClass spawner) + { + Spawner = spawner + IsPlayerWeapon = true + + name = "CShotgun" + ClassNum = World.ItemColPtr.GetItemIndex(name) //ClassNum = CMachineGun + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + MainObject = GetObject("obj/weapons/shotgun.xob") + else + MainObject = GetObject("obj/weapons/shotgun_enemy.xob") + + DummyObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) + ShellType = 1 +// AimAnim = GetObject("anm/player/hands/ShotGun_aim.anm") + + SelectModel(Spawner) + + AmmoPerMagazine = ShotgunAmmoPerMagazine + Ammo = AmmoPerMagazine + AmmoType = AmmoShotgun + + NumActions = 3 + NumShooters = 1 + + Shooters[0] = new ShooterBullets(this, AMMO_BULLETS1) //primarna strelba (samopal) + + PrecisionFlawMin = 0.0441 + PrecisionFlawMax = 0.0979 + RicSndSkip = 5 + + ExactAimOffset = "-2.935 -1 0" + ExactAimAngOffset = "10 0 0" + ExactAimFOV = 16 + + ADelay[0] = 1 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //primary attack + ADelay[1] = 5 //reload + + ShotStor.damage = WDmgShotgun + ShotStor.BulletRainInc = 3.975 + ShotStor.power = 6.45 + ShotStor.NumBullets = 8 + ShotStor.MarkSize = 3.32 + ShotStor.StreakWidth = 4 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 81 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 1700 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 3 + ShotStor.RicDecalType = DE_BULLET + ShotStor.RicSndType = SE_BULLET + if(spawner && spawner.ClassNum != ClassNumPlayer) + ShotStor.RicParticlesType = PE_BULLET + else + ShotStor.RicParticlesType = PE_PLAYERBULLET + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + Flash = new weapon_flash(this, 0.1, "90 0 0", 1) + + IdleAnim = GetObject("anm/player/hands/ShotGun_Idle.anm") //player + WalkAnim = GetObject("anm/player/hands/ShotGun_walk.anm") //player + ReloadAnim = GetObject("anm/player/hands/ShotGun_reload_01.anm") //player + ReloadAnim2 = GetObject("anm/player/hands/ShotGun_reload_02.anm") //player + ReloadAnim3 = GetObject("anm/player/hands/ShotGun_reload_03.anm") //player + + CustomReloadAnim = GetObject("anm/shotgun/c_reload.anm") //enemies + + AttackAnim = GetObject("anm/player/hands/ShotGun_Fire.anm") //player + SelectAnim = GetObject("anm/player/hands/ShotGun_in.anm") //player + UnselectAnim = GetObject("anm/player/hands/ShotGun_out.anm") //player + IdleVarAnims[0] = GetObject("anm/player/hands/ShotGun_Idle_var1.anm") //player + IdleVarAnims[1] = GetObject("anm/player/hands/ShotGun_Idle_var2.anm") //player + + WeapIdleAnim = GetObject("anm/weapons/ShotGun_idle.anm") + WeapAttackAnim = GetObject("anm/weapons/ShotGun_Fire.anm") + WeapReloadAnim = GetObject("anm/weapons/ShotGun_reload_03.anm") //pusta sa iba s ReloadAnim3 na rukach + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + { + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + + InitSounds(WS_WeaponShotgun) + SetEventMask(this, EV_ANIMEND) + + KickUp[PRIMARY] = 0.877 //ako to dviha zbran pri strelbe + KickUp[SECONDARY] = 0.255 + Automatic[PRIMARY] = false + Automatic[SECONDARY] = false + } + +//----------------------------------------------------------------- + void ~item_weapon_shotgun() + { + if(ReloadAnim2) + { + ReleaseObject(ReloadAnim2, 0) + ReloadAnim2 = VNULL + } + + if(ReloadAnim3) + { + ReleaseObject(ReloadAnim3, 0) + ReloadAnim3 = VNULL + } + } +} + +//================================================================================= +class item_weapon_sniperrifle extends FireWeaponClass +{ +//----------------------------------------------------------------- + void OnExactAimInterpolate(float rate) + { + if(rate >= 0.5) + CrossHair = 5 //ziadny kurzor + else + CrossHair = 0 + + SetBone(this, B_Sniper_Display, Vector(0, 0, rate * 90), ZeroVec, 1) + } + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + if(spawner) //berieme to rovno do ruk pretoze entita nebola vytvorena z mapy + { + DummyObject = VNULL //system itemov objekt po skonceni mapy maze + + if(spawner.ClassNum == ClassNumPlayer) + { + SetObject(MainObject, "$remap 'obj/weapons/SniperRifle' 'obj/weapons/SniperRifle_fps';$remap 'obj/weapons/SniperRifle_CrossEff' 'obj/weapons/SniperRifle_CrossEff_fps';$remap 'obj/weapons/SniperRifle_Cross' 'obj/weapons/SniperRifle_Cross_fps';") + + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + else + SetObject(MainObject, "$remap 'obj/weapons/SniperRifle_Display' 'null';") + } + else //bude lezat v levele ako fyzikalny objekt + SelectObject(this, DummyObject) + } + +//----------------------------------------------------------------- + void item_weapon_sniperrifle(ExtClass spawner) + { + Spawner = spawner + IsPlayerWeapon = true + + name = "CSniperRifle" + ClassNum = World.ItemColPtr.GetItemIndex(name) //ClassNum = CMachineGun + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + MainObject = GetObject("obj/weapons/SniperRifle.xob") + else + MainObject = GetObject("obj/weapons/SniperRifle_enemy.xob") + + DummyObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) + ShellType = 1 +// AimAnim = GetObject("anm/player/hands/MachineGun_aim.anm") + + SelectModel(Spawner) + + AmmoPerMagazine = SniperRifleAmmoPerMagazine + Ammo = AmmoPerMagazine + AmmoType = AmmoSniperRifle + + NumActions = 4 + NumShooters = 1 + + Shooters[0] = new ShooterBullets(this, AMMO_BULLETS1) //primarna strelba (samopal) + + PrecisionFlawMin = 0.00002 + PrecisionFlawMax = 0.19 + RicSndSkip = 0 + + //temporalne vypnute nez jirka predela animacku idlu (LCD lezlo do ruky) + ExactAimOffset = "-1.935 -4.325 5" //"-4 -2 1" l/r n/d + ExactAimAngOffset = "0 0 0" //"0 0 0" + ExactAimFOV = 50 //8 + + ADelay[0] = 0.5 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //primary attack + ADelay[1] = 1.7 //reload + ADelay[2] = 0.7 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //secondary attack + + ShotStor.damage = WDmgSniperRifle + ShotStor.BulletRainInc = 6.5 + ShotStor.power = 28.35 + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 9.3 + ShotStor.StreakWidth = 9 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 180 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 2000 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 4 + ShotStor.RicDecalType = DE_PLASMA + ShotStor.RicSndType = SE_PLASMA + if(spawner && spawner.ClassNum != ClassNumPlayer) + ShotStor.RicParticlesType = PE_BULLET + else + ShotStor.RicParticlesType = PE_PLAYERBULLET + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + Flash = new weapon_flash(this, 0.1, "90 0 0", 1) + + IdleAnim = GetObject("anm/player/hands/SniperRifle_idle.anm") //player + WalkAnim = GetObject("anm/player/hands/SniperRifle_walk.anm") //player + ReloadAnim = GetObject("anm/player/hands/SniperRifle_reload.anm") //player + AttackAnim = GetObject("anm/player/hands/SniperRifle_fire.anm") //player + AttackAnim2 = GetObject("anm/player/hands/SniperRifle_fire.anm") //player + SelectAnim = GetObject("anm/player/hands/SniperRifle_in.anm") //player + UnselectAnim = GetObject("anm/player/hands/SniperRifle_out.anm") //player + IdleVarAnims[0] = GetObject("anm/player/hands/SniperRifle_idle.anm") //player + IdleVarAnims[1] = GetObject("anm/player/hands/SniperRifle_idle.anm") //player + + WeapIdleAnim = GetObject("anm/weapons/SniperRifle_Idle.anm") + WeapReloadAnim = GetObject("anm/weapons/SniperRifle_reload.anm") +// ProjectX/anm/weapons/SniperRifle_Open.anm + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + { + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + + InitSounds(WS_WeaponSniperRifle) + SetEventMask(this, EV_ANIMEND) + + KickUp[PRIMARY] = 0.76 //ako to dviha zbran pri strelbe + KickUp[SECONDARY] = 0.02 + Automatic[PRIMARY] = false + Automatic[SECONDARY] = false + } +} + + +//================================================================================= +class item_weapon_grenade extends FireWeaponClass +{ + ProjectileGrenade ActionProj + bool FireButton + float ThrowPow + bool OffScreenPos + bool AfterThrow + +//----------------------------------------------------------------- + bool CanUpdateOwnerAnim() + { + return 1 - OffScreenPos + } + +//----------------------------------------------------------------- + void Unselect() + { + SetAction(0) + ClearFlags(this, TFL_VISIBLE) + + if(ActionProj) + { + delete ActionProj + ActionProj = NULL + } + } + +//----------------------------------------------------------------- + void SetAction(int act) + { + Action = act + ActionTime = 0 + + if(Action) + SetEventMask(this, EV_FRAME) + else + ClearEventMask(this, EV_FRAME) + + if(Action) + { + if(Owner && MainObject) + SetAnimSlot(this, s_walk - 1, VNULL, 10.0, 0, NULL, 30, 0) //idle var musi skoncit aby po skonceni animacie prave zacinajucej akcie nebezal + } + + ThrowPow = 0 + OffScreenPos = false + bool ThrowBar = false + FireButton = false + + if(Action == 1) + ThrowBar = true + + if(Owner) + Owner.SetThrowBar(ThrowPow, ThrowBar) + } + +//----------------------------------------------------------------- + void Fire() + { + ShotStor.shooter = Owner + ShotStor.dir = World.CameraNorm//GetMatrix(this, 1) + ShotStor.from = GetMatrix(this, 3) + ShotStor.from += g_CamMat[0] * 7 + ShotStor.from += World.CameraNorm * 10 + ShotStor.to = ShotStor.from + ShotStor.to += ShotStor.dir * 1000000 + ShotStor.precision = 0//PrecisionFlawMax * World.Cross.GetPrecisionScale() +/* ShotStor.RicDecalType = DE_PLASMA //DE_BULLET, DE_PLASMA //zeby sme do toho systemu nemontovali granaty? + ShotStor.RicSndType = SE_BULLET //SE_BULLET, SE_PLASMA + ShotStor.RicParticlesType = PE_BULLET //PE_BULLET, PE_PLASMA + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType)*/ + + Ammo-- + clamp Ammo<0, GrenadeAmmoPerMagazine> + Owner.UpdateHUD(1) //ammo bar + + RemoveChild(this, ActionProj) + ActionProj.ImpactScale = ThrowPow + ActionProj.Fire(ShotStor) + SetFlags(ActionProj, TFL_USER6) + + UpdateEntity(ActionProj) + ActionProj = NULL + ThrowPow = 0 + +/* if(Owner.ClassNum == ClassNumPlayer && Ammo == 0 && Owner.Ammo[AmmoType] == 0) + { + InterruptAction() + Owner.WeaponChange(Owner.GetBestAvailableWeapon(), true) + } */ + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(!Owner) + return + + if(Action == 1) + { + if(AfterThrow == false) + { + ThrowPow += ftime + clamp ThrowPow<0, 1> + int FireButtonBefore = FireButton + FireButton = KEY(P_ATTACK, false) + + if(FireButtonBefore != 0 && FireButton == 0) + { + OffScreenPos = false + AfterThrow = true + } + } + + if(Owner) + { + if(ThrowPow) + Owner.SetThrowBar(ThrowPow, true) + else + Owner.SetThrowBar(0, false) + } + } + } + +//--------------------------------------------------------------------------------------------------------- + void AddPickedAmmo(int num) + { + if(Ammo == 0) + { + Ammo = 1 + num -= 1 + } + + int OwnAmmo = Owner.Ammo[AmmoType] + num + clamp OwnAmmo<0, MaxAmmos[ClassNum]> + Owner.Ammo[AmmoType] = OwnAmmo + } + +//----------------------------------------------------------------- + bool CanSelect() + { + if(Ammo == 0 && Owner.Ammo[AmmoType] == 0) + return false + + return true + } + +//--------------------------------------------------------------------------------------------------------- + void Activate(int fl, ExtClass other) + { + if(other != World.Player) + return + + CreatureClass cc = other + WeaponClass wc = cc.GetWeaponPointer(ClassNum) + + if(wc) + { + int AllAmmo = cc.Ammo[AmmoGrenade] + Ammo + + if(AllAmmo >= GrenadeMaximumAmmo) //neberieme to ked viac nemozeme zobrat + return + } + + if(World.ManipEntity == this) + return + + status = 1 + SetPickable(false) + RemoveBodyAndGeom() + SetEventMask(this, EV_FRAME) + World.NumFlyingItems++ +// PlaySound(this, g_sCommonSounds[1], SF_ONCE) + } + +//----------------------------------------------------------------- + void ReloadAction() //z animhooku playera + { + LoadMagazine() + Owner.UpdateHUD(1) //ammo bar + + if(!ActionProj) + { + ActionProj = new ProjectileGrenade(2) + Throw(ActionProj, this, EV_INIT, 0) + ActionProj.damage = ShotStor.damage + ClearFlags(ActionProj, TFL_FULLMATRIX) + AddChild(this, ActionProj, 1) + SetOrigin(ActionProj, Vector(-1.984,0,0)) //musi sa naofsetit pretoze taziste ma v strede koli fyzike + } + + EndSound(ActionSound) + ActionSound = PlaySound(Owner, Sounds[0], SF_ONCE) + } + +//----------------------------------------------------------------- + void ShootAction() //z animhooku playera + { + Fire() + + if(Owner.ClassNum == ClassNumPlayer && Ammo == 0 && Owner.Ammo[AmmoType] == 0) //uz tu musime menit zbran aby to nevyzeralo dementne + { + InterruptAction() + Owner.WeaponChange(Owner.GetBestAvailableWeapon(), true) + } + } + +//----------------------------------------------------------------- + void ShootAction2() + { + if(AfterThrow == false) //ak sme este nepustili LMB tak animacka zostane visiet v tomto bode + OffScreenPos = true + } + +//----------------------------------------------------------------- + int Reload() + { + if(Ammo == AmmoPerMagazine) + return false + + int a = Owner.Ammo[AmmoType] + toload = a + clamp toload<0, AmmoPerMagazine> + int miss = AmmoPerMagazine - Ammo + + clamp toload<0, miss> + + if(ReloadAnim) + { + SetAnimSlot(Owner.Hands, s_weapon - 1, VNULL, 10.0, 0, NULL, 30, AF_RESET) + SetAnimSlot(Owner.Hands, s_weapon, ReloadAnim, 10.0, 0, NULL, 30, AF_ONCE) + + if(Owner && Owner.ClassNum == ClassNumPlayer) + { + if(WeapReloadAnim) + SetAnimSlot(this, 0, WeapReloadAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + } + else + { + LoadMagazine() + Owner.UpdateHUD(1) //ammo bar + SetAction(0) + } + + PlaySound(Owner, Sounds[1], SF_ONCE) + return true + } + +//----------------------------------------------------------------- + int PrimaryFire(vector target) + { + if(ThrowPow) + return false + + if(CheckForAmmo() == false) //zistime ci mame strelivo na vystrel + return false + + ThrowPow = 0 + OffScreenPos = false + AfterThrow = false + FireButton = true + + if(AttackAnim && Owner.Hands) + { + SetAnimSlot(Owner.Hands, s_weapon, AttackAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + + if(Owner || Owner.ClassNum == ClassNumPlayer) + { + if(WeapAttackAnim) + SetAnimSlot(this, 0, WeapAttackAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + } + + return true + } + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + if(spawner) //berieme to rovno do ruk pretoze entita nebola vytvorena z mapy + { + DummyObject = VNULL //system itemov objekt po skonceni mapy maze + SelectObject(this, VNULL) + ClearFlags(this, TFL_SOLID) + } + else //bude lezat v levele ako fyzikalny objekt + SelectObject(this, DummyObject) + } + +//----------------------------------------------------------------- + void item_weapon_grenade(ExtClass spawner) + { + Spawner = spawner + IsPlayerWeapon = true + + name = "CGrenade" + ClassNum = World.ItemColPtr.GetItemIndex(name) //ClassNum = CMachineGun + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + MainObject = VNULL//GetObject("obj/weapons/grenade.xob") + DummyObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) + + SelectModel(Spawner) + + AmmoPerMagazine = GrenadeAmmoPerMagazine + Ammo = AmmoPerMagazine + AmmoType = AmmoGrenade + + NumActions = 2 + NumShooters = 1 + + Shooters[0] = new ShooterProjectile(this, AMMO_GRENADE1) //sekundarna (granat) + + PrecisionFlawMin = 0 + PrecisionFlawMax = 0.0425 + RicSndSkip = 0 + + ExactAimOffset = ZeroVec + ExactAimAngOffset = ZeroVec + ExactAimFOV = 0 + + ADelay[0] = 3000 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //primary attack + ADelay[1] = 2.89 //reload + ADelay[2] = 0.85 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //secondary attack + + ShotStor.damage = WDmgGrenade + ShotStor.power = 23 + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 28 + ShotStor.StreakWidth = 3 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 60 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 5000 + ShotStor.StreakShader = 0 + ShotStor.RicDecalType = DE_PLASMA + +// Flash = new weapon_flash(this, "obj/weapons/weaflash1.xob", 0.1, "90 0 0", 1) + + IdleAnim = GetObject("anm/player/hands/Grenade_idle.anm") //player + WalkAnim = GetObject("anm/player/hands/Grenade_walk.anm") //player + ReloadAnim = GetObject("anm/player/hands/Grenade_in.anm") //player + AttackAnim = GetObject("anm/player/hands/Grenade_fire.anm") //player +// AttackAnim2 = GetObject("anm/player/hands/machinegun_fire_secondary.anm") //player + SelectAnim = GetObject("anm/player/hands/Grenade_in.anm") //player + UnselectAnim = GetObject("anm/player/hands/Grenade_out.anm") //player +// IdleVarAnims[0] = GetObject("anm/player/hands/machinegun_idle_var1.anm") //player +// IdleVarAnims[1] = GetObject("anm/player/hands/machinegun_idle_var2.anm") //player + + InitSounds(WS_WeaponGrenade) + SetEventMask(this, EV_ANIMEND) + + KickUp[PRIMARY] = 0.25 //ako to dviha zbran pri strelbe + KickUp[SECONDARY] = 0.4 + Automatic[PRIMARY] = true + Automatic[SECONDARY] = false + } +} + +const float MineFlyOffset = 5 //o kolko sa dvihne ked sa da do pohybu + +//----------------------------------------------------------------- +class item_weapon_mine extends RigidBodyClass +{ + vector coords + float angle, angle2, angle3 + float damage + float health //asi iba pre plamenomet + string model + string activatesound + string explosionsound + vobject MainObject + int status + dJoint AngLimJoint + hsound ActivateSound + hsound ExplosionSound + int LightHandle + dlight_dynamic DiscoLight + misc_particle_effector MotorParticles + float timer + vector CtrlAngles + hsound MotorSound + int MotorSnd + float UVPos, UVPos2 //pouzito v shaderu + bool NeedExplosion + +#ifdef EDITOR + void EditorOpened() + { + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + angle2 = atof(GetKeyValue("angle2")) + angle3 = atof(GetKeyValue("angle3")) + vector Angs = Vector(angle3, angle, angle2) + + if(GetParent() == NULL) + SetTransformEx(Angs, coords) + + Show(true) + UpdateEntity(this) + } + + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + if(GetParent() == NULL) //normalny stav + SetTransformEx(Angs, Pos) + else //zrejme je na niecom naparentena + { + ClearFlags(this, TFL_FULLMATRIX) + SetOrigin(this, Pos) + SetAngles(this, Angs) + } + + UpdateMainVisualizer() + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } +#endif + +//----------------------------------------------------------------- + void CleanUpEffects() + { + if(DiscoLight) + { + delete DiscoLight + DiscoLight = NULL + } + + if(LightHandle) + { + RemoveLight(LightHandle) + LightHandle = 0 + } + + if(MotorParticles) + { + delete MotorParticles + MotorParticles = NULL + } + } + +//----------------------------------------------------------------- + bool CanLogIn() + { + if(status == 0) + return true + + return false + } + +//----------------------------------------------------------------- + void LogIn() + { + SetEventMask(this, EV_FRAME) + ClearEventMask(this, EV_VISIBLE) + SetMass(1) + CtrlAngles[0] = 0//45 + CtrlAngles[1] = 0 + CtrlAngles[2] = 0 + status = 10 + + if(!MotorSnd) + MotorSnd = PlaySound(this, MotorSound, SF_HALFRANGE) + + SetEAXEnvironment("$current", "Bullet", 100) + + if(!MotorParticles) + { + MotorParticles = new misc_particle_effector() + MotorParticles.SetParms("particle/mine_drive.ptc", ZeroVec, true, 0) + AddChild(this, MotorParticles, 0) + } + + SetBone(this, B_mine, ZeroVec, Vector(MineFlyOffset, 0, 0), 1) + } + +//----------------------------------------------------------------- + void LogOut() + { + ClearEventMask(this, EV_FRAME) + SetEventMask(this, EV_VISIBLE) + SetMass(50) + status = 0 + + if(MotorSnd) + { + EndSound(MotorSnd) + MotorSnd = 0 + } + + SetEAXEnvironment("$current", "Bullet", 0) + SetBone(this, B_mine, ZeroVec, ZeroVec, 1) + CleanUpEffects() + } + +//----------------------------------------------------------------- + void RemoveJoints() + { + if(AngLimJoint) + { + dJointDestroy(AngLimJoint) + AngLimJoint = 0 + } + } + +//----------------------------------------------------------------- + void StartExplosion() + { + CreatureClass pla = World.Player + + if(World.ManipEntity == this) + pla.DropManipEntity(true) + + if(status == 10) + pla.InterruptHacking(false) + + pla.RemoveHackAdept(this) + if(HackInterf) //ked uz niesme pod playerovou kontrolou tak by tam zostavali visiet widgety + { + delete HackInterf + HackInterf = NULL + } + + ActivateBody(false) + Show(false) + vector origin = GetMatrix(this, 3) +// misc_particle_effector explode = new misc_particle_effector() +// explode.SetParms("particle/explosion1.ptc", origin, true, 2) + + if(!LightHandle) + LightHandle = AddLight(this, 0, LFL_POINT | LFL_DYNAMIC | LFL_CHEAP, 40, 128, "255 100 0") + + if(DiscoLight) + DiscoLight.M_SwitchOff(this) //vyhadzuje svetlo + + if(MotorParticles) + MotorParticles.Switch(false) + + if(MotorSnd) + { + EndSound(MotorSnd) + MotorSnd = 0 + } + + ClearFlags(this, TFL_SOLID) + World.ApplyExplosion(this, GetMatrix(this, 3), 96, 300, damage, 1) + PlaySound(this, ExplosionSound, SF_ONCE|SF_AMBIENT) + SetEventMask(this, EV_FRAME) + status = 4 + timer = 25 + NeedExplosion = false + } + +//----------------------------------------------------------------- + int Shoot(ShotStorage shot) + { + if(shot.HurtType == HT_SHOT) + { + if(status < 4) + StartExplosion() + + return 1 + } + + if(shot.HurtType == HT_FLAME) + { + if(status < 4) + { + health -= ftime * 150 + + if(health <= 0) + StartExplosion() + } + return 1 + } + return 0 + } + +//----------------------------------------------------------------- + void EOnVisible(MinClass other, int extra) + { + if(status == 0) //cakame na playera az sa priblizi + { + vector pos = GetMatrix(this, 3) + vector PlayerPos = GetMatrix(World.Player, 3) + vector dir = PlayerPos - pos + float dist = VectorNormalize(dir) + UVPos += ftime + UVPos2 = UVPos + + if(dist < MineActivationDistance) + { + ClearEventMask(this, EV_VISIBLE) //budeme zrychlovat a na naraz explodujeme + SetEventMask(this, EV_FRAME) + DiscoLight = new dlight_dynamic() + DiscoLight.texture = "textures/lightcube/fluidsmall.dds" + DiscoLight.intensity = 500 + DiscoLight.radius = 120 + DiscoLight._color = "1 0.4 0.1" + Throw(DiscoLight, this, EV_INIT, 0) + DiscoLight.M_SwitchOn(this) + UpdateEntity(DiscoLight) + SetOrigin(DiscoLight, "0 0 16") + AddChild(this, DiscoLight, 1) + PlaySound(this, ActivateSound, SF_ONCE) //ked dohraje zvuk, spusti sa OnFrame + + if(!LightHandle) + LightHandle = AddLight(this, 0, LFL_POINT | LFL_DYNAMIC | LFL_CHEAP, 255, 16, "255 100 100") + + Color = 0x000000ff + UVPos = 0 + SetMass(1) + timer = 100 + status = 1 + + CreatureClass pla = World.Player + pla.RemoveHackAdept(this) //odteraz sa do toho nemoze hackovat a entitta bude coskoro zmazana takze to musime playerovi vyhodit zo zoznamu adeptov + if(HackInterf) //ked uz niesme pod playerovou kontrolou tak by tam zostavali visiet widgety + { + delete HackInterf + HackInterf = NULL + } + } + } + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + vector Vel + float VelLng + float freqrate + float freq + + if(NeedExplosion) + { + StartExplosion() + return + } + + if(status == 10) //sme nalogovani + { + CtrlAngles[0] = CtrlAngles[0] - (g_fMouseSpeedV * (float)MouseDeltaY * 3) + CtrlAngles[1] = CtrlAngles[1] - (g_fMouseSpeedH * (float)MouseDeltaX * 3) + CtrlAngles[2] = 0 + + if(CtrlAngles[0] > 80) + CtrlAngles[0] = 80 + + if(CtrlAngles[0] < -20) + CtrlAngles[0] = -20 + + vector tmpang = CtrlAngles + float ff = tmpang[0] + tmpang[0] = -ff + + vector LookMat[4] + vector CameraMat[4] + RollPitchYawMatrix2(CtrlAngles, LookMat) + RollPitchYawMatrix2(tmpang, CameraMat) + vector Pos = GetMatrix(this, 3) + LookMat[3] = Pos + + vector Forward = LookMat[0] + vector Left = LookMat[1] + vector AAForward = Left * "0 0 1" + vector CameraOffset = Forward * -128 + CameraMat[3] = Pos + Vector(0, 0, 6 + MineFlyOffset) //+ CameraOffset + vector Force = ZeroVec + + if(KEY(LEFT, false)) + Force = Force + Left + + if(KEY(RIGHT, false)) + Force = Force - Left + + if(KEY(MOVE_F, false)) + Force = Force + AAForward + + if(KEY(MOVE_B, false)) + Force = Force - AAForward + + float ForceLng = VectorNormalize(Force) + + if(ForceLng == 0) + { + Vel = GetVelocity(this) + Force = -Vel * 0.002 + } + + Force = Force * 10 + dBodyApplyForce(this, Force) + SetCameraEx(1, CameraMat) + + if(MotorSnd) + { + Vel = GetVelocity(this) + VelLng = VectorLength(Vel) + freqrate = VelLng / 400 + clamp freqrate<0, 1> + freq = 10000 + (freqrate * 30000) + SetSoundFrequency(MotorSnd, freq) + } + + UVPos += ftime * 1 + UVPos2 += ftime * 2 + return + } + + timer -= ftime * 100 + + if(status == 1) + { + if(timer <= 0) + { + timer = 100 + status = 2 + + if(!MotorSnd) + MotorSnd = PlaySound(this, MotorSound, SF_HALFRANGE) + + if(!MotorParticles) + { + MotorParticles = new misc_particle_effector() + MotorParticles.SetParms("particle/mine_drive.ptc", ZeroVec, true, 0) + AddChild(this, MotorParticles, 0) + } + } + return + } + + if(status == 2) + { + float HeightOffset + if(timer <= 0) + { + timer = 0 + HeightOffset = MineFlyOffset + status = 3 + } + else + { + float StatusProgress = timer / 100 + StatusProgress = 1 - StatusProgress + StatusProgress = StatusProgress * StatusProgress + HeightOffset = MineFlyOffset * StatusProgress + } + + UVPos += ftime * 10 + UVPos2 += ftime * 2 + SetBone(this, B_mine, ZeroVec, Vector(HeightOffset, 0, 0), 1) + + if(MotorParticles) + SetOrigin(MotorParticles, Vector(0, 0, HeightOffset)) + return + } + + if(status == 3) //priblizujeme sa k playerovi + { + UVPos += ftime * 10 + UVPos2 += ftime * 4 + vector pos = GetMatrix(this, 3) + vector PlayerPos = GetMatrix(World.Player, 3) + PlayerPos[2] = pos[2] + vector dir = PlayerPos - pos + float dist = VectorNormalize(dir) + dBodyApplyForce(this, dir * 20) + + if(MotorSnd) + { + Vel = GetVelocity(this) + VelLng = VectorLength(Vel) + freqrate = VelLng / 400 + clamp freqrate<0, 1> + freq = 10000 + (freqrate * 30000) + SetSoundFrequency(MotorSnd, freq) + } + return + } + + float rate + vector color + + if(status == 4) //vybuch prva faza + { + rate = timer / 25 + rate = 1 - rate + color = "255 100 0" + color = color * rate + SetLightEx(LightHandle, 0, 128, color) + + if(timer <= 0) + { + status = 5 + timer = 150 + } + return + } + + if(status == 5) //vybuch druha faza + { + rate = timer / 150 + color = "255 100 0" + color = color * rate + SetLightEx(LightHandle, 0, 65, color) + + if(timer <= 0) + { + CleanUpEffects() + RemoveJoints() + RemoveBodyAndGeom() + ClearEventMask(this, EV_ALL) + ClearFlags(this, TFL_VISIBLE) + } + } + } + +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + float KE = dBodyGetLastKineticEnergy(this) + float ke = dBodyGetKineticEnergy(this) + float KinDiff = KE - ke + + if(KinDiff > 5) + { + NeedExplosion = true + SetEventMask(this, EV_FRAME) + } + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetPickable(true) + + if(!model) + model = "obj/weapons/mine.xob" + + if(!activatesound) + activatesound = "Disp_effect_31" + + if(damage == 0) + damage = WDmgMine + + health = 50 //pouzito iba pre plamenomet + + MainObject = GetObject(model) + + if(MainObject) + SetObject(MainObject, _materialremap) + + SetMass(50) + SetTransformEx(Vector(angle3, angle, angle2), coords) + SetAngles(this, Vector(angle3, angle, angle2)) + + if(CreateRigidBody(GEOMTYPE_NONE, "", model) == true) + { + AngLimJoint = dJointCreateAngularLimit(World, "0 0 1", this, "0 0 1", 10 * DEG2RAD, 0) + ActivateBody(true) + } + + ActivateSound = GetSoundEx(activatesound, 1, SF_3D) + ExplosionSound = GetSoundEx("Weap_Grenade_expl", 1, SF_3D) + MotorSound = GetSoundEx("mine01", 1, SF_3D|SF_FREQCONTROL) + + vector mins, maxs + GetBoundBox(this, mins, maxs) + maxs[2] = maxs[2] + MineFlyOffset + SetBoundBox(this, mins, maxs) + } + +//----------------------------------------------------------------- + void item_weapon_mine(); + +//----------------------------------------------------------------- + void ~item_weapon_mine() + { + CleanUpEffects() + RemoveJoints() + RemoveBodyAndGeom() + + if(MainObject) + { + ReleaseObject(MainObject, 0) + MainObject = VNULL + } + } +} + + +//================================================================================= +class MineInterface extends HackInterface +{ + item_weapon_mine mine + func_display BackDisplay + +//--------------------------------------------------------------------------------- + bool CanLogin() + { + if(CurHackingTime != HackingTime) + return false + + if(mine.status == 0) + return true + + return false + } + +//--------------------------------------------------------------------------------- + bool NeedLogOut() + { + if(mine.status == 10) + return false + + return true + } + +//--------------------------------------------------------------------------------- + void LogIn() + { + mine.LogIn() + + if(BackDisplay) + { + ShowWidget(BackDisplay.CanvasWdg, true) + BackDisplay.RunAction("login") + } + } + +//--------------------------------------------------------------------------------- + void LogOut() + { + mine.LogOut() + + if(BackDisplay) + ShowWidget(BackDisplay.CanvasWdg, false) + } + +//--------------------------------------------------------------------------------- + vector GetVisualPos() + { + return GetMatrix(mine, 3) + } + +//--------------------------------------------------------------------------------- + MinClass GetMainEntity() + { + return mine + } + +//--------------------------------------------------------------------------------- + bool SetHackPreviewCamera() + { + vector mat[4] + GetMatrix4(mine, mat) + vector pos = mat[3] + Vector(0, 0, 6/* + MineFlyOffset*/) + + vector rotmat[3] + RollPitchYawMatrix2("0 0 0", rotmat) + + vector resmat[4] + MatrixMultiply3(mat, rotmat, resmat) + + resmat[3] = pos + SetCameraEx(1, resmat) + return true + } + +//--------------------------------------------------------------------------------- + void OnFrame() + { + if(BackDisplay) + { + BackDisplay.UpdateTime() + BackDisplay.UpdateElements() + } + } + +//--------------------------------------------------------------------------------- + void BeforeInit() + { + string NameIndex = itoa(++World.NumMines) + name = "ExplosiveMine" + " " + NameIndex + IconName = "AM" + NameIndex + description = "Attack mine" + IconType = 2 + } + +//--------------------------------------------------------------------------------- + void MineInterface(MinClass owner) + { + mine = owner + + if(World.MineDisplay == NULL) //drzime iba jeden spolocny + World.MineDisplay = new func_display(mine, "displays/turret00_overlay.dpl", true) + + BackDisplay = World.MineDisplay + ShowWidget(BackDisplay.CanvasWdg, false) + } + +//--------------------------------------------------------------------------------- + void ~MineInterface() + { + //Tady ne!! uz to maze world! + //delete BackDisplay + //BackDisplay = NULL + } +} + +//----------------------------------------------------------------- +void item_weapon_mine::item_weapon_mine() +{ + SetFlags(this, TFL_VISIBLE) + SetEventMask(this, EV_VISIBLE|EV_CONTACT) + Color = 0x0000ff00 + HackInterf = new MineInterface(this) +} + + + + +//================================================================================= +class item_weapon_rocketlauncher extends FireWeaponClass +{ +//----------------------------------------------------------------- + int PrimaryFire(vector target) + { + if(CheckForAmmo() == false) //zistime ci mame strelivo na vystrel + return false + + Ammo-- + int sfl = ClearFlags(Owner, TFL_SOLID) + vector targ, dir + float prec = 0 + + if(Flash) + Flash.Switch(true) + + vector start + +// if(Owner.ClassNum == ClassNumPlayer) +// start = g_CamMat[3] +// else + start = GetMatrix(this, 3) + + dir = target - start + VectorNormalize(dir) + + Shooter shoter = Shooters[0] + ShotStor.shooter = Owner + target = target - start + VectorNormalize(target) + target = target * 8192 + start + ShotStor.from = start + ShotStor.to = target + ShotStor.dir = dir + + if(Owner.ClassNum == ClassNumPlayer) + { + float FlawDiff = PrecisionFlawMax - PrecisionFlawMin + ShotStor.precision = PrecisionFlawMin + (FlawDiff * World.Cross.GetPrecisionScale()) + } + else + ShotStor.precision = PrecisionFlawMax + + + if(Flash) + ShotStor.VisualsFrom = GetMatrix(Flash, 3) + else + ShotStor.VisualsFrom = start + + shoter.Fire(ShotStor) + SetFlags(Owner, sfl) + + if(Owner != World.Player) //player to pusta po uspesnom Action() + { + if(ActionSound) + EndSound(ActionSound) + + ActionSound = PlaySound(Owner, Sounds[0], SF_ONCE) + } + + if(AttackAnim) + { + if(Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, AttackAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + + if(Owner && Owner.ClassNum == ClassNumPlayer) + { + if(WeapAttackAnim) + SetAnimSlot(this, 0, WeapAttackAnim, 0, 0, NULL, 30, AF_ONCE|AF_RESET) + } + +// World.Quake(16, 2, 2, 8, 8, 1) + return true + } + +//----------------------------------------------------------------- + int SecondaryFire(vector target) + { + return false + } + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + if(spawner) //berieme to rovno do ruk pretoze entita nebola vytvorena z mapy + { + DummyObject = VNULL //system itemov objekt po skonceni mapy maze + if(spawner.ClassNum == ClassNumPlayer) + { + SetObject(MainObject, "$remap 'rocketlauncher' 'rocketlauncher_fps';") + + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + else + SetObject(MainObject) + } + else //bude lezat v levele ako fyzikalny objekt + SelectObject(this, DummyObject) + } + +//----------------------------------------------------------------- + void item_weapon_rocketlauncher(ExtClass spawner) + { + Spawner = spawner + IsPlayerWeapon = true + + name = "CRocketLauncher" + ClassNum = World.ItemColPtr.GetItemIndex(name) + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + MainObject = GetObject("obj/weapons/rocketlauncher.xob") //normalny model + else + MainObject = GetObject("obj/weapons/rocketlauncher_enemy.xob") + + DummyObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) + ShellType = 1 +// AimAnim = GetObject("anm/player/hands/MachineGun_aim.anm") + + SelectModel(Spawner) + + AmmoPerMagazine = RocketLauncherAmmoPerMagazine + Ammo = AmmoPerMagazine + AmmoType = AmmoRocketLauncher + + NumActions = 4 + NumShooters = 1 + Shooters[0] = new ShooterProjectile(this, AMMO_ROCKET1) + + PrecisionFlawMin = 0.004 + PrecisionFlawMax = 0.016 + RicSndSkip = 3 + + ExactAimOffset = "0 0 0" + ExactAimAngOffset = "0 0 0" + ExactAimFOV = -1 //tymto sa definuje ze u zbrane nechceme ExactAim mod vobec + + ADelay[0] = 2.4 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //primary attack + ADelay[1] = 2.0 //reload + ADelay[2] = 0.9 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //secondary attack + + ShotStor.damage = WDmgRocketLauncher + ShotStor.power = 10 + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 202 + ShotStor.StreakWidth = 25 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakLength = 5100 * sqrt(sqrt(1 / g_timescale)) + ShotStor.StreakSpeed = 185 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 4 + ShotStor.RicDecalType = DE_BULLET + ShotStor.RicSndType = SE_BULLET + if(spawner && spawner.ClassNum != ClassNumPlayer) + ShotStor.RicParticlesType = PE_BULLET + else + ShotStor.RicParticlesType = PE_PLAYERBULLET + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + Flash = new weapon_flash(this, 0.1, "90 0 0", 1) +//Replacing $/ProjectX/anm/player/hands/RocketLauncher_fire.anm +//Getting $/ProjectX/anm/player/hands/RocketLauncher_reload.anm + + + IdleAnim = GetObject("anm/player/hands/rocketlauncher_idle.anm") //player + WalkAnim = GetObject("anm/player/hands/rocketlauncher_idle.anm") //player + ReloadAnim = GetObject("anm/player/hands/rocketlauncher_reload.anm") //player + AttackAnim = GetObject("anm/player/hands/rocketlauncher_fire.anm") //player + SelectAnim = GetObject("anm/player/hands/rocketlauncher_in.anm") //player + UnselectAnim = GetObject("anm/player/hands/rocketlauncher_out.anm") //player + IdleVarAnims[0] = GetObject("anm/player/hands/rocketlauncher_idle.anm") //player + IdleVarAnims[1] = GetObject("anm/player/hands/rocketlauncher_idle.anm") //player + + //WeapAttackAnim = GetObject("anm/weapons/rocketlauncher_fire.anm") + WeapIdleAnim = GetObject("anm/weapons/rocketlauncher_idle.anm") + WeapReloadAnim = GetObject("anm/weapons/rocketlauncher_reload.anm") + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + { + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + + InitSounds(WS_WeaponRocketLauncher) + SetEventMask(this, EV_ANIMEND) + + KickUp[PRIMARY] = 0.55 //ako to dviha zbran pri strelbe + KickUp[SECONDARY] = 0.5 + Automatic[PRIMARY] = false + Automatic[SECONDARY] = false + } + +//----------------------------------------------------------------- + void ~item_weapon_rocketlauncher() + { + } +} + + + +const float FlameHurtLength = 160.3 //5m +const vector FlameLightColor = "240 140 40" +const int NumPlayerFlameHurtSamples = 15 + +int LastFlameID +//================================================================================= +class item_weapon_flamethrower extends FireWeaponClass +{ + misc_particle_effector Flame + misc_particle_effector Burner + misc_particle_effector SmokeEffector + DynamicOverlaySprite RefractionSprite + float SmokePower + float OrginalEffectTime + float FiringCounter, FiringLightCounter + int LightHandle + float fAmmo //tu musi byt ammo ako float + bool Firing + vector HurtPtsOffsetsStart[NumPlayerFlameHurtSamples] + vector HurtPtsOffsetsEnd[NumPlayerFlameHurtSamples] + int NumFlameHurtSamples + float FlameEmitorVelocities[8] + vector FlameEmitorConeAngles[8] + float FlameEmitorBirthRates[8] + int NumFlameEmitors + MinClass LightOwner + vector LightOffset + +//----------------------------------------------------------------- + void Show(bool show) + { + if(show) + SetFlags(this, TFL_VISIBLE) + else + ClearFlags(this, TFL_VISIBLE) + + Burner.Show(show) + } + +//----------------------------------------------------------------- + int Action(int n, vector targ) + { + if(!CanAct(n)) + return false + +// if(Action) //toto je u plamenometu v rukach potvory neziaduce +// InterruptAction() + + switch(n) + { + case 1: + if(PrimaryFire(targ)) + { + SetAction(n) + return true + } + break + + case 2: + if(Reload()) + { + SetAction(n) + return true + } + break + + case 3: //sekundarny mod + if(SecondaryFire(targ)) + { + SetAction(n) + return true + } + } + + SetAction(0) + return false + } + +//----------------------------------------------------------------- + int SecondaryFire(vector target) + { + return false + } + +//----------------------------------------------------------------- + void SelectModel(ExtClass spawner) + { + if(spawner) //berieme to rovno do ruk pretoze entita nebola vytvorena z mapy + { + DummyObject = VNULL //system itemov objekt po skonceni mapy maze + if(spawner.ClassNum == ClassNumPlayer) + { + SetObject(MainObject, "$remap 'flamethrower' 'flamethrower_fps';") + + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + else + SetObject(MainObject) + } + else //bude lezat v levele ako fyzikalny objekt + SelectObject(this, DummyObject) + } + +//----------------------------------------------------------------- + void SetAction(int act) + { + Action = act + ActionTime = 0 + + if(Action) + SetEventMask(this, EV_FRAME) + + if(Action) + { + if(Owner && MainObject) + SetAnimSlot(this, s_walk - 1, VNULL, 10.0, 0, NULL, 30, 0) //idle var musi skoncit aby po skonceni animacie prave zacinajucej akcie nebezal + } + } + +//----------------------------------------------------------------- + void LoadMagazine() + { + Ammo += toload + Owner.Ammo[AmmoType] = Owner.Ammo[AmmoType] - toload + toload = 0 + fAmmo = Ammo + } + +//----------------------------------------------------------------- +/* +to je asi nejaky spatny vtip, ne? +Flame neni solid +this neni solid +a u Owner se da TFL_SOLID vypnout! + + bool FlameTraceFilter(MinClass other) + { + if(other == Flame || other == this || other == Owner) + return false + + return true + } +*/ + + vector HurtLineEnd + float LastNotifyTime + +//----------------------------------------------------------------- + void UpdateBurning(bool FirstTime) + { + if(Ammo != -1) + { + fAmmo -= ftime * 50 + Ammo = fAmmo + clamp Ammo<0, FlameThrowerAmmoPerMagazine> + } + + Owner.UpdateHUD(1) //ammo bar + + vector HurtLineStart + vector IdealHurtLineEnd + vector IdealHurtLineVec + vector HurtLineVec + vector FlameMat[4] + GetMatrix4(Flame, FlameMat) + HurtLineStart = FlameMat[3] + IdealHurtLineEnd = FlameMat[2] * FlameHurtLength //6m + IdealHurtLineEnd = HurtLineStart + IdealHurtLineEnd + + if(FirstTime) + HurtLineEnd = IdealHurtLineEnd + + IdealHurtLineVec = IdealHurtLineEnd - HurtLineStart + HurtLineVec = HurtLineEnd - HurtLineStart + + if(!FirstTime) + { + vector HurtLineOff = IdealHurtLineEnd - HurtLineEnd + float TimeStep = 20 * (ftime - (ftime * 0.5)) //TimeStep = 20 * ftime by malo byt spravne ale na nizkom fps nefunguje :-( + vector HurtLineStep = HurtLineOff * TimeStep + HurtLineEnd = HurtLineEnd + HurtLineStep + } + + vector HurtLineDir = HurtLineVec + float HurtLineLng = VectorNormalize(HurtLineDir) + + vector HurtSpace[4] + GetAroundMatrixOfDir(HurtLineDir, HurtSpace) + HurtSpace[3] = HurtLineStart +// ShowMatrix(HurtSpace) + + vector CurLightPos = VectorMatrixMultiply4(HurtSpace, LightOffset) + SetOrigin(LightOwner, CurLightPos) + + + //scare monsters + if(Owner == World.Player) + { + //limits notification frequency + float df = currenttime - LastNotifyTime + if(df > 1.0) + { + LastNotifyTime = currenttime + NotifyNoises(Owner, HurtLineEnd, NOISERANGE_FLAME, NOISE_FLAME) + } + } + + //AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, HurtLineStart, HurtLineEnd) + + int content, sparm + ExtClass other + float plane[4] + vector SampleStart, SampleEnd + + LastFlameID++ + int ofl = ClearFlags(Owner, TFL_SOLID) + float LongestHurtRate = -1 + float AverageHurtRate = 0 + + for(int s = 0; s < NumFlameHurtSamples; s++) + { + SampleStart = VectorMatrixMultiply4(HurtSpace, HurtPtsOffsetsStart[s]) + SampleEnd = VectorMatrixMultiply4(HurtSpace, HurtPtsOffsetsEnd[s]) + float HurtRate = TraceLineEx(DEFAULT, SampleStart, SampleEnd, ZeroVec, ZeroVec, other, plane, content, sparm, TRACE_RAGDOLLS|TRACE_DEFAULT|TRACE_BONES, NULL) + AverageHurtRate += HurtRate + + if(HurtRate < 1) + { + if(HurtRate > LongestHurtRate) + LongestHurtRate = HurtRate + + if(other != World && IsInherited(other, CExtClass)) + { + //nezranuj 2x tim samym plamenem + if(other.FlameID != LastFlameID) + { + other.FlameID = LastFlameID + + HurtRate *= HurtRate //pri konci zranuje menej ale smerom k zbrani to rychle narasta + HurtRate = 1 - HurtRate + + ShotStor.shooter = Owner + ShotStor.from = SampleStart + ShotStor.to = SampleEnd + ShotStor.dir = HurtLineDir + ShotStor.precision = 0 + ShotStor.VisualsFrom = SampleStart + + HurtRate *= 100 * ftime + ShotStor.power = HurtRate * 200 + float DamageBefore = ShotStor.damage + ShotStor.damage *= HurtRate + ShotStor.Bone = -1 + other.Shoot(ShotStor) + ShotStor.damage = DamageBefore + } + } + } +/* AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, SampleStart - "0.2 0.2 0.2", SampleStart + "0.2 0.2 0.2") + AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, SampleEnd - "0.2 0.2 0.2", SampleEnd + "0.2 0.2 0.2") + AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, SampleStart, SampleEnd)*/ + } + + if(LongestHurtRate == -1) + LongestHurtRate = 1 + + AverageHurtRate /= (float)NumFlameHurtSamples + + SetFlags(Owner, ofl) + +/* + ExtClass HurtAdepts[16] + int HurtAdeptsNum = VisEntities(HurtLineStart, HurtLineDir, 15, FlameHurtLength, HurtAdepts, 16, TFL_VISIBLE) + + ExtClass Adept + for(int n = 0; n < HurtAdeptsNum; n++) + { + Adept = HurtAdepts[n] + + if(Adept == this || Adept == Owner || Adept == Flame || Adept == Burner) + continue + + if(Owner.Hands && Adept == Owner.Hands) + continue + + if(!IsInherited(Adept, CExtClass)) + continue + +// if(!E2EVisibility(Flame, Oss, Adept, GetMatrix(Adept, 3), TRACE_VISTEST|TRACE_DETAIL|TRACE_ENTS|TRACE_PASSTRANSLUCENT)) +// continue + + vector pos = GetMatrix(Adept, 3) + vector HurtDir = pos - HurtLineStart + float Dist = VectorNormalize(HurtDir) + float HurtRate = Dist / FlameHurtLength + clamp HurtRate<0, 1> + HurtRate = 1 - HurtRate + + ShotStor.shooter = Owner + ShotStor.from = HurtLineStart + ShotStor.to = pos//HurtLineEnd + ShotStor.dir = HurtDir//HurtLineDir + ShotStor.precision = 0 + ShotStor.VisualsFrom = HurtLineStart + + ShotStor.power = 200 * HurtRate * 100 * ftime// * HurtRate3 + ShotStor.damage = WDmgFlameThrower * HurtRate * 100 * ftime// * HurtRate3 + ShotStor.Bone = -1 + Adept.Shoot(ShotStor) + }*/ + + float StrLen = FlameHurtLength// * 20000 + vector StrPos = HurtLineDir * StrLen + StrPos = HurtLineStart + StrPos + RefractionSprite.SetPos(HurtLineStart, StrPos) + RefractionSprite.Update() + + for(int n = 0; n < NumFlameEmitors; n++) + { + float fval = FlameEmitorVelocities[n] * AverageHurtRate + SetEffectorParm(Flame, n, EP_VELOCITY, fval) + + vector cang = FlameEmitorConeAngles[n] + float flip = 1 - AverageHurtRate + float ca = cang[1] + (cang[1] * flip * 4) + + if(n == 0) + ca *= 0.5 + + vector vval = Vector(cang[0], ca, cang[2]) + SetEffectorParm(Flame, n, EP_CONEANGLE, vval) + } + +// vector vec = Vector(LongestHurtRate * FlameHurtLength, 0, 0) +// SetEffectorParm(Flame, -1, EP_KILLBOX, vec) //KillShapeSize + +// SetLightEx(LightHandle, 0, 128, color) +// AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, HurtLineStart, IdealHurtLineEnd) +// AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, HurtLineStart, HurtLineEnd) + } + +//----------------------------------------------------------------- + void BurningStart() + { + Firing = true + UpdateBurning(true) + Flame.Restart() + Flame.Switch(true) + Burner.Switch(false) + RefractionSprite.Show(true) + + if(!LightHandle) + LightHandle = AddLight(LightOwner, 0, LFL_POINT | LFL_DYNAMIC | LFL_CHEAP, 100, 128, ZeroVec) + + SetEventMask(this, EV_FRAME) + + if(AttackAnim) + { + if(Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, AttackAnim, 0, 0, NULL, 30, AF_RESET) + } + + if(Owner && Owner.ClassNum == ClassNumPlayer) + { + if(WeapAttackAnim) + SetAnimSlot(this, 0, WeapAttackAnim, 5, 0, NULL, 30, AF_ONCE|AF_RESET) + } + + if(Owner != World.Player) + ActionSound = PlaySound(Owner, Sounds[0], 0) + } + +//----------------------------------------------------------------- + void BurningEnd() + { + Firing = false + EndAction() + FiringCounter = 0 +// ClearEventMask(this, EV_FRAME) + Flame.Switch(false) + Burner.Switch(true) +// RefractionSprite.Show(false) + +/* if(LightHandle) + { + RemoveLight(LightHandle) + LightHandle = 0 + }*/ + + if(Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, VNULL, 30, 0, NULL, 0, 0) + else + SetAnimSlot(Owner, s_weapon, VNULL, 1, 0, NULL, 0, 0) + + if(ActionSound) + { + EndSound(ActionSound) + ActionSound = 0 + } + } + +//----------------------------------------------------------------- + void InterruptAction() + { +// if(Owner != World.Player) +// { + BurningEnd() + Burner.Switch(false) + RefractionSprite.Show(false) + ClearEventMask(this, EV_FRAME) + + if(LightHandle) + { + RemoveLight(LightHandle) + LightHandle = 0 + } +// } + } + +//----------------------------------------------------------------- + int PrimaryFire(vector target) + { + if(CheckForAmmo() == false) //zistime ci mame strelivo na vystrel + return false + + if(FiringCounter == 0) //ohen nehori + BurningStart() + + FiringCounter = 0.2 + return true + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(status > 0) //prebieha pick zbrane v superclase + return + + if(Firing) //on frame pobezi az kym nezhasne svetlo + { + SmokePower += ftime * 0.8 + + FiringLightCounter += ftime * 10 + + if(FiringLightCounter >= 1) + FiringLightCounter = 1 + } + else + { + FiringLightCounter -= ftime * 5 + + if(FiringLightCounter <= 0) + { + clamp SmokePower<0, 1> + float EffectTime = OrginalEffectTime * SmokePower + /* + SmokeEffector.SetParmToEffectors(EP_EFFECT_TIME, EffectTime) + + SmokeEffector.Restart() + SmokeEffector.Switch(true)*/ + FiringLightCounter = 0 + + if(!Action) //mohol by bezat reload + ClearEventMask(this, EV_FRAME) + + if(LightHandle) + { + RemoveLight(LightHandle) + LightHandle = 0 + } + SmokePower = 0 + RefractionSprite.Show(false) + } + } + + if(LightHandle) + SetLightEx(LightHandle, 100, 128, FlameLightColor * FiringLightCounter) + + RefractionSprite.ScaleRefract(FiringLightCounter) + +// UpdateBurning(false) + + if(FiringCounter > 0) + { + FiringCounter -= ftime + + if(FiringCounter <= 0) + { + FiringCounter = 0 + BurningEnd() + } + UpdateBurning(false) + + if(Ammo == 0) + BurningEnd() + } + } + +//----------------------------------------------------------------- + void SetFlameBirthRateScale(float scale) + { + for(int n = 0; n < NumFlameEmitors; n++) + { + float fval = FlameEmitorBirthRates[n] * scale + SetEffectorParm(Flame, n, EP_BIRTH_RATE, fval) + } + } + +//----------------------------------------------------------------- + void Select() + { + SetAngles(this, ZeroVec) + SetOrigin(this, ZeroVec) + SetFlags(this, TFL_VISIBLE) + Owner.UpdateHUD(1) + SetEventMask(this, EV_FRAME) + fAmmo = Ammo + Burner.Switch(true) + + if(MainObject) + SetAnimSlot(this, 0, VNULL, 0, 0, NULL, 30, AF_RESET) //vyhodime pripadny reload alebo fire anim + + BumpFrame(this, 0, 0) + } + +//----------------------------------------------------------------- + void BeginUnselect() + { + Flame.Switch(false) + Burner.Switch(false) +// RefractionSprite.Show(false) + } + +//----------------------------------------------------------------- + void EndAction() + { + if(Action != 1) //pri fire zostava loopovat attack animacka + { + if(Owner.Hands) + SetAnimSlot(Owner.Hands, s_weapon, VNULL, 30, 0, NULL, 0, 0) + else + SetAnimSlot(Owner, s_weapon, VNULL, 1, 0, NULL, 0, 0) + } + + if(MainObject) + SetAnimSlot(this, 0, VNULL, 0, 0, NULL, 30, 0) //vyhodime pripadny reload alebo fire anim + + SetAction(0) + } + +//----------------------------------------------------------------- + void item_weapon_flamethrower(ExtClass spawner) + { + Spawner = spawner + IsPlayerWeapon = true + name = "CFlameThrower" + ClassNum = World.ItemColPtr.GetItemIndex(name) + Definition = World.ItemColPtr.GetItemFromIndex(ClassNum) + string FlameEffector, BurnerEfector + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + { + MainObject = GetObject("obj/weapons/flamethrower.xob") + FlameEffector = "particle/flamethrower_fire.ptc" + BurnerEfector = "particle/flamethrower_burner.ptc" + NumFlameHurtSamples = NumPlayerFlameHurtSamples + } + else + { + MainObject = GetObject("obj/weapons/flamethrower_enemy.xob") + FlameEffector = "particle/flamethrower_fireenemy.ptc" + BurnerEfector = "particle/flamethrower_burner.ptc" + NumFlameHurtSamples = 4 //enemakom staci menej + } + + DummyObject = World.ItemColPtr.GetObjectFromIndex(ClassNum) + ShellType = 1 +// AimAnim = GetObject("anm/player/hands/MachineGun_aim.anm") + + SelectModel(Spawner) + + AmmoPerMagazine = FlameThrowerAmmoPerMagazine + Ammo = AmmoPerMagazine + fAmmo = Ammo //u plamenometu musime pracovat s floatami + AmmoType = AmmoFlameThrower + + NumActions = 2 + NumShooters = 1 + + Shooters[0] = new ShooterBullets(this, AMMO_BULLETS1) //primarna strelba (samopal) + + PrecisionFlawMin = 0.012 + PrecisionFlawMax = 0.042 + RicSndSkip = 3 + + ExactAimOffset = "0 0 0" + ExactAimAngOffset = "-0.6 -0.8 0" + ExactAimFOV = 5 + + ADelay[0] = 0.16 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //primary attack + ADelay[1] = 2.7 //reload + ADelay[2] = 0.88 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) //secondary attack + + ShotStor.damage = WDmgFlameThrower //damage musi byt podla fps pretoze zranujeme OnFrame + ShotStor.BulletRainInc = 3.38 + ShotStor.power = 120 + ShotStor.HurtType = HT_FLAME + ShotStor.NumBullets = 1 + ShotStor.MarkSize = 70 + ShotStor.StreakWidth = 10 + ShotStor.StreakLength = 300 + ShotStor.StreakSpeed = 1000 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) + ShotStor.StreakShader = 4 + ShotStor.RicDecalType = DE_BULLET //DE_BULLET, DE_PLASMA + ShotStor.RicSndType = -1 //SE_BULLET, SE_PLASMA + if(spawner && spawner.ClassNum != ClassNumPlayer) + ShotStor.RicParticlesType = PE_BULLET + else + ShotStor.RicParticlesType = PE_PLAYERBULLET //PE_BULLET, PE_PLASMA + InitRicParticles(ShotStor.RicParticlesType) + InitRicSounds(ShotStor.RicSndType) + + Flame = new misc_particle_effector() + Flame.SetParms(FlameEffector, ZeroVec, true, 0) + Flame.Switch(false) + + Burner = new misc_particle_effector() + Burner.SetParms(BurnerEfector, ZeroVec, true, 0) + Burner.Switch(false) + + SmokeEffector = new misc_particle_effector + SmokeEffector.SetParms("particle/GatlingLE_smoke.ptc", "-2 11 4", true, 1) + SmokeEffector.Switch(false) + GetEffectorParm(SmokeEffector, 0, EP_EFFECT_TIME, OrginalEffectTime) + AddChild(this, SmokeEffector, 4) + + Flame.AnimFlags |= 2 + Burner.AnimFlags |= 2 + + AddChild(this, Flame, 0) + SetAngles(Flame, "180 0 0") + + AddChild(this, Burner, 1) + SetAngles(Burner, "0 0 -90") + + RefractionSprite = new DynamicOverlaySprite(ZeroVec, ZeroVec, 80, "flameheat") + RefractionSprite.Show(false) + + IdleAnim = GetObject("anm/player/hands/flamethrower_idle.anm") //player + WalkAnim = GetObject("anm/player/hands/flamethrower_walk.anm") //player + ReloadAnim = GetObject("anm/player/hands/flamethrower_reload.anm") //player + AttackAnim = GetObject("anm/player/hands/flamethrower_fire.anm") //player + SelectAnim = GetObject("anm/player/hands/flamethrower_in.anm") //player + UnselectAnim = GetObject("anm/player/hands/flamethrower_out.anm") //player + IdleVarAnims[0] = GetObject("anm/player/hands/flamethrower_idle.anm") //player + IdleVarAnims[1] = GetObject("anm/player/hands/flamethrower_idle.anm") //player + +// WeapIdleAnim = GetObject("anm/weapons/machinegun_idle.anm") + WeapReloadAnim = GetObject("anm/weapons/flamethrower_reload.anm") + + if(!spawner || spawner.ClassNum == ClassNumPlayer) + { + if(WeapIdleAnim) + SetAnimSlot(this, 1, WeapIdleAnim, 0, 0, NULL, 30, 0) + } + + InitSounds(WS_WeaponFlameThrower) + SetEventMask(this, EV_ANIMEND) + +/* SmokeEffector = new misc_particle_effector + SmokeEffector.SetParms("particle/GatlingLE_smoke.ptc", "-2 11 4", true, 1) + SmokeEffector.Switch(false) + GetEffectorParm(SmokeEffector, 0, EP_EFFECT_TIME, OrginalEffectTime) + AddChild(this, SmokeEffector, 4)*/ + + KickUp[PRIMARY] = 0.022 //ako to dviha zbran pri strelbe + KickUp[SECONDARY] = 0.001 + Automatic[PRIMARY] = true + Automatic[SECONDARY] = false + + int NumAroundSamples = NumFlameHurtSamples - 1 + float angstep = 360 / (float)NumAroundSamples + float sangle = 0 + vector vec + float StartHurtRadius = 0.5 + float EndHurtRadius = 49.5 + + HurtPtsOffsetsStart[0] = ZeroVec + HurtPtsOffsetsEnd[0] = Vector(FlameHurtLength, 0, 0) + + for(int s = 1; s < NumFlameHurtSamples; s++) + { + float CurAng = sangle * DEG2RAD + vec[1] = sin(CurAng) + vec[2] = cos(CurAng) + vec[0] = 0 + vector off = vec * StartHurtRadius +// off[0] = off[0] - 20 + HurtPtsOffsetsStart[s] = off + + off = vec * EndHurtRadius + off[0] = FlameHurtLength + HurtPtsOffsetsEnd[s] = off + sangle += angstep + } + + NumFlameEmitors = GetEmitors(Flame, NULL, 0) + float fval + vector vval + for(int n = 0; n < NumFlameEmitors; n++) + { + GetEffectorParm(Flame, n, EP_VELOCITY, fval) + FlameEmitorVelocities[n] = fval + + GetEffectorParm(Flame, n, EP_CONEANGLE , vval) + FlameEmitorConeAngles[n] = vval + + GetEffectorParm(Flame, n, EP_BIRTH_RATE , fval) + FlameEmitorBirthRates[n] = fval + } + + LightOwner = new MinClass + LightOffset = Vector(FlameHurtLength * 0.75, 0, 0) + } + +//----------------------------------------------------------------- + void ~item_weapon_flamethrower() + { + if(ActionSound) + { + EndSound(ActionSound) + ActionSound = 0 + } + + if(RefractionSprite) + { + delete RefractionSprite + RefractionSprite = NULL + } + + if(Flame) + { + delete Flame + Flame = NULL + } + + if(Burner) + { + delete Burner + Burner = NULL + } + + if(LightOwner) + { + delete LightOwner + LightOwner = NULL + } +/* if(SmokeEffector) + { + delete SmokeEffector + SmokeEffector = NULL + }*/ + } +} + diff --git a/Alpha Prime/Mod/scripts/class_light.h b/Alpha Prime/Mod/scripts/class_light.h new file mode 100644 index 0000000..046a057 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_light.h @@ -0,0 +1,337 @@ + +class light_effect extends LightClass +{ +int ltim +float flashtime +float fDuration +bool bDeleteOnEnd +//----------------------------------------------------------------- + void Switch(int onoff) + { + if(onoff == true) + { + SetLightEx(LightHandle,intensity, radius, _color) + } + else + { + SetLightEx(LightHandle,0,0, ZeroVec) + } + } + +//----------------------------------------------------------------- + int EOnFrame(MinClass other, int extra) + { + if(fDuration) + { + float fd = currenttime - flashtime + fd = fDuration - fd + clamp fd<0, fDuration> + + if(fd == 0) + { + fDuration = 0 + if(bDeleteOnEnd) + delete this + + Switch(false) + return + } + + fd /= fDuration + SetLightEx(LightHandle,0, radius, _color * fd) + } + + } + +//----------------------------------------------------------------- + void Flash(float duration, bool deleteonend) + { + flashtime = currenttime + + SetEventMask(this, EV_FRAME) + Switch(true) + bDeleteOnEnd = deleteonend + fDuration = duration + } + +//----------------------------------------------------------------- + void light_effect(vector coo, int intens, int rad, vector col, int flags) + { + ltim = 0 + + SetOrigin(this,coo) + intensity = intens + radius = rad + _color = col + + LightHandle = AddLight(this, style, flags | LFL_POINT | LFL_DYNAMIC, intensity, radius, _color) + Switch(false) + } +//----------------------------------------------------------------- + void ~light_effect() + { + if(LightHandle) + RemoveLight(LightHandle) + } +} + +//----------------------------------------------------------------- +ExtClass FindClassByLink(string link); + +//================================================================================= +class dlight_dynamic extends LightClass +{ + MinClass target + int flags, lfl + string texture + +//----------------------------------------------------------------- + void EOnFrame(ExtClass other, int extra) + { + if(target) + { + vector vec = GetOrigin(target) + vec = vec - GetOrigin(this) + SetAngles(this, Vector2Angles(vec)) + } + } + +//----------------------------------------------------------------- + void M_SwitchOn(ExtClass other) + { + if(LightHandle) + { + RemoveLight(LightHandle) + LightHandle = 0 + } + + Init(0, lfl) + + if(texture) + { + SetLightTexture(LightHandle, texture) + } + + if(target) + SetEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void M_SwitchOff(ExtClass other) + { + if(LightHandle) + { + RemoveLight(LightHandle) + LightHandle = 0 + } + + ClearEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void M_SetColor(ExtClass other) + { + string str = other._value + string tok + + if(ParseStringEx(str, tok) != 4) + return + + _color[0] = atof(tok) + + if(ParseStringEx(str, tok) != 1) + return + + if(ParseStringEx(str, tok) != 4) + return + + _color[1] = atof(tok) + + if(ParseStringEx(str, tok) != 1) + return + + if(ParseStringEx(str, tok) != 4) + return + + _color[2] = atof(tok) + + if(LightHandle) + SetLightEx(LightHandle,intensity, radius, _color) + } + +//----------------------------------------------------------------- + void EOnLoaded(ExtClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(ExtClass other, int extra) + { + target = FindClassByLink(link) + + if(intensity == 0) + intensity = 32 + + _color = _color * (float)255 + + lfl = LFL_DYNAMIC + + if(target) + lfl |= LFL_SPOT + else + lfl |= LFL_POINT + + if(flags & 2) + lfl |= LFL_SHADOWSOURCE + + if(flags & 1) + M_SwitchOn(this) + + SetOrigin(this, coords) + } + +//----------------------------------------------------------------- + void dlight_dynamic() + { + SetEventMask(this, EV_INIT|EV_LOADED) + } + +//----------------------------------------------------------------- + void ~dlight_dynamic() + { + if(LightHandle) + { + RemoveLight(LightHandle) + LightHandle = 0 + } + } +} + +void Matrix(vector pos, vector mat[4]) +{ + mat[0] = "1 0 0" + mat[1] = "0 1 0" + mat[2] = "0 0 1" + mat[3] = pos +} + +//================================================================================= +class light extends LightClass +{ + float angle + int flags + int specular + int _sun + +//----------------------------------------------------------------- + void Update() + { + if(LightHandle) + RemoveLight(LightHandle) + + SetOrigin(this, coords) + + int fl = LFL_POINT + + if(specular != 0) + { + fl |= LFL_SPECULAR + //AddDShape(SHAPE_BBOX, 0x7f7f7f7f, 0, coords - "2 2 2", coords + "2 2 2") + radius = specular + } + + LightHandle = AddLight(this, style, fl, intensity, radius, _color) + } + +//----------------------------------------------------------------- +#ifdef EDITOR +Shape shape + + void DestroyCustomVisuals() + { + if(shape) + { + shape.Destroy() + shape = NULL + } + } + + void CreateCustomVisuals() + { + if(!shape) + shape = AddDSphere(VectortoRGBA(_color, 0.15) , SS_NOZUPDATE|SS_TRANSP|SS_NOOUTLINE, coords, radius * 0.5) + + vector mat[4] + Matrix(coords, mat) + shape.SetMatrix(mat) + } + + void UpdateCustomVisuals() + { + if(shape) + { + vector mat[4] + Matrix(GetMatrix(this, 3), mat) + shape.SetMatrix(mat) + } + Update() + } +#endif + +//----------------------------------------------------------------- + void ~light() + { + if(LightHandle) + RemoveLight(LightHandle) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + float f = _color * _color + + if( f == 0) + _color = "1.0 1.0 1.0" + + if(intensity == 0) + intensity = 304 + + if(radius == 0) + radius = intensity + + Update() + } + +//----------------------------------------------------------------- + void light() + { + SetEventMask(this, EV_INIT) + } +} + +//================================================================================= +class light_flashlamp extends LightClass +{ +//----------------------------------------------------------------- + void Switch(int onoff) + { + if(onoff == true) + SetLightEx(LightHandle,intensity, radius, _color) + else + SetLightEx(LightHandle, 0, 0, ZeroVec) + } + +//----------------------------------------------------------------- + void light_flashlamp() + { + _color = "255 240 200" + + intensity = 35 + radius = 250 + + Init(0, LFL_SPOT | LFL_DYNAMIC | LFL_SHADOWSOURCE) + Switch(false) + ClearEventMask(this, EV_ALL) + } +} diff --git a/Alpha Prime/Mod/scripts/class_misc_model.h b/Alpha Prime/Mod/scripts/class_misc_model.h new file mode 100644 index 0000000..4f4df0b --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_misc_model.h @@ -0,0 +1,952 @@ +class misc_physx_drinkmachine extends ExtClass +{ + vector coords + float angle, angle2, angle3 + float timeout + vobject MainObject + + hsound hs + ExtClass Cans[32] + int Top + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + } + + vector Matrix[4] +//----------------------------------------------------------------- + void EOnTick(MinClass other, int extra) + { + if(g_physx) + return + + timeout += TICK_PERIOD + + if(timeout > 0.5) + { + timeout = 0 + + ExtClass ec = Cans[Top] + + if(ec == NULL) + { + ec = new ExtClass + SetOrigin(ec, coords) + SetAngles(ec, Vector(angle3 + 90, angle + 90, angle2)) + UpdateEntity(ec) + GetMatrix4(ec, Matrix) + + SetFlags(ec, TFL_VISIBLE|TFL_FULLMATRIX|TFL_NOSHADOW) + ec.SetObject(MainObject, "$remap 'obj/sharedtextures/can' 'obj/sharedtextures/can2b';") + + NxActorCreate(ec, ZeroVec, BC_MODEL, true, 1.5, 0, 0) + NxActorSetCollisionGroup(ec, 1) + + Cans[Top] = ec + } + else + { + SetMatrix(ec, Matrix) + } + + Top = Top + 1 & 31 + + vector vec + vec = GetMatrix(this, 0) + + vec[0] = vec[0] * frand(0.95, 1.05) + vec[1] = vec[1] * frand(0.95, 1.05) + vec[2] = vec[2] * frand(0.95, 1.05) + SetVelocity(ec, vec * 35) + PlaySound(this, hs, SF_ONCE) + } + } + +//----------------------------------------------------------------- + void misc_physx_drinkmachine() + { + ClassType = 666 + SetEventMask(this, EV_INIT | EV_LOADED) + SetOrigin(this, coords) + + if(g_physx) + SetEventMask(this, EV_TICK) + + MainObject = GetObject("obj/physics/cansmall.xob") + SetFlags(this, TFL_VISIBLE|TFL_SOLID) + + hs = GetSoundEx("Plate_item", 1, SF_3D) + } + +//----------------------------------------------------------------- + void ~misc_physx_drinkmachine() + { + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + +class misc_physx_box extends ExtClass +{ + vector coords + float angle, angle2, angle3 + bool body + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + } + +//----------------------------------------------------------------- + void misc_physx_box() + { + ClassType = 666 + SetEventMask(this, EV_INIT | EV_LOADED) + SetOrigin(this, coords) + + if(g_physx) + { + body = true + CreateModel(this, "-4 -4 -4", "4 4 4") + dBodyCreate(this, ZeroVec, BC_OBB) + dBodyActive(this, false, false) + dBodyCreatePhysXShadow(this, 0, PSF_COLLIDE_CLOTH) + SetFlags(this, TFL_VISIBLE|TFL_SOLID) + } + } + + +//----------------------------------------------------------------- + void ~misc_physx_box() + { + if(body) + { + dBodyDestroyPhysXShadow(this) + dBodyDestroy(this) + RemoveModel(this) + } + } +} + +class misc_model extends RigidBodyClass +{ + bool _nocollision + string model + float angle, angle2, angle3 + vector coords + vobject MainObject + bool railing + +//--------------------------------------------------------------------------------- + void UpdateAgent(bool act) + { + //we don't want to place pathengine agents here!!! + } + +//--------------------------------------------------------------------------------- +#ifdef EDITOR + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + angle3 = Angs[0] + angle = Angs[1] + angle2 = Angs[2] + SetTransformEx(Angs, Pos) + UpdateMainVisualizer() + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } + + void CreateEditorVisuals() + { + } +#endif +/* +//----------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(ActivateMethod <= ACT_NONE) + return ACT_DISABLE + + if(ActivateMethod == ACT_USEKEY_DISP) + { + if(Display && Display.CanActivate(0, this) == ACT_ENABLE) + return ACT_ENABLE + else + return ACT_DISABLE + } + + if(ActivateMethod != ACT_USEKEY) + return ACT_DISABLE + + return ACT_ENABLE + }*/ + +//----------------------------------------------------------------- + void EOnLoad(MinClass other, int extra) + { + //HOTFIX: some bodies are on wrong positions. Why??? + if(rb) + { + rb = false + dBodyDestroy(this) + } + + if(CreateRigidBody(GEOMTYPE_NONE, "", model)) + { + dBodyInteractionLayer(this, ET_WORLD) //misc_modely su vzdy staticke takze to budeme chapat ako world + ActivateBody(false) + dBodyCreatePhysXShadow(this, 0, PSF_COLLIDE_CLOTH|PSF_COLLIDE_RB) + } + ClearFlags(this, TFL_TOUCHTRIGGERS) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + + +#ifndef EDITOR + if(g_physx && strstr(model, "obj/misc/pipe_0") == 0) + { + ClothDef cdef = new ClothDef + cdef.Thickness = 0.05 + cdef.Density = 1.0 + cdef.BendingStiffness = 1.0 + cdef.StretchingStiffness = 1.0 + cdef.DampingCoefficient = 0.7 + cdef.Friction = 0.5 + cdef.Pressure = 2.0 + cdef.CollisionResponseCoefficient = 1.0 + cdef.AttachmentResponseCoefficient = 1.0 + cdef.SolverIterations = 5 + cdef.CollisionGroup = 0 +// cdef.Flags = NX_CLF_BENDING|NX_CLF_GRAVITY +// cdef.Flags = NX_CLF_PRESSURE|NX_CLF_BENDING|NX_CLF_GRAVITY +// cdef.Flags = NX_CLF_BENDING|NX_CLF_GRAVITY|NX_CLF_BENDING_ORTHO|NX_CLF_PRESSURE +// cdef.Flags = NX_CLF_GRAVITY|NX_CLF_PRESSURE +// cdef.Flags = NX_CLF_BENDING|NX_CLF_GRAVITY|NX_CLF_BENDING_ORTHO + cdef.Flags = NX_CLF_GRAVITY|NX_CLF_PRESSURE + NxClothCreate(this, "textures/trim/Pipe_03", cdef, true) + + delete cdef + } +#endif + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + + if(!model) + model = "obj/physics/boxik.xob" + + if(impactsounds == 3) //user do kluca nic nenastavil tak my to chceme defaultne vypnute + impactsounds = 0 + + MainObject = GetObject(model) + SetObject(MainObject, _materialremap) + + SetTransformEx(Vector(angle3, angle, angle2), coords) + SetOrigin(this, coords) + + string mm = model + strlower(mm) + + if(strstr(mm, "obj/static/rail") != -1) + { + railing = true + } + + if(_nocollision) + return + + if(CreateRigidBody(GEOMTYPE_NONE, "", model)) + { + dBodyInteractionLayer(this, ET_WORLD) //misc_modely su vzdy staticke takze to budeme chapat ako world + ActivateBody(false) + dBodyCreatePhysXShadow(this, 0, PSF_COLLIDE_CLOTH|PSF_COLLIDE_RB) + } + + ClearFlags(this, TFL_TOUCHTRIGGERS) + + if(display && !Display) + { + Display = new func_display(this, display, false) //musi sa vytvarat az ked ma entita selectnuty object! + SetEventMask(this, EV_VISIBLE) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY_DISP + } + } + +//----------------------------------------------------------------- + void misc_model() + { + ClassType = ClassTypeMiscModel + SetEventMask(this, EV_INIT | EV_LOADED) + SetFlags(this, TFL_VISIBLE|TFL_SOLID|TFL_NOSHADOW) + SetPickable(false) + + if(g_physx && strstr(model, "obj/misc/pipe_0") == 0) + _surfaces = "" + } + +//----------------------------------------------------------------- + void ~misc_model() + { +// if(!_nocollision) +// { + if(IsRigidBody()) //FIXME v _nocollision sa nachadza hodnota 1024. co to je?! + { + dBodyDestroyPhysXShadow(this) + RemoveBodyAndGeom() + } +// } + + if(MainObject) + ReleaseObject(MainObject, 0) + } +} +//================================================================================= +class misc_anim_object extends Actor +{ + vector coords + int angle + int angle2 + int angle3 + string model + string anim + + int speed + + int type + int flags + int fps + int EditFrame + bool Disabled + + string OnStart, OnEnd, OnPause, OnContinue + +#ifdef EDITOR + void EditorOpened() + { + if(EditFrame) + { + SetFrame(this, 6, EditFrame) + BumpFrame(this, 0, 0) + UpdateEntity(this) + } + } +#endif + + void M_Enable(ExtClass other) //enabluje aktivovanie + { + Disabled = false + } + + void M_Disable(ExtClass other) + { + Disabled = true + } + +//--------------------------------------------------------------------------------------------------------- + void CanActivate(int fl, ExtClass other) + { + if(Disabled) //su pripady kedy potrebujeme disablovat aj ked to displej povoluje + return ACT_DISABLE + + if(ActivateMethod <= ACT_NONE) + return ACT_DISABLE + + if(ActivateMethod == ACT_USEKEY_DISP) + { + if(Display && Display.CanActivate(0, this) == ACT_ENABLE) + return ACT_ENABLE + else + return ACT_DISABLE + } + + if(ActivateMethod == ACT_USEKEY) + { + return ACT_ENABLE + } + + return ACT_DISABLE + +/* + if(status == 0) + return ACT_ENABLE + + return ACT_DISABLE*/ + } + +//----------------------------------------------------------------- + void Switch(bool onoff) + { + status = onoff + + if(flags & 8) + { + if(onoff) + SetEventMask(this, EV_VISIBLE) + else + { + if(!Display) + ClearEventMask(this, EV_VISIBLE) + } + } + else + { + if(onoff) + SetEventMask(this, EV_FRAME) + else + { + if(!Display) + ClearEventMask(this, EV_FRAME) + } + } + } + +//----------------------------------------------------------------- + void M_Start(ExtClass other) + { + Switch(true) + CallMethods(this, OnStart) + } + +//----------------------------------------------------------------- + void M_Stop(ExtClass other) + { + Switch(false) + CallMethods(this, OnEnd) + } + +//----------------------------------------------------------------- + void M_Pause(ExtClass other) + { + Switch(false) + CallMethods(this, OnPause) + } + +//----------------------------------------------------------------- + void M_Continue(ExtClass other) + { + Switch(true) + CallMethods(this, OnContinue) + } + +//----------------------------------------------------------------- + void M_SeekAnim(ExtClass other) + { + string val = other._value + + int slot = 0, n = 0, p + float frame + string parm + + loop: + p = strstr(val, ",") + if(p == -1) + parm = val + else + { + parm = substr(val, 0, p) + val = substr(val, p + 1, strlen(val) - p - 1) + } + + triminplace(parm) + triminplace(val) + + switch(n) + { + case 0: + slot = atoi(parm) + break + + case 1: + frame = atof(parm) + break + } + + n++ + if(p != -1) + goto loop + + if(n < 2) + { + Print("SeekAnim: not enough parameters") + return + } + + slot += s_cutscene + clamp slot + + SetFrame(this, slot, frame) + } + +//----------------------------------------------------------------- + void EOnAnimEnd(MinClass other, int extra) + { + CallMethods(this, OnEnd) + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + //evidentne to nejaky debil pouzil jen jako neanimovany objekt + if(NumPAnims == 0) + { + ClearEventMask(this, EV_FRAME) + return + } + //looped anim if present + BumpFrame(this, ftime, 0) + } + +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + //evidentne to nejaky debil pouzil jen jako neanimovany objekt + if(NumPAnims == 0 && !Display) + { + ClearEventMask(this, EV_VISIBLE) + } + else + { + //looped anim if present + BumpFrame(this, ftime, 0) + } + return 0 + } + + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + ClassType = ClassTypeMisc + + if(fps == 0) + fps = 30 + + SetOrigin(this,coords) + SetAngles(this, Vector(angle3, angle, angle2)) + + MainObject = GetObject(model) + if(MainObject) + { + SetObject(MainObject, _materialremap) + + int p = strstr(model,".xob") + + if(p != -1) + { + if(anim != "") + { + vobject anm = AddPAnim(anim) + + if(anm) + { + int aflags = 0 + + if(flags & 1) + aflags |= AF_ONCE + + if(flags & 32) + aflags |= AF_WRAP + + //slot 6 because of cutscenes (s_cutscene + 0...1) + SetAnimSlot(this, 6, anm, 0, 1, NULL, fps, aflags) + + if(flags & 4) + Switch(true) + } + } + + type = 1 + } + else + { + type = 0 + } + + SetFlags(this,TFL_VISIBLE) + SetEventMask(this,EV_ANIMEND|EV_INIT|EV_LOADED) + } + else + { + ClearEventMask(this, EV_ALL) + } + + if(speed == 0) + speed = 5 + + + if(flags & 16) + SetFlags(this, TFL_NOSHADOW) + +#ifdef EDITOR + if(World.EditorActive) + { + if(EditFrame) + { + SetFrame(this, 6, EditFrame) + BumpFrame(this, 0, 0) + UpdateEntity(this) + } + } +#endif + +//musi probehnout aspon prvni snimek, jinak jsou XOB objekty neinicializovane + BumpFrame(this, 0, 0) + SetFlags(this, TFL_TRIGGER) + + UpdateEntity(this) + + if(display && !Display) + { + Display = new func_display(this, display, false) //musi sa vytvarat az ked ma entita selectnuty object! + SetEventMask(this, EV_VISIBLE) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY_DISP + } + + if(SoundSetName) + LoadSoundSet(SoundSetName, CSounds) + } + +//----------------------------------------------------------------- + void misc_anim_object() + { + SetFlags(this,TFL_SOLID|TFL_OBBCOLLISION|TFL_DYNAMICBBOX) + } +} + +//================================================================================= +#ifdef NEPOUZITO +//================================================================================= +class misc_testhead extends Actor +{ + float frame + vector coords + int angle + int angle2 + int angle3 + string model + + float p_face0,p_face1,p_face2,p_face3 + + ExtClass animobj + hsound sound + + +//----------------------------------------------------------------- + void Anim(int bone, string name) + { + vector mat[4] + float weight + + GetBoneMatrix(animobj, bone, mat) + weight = mat[3][2]/32 + SetMorphState(this, name, weight) + + string msg = name + " " + ftoa(weight) +// Print(msg) + } + + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + BumpFrame(animobj, ftime, 0) + +// Print("---------------------") + Anim(B_BrowsDown_L, "BrowsDown_L") + Anim(B_BrowsDown_R, "BrowsDown_R") + Anim(B_BrowsUp_L, "BrowsUp_L") + Anim(B_BrowsUp_R, "BrowsUp_R") + Anim(B_BrowsUpSide_L, "BrowsUpSide_L") + Anim(B_BrowsUpSide_R, "BrowsUpSide_R") + Anim(B_Mrkani_L, "Mrkani_L") + Anim(B_Mrkani_R, "Mrkani_R") + Anim(B_Privreni_L, "Privreni_L") + Anim(B_Privreni_R, "Privreni_R") + Anim(B_Angry, "Angry") + Anim(B_Sad, "Sad") + Anim(B_AI, "AI") + Anim(B_BMP, "BMP") + Anim(B_CDG, "CDG") + Anim(B_E, "E") + Anim(B_FV, "FV") + Anim(B_O, "O") + Anim(B_QW, "QW") + Anim(B_U, "U") + + + + if(KeyState(KC_NUMPAD7)) + { + frame += 1.0 + SetFrame(animobj, 0, 0.0) + BumpFrame(animobj, ftime, 0) + + PlaySound(this, sound, SF_ONCE) + + + if (frame > 81.0) + frame = 0.0 + } + + +/* if(KeyState(KC_NUMPAD7)) + { + p_face0 += ftime * 0.5 + } + + if(KeyState(KC_NUMPAD4)) + { + p_face0 -= ftime * 0.5 + } + + clamp p_face0<0,1> + SetMorphState(this, "AI", p_face0) + + if(KeyState(KC_NUMPAD8)) + { + p_face1 += ftime * 0.5 + } + + if(KeyState(KC_NUMPAD5)) + { + p_face1 -= ftime * 0.5 + } + + clamp p_face1<0,1> + SetMorphState(this, "E", p_face1) +*/ + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnAnimEnd(MinClass other, int extra) + { + Print("AGAIN") + SetAnimSlot(animobj, 0, GetObject("anm/morphs/I_1_Arn0008.anm"), 0, 0, NULL, 30, AF_ONCE) + PlaySound(this, sound, SF_ONCE) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + ClassType = ClassTypeMisc + frame = 0.0 + + SetOrigin(this,coords) + SetAngles(this, Vector(angle3, angle, angle2)) + + if(!model) + { + model = "obj/creatures/arnold/arnold_cutscene.xob" + } + + MainObject = GetObject(model) + if(MainObject) + { + SelectObject(this, MainObject) + + SetFlags(this,TFL_VISIBLE) + SetEventMask(this,EV_INIT|EV_LOADED|EV_FRAME|EV_ANIMEND) + } + else + { + ClearEventMask(this, EV_ALL) + } + + sound = GetSoundEx("I_1_Arn0008", 1, SF_3D) + PlaySound(this, sound, SF_ONCE) + Print(sound) + + //musi probehnout aspon prvni snimek, jinak jsou X objekty neinicializovane + BumpFrame(this, 0, 0) + + animobj = new ExtClass + + SelectObject(animobj, GetObject("obj/creatures/arnold/morphs.xob")) + SetAnimSlot(animobj, 0, GetObject("anm/morphs/I_1_Arn0008.anm"), 0, 0, NULL, 30, AF_ONCE) +// SetAnimSlot(animobj, 0, GetObject("obj/creatures/arnold/morph_test_export_basic.anm"), 0, 0, NULL, 30, 0) +// SetAnimSlot(animobj, 0, GetObject("obj/creatures/arnold/morph_test_export_dvadohromady.anm"), 0, 0, NULL, 30, AF_USER) + } + +//----------------------------------------------------------------- + void misc_testhead() + { + SetFlags(this,TFL_SOLID|TFL_OBBCOLLISION) + ActivateMethod = 0 + + } +} +#endif + +//================================================================================= +// test class, loads object, morphs and dialogue sound +//================================================================================= +class MiscTestDialogue extends Actor +{ + vobject m_Object + vobject m_MorphObject + vobject m_Dialogue + hsound m_Sound + + ExtClass m_AnimObject + + string m_strObject + string m_strMorphName + string m_strSoundName + + bool m_bReady + +//----------------------------------------------------------------- + void Anim(int bone, string name) + { + vector mat[4] + float weight + + GetBoneMatrix(m_AnimObject, bone, mat) + weight = mat[3][2]/32 + SetMorphState(this, name, weight) + } + + +//----------------------------------------------------------------- +// void EOnFrame(MinClass other, int extra) + void SetBonesSetup() + { +// BumpFrame(m_AnimObject, ftime, 0) + Anim(B_BrowsDown_L, "BrowsDown_L") + Anim(B_BrowsDown_R, "BrowsDown_R") + Anim(B_BrowsUp_L, "BrowsUp_L") + Anim(B_BrowsUp_R, "BrowsUp_R") + Anim(B_BrowsUpSide_L, "BrowsUpSide_L") + Anim(B_BrowsUpSide_R, "BrowsUpSide_R") + Anim(B_Mrkani_L, "Mrkani_L") + Anim(B_Mrkani_R, "Mrkani_R") + Anim(B_Privreni_L, "Privreni_L") + Anim(B_Privreni_R, "Privreni_R") + Anim(B_Angry, "Angry") + Anim(B_Sad, "Sad") + Anim(B_AI, "AI") + Anim(B_BMP, "BMP") + Anim(B_CDG, "CDG") + Anim(B_E, "E") + Anim(B_FV, "FV") + Anim(B_O, "O") + Anim(B_QW, "QW") + Anim(B_U, "U") + } + + + //----------------------------------------------------------------- + // Name: StartAnim : play animation with sound + //----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + + + //----------------------------------------------------------------- + // Name: StartAnim : play animation with sound + //----------------------------------------------------------------- + void StartAnim() + { + if (m_bReady) + { + SelectObject(m_AnimObject, m_MorphObject) + SetAnimSlot(m_AnimObject, 0, m_Dialogue, 0, 0, NULL, 30, AF_ONCE) + PlaySound(this, m_Sound, SF_ONCE) + } + } + + //----------------------------------------------------------------- + // Name: MiscTestDialogue -> loads object with morphs, sounds and + // lipsync + //----------------------------------------------------------------- + void MiscTestDialogue(string objectname, string morphname, string soundname) + { + Print ("Wait, loading object...") + m_bReady = false + + SetFlags(this,TFL_SOLID|TFL_OBBCOLLISION) + ActivateMethod = 0 + + m_strObject = objectname + m_strMorphName = morphname + m_strSoundName = soundname + + ClassType = ClassTypeMisc + + string tmp = "anm/morphs/" + m_strSoundName + ".anm" + + m_Object = GetObject(m_strObject) + m_MorphObject = GetObject(m_strMorphName) + m_Dialogue = GetObject(tmp) + + m_Sound = GetSoundEx(m_strSoundName, 1, SF_3D) + + m_AnimObject = new ExtClass + + if (m_Object && m_Dialogue && m_Sound && m_AnimObject) + { + SelectObject(this, m_Object) + + + SetFlags(this,TFL_VISIBLE) + SetEventMask(this, 0)//EV_LOADED|EV_FRAME) + + SelectObject(m_AnimObject, m_MorphObject) + + BumpFrame(this, 0, 0) + m_bReady = true + Print ("Successfuly loaded...") + } else + { + ClearEventMask(this, EV_ALL) + } + + } + + + //----------------------------------------------------------------- + // Name: ~MiscTestDialogue : clear all + //----------------------------------------------------------------- + void ~MiscTestDialogue() + { + ReleaseObject(m_Object, 0) + ReleaseObject(m_Dialogue, 0) + ReleaseObject(m_MorphObject, 0) + + ReleaseSound(m_Sound) + delete m_AnimObject + } + +} diff --git a/Alpha Prime/Mod/scripts/class_misc_physics_model.h b/Alpha Prime/Mod/scripts/class_misc_physics_model.h new file mode 100644 index 0000000..4cb04cf --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_misc_physics_model.h @@ -0,0 +1,1888 @@ +//================================================================================= +class creature_ragdoll extends CreatureClass +{ + float angle2, angle3 + vobject RagdollObject +// rigidbody_rope DRope +// string FixationBones + string ragdoll + string pose + string material + float weight + +#ifdef EDITOR +//----------------------------------------------------------------- + void SetOrientation(vector pos, float angle) //nech v editore nerobi nic + { + } + + float SetYaw(float angle) + { + } + + void SetInitOrientation() + { + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + angle2 = atof(GetKeyValue("angle2")) + angle3 = atof(GetKeyValue("angle3")) + vector Angs = Vector(angle3, angle, angle2) + + ClearFlags(this, TFL_FULLMATRIX) + SetOrigin(this, coords) + SetAngles(this, Angs) + UpdateEntity(this) + } + +//----------------------------------------------------------------------------------- + void EditorOpened() + { + if(ragdollActive) + { + dRagdollDestroy(this) + ragdollActive = false + } + + if(pose) + { + vobject anim = AddPAnim(pose) + SetAnimSlot(this, 0, anim, 0, 0, NULL, 30, AF_ONCE) + SetFrame(this, 0, 0) + BumpFrame(this, 0, 0) + } + UpdateEntity(this) + SetInitOrientation() + } +/* +//----------------------------------------------------------------------------------- + void AfterReloadInEditor() + { + SetInitOrientation() + } +*/ +//----------------------------------------------------------------------------------- + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + ClearFlags(this, TFL_FULLMATRIX) + SetOrigin(this, Pos) + SetAngles(this, Angs) + UpdateMainVisualizer() + UpdateEntity(this) + } +#endif +/* +//----------------------------------------------------------------- + void CreateFixationJoints() + { + string Parms[32] + int NumParms = ParseString(FixationBones, Parms) + + for(int n = 0; n < NumParms; n++) + { + if(Parms[n] != ",") + { + string BoneName = "B_" + Parms[n] + int BoneValue = -1 + + if(GetValue(NULL, BoneName, 0, BoneValue)) + { + + } + else + { + string Err = "Not existing bone name " + Parms[n] + "in FixationBones key of " + _name + DPrint(Err) + } + } + } + } +*/ +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + +#ifdef GERMAN + return +#endif + +#ifdef EDITOR + if(!World.EditorActive) //ragdol vytvarat iba v playmode + { +#endif + if(!ragdollActive) + InitRagdoll(ragdoll, weight, material) +#ifdef EDITOR + } +#endif +// CreateFixationJoints() + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { +#ifndef GERMAN + ClearEventMask(this, 0xffffffff) + SetEventMask(this, EV_LOADED|EV_ONLOAD|EV_ONSAVE) + SetFlags(this, TFL_VISIBLE|TFL_SOLID|TFL_DYNAMICBBOX) + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + SetKind(this, MONSTER) + + if(material == "") + material = "material/flesh" + + if(model == "") +// model = "obj/creatures/securityspider01/securityspider01.xob" + model = "obj/creatures/lighttrooper/lighttrooper.xob" + + if(!ragdoll) +// ragdoll = "spacesuit" + ragdoll = "humanoid2" +// ragdoll = "securityspider" + + if(weight == 0) + weight = 50 + + RagdollObject = GetObject(model) + SetObject(RagdollObject, _materialremap) + + if(pose) + { + SetAnimSlot(this, 0, AddPAnim(pose), 0, 0, NULL, 30, AF_ONCE) + SetFrame(this, 0, 0) + BumpFrame(this, 0, 0) + UpdateEntity(this) + } +#endif + status = STATE_DEAD + } + + +//----------------------------------------------------------------- + int Shoot(ShotStorage shot) + { +#ifndef GERMAN + float dmg = shot.damage //kolko energie to ma zobrat + vector dir = shot.dir + vector pos = shot.to + float pow = shot.power + + if(shot.HurtType == HT_SHOT) + { + if(shot.Bone >= 0 && RBones[shot.Bone]) + { + pow *= shot.NumBullets * 350 + clamp pow<500, 3500> + + dBodyApplyImpulseAt(RBones[shot.Bone], shot.dir * pow, shot.to) + } + return 1 + } + + if(shot.HurtType == HT_EXPLOSION) + { + float scale + pow *= ExplosionImpactScale //koli moznosti vyscalovat vsetky bodies v hre + pow *= 0.6 //na potvory je to vela + + WakeupRagdoll() + ApplyExplosionOnRagdoll(shot.from, shot.radius, pow) + return 1 + } +#endif + } + +//----------------------------------------------------------------- + void creature_ragdoll() + { + flags |= FL_NOTEST + SetFlags(this, TFL_TOUCHTRIGGERS) + } + +//----------------------------------------------------------------- + void ~creature_ragdoll() + { + if(RagdollObject) + ReleaseObject(RagdollObject, 0) + } +} + +const int NEED_SHOOT_EVENT_FLAG = 2048 //12-ty bit +//================================================================================= +class misc_physics_model extends RigidBodyClass +{ + int flags + string model + float angle, angle2, angle3 + vector coords + vobject MainObject + string OnShoot + +#ifdef EDITOR + void EditorOpened() + { + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + angle2 = atof(GetKeyValue("angle2")) + angle3 = atof(GetKeyValue("angle3")) + vector Angs = Vector(angle3, angle, angle2) + + if(GetParent() == NULL) + SetTransformEx(Angs, coords) + + UpdateEntity(this) + } + + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + if(GetParent() == NULL) //normalny stav + SetTransformEx(Angs, Pos) + else //zrejme je na niecom naparentena + { + ClearFlags(this, TFL_FULLMATRIX) + SetOrigin(this, Pos) + SetAngles(this, Angs) + } + + UpdateMainVisualizer() + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } + + void CreateEditorVisuals() + { + } +#endif + +//--------------------------------------------------------------------------------- + void M_EnableShootEvent(ExtClass other) + { + if(!flags & NEED_SHOOT_EVENT_FLAG) + flags |= NEED_SHOOT_EVENT_FLAG + } + +//--------------------------------------------------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(ActivateMethod == ACT_USEKEY) + return ACT_ENABLE + + if(ActivateMethod == ACT_USEKEY_DISP) + { + if(Display && Display.CanActivate(0, this) == ACT_ENABLE) + return ACT_ENABLE + } + + return ACT_DISABLE + } + +//--------------------------------------------------------------------------------- + int Shoot(ShotStorage shot) //kopia z RigidBodyClassu + nieco navyse. mozno to hodit do inej funkcie + { + float ImpactPower + + if(shot.HurtType == HT_SHOT) + { + ImpactPower = shot.power * ShootImpactScale + + if(rb) + { + ImpactPower *= weaponscale + float ke = dBodyGetKineticEnergy(this) + + if(ke > 10) //aby sa nic nepohybovalo extremnymi rychlostami + ImpactPower *= 0.1 + + if(World.ManipEntity == this) + ImpactPower *= 0.1 + + vector vec = shot.dir * ImpactPower + dBodyApplyImpulseAt(this, vec, shot.to) + } + + if(flags & NEED_SHOOT_EVENT_FLAG) + { + flags &= 0xffffffff - NEED_SHOOT_EVENT_FLAG + CallMethods(this, OnShoot) + } + return 1 + } + + if(shot.HurtType == HT_EXPLOSION) + { + ImpactPower = shot.power * ExplosionImpactScale + + if(rb) + { + vector Org = GetCenterOfEntity(this) + vector ForceDir = Org - shot.from + float dist = VectorNormalize(ForceDir) + float scale = dist / shot.radius + clamp scale<0, 1> + scale = 1 -scale + ImpactPower += ImpactPower * scale + float MassScale = mass / 30 + + if(MassScale > 2) + MassScale = 2 + + ImpactPower *= MassScale //lahsie telesa musia dostat mensiu silu inac su velmi velke rozdiely + + if(World.ManipEntity == this) + ImpactPower *= 0.01 + + vector Force = ForceDir * ImpactPower + dBodyApplyImpulseAt(this, Force, Org + "0 0 10") + } + + if(flags & NEED_SHOOT_EVENT_FLAG) + { + flags &= 0xffffffff - NEED_SHOOT_EVENT_FLAG + CallMethods(this, OnShoot) + } + return true + } + + if(shot.HurtType == HT_FLAME) + { + dBodyApplyForce(this, shot.dir * shot.power) + + if(flags & NEED_SHOOT_EVENT_FLAG) + { + flags &= 0xffffffff - NEED_SHOOT_EVENT_FLAG + CallMethods(this, OnShoot) + } + return true + } + + return true + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + + //----------------------------------------------------------------- + void BeforeInit() + { + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + BeforeInit() + + if(flags & 1) + SetPickable(false) + + if(!model) + model = "obj/physics/box.xob" + + MainObject = GetObject(model) + + if(MainObject) + { + SetObject(MainObject, _materialremap) + } + //protoze je uplne jasny, ze se nikdo s nastavovanim _pathblock + //srat nebude, tak aspon odfiltrujeme maly veci + if(_pathblock == 0) + { + //TODO: cleanup this mess! + vector mins, maxs + GetBoundBox(this, mins, maxs) + maxs -= mins + if(maxs[0] < MIN_OBSTACLE_SIZE && maxs[1] < MIN_OBSTACLE_SIZE && maxs[2] < MIN_OBSTACLE_SIZE) + _pathblock = -1 + } + + if(_pathblock != -1) + { + SetEventMask(this, EV_EXTRA) + SetFlags(this, TFL_PATHBLOCK) + } + + SetTransformEx(Vector(angle3, angle, angle2), coords) + SetAngles(this, Vector(angle3, angle, angle2)) + if(CreateRigidBody(GEOMTYPE_NONE, "", model)) + { + ActivateBody(true) + dBodyCreatePhysXShadow(this, 1, PSF_KINEMATIC|PSF_COLLIDE_CLOTH|PSF_COLLIDE_RB) + } + + if(display && !Display) + { + Display = new func_display(this, display, false) //musi sa vytvarat az ked ma entita selectnuty object! + SetEventMask(this, EV_VISIBLE) + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_USEKEY_DISP + } + } + +//----------------------------------------------------------------- + void EOnExtra(MinClass other, int extra) + { + //kdykoliv se uklidni, updatuj + if(!extra & 1) + UpdateAgent(true) + //else + //UpdateAgent(false) //toto neni dobry napad, protoze se obcas aktivuje bedna, kolem ktere potvora bezi + //a nasledne zmizi obstacle z pathfinderu, coz vede ke kolizi... + } + +//----------------------------------------------------------------- + void misc_physics_model() + { + agent = NULL + ClassType = 666//ClassTypeMisc + SetEventMask(this, EV_INIT | EV_LOADED) + SetFlags(this, TFL_VISIBLE) + } + +//----------------------------------------------------------------- + void Cleanup() + { + dBodyDestroyPhysXShadow(this) + RemoveBodyAndGeom() + + if(MainObject) + ReleaseObject(MainObject, 0) + } + +//----------------------------------------------------------------- + void ~misc_physics_model() + { + Cleanup() + } +} + +class misc_physics_bmodel extends misc_physics_model +{ +} + +//================================================================= +class misc_shooting_shield extends misc_physics_model +{ + int EnabledSide + float row0[4] + float row1[4] + float UVShift + float UVScale + +//----------------------------------------------------------------- + void M_SetShootingSide(ExtClass other) + { + EnabledSide = atoi(other._value) + clamp EnabledSide<0, 1> + } + +//----------------------------------------------------------------- + int IsShot(vector rayorigin, vector raydirection) + { + float dot = GetMatrix(this, 1) * raydirection + int side = EnabledSide + + if(dot > 0) + side = 1 - side + + if(side) + return true + + return false + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + UVShift += ftime * 5// * 100 + + UVScale = 10.0//sin(UVShift * DEG2RAD) + 1 * 0.5 + } + + //----------------------------------------------------------------- + void BeforeInit() + { + if(!model) + model = "obj/weapons/energy_wall.xob" + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + ActivateBody(false) + vector mins, maxs + GetBoundBox(this, mins, maxs) + mins[1] = -0.04 //pre presne detekcie zasahov to zase znizime + maxs[1] = 0.04 + SetBoundBox(this, mins, maxs) + } + +//----------------------------------------------------------------- + void misc_shooting_shield() + { + ClassType = ClassTypeMiscShootingShield + row0[0] = 0.008 + row0[1] = 0.0 + row0[2] = 0.0 + row0[3] = 0.0 + + row1[0] = 0.0 + row1[1] = 0.008 + row1[2] = 0.0 + row1[3] = 0.0 + + Color = 0xffffe0d0 //abgr + SetEventMask(this, EV_FRAME) + } +} + + + + + + + +int g_NumGlassDebrises + +class GlassDebris extends RigidBodyClass +{ + float timer + + void EOnTick(MinClass other, int extra) + { + if(g_NumGlassDebrises > 8) + timer -= TICK_PERIOD * 3 + else + timer -= TICK_PERIOD + + if(timer <= 0 && Dependencies == 0) + delete this + } + + void GlassDebris() + { + SetEventMask(this, EV_TICK) + SetFlags(this, TFL_VISIBLE) + timer = 10 //10 sekund + SetPickable(false) + g_NumGlassDebrises++ + } + + void ~GlassDebris() + { + RemoveBodyAndGeom() + g_NumGlassDebrises-- + } +} + +class GlassDebrisX extends ExtClass +{ + float timer + + void EOnTick(MinClass other, int extra) + { + timer -= TICK_PERIOD + + if(timer <= 0) + { + NxActorDestroy(this) + delete this + } + } + + void GlassDebrisX() + { + SetEventMask(this, EV_TICK) + SetFlags(this, TFL_VISIBLE|TFL_FULLMATRIX|TFL_NOSHADOW) + timer = 15 + } +} + +//stavy +const int GL_FULL = 7 //cele sklo priesvitne +const int GL_FULL2 = 6 //cele sklo popraskane + +//const int GL_EMPTY = 14 //uplne rozbite sklo (nezostalo nic) +const int GL_BROKEN0 = 0 //nastiepene sklo +const int GL_BROKEN1 = 1 //nastiepene sklo +const int GL_BROKEN2 = 2 //nastiepene sklo +const int GL_BROKEN3 = 3 //nastiepene sklo +const int GL_BROKEN4 = 4 //nastiepene sklo +const int GL_BROKEN5 = 5 //nastiepene sklo +const int GL_NONE = 127 //nedefinovane nic + +//rotacie +const int GL_BOTTOM = 0 //normalny stav +const int GL_LEFT = 1 +const int GL_TOP = 2 +const int GL_RIGHT = 3 + + +const int TypeMasks[4] = {0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff} + +class misc_physics_glass extends RigidBodyClass +{ + vobject GlassObject + vector coords + float angle + float angle2 + float angle3 + float width, height + float gridsize + int skin + int flags + + trigger_motion2 MTrigger + vobject DebrisObj[10] + int NumHSegments + int NumVSegments + int NumAllSegments + int NumVert + int NumInd + int NumShots + hsound Sound + vector Force + int ShotSegmentX + int ShotSegmentY + int ShotLayer + int BreakAction //co sposobilo break. strela, dotyk inej entity, vybuch, fyzicky naraz + + int SegMaskIndex[16][16] //typ textury pre kazdy segment + int SegMaskRot[16][16] //otocenie textury pre kazdy segment 0 - 3 + +#ifdef EDITOR + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + if(!flags & 1) + { + SetTransformEx(Angs, Pos) + } + else + { + SetOrigin(this, Pos) + SetAngles(this, Angs) + } + + UpdateMainVisualizer() + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } +#endif + +//------------------------------------------------------------------------- + int GetTypeFor(int X, int Y, int Z) + { + int shift = 24 - (Z * 8) + int temp = SegMaskIndex[X][Y] + int mask = TypeMasks[Z] + temp = temp & mask + temp = temp >> shift + return temp + } + +//------------------------------------------------------------------------- + void SetTypeFor(int X, int Y, int Z, int type) + { + int shift = 24 - (Z * 8) + int temp = SegMaskIndex[X][Y] + type = type << shift + int mask = TypeMasks[Z] + temp &= -1 ^ mask + temp = temp | type + SegMaskIndex[X][Y] = temp + } + +//------------------------------------------------------------------------- + int GetRotFor(int X, int Y, int Z) + { + int shift = 24 - (Z * 8) + int temp = SegMaskRot[X][Y] + int mask = TypeMasks[Z] + temp = temp & mask + temp = temp >> shift + return temp + } + +//------------------------------------------------------------------------- + void SetRotFor(int X, int Y, int Z, int rot) + { + int shift = 24 - (Z * 8) + int temp = SegMaskRot[X][Y] + rot = rot << shift + int mask = TypeMasks[Z] + temp &= -1 ^ mask + temp = temp | rot + SegMaskRot[X][Y] = temp + } + +//------------------------------------------------------------------------- + void RegenerateGlassObject() + { + SelectObject(this, VNULL) + if(GlassObject) + { + ReleaseObject(GlassObject, 0) + GlassObject = VNULL + } + + vector vertex1 + vector vertex2 + vector vertex3 + vector vertex4 + NumVert = 0 + NumInd = 0 + int SegIndex + int CurMaskIndex + int CurRot + + int FirstVert = 0 + int SecondVert = 0 + int ThirdVert = 0 + int FourthVert = 0 + + for(int v = 0; v < NumVSegments; v++) + { + for(int h = 0; h < NumHSegments; h++) + { + for(int n = 0; n < 4; n++) + { + SegIndex = GetTypeFor(h, v, n) + + if(SegIndex != GL_NONE) //ak je nadefinovane viac typov na jeden segment tak vytvarame pre kazdy typ novu vrstvu + { + vertex1[0] = h * gridsize + vertex1[1] = 0 + vertex1[2] = v * gridsize + gridsize + + vertex2[0] = vertex1[0] + gridsize + vertex2[1] = 0 + vertex2[2] = vertex1[2] + + vertex3[0] = vertex1[0] + gridsize + vertex3[1] = 0 + vertex3[2] = vertex1[2] - gridsize + + vertex4[0] = vertex1[0] + vertex4[1] = 0 + vertex4[2] = vertex1[2] - gridsize + + FirstVert = NumVert + SecondVert = NumVert + 1 + ThirdVert = NumVert + 2 + FourthVert = NumVert + 3 + + g_TempVerts[NumVert++] = vertex1 + g_TempVerts[NumVert++] = vertex2 + g_TempVerts[NumVert++] = vertex3 + g_TempVerts[NumVert++] = vertex4 + + g_TempIndices[NumInd++] = FirstVert + g_TempIndices[NumInd++] = SecondVert + g_TempIndices[NumInd++] = ThirdVert + + g_TempIndices[NumInd++] = ThirdVert + g_TempIndices[NumInd++] = FourthVert + g_TempIndices[NumInd++] = FirstVert + + CurRot = GetRotFor(h, v, n) + CurMaskIndex = SegIndex * 8 + + g_TempUVs[FirstVert * 2] = GlassMaskUV[CurRot][CurMaskIndex + 0] + g_TempUVs[FirstVert * 2 + 1] = GlassMaskUV[CurRot][CurMaskIndex + 1] + + g_TempUVs[SecondVert * 2] = GlassMaskUV[CurRot][CurMaskIndex + 2] + g_TempUVs[SecondVert * 2 + 1] = GlassMaskUV[CurRot][CurMaskIndex + 3] + + g_TempUVs[ThirdVert * 2] = GlassMaskUV[CurRot][CurMaskIndex + 4] + g_TempUVs[ThirdVert * 2 + 1] = GlassMaskUV[CurRot][CurMaskIndex + 5] + + g_TempUVs[FourthVert * 2] = GlassMaskUV[CurRot][CurMaskIndex + 6] + g_TempUVs[FourthVert * 2 + 1] = GlassMaskUV[CurRot][CurMaskIndex + 7] + } + } + } + } + + if(NumVert == 0) + delete this + + int nverts[1] + int numindices[1] + string shaders[1] + nverts[0] = NumVert + numindices[0] = NumInd + shaders[0] = "textures/glass/brokenglass" + itoa(skin) + + GlassObject = CreateXOB(1, nverts, numindices, shaders) + SetObject(GlassObject, _materialremap) + UpdateIndices(GlassObject, 0, g_TempIndices) //najprv sa musia updatovat indexy! + UpdateVertsEx(this, 0, g_TempVerts, g_TempUVs) + +// ActivateBody(true) + UpdateEntity(this) + } + +//------------------------------------------------------------------------- + void GenerateStartObject() + { + vector Vertices[4] + int Indices[6] + float UVs[8] + + Vertices[0] = ZeroVec + Vertices[1] = Vector(0, 0, height) + Vertices[2] = Vector(width, 0, height) + Vertices[3] = Vector(width, 0, 0) + + Indices[0] = 0 + Indices[1] = 1 + Indices[2] = 2 + Indices[3] = 2 + Indices[4] = 3 + Indices[5] = 0 + + UVs[0] = 0.75 + UVs[1] = 1 + UVs[2] = 0.75 + UVs[3] = 0.5 + UVs[4] = 1 + UVs[5] = 0.5 + UVs[6] = 1 + UVs[7] = 1 + + int nverts[1] + int numindices[1] + string shaders[1] + nverts[0] = 4 + numindices[0] = 6 + shaders[0] = "textures/glass/brokenglass" + itoa(skin) + + GlassObject = CreateXOB(1, nverts, numindices, shaders) + SetObject(GlassObject, _materialremap) + UpdateIndices(GlassObject, 0, Indices) //najprv sa musia updatovat indexy! + UpdateVertsEx(this, 0, Vertices, UVs) + + UpdateEntity(this) + } + +//------------------------------------------------------------------------- + bool IsBrokenType(int type) + { + if(type == GL_BROKEN0 || type == GL_BROKEN1 || type == GL_BROKEN2 || type == GL_BROKEN3 || type == GL_BROKEN4 || type == GL_BROKEN5) + return true + + return false + } + +//------------------------------------------------------------------------- + bool IsFullType(int type) + { + if(type == GL_FULL || type == GL_FULL2) + return true + + return false + } + +//------------------------------------------------------------------------- + void ChangeFullType() + { + for(int v = 0; v < NumVSegments; v++) + { + for(int h = 0; h < NumHSegments; h++) + SetTypeFor(h, v, 0, 6) //nahodne rozlozime cele ale popraskane skla + } + } + +//------------------------------------------------------------------------- + void ThrowDebris(int X, int Y) + { + vector mat[4], pos + GetMatrix4(this, mat) + + float HalfGridSize = gridsize * 0.5 + float QuarterGridSize = gridsize * 0.25 + + pos[0] = gridsize * (float)X + HalfGridSize + pos[1] = 0 + pos[2] = gridsize * (float)Y + HalfGridSize + + if(X == 0) + pos[0] = pos[0] + QuarterGridSize + + if(Y == 0) + pos[2] = pos[2] + QuarterGridSize + + int NumH = NumHSegments - 1 + int NumV = NumVSegments - 1 + + if(X == NumH) + pos[0] = pos[0] - QuarterGridSize + + if(Y == NumV) + pos[2] = pos[2] - QuarterGridSize + + pos = VectorMatrixMultiply4(mat, pos) + mat[3] = pos + + if(g_physx) + { + //neco efektivnejsiho + GlassDebrisX debx = new GlassDebrisX() + + SetMatrix(debx, mat) + SelectObject(debx, DebrisObj[rand(0, 10)]) + NxActorCreate(debx, ZeroVec, BC_OBB, true, 1.5, 0, 0) + SetVelocity(debx, Force * 10) + } + else + { + GlassDebris deb = new GlassDebris() + SelectObject(deb, DebrisObj[rand(0, 10)]) + + deb.SetMass(0.4) + deb.SetTransform(mat) + + if(deb.CreateRigidBody(GEOMTYPE_BOX, "material/glassdebris", "")) + { + deb.ActivateBody(true) + + dBodyInteractionLayer(deb, ET_DEBRIS) + + vector offset + offset[0] = frand(-0.03, 0.03) + offset[1] = frand(-0.03, 0.03) + offset[2] = frand(-0.03, 0.03) + + dBodyApplyImpulseAt(deb, Force, pos + offset) + } + } + } + +//------------------------------------------------------------------------- + bool IsInRange(int X, int Y) + { + int MaxX = NumHSegments - 1 + int MaxY = NumVSegments - 1 + + if(X < 0 || Y < 0 || X > MaxX || Y > MaxY) + return false + + return true + } + +//------------------------------------------------------------------------- + void BreakGlass(local int X, local int Y, local int LayerIndex, bool NoRecursions) + { + local int OldType = GetTypeFor(X, Y, LayerIndex) + local int OldRot = GetRotFor(X, Y, LayerIndex) + + local int LeftX = X - 1 + local int RightX = X + 1 + local int TopY = Y + 1 + local int BottomY = Y - 1 + + if(RightX >= NumHSegments) + RightX = -1 + + if(TopY >= NumVSegments) + TopY = -1 + + local bool IsFull = false + if(IsFullType(GetTypeFor(X, Y, 0))) + IsFull = true + + if(IsFull) //ak je cele tak ma celych aj vsetkych susedov + { + SetTypeFor(X, Y, 0, rand(0, 6)) + SetTypeFor(X, Y, 1, rand(0, 6)) + SetTypeFor(X, Y, 2, rand(0, 6)) + SetTypeFor(X, Y, 3, rand(0, 6)) + + SetRotFor(X, Y, 0, GL_BOTTOM) + SetRotFor(X, Y, 1, GL_LEFT) + SetRotFor(X, Y, 2, GL_TOP) + SetRotFor(X, Y, 3, GL_RIGHT) + + int Debris = 1 + + if(BreakAction == 2) //rozbija to vybuch + Debris = rand(0, 4) + + if(Debris > 0) + ThrowDebris(X, Y) + + if(NoRecursions) + return + + local int tmp //kriz okolo trafeneho segmentu musi mat cesty k okrajom. inac rozbijame cele rady + local int tmpX + local int tmpY + local int n + local bool LeftWay = true + local bool RightWay = true + local bool TopWay = true + local bool BottomWay = true + + tmpX = X - 1 + tmpY = Y + + while(tmpX >= 0) + { + if(!IsFullType(GetTypeFor(tmpX, Y, 0))) + { + LeftWay = false + for(n = X - 1; n > tmpX; n--) + { + BreakGlass(n, Y, 0, true) + + tmp = Y + 1 + if(IsInRange(X, tmp) && IsFullType(GetTypeFor(n, tmp, 0)) && rand(0, 2) == 0) //nohodne nieco rozbijeme potri tom aby to nevyzeralo linearne + BreakGlass(n, tmp, 0, true) + + tmp = Y - 1 + if(IsInRange(X, tmp) && IsFullType(GetTypeFor(n, tmp, 0)) && rand(0, 2) == 0) + BreakGlass(n, tmp, 0, true) + } + break + } + tmpX-- + } + + tmpX = X + 1 + tmpY = Y + + while(tmpX < NumHSegments) + { + if(!IsFullType(GetTypeFor(tmpX, Y, 0))) + { + RightWay = false + for(n = X + 1; n < tmpX; n++) + { + BreakGlass(n, Y, 0, true) + + tmp = Y + 1 + if(IsInRange(X, tmp) && IsFullType(GetTypeFor(n, Y + 1, 0)) && rand(0, 2) == 0) + BreakGlass(n, Y + 1, 0, true) + + tmp = Y - 1 + if(IsInRange(X, tmp) && IsFullType(GetTypeFor(n, Y - 1, 0)) && rand(0, 2) == 0) + BreakGlass(n, Y - 1, 0, true) + } + break + } + tmpX++ + } + + tmpX = X + tmpY = Y - 1 + + while(tmpY >= 0) + { + if(!IsFullType(GetTypeFor(X, tmpY, 0))) + { + BottomWay = false + for(n = Y - 1; n > tmpY; n--) + { + BreakGlass(X, n, 0, true) + + tmp = X + 1 + if(IsInRange(tmp, Y) && IsFullType(GetTypeFor(tmp, n, 0)) && rand(0, 2) == 0) + BreakGlass(tmp, n, 0, true) + + tmp = X - 1 + if(IsInRange(tmp, Y) && IsFullType(GetTypeFor(tmp, n, 0)) && rand(0, 2) == 0) + BreakGlass(tmp, n, 0, true) + } + break + } + tmpY-- + } + + tmpX = X + tmpY = Y + 1 + + while(tmpY < NumVSegments) + { + if(!IsFullType(GetTypeFor(X, tmpY, 0))) + { + TopWay = false + for(n = Y + 1; n < tmpY; n++) + { + BreakGlass(X, n, 0, true) + + tmp = X + 1 + if(IsInRange(tmp, Y) && IsFullType(GetTypeFor(tmp, n, 0)) && rand(0, 2) == 0) + BreakGlass(tmp, n, 0, true) + + tmp = X - 1 + if(IsInRange(tmp, Y) && IsFullType(GetTypeFor(tmp, n, 0)) && rand(0, 2) == 0) + BreakGlass(tmp, n, 0, true) + } + break + } + tmpY++ + } + return + } + + if(!IsFull) + { + SetTypeFor(X, Y, LayerIndex, GL_NONE) //zasiahnuty kusok musi vypadnut + + if(LayerIndex == 1 && LeftX >= 0) //sused vlavo + { + if(IsFullType(GetTypeFor(LeftX, Y, 0))) //sused je cely + BreakGlass(LeftX, Y, 3, false) + + SetTypeFor(LeftX, Y, 3, GL_NONE) + } + + if(LayerIndex == 3 && RightX >= 0) //sused vpravo + { + if(IsFullType(GetTypeFor(RightX, Y, 0))) + BreakGlass(RightX, Y, 1, false) + + SetTypeFor(RightX, Y, 1, GL_NONE) + } + + if(LayerIndex == 2 && TopY >= 0) //sused hore + { + if(IsFullType(GetTypeFor(X, TopY, 0))) + BreakGlass(X, TopY, 0, false) + + SetTypeFor(X, TopY, 0, GL_NONE) + } + + if(LayerIndex == 0 && BottomY >= 0) //sused dole + { + if(IsFullType(GetTypeFor(X, BottomY, 0))) + BreakGlass(X, BottomY, 2, false) + + SetTypeFor(X, BottomY, 2, GL_NONE) + } + } + } + +//------------------------------------------------------------------------- + void HandleGlassShape() + { + int TypeLeft + int TypeRight + int TypeTop + int TypeBottom + + int TLeft + int TRight + int TTop + int TBottom + + int LeftX + int RightX + int TopY + int BottomY + int v, h + int VertNum = NumVSegments - 1 + int HorzNum = NumHSegments - 1 + bool LeftWay + bool RightWay + bool TopWay + bool BottomWay + + for(v = 1; v < VertNum; v++) //kazdy segment ktory neni okrajovy musi mat aspon jednu priamu cestu k okraju + { + for(h = 1; h < HorzNum; h++) + { + if(IsFullType(GetTypeFor(h, v, 0))) + { + LeftWay = true + RightWay = true + TopWay = true + BottomWay = true + + LeftX = h - 1 + while(LeftX >= 0) + { + if(!IsFullType(GetTypeFor(LeftX, v, 0))) + { + LeftWay = false + break + } + LeftX-- + } + + RightX = h + 1 + while(RightX < NumHSegments) + { + if(!IsFullType(GetTypeFor(RightX, v, 0))) + { + RightWay = false + break + } + RightX++ + } + + TopY = v - 1 + while(TopY >= 0) + { + if(!IsFullType(GetTypeFor(h, TopY, 0))) + { + TopWay = false + break + } + TopY-- + } + + BottomY = v + 1 + while(BottomY < NumHSegments) + { + if(!IsFullType(GetTypeFor(h, BottomY, 0))) + { + BottomWay = false + break + } + BottomY++ + } + + if(!LeftWay && !RightWay && !TopWay && !BottomWay) //ak neni ziadna cesta k okraju. musime to rozbit + BreakGlass(h, v, 0, true) + } + } + } + + for(v = 0; v < NumVSegments; v++) //nemozu byt dva breaknute vedla seba lebo vznikaju nerealne stavy. prejdeme vsetkych susedov + { + for(h = 0; h < NumHSegments; h++) + { + LeftX = h - 1 + RightX = h + 1 + TopY = v + 1 + BottomY = v - 1 + + if(RightX >= NumHSegments) + RightX = -1 + + if(TopY >= NumVSegments) + TopY = -1 + + TypeBottom = GetTypeFor(h, v, 0) + TypeLeft = GetTypeFor(h, v, 1) + TypeTop = GetTypeFor(h, v, 2) + TypeRight = GetTypeFor(h, v, 3) + + if(LeftX >= 0) //sused vlavo + { + if(IsBrokenType(TypeLeft) && IsBrokenType(GetTypeFor(LeftX, v, 3))) + { + SetTypeFor(LeftX, v, 3, GL_NONE) + SetTypeFor(h, v, 1, GL_NONE) + } + } + + if(RightX >= 0) //sused vpravo + { + if(IsBrokenType(TypeRight) && IsBrokenType(GetTypeFor(RightX, v, 1))) + { + SetTypeFor(RightX, v, 1, GL_NONE) + SetTypeFor(h, v, 3, GL_NONE) + } + } + + if(TopY >= 0) //sused hore + { + if(IsBrokenType(TypeTop) && IsBrokenType(GetTypeFor(h, TopY, 0))) + { + SetTypeFor(h, TopY, 0, GL_NONE) + SetTypeFor(h, v, 2, GL_NONE) + } + } + + if(BottomY >= 0) //sused dole + { + if(IsBrokenType(TypeBottom) && IsBrokenType(GetTypeFor(h, BottomY, 2))) + { + SetTypeFor(h, BottomY, 2, GL_NONE) + SetTypeFor(h, v, 0, GL_NONE) + } + } + } + } + } + +//------------------------------------------------------------------------- + void CreateTouchTrigger() + { + if(MTrigger) + return + + vector mins, maxs + GetBoundBox(this, mins, maxs) + + MTrigger = new trigger_motion2(this, mins, maxs) + SetFlags(MTrigger, TFL_OBBCOLLISION) + SetOrigin(MTrigger, coords) + SetAngles(MTrigger, Vector(angle3, angle, angle2)) + } + +//------------------------------------------------------------------------- + void BreakBox(vector pos, vector mins, vector maxs) + { + NumShots++ + + if(NumShots == 1 && !flags & 1) //prvy zasah ked je sklo fyzikalne + { + RemoveBodyAndGeom() //zrusime + ChangeFullType() //mozeme zrusit fyziku + CreateTouchTrigger() + } + + vector offset = pos - coords + vector vec + vector mat[3] + GetMatrix4(this, mat) + vec = VectorMatrixInvMultiply3(mat, offset) + offset = vec + + bool NeedTrans = false + vector axis = mat[0] + if(axis[0] == 0 || axis[0] == 1 || axis[0] == -1) + { + if(axis[1] == 0 || axis[1] == 1 || axis[1] == -1) + { + if(axis[2] == 0 || axis[2] == 1 || axis[2] == -1) + NeedTrans = true + } + } + + if(NeedTrans) + { + vector tmins, tmaxs + tmins = VectorMatrixMultiply3(mat, mins) + tmaxs = VectorMatrixMultiply3(mat, maxs) + mins = tmins + maxs = tmaxs + + float f = mins[0] + + if(f > maxs[0]) + { + mins[0] = maxs[0] + maxs[0] = f + } + + f = mins[1] + + if(f > maxs[1]) + { + mins[1] = maxs[1] + maxs[1] = f + } + + f = mins[2] + + if(f > maxs[2]) + { + mins[2] = maxs[2] + maxs[2] = f + } + } + +// AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, coords + mins, coords + maxs) + + float MinX, MaxX + float MinY, MaxY + MinX = offset[0] + mins[0] + MaxX = offset[0] + maxs[0] + MinY = offset[2] + mins[2] + MaxY = offset[2] + maxs[2] + + float SegCenterX, SegCenterY + float HalfGridSize = gridsize * 0.5 + int NumBroken = 0 + BreakAction = 3 + + for(int v = 0; v < NumVSegments; v++) + { + for(int h = 0; h < NumHSegments; h++) + { + SegCenterX = h * gridsize + HalfGridSize + SegCenterY = v * gridsize + HalfGridSize + + if(SegCenterX > MinX && SegCenterX < MaxX && SegCenterY > MinY && SegCenterY < MaxY) + { + if(IsFullType(GetTypeFor(h, v, 0))) + { + BreakGlass(h, v, 0, false) + NumBroken++ + } + } + } + } + + if(NumBroken > 0) + { + HandleGlassShape() + RegenerateGlassObject() + PlaySound(this, Sound, SF_ONCE) + } + } + + +//------------------------------------------------------------------------- + void Activate(int fl, MinClass other) + { + vector mins, maxs, pos + ExtClass MyParent = GetParent() + + if(MyParent && other == MyParent) + return + +#ifdef EDITOR + return //v editore dochadza k extremnym situaciam v suvislosti s triggerom ktory nam toto vola. +#endif + + if(ClassName(other) == "GlassDebris" || other.ClassType == ClassTypeMiscPhysicsGlass) + return + + pos = GetMatrix(other, 3) + + if(other.ClassType == ClassTypeCreature) + { + CreatureClass cc = other + mins = cc.Mins + maxs = cc.Maxs + } + else + { + GetCBoundBox(other, mins, maxs) + mins = mins - pos + maxs = maxs - pos + } + BreakBox(pos, mins, maxs) + } + +//----------------------------------------------------------------- + void AfterShoot(int SegmentX, int SegmentY, int Layer) + { + NumShots++ + + if(NumShots == 1 && !flags & 1) //prvy zasah ked je sklo fyzikalne + { + RemoveBodyAndGeom() //zrusime + ChangeFullType() //mozeme zrusit fyziku + CreateTouchTrigger() + } + + BreakGlass(SegmentX, SegmentY, Layer, false) + } + +//----------------------------------------------------------------- + int IsShot(vector rayorigin, vector raydirection) + { + vector plane = GetMatrix(this, 1) + float dist = GetMatrix(this, 3) * plane + + float vd = plane * raydirection + float v0 = plane * rayorigin - dist + float scale = v0 / vd + + if(scale > 0) + return false //poloprimka je za plochou + + vector intersect = rayorigin + (raydirection * -scale) + + vector offset = intersect - GetMatrix(this, 3) + vector vec + vector mat[3] + GetMatrix4(this, mat) + vec = VectorMatrixInvMultiply3(mat, offset) + offset = vec + + float X = offset[0] //pozicia zasahu + float Y = offset[2] + + if(X < 0 || X > width || Y < 0 || Y > height) + return false + +// vec = coords + vec +// AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, coords, pos) +// AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, coords, vec) +// AddDShape(SHAPE_BBOX, 0xffffffff, 0, intersect - "2 2 2", intersect + "2 2 2") + + int SegmentX = X / gridsize + int SegmentY = Y / gridsize + + int MaxHindex = NumHSegments - 1 + int MaxVindex = NumVSegments - 1 + clamp SegmentX<0, MaxHindex> + clamp SegmentY<0, MaxVindex> + + if(IsFullType(GetTypeFor(SegmentX, SegmentY, 0))) //ked rozbijame cely stvorec tak nemusime testovat per pixel + { + ShotSegmentX = SegmentX //len si poznamename ze je mozny zasah. O skutocnom zasahu sa rozhodne az ked bude dotrasovane + ShotSegmentY = SegmentY + ShotLayer = 0 + return true + } + + float SegRateX = X / gridsize + SegRateX -= (float)SegmentX //percentualne v trafenom stvorci + float SegRateY = Y / gridsize + SegRateY -= (float)SegmentY + + int TexturePtr[] + int twidth, theight, pitch + int tex = LockTexture("textures/glass/brokenglass" + itoa(skin), TexturePtr, twidth, theight, pitch) + int MaxIndex = twidth * theight - 1 + + if(!tex) + return false + + int MaxX = twidth - 1 + int MaxY = theight - 1 + + for(int n = 0; n < 4; n++) //prebehneme vsetky layery a zistime ci sme v niektorom trafili do casti s alfou + { + int SegIndex = GetTypeFor(SegmentX, SegmentY, n) + + if(SegIndex == 127) //prazdne sklo + continue + + int UVIndex = SegIndex * 8 + int SegRot = GetRotFor(SegmentX, SegmentY, n) + + float SgRateX, SgRateY //prehodime do inych aby sa neprepisali pri dalsom prechode + if(SegRot == 1 || SegRot == 3) //prislusne to otocime + { + SgRateX = SegRateY + SgRateY = SegRateX + } + else + { + SgRateX = SegRateX + SgRateY = SegRateY + } + + if(SegRot == 0 || SegRot == 1) + { + SgRateX = 1 - SgRateX + SgRateY = 1 - SgRateY + } + + if(SegRot == 0 || SegRot == 2) + SgRateX = 1 - SgRateX + + float UVX0 = GlassMaskUV[0][UVIndex + 0] + float UVY0 = GlassMaskUV[0][UVIndex + 1] + + float realRateX = UVX0 + (SgRateX * 0.25) //percentualne na skutocnej (spolocnej) texture + float realRateY = UVY0 + (SgRateY * 0.5) + + float rateX = X / width + float rateY = Y / height + + int TargetPixel + + float ftx = realRateX * (float)twidth + float fty = realRateY * (float)theight + int tx = ftx + int ty = fty + + clamp tx<0, MaxX> + clamp ty<0, MaxY> + + int TextureIndex = ty * twidth + tx + + if(TextureIndex > MaxIndex) + TargetPixel = 0 + else + TargetPixel = TexturePtr[TextureIndex] >> 24 //nechame iba alfu + + if(TargetPixel != 0) //iba uplne nulova alfa je zasah mimo! + { + UnlockTexture(tex) + ShotSegmentX = SegmentX //len si poznamename ze je mozny zasah. O skutocnom zasahu sa rozhodne az ked bude dotrasovane. bude zavolany shoot() + ShotSegmentY = SegmentY + ShotLayer = n + return true + } + } + + UnlockTexture(tex) + + return false + } + +//------------------------------------------------------------------------- + int Shoot(ShotStorage shot) + { + if(shot.HurtType == HT_SHOT) + { + Force = shot.dir * 25 + BreakAction = 1 + AfterShoot(ShotSegmentX, ShotSegmentY, ShotLayer) + HandleGlassShape() + RegenerateGlassObject() + PlaySound(this, Sound, SF_ONCE) + return 1 + } + + if(shot.HurtType == HT_EXPLOSION) + { + int TargetH = NumHSegments - 0 + int TargetV = NumVSegments - 0 + float lng + float HalfGridSize = gridsize * 0.5 + vector direction + + vector mat[3] + GetMatrix4(this, mat) + + vector SegPos + int ShotDisabled + BreakAction = 2 + + for(int v = 0; v < TargetV; v++) + { + for(int h = 0; h < TargetH; h++) + { + if(IsFullType(GetTypeFor(h, v, 0))/* && rand(0, 2) == 1*/) + { + SegPos[0] = h * gridsize + HalfGridSize + SegPos[1] = 0 + SegPos[2] = v * gridsize + HalfGridSize + SegPos = VectorMatrixMultiply3(mat, SegPos) + SegPos = coords + SegPos + direction = SegPos - shot.from + lng = VectorNormalize(direction) + + float rate = lng / shot.radius + ShotDisabled = 1 + + if(rate < 0.3) + ShotDisabled = 0 //to co je blizko musi vypadnut + else + { + if(rate < 0.4) + ShotDisabled = rand(0, 2) + else + { + if(rate < 0.5) + ShotDisabled = rand(0, 3) + else + { + if(rate < 0.6) + ShotDisabled = rand(0, 4) //nahodne nieco nechame na dalsie odsrelovanie ;) + else + ShotDisabled = rand(0, 10) + } + } + } + + if(ShotDisabled == 0) + { + Force = direction * 50 + AfterShoot(h, v, 0) + } + // AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, SegPos + "-2 -2 -2", SegPos + "2 2 2") + // AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos, SegPos) + } + } + } + + HandleGlassShape() + RegenerateGlassObject() + PlaySound(this, Sound, SF_ONCE) + } + return 0 + } +/* +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + if(!rb) + return + + vector ImpNorm = c.GetNormalImpulse() + float ImpNormLng = VectorLength(ImpNorm) + ImpNormLng /= (float)mass + + vector vel = GetVelocity(other) + + if(rb) + { + ClearEventMask(this, EV_ONCONTACT) + RemoveBodyAndGeom() //zrusime + ChangeFullType() //mozeme zrusit fyziku + HandleGlassShape() + RegenerateGlassObject() + CreateTouchTrigger() + +// Force = ImpNorm * 25 +// BreakAction = 4 +// AfterShoot(ShotSegmentX, ShotSegmentY, ShotLayer) +// HandleGlassShape() +// RegenerateGlassObject() +// PlaySound(this, Sound, SF_ONCE) + } + } +*/ +//------------------------------------------------------------------------- + void OnParent(ExtClass parent) + { + if(MTrigger) + { + AddChild(this, MTrigger, 7) //boli sme naparenteni na nieco ine tak musime so sebou brat aj trigger ;-) + SetOrigin(MTrigger, ZeroVec) + SetAngles(MTrigger, ZeroVec) + } + } + +//------------------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//------------------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(skin <= 0) + skin = 1 + + //skin = 2 + + if(gridsize == 0) + gridsize = 8 + + if(width == 0) + width = 32 + + if(height == 0) + height = 32 + + NumHSegments = width / gridsize + NumVSegments = height / gridsize + NumAllSegments = NumHSegments * NumVSegments + + string ErrMsg + + if(NumHSegments > 16) + { + ErrMsg = "entity " + _name + " is to large!. please decrease width key!" + DPrint(ErrMsg) + return + } + + if(NumVSegments > 16) + { + ErrMsg = "entity " + _name + " is to large!. please decrease height key!" + DPrint(ErrMsg) + return + } + + if(NumAllSegments > 256) + { + ErrMsg = "entity " + _name + " is to large!. please decrease width or height key!" + DPrint(ErrMsg) + return + } + + for(int v = 0; v < NumVSegments; v++) + { + for(int h = 0; h < NumHSegments; h++) + { + SetTypeFor(h, v, 0, GL_FULL) //na zaciatku su vsetky skla cele + SetTypeFor(h, v, 1, GL_NONE) //dalsie vrstvy nepouzite + SetTypeFor(h, v, 2, GL_NONE) + SetTypeFor(h, v, 3, GL_NONE) + } + } + + RegenerateGlassObject() +// GenerateStartObject() + vector mins + vector maxs + GetBoundBox(this, mins, maxs) //mins[1] a maxs[1] su teraz nulove + +// flags |= 1 + + if(!flags & 1) + { + mins[1] = -1 //pre fyziku nastavime toto + maxs[1] = 1 + SetBoundBox(this, mins, maxs) + SetMass(1) + SetWeaponScale(1) + SetTransformEx(Vector(angle3, angle, angle2), coords) + CreateRigidBody(GEOMTYPE_BOX, "material/glass", _name) + } + else //je bez fyziky + { + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + ChangeFullType() + CreateTouchTrigger() //uz necakame na prvy zasah takze musi byt rozbitelne dotykom od zaciatku + } + + mins[1] = -0.04 //pre presne detekcie zasahov to zase znizime + maxs[1] = 0.04 + SetBoundBox(this, mins, maxs) + + DebrisObj[0] = GetObject("obj/physicsparts/glassdebris01.xob") + DebrisObj[1] = GetObject("obj/physicsparts/glassdebris02.xob") + DebrisObj[2] = GetObject("obj/physicsparts/glassdebris03.xob") + DebrisObj[3] = GetObject("obj/physicsparts/glassdebris04.xob") + DebrisObj[4] = GetObject("obj/physicsparts/glassdebris05.xob") + DebrisObj[5] = GetObject("obj/physicsparts/glassdebris06.xob") + DebrisObj[6] = GetObject("obj/physicsparts/glassdebris07.xob") + DebrisObj[7] = GetObject("obj/physicsparts/glassdebris08.xob") + DebrisObj[8] = GetObject("obj/physicsparts/glassdebris09.xob") + DebrisObj[9] = GetObject("obj/physicsparts/glassdebris10.xob") + + Sound = GetSoundEx("glass_break", 1, SF_3D|SF_GLOBAL) + } + +//------------------------------------------------------------------------- + void misc_physics_glass() + { + SetFlags(this, TFL_VISIBLE | TFL_SOLID | TFL_OBBCOLLISION | TFL_TRANSLUCENT) + SetEventMask(this, EV_INIT | EV_LOADED/* | EV_ONCONTACT*/) + SetPickable(false) + ClassType = ClassTypeMiscPhysicsGlass + } + +//------------------------------------------------------------------------- + void ~misc_physics_glass() + { + RemoveBodyAndGeom() + + SetObject(VNULL) + if(GlassObject) + { + ReleaseObject(GlassObject, 0) + } + + if(MTrigger) + delete MTrigger + + for(int n = 0; n < sizeof(DebrisObj); n++) + { + if(DebrisObj[n]) + ReleaseObject(DebrisObj[n], 0) + } + } +} + + diff --git a/Alpha Prime/Mod/scripts/class_particle.h b/Alpha Prime/Mod/scripts/class_particle.h new file mode 100644 index 0000000..342c741 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_particle.h @@ -0,0 +1,586 @@ +const float ZeroFloat = 0 + +class misc_particle_effector extends ExtClass +{ + vobject MainObject + vector coords + float speed + string model + int flags + float angle, angle2, angle3 + bool SwitchStatus + string EffectorNames[16] + float BRates[16] + float BRatesRND[16] + int NumEffectors + bool KillOnIdle + int OnceAction + float EffectTime + float CurrentTime + float LastTime + MinClass boneowner + int boneid + int LastPnum + bool AnyParticleEmitedFromStart + int AnimFlags + + void ParentOnBone(MinClass owner, int bone) + { + boneowner = owner + boneid = bone + + vector mat[4] + GetBoneMatrix(boneowner, boneid, mat); + SetOrigin(this, mat[3]) + } + + void SetAnglesFromVec(vector vec) + { + vector ang = Vector2Angles(vec) + ang[0] = FixAngle(ang[0] - 90) + SetAngles(this, ang) + } + + int ParticlesActive() + { + if(LastPnum == 0 && status != 1) //zatal nebol vyemitovany ani jeden tak nesmieme vratit false. to plati iba ked nebol hned na zaciatku zavolany switch(false) + return true + + int Pnum = GetEffectorParticleCount(this) + + if(Pnum > 0) + LastPnum = Pnum //musime vediet ze bol vyemitovany aspon jeden (vybuchy a pod) + + return Pnum + } + + void Restart() + { + ResetEffectorPosition(this) + SetEffectorParm(this, -1, EP_CURRENT_TIME, ZeroFloat) + LastTime = 0 + CurrentTime = 0 + AnyParticleEmitedFromStart = false + } + + void M_Restart(ExtClass other) + { + Restart() + } + + void Switch(bool stat) + { + SwitchStatus = stat + ClearEventMask(this, EV_FRAME | EV_VISIBLE) + + if(stat) + { + status = 0 + SetFlags(this, TFL_VISIBLE) + AnyParticleEmitedFromStart = false + + if(flags & 1) + SetEventMask(this, EV_FRAME) + else + SetEventMask(this, EV_VISIBLE) + + //Nevim, proc tu byl BumpFrame ale je to SPATNE. Effectory jsou poruznu zapinany timerama + //po celym levelu a je dost nezadouci, aby se i ty, ktere nejsou videt, updatovaly! + +// BumpFrame(this, ftime * speed, 0) + ResetEffectorPosition(this) //aby zresetoval staru poziciu na novu. inac by roztahoval partikly medzi poslednym emitovanym miestom + + for(int n = 0; n < NumEffectors; n++) + { + SetEffectorParm(this, n, EP_BIRTH_RATE, BRates[n]) + SetEffectorParm(this, n, EP_BIRTH_RATE_RND, BRatesRND[n]) + } + } + else + { + status = 1 + + if(ParticlesActive() == 0) //neni nic vyemitovane takze nepotrebujeme pustat OnFrame + { + ClearFlags(this, TFL_VISIBLE) + return + } + + SetEventMask(this, EV_FRAME) + SetEffectorParm(this, -1, EP_BIRTH_RATE, ZeroFloat) + SetEffectorParm(this, -1, EP_BIRTH_RATE_RND, ZeroFloat) + } + } + + void Destroy() //efekt dobehne a samo sa to zmaze + { + KillOnIdle = true + Switch(false) + } + + void SetSpeed(float Speed) + { + speed = Speed + } + + void M_Show(ExtClass other) + { + Switch(true) + } + + void M_Hide(ExtClass other) + { + Switch(false) + } + + void M_SetAngles(ExtClass other) + { + string Parms[8] + int NumParms = ParseString(other._value, Parms) + + if(NumParms != 5) + { + Print(String("wrong num of parameters " + _name + ".Say")) + return + } + + vector angs + angs[0] = atof(Parms[0]) + angs[1] = atof(Parms[2]) + angs[2] = atof(Parms[4]) + + SetAngles(this, angs) + } + + void EndLoop() + { + if(OnceAction == 1) + Switch(false) + + if(OnceAction == 2) + Destroy() + } + + void Update() + { + if(boneowner != NULL) + { + vector mat[4] + GetBoneMatrix(boneowner, boneid, mat); + SetOrigin(this, mat[3]) + SetAnglesFromVec(mat[1]) + } + + if(status == 1) //bol zavolany Switch(false) tak pockame nez vyemitovane partikly zmiznu az potom to vypneme + { + if(ParticlesActive() == false) + { + if(KillOnIdle) + delete this + + ClearFlags(this, TFL_VISIBLE) + ClearEventMask(this, EV_FRAME | EV_VISIBLE) + status = 0 + return + } + } + else + { + if(OnceAction) + { + bool AnyParticleEmitedNow = ParticlesActive() + + if(AnyParticleEmitedNow) + AnyParticleEmitedFromStart = true + + if(AnyParticleEmitedFromStart) + { + GetEffectorParm(this, 0, EP_CURRENT_TIME, CurrentTime) + + if(CurrentTime < LastTime || CurrentTime > EffectTime || AnyParticleEmitedNow == false) + { + LastTime = 0 + CurrentTime = 0 + EndLoop() + } + } + } + } + + LastTime = CurrentTime + + BumpFrame(this, ftime, AnimFlags) + } + + int EOnVisible(MinClass other, int extra) + { + Update() + return 0 + } + + void EOnFrame(MinClass other, int extra) + { + Update() + } + + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + + void Init() + { + if(MainObject) + return + + int n + + if(model == "") + model = "particle/torch.ptc" + + if(!boneowner) + { + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + } + + UpdateEntity(this) + + speed = 1 + MainObject = GetObject(model) + SelectObject(this, MainObject) + SetEventMask(this, EV_LOADED) + + if(flags & 2) + OnceAction = 1 + + if(SwitchStatus == false) + return + + SetFlags(this, TFL_VISIBLE) + + if(flags & 1) + { + SetEventMask(this, EV_FRAME) + } + else + SetEventMask(this, EV_VISIBLE) + + NumEffectors = GetEmitors(this, EffectorNames, sizeof(EffectorNames)) + float tmp + + for(n = 0; n < NumEffectors; n++) + { + GetEffectorParm(this, n, EP_BIRTH_RATE, tmp) + BRates[n] = tmp + + GetEffectorParm(this, n, EP_BIRTH_RATE_RND, tmp) + BRatesRND[n] = tmp + } + + GetEffectorParm(this, 0, EP_EFFECT_TIME, EffectTime) + + } + + void EOnInit(MinClass other, int extra) + { + Init() + } + + void SetParms(string Model, vector Coords, bool AlwaysUpdate, int OnceAct) //pokial neni vlozena v mape pouzit toto + { +// AlwaysUpdate = true //FIXME!!! + + model = Model + coords = Coords + OnceAction = OnceAct + + if(AlwaysUpdate) + { + if(!flags & 1) + flags = flags | 1 + } + + Init() + } + + void SetParmsEx(vobject obj, vector Coords, bool AlwaysUpdate, int OnceAct) //pokial neni vlozena v mape pouzit toto + { + OnceAction = OnceAct + + if(!boneowner) + { + SetOrigin(this, Coords) + UpdateEntity(this) + SetAngles(this, Vector(angle3, angle, angle2)) + } + + speed = 1 + SelectObject(this, obj) + + if(flags & 2) + OnceAction = 1 + + SetFlags(this, TFL_VISIBLE) + + if(AlwaysUpdate) + { + flags = flags | 1 + SetEventMask(this, EV_FRAME) + } + else + SetEventMask(this, EV_VISIBLE) + + NumEffectors = GetEmitors(this, EffectorNames, sizeof(EffectorNames)) + float tmp + + for(int n = 0; n < NumEffectors; n++) + { + GetEffectorParm(this, n, EP_BIRTH_RATE, tmp) + BRates[n] = tmp + + GetEffectorParm(this, n, EP_BIRTH_RATE_RND, tmp) + BRatesRND[n] = tmp + } + + GetEffectorParm(this, 0, EP_EFFECT_TIME, EffectTime) + } + + void misc_particle_effector() + { + SwitchStatus = true + } + + void ~misc_particle_effector() + { + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + + + + + + + + +//================================================================================================== +// klasicka corona +//================================================================================================== +class misc_effect_glow extends ExtClass +{ + vector coords + string model + float offset + float maxalpha + float minalpha + float fadedist + float fadeangle + + vobject MainObject + ExtClass effect + float distscale + float AlpRange + float OnOffScale + float OnOffTargetScale + int flags + +//--------------------------------------------------------------------------------------------------- + void Switch(bool stat) + { + if(stat) + { + SetFlags(effect, TFL_VISIBLE) + SetFlags(this, TFL_VISIBLE) + } + else + { + ClearFlags(effect, TFL_VISIBLE) + ClearFlags(this, TFL_VISIBLE) + } + } + +//--------------------------------------------------------------------------------------------------- + void Show(bool stat) + { + Switch(stat) + } + +//--------------------------------------------------------------------------------------------------- +OcclusionQuery query + +//--------------------------------------------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + if(r_recursion != 0) + return 1 + + SetEventMask(this, EV_NOTVISIBLE) + vector CamPos = World.CameraPos + vector CoordsPos = GetMatrix(this, 3) + vector Dir = CoordsPos - CamPos + float dist = VectorNormalize(Dir) + float dot = World.CameraNorm * Dir + + if(dist > fadedist) + distscale = 1 + else + distscale = dist / fadedist + + if(dot < 0.6) + return 0 + + vector off = Dir * offset + vector end = CoordsPos - off + OnOffTargetScale = 1 + + + if(flags & 1) + { + if(!query) + query = CreateOcclusionQuery(end, 1) + else + query.SetPosition(end) + + if(query.GetResult() <= 0) + OnOffTargetScale = 0 + } + + if(OnOffScale > OnOffTargetScale) + { + OnOffScale = ftime * -4 + OnOffScale + + if(OnOffScale < OnOffTargetScale) + OnOffScale = OnOffTargetScale + } + else + { + if(OnOffScale < OnOffTargetScale) + { + OnOffScale = ftime * 4 + OnOffScale + + if(OnOffScale > OnOffTargetScale) + OnOffScale = OnOffTargetScale + } + } + + float CurAngle = 1 - dot * 180 //uhol + float AngleScale = 0 + + if(CurAngle <= fadeangle) + AngleScale = 1 - (CurAngle / fadeangle) + + float AngleAlpha = AngleScale * AlpRange //alfa z toho aky mame odklon pohladu + float DistAlpha = distscale * AlpRange + float OnOffAlpha = OnOffScale * AlpRange + float FinalAlpha = AngleAlpha * DistAlpha * OnOffAlpha + FinalAlpha += minalpha + + effect.TFactor[3] = FinalAlpha + float fa = FinalAlpha * 255 + effect.Color = fa << 24 | 0xffffff + + SetOrigin(effect, CoordsPos - off) + return 0 + } + +//--------------------------------------------------------------------------------------------------- + void EOnNotVisible(class other, int extra) + { + if(r_recursion != 0) + return + + if(query) + { + query.Destroy() + query = NULL + } + + OnOffScale = 0 + effect.TFactor[3] = 0 + effect.Color = 0 + ClearEventMask(this, EV_NOTVISIBLE) + } + +//--------------------------------------------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//--------------------------------------------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(!model) + model = "spr/effects/glow/corona4.spr" + + if(maxalpha == 0) //scale na alfu + maxalpha = 1 + + if(maxalpha > 1) + maxalpha = 1 + + if(minalpha > maxalpha) + minalpha = maxalpha + + AlpRange = maxalpha - minalpha //v tomto rozsahu pracujeme s alfou + + if(fadedist == 0) + fadedist = 128 + + if(fadeangle == 0) + fadeangle = 70 + + if(fadeangle > 180) + fadeangle = 180 + + effect = new MinClass() + MainObject = GetObject(model) + SelectObject(effect, MainObject) + SetOrigin(this, coords) + Show(true) + SetFlags(effect, TFL_PARTICLE) + effect.TFactor[0] = 1 + effect.TFactor[1] = 1 + effect.TFactor[2] = 1 + effect.TFactor[3] = 0 + + if(extra == 1) + ClearEventMask(this, EV_INIT) //neni to entita z mapy takze nesmeieme dovolit aby sa to zavolalo este raz + else + SetEventMask(this, EV_LOADED) + + SetBoundBox(this, "-64 -64 -64", "64 64 64") + } + +//--------------------------------------------------------------------------------------------------- + void SetParms(vector Coords, float Offset, string Sprite) + { + coords = Coords + "0 0 1" + offset = Offset + model = Sprite + Throw(this, this, EV_INIT, 1) + } + +//--------------------------------------------------------------------------------------------------- + void misc_effect_glow() + { + SetEventMask(this, EV_VISIBLE) + } + +//--------------------------------------------------------------------------------------------------- + void ~misc_effect_glow() + { + if(query) + { + query.Destroy() + } + + if(MainObject) + ReleaseObject(MainObject, 0) + + if(effect) + delete effect + } +} diff --git a/Alpha Prime/Mod/scripts/class_shot.h b/Alpha Prime/Mod/scripts/class_shot.h new file mode 100644 index 0000000..e63a0a1 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_shot.h @@ -0,0 +1,353 @@ +//================================================================================= +class DefaultShell extends RigidBodyClass +{ +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + PlaySound(this, g_sCommonSounds[2], SF_ONCE) + ClearEventMask(this, EV_CONTACT) + } + +//----------------------------------------------------------------- + void DefaultShell(vobject obj, vector mat[]) + { + ClassType = -1 + SetFlags(this, TFL_VISIBLE|TFL_FULLMATRIX) + ClearFlags(this, TFL_TOUCHTRIGGERS) + + ClearEventMask(this, EV_ALL) + SetPickable(false) + SelectObject(this, obj) + SetMatrix(this, mat) + + } + +//----------------------------------------------------------------- + void ~DefaultShell() + { + RemoveBodyAndGeom() + } +} + + +//================================================================================= +class PhysXShell extends MinClass +{ +//----------------------------------------------------------------- + void ~PhysXShell() + { + NxActorDestroy(this) + } +//----------------------------------------------------------------- +void PhysXShell(vobject obj, vector mat[]) + { + ClassType = -1 + SetFlags(this, TFL_VISIBLE|TFL_FULLMATRIX) + + SelectObject(this, obj) + + SetObject(obj) + SetMatrix(this, mat) + +// NxActorCreate(this, ZeroVec, BC_CAPSULE_Z, true, 1, 0, 0) + NxActorCreate(this, ZeroVec, BC_MODEL, true, 1, 0, 0) + NxActorSetCollisionGroup(this, 1) + + } +} + +//================================================================================= +void WorldClass::ThrowShell(MinClass pivot, MinClass owner, int type, float speed, bool sound) +{ + vector mat[4] + GetMatrix4(pivot, mat) + float distq + + if(owner.ClassNum != ClassNumPlayer) + { + vector org = mat[3] + distq = VectorLengthSq(org - CameraPos) + if(distq > 124 * 124) + return + + // TODO: pokud neni videt, mohlo by se aspon poustet cinkani nabojnic, aby to nebylo podezrele :) + if(!IsBoxVisible(org, org, true)) + return + } + + type-- + + vector vel = pivot.VectorToParent("0.612372 -0.353553 0.707107") + float rnd = frand(1.5, 2.5) * -speed + vel = vel * rnd + vel = GetVelocity(owner) * 0.8 + vel + + int top = ShellTop[type] + DefaultShell shell = Shells[type][top] + + if(shell == NULL) + { + vobject obj = ShellObjects[type] + + { + shell = new DefaultShell(obj, mat) + + if(!dBodyCreate(shell, ZeroVec, BC_MODEL)) + { + delete shell + return + } + shell.rb = true + dBodySetMass(shell, ZeroVec, 50) + dBodyInteractionLayer(shell, ET_SHELL) + dBodyActive(shell, true, true) + } + + Shells[type][top] = shell + } + else + { + SetMatrix(shell, mat) + } + + if(sound && distq > 64 * 64) + SetEventMask(shell, EV_CONTACT) + else + ClearEventMask(shell, EV_CONTACT) + + SetVelocity(shell, vel) + + ShellTop[type] = top + 1 % ShellBufferSize +} + + +//--------------------------------------------------------------------------------- +void ReleaseRicParticles() +{ + for(int n = 0; n < sizeof(RicParticles); n++) + { + if(RicParticles[n]) + { + ReleaseObject(RicParticles[n], 0) + RicParticles[n] = VNULL + } + } +} + +//--------------------------------------------------------------------------------- +hsound GetRicSound(int Mat, int RSndType) +{ + if(Mat >= MATERIAL_LAST) + { + Print(String("GetRicSound out of material table " + itoa(Mat))) + Mat = 0 + } + if(RSndType >= SE_COUNT) + { + Print(String("GetRicSound out of sound table " + itoa(RSndType))) + RSndType = 0 + } + if(RicSounds[RSndType][Mat]) + return RicSounds[RSndType][Mat] + + return RicSounds[RSndType][0] //default +} + +//--------------------------------------------------------------------------------- +hshader GetDecalShader(int Mat, int RDecalType) +{ + if(Mat >= MATERIAL_LAST) + { + DPrint(String("GetDecalShader out of material table " + itoa(Mat))) + Mat = 0 + } + + if(RDecalType >= DE_COUNT) + { + DPrint(String("GetDecalShader out of decal table " + itoa(RDecalType))) + RDecalType = 0 + } + + if(DecalShaders[RDecalType][Mat]) + return DecalShaders[RDecalType][Mat] + + return DecalShaders[RDecalType][0] //default +} + +//--------------------------------------------------------------------------------- +vobject GetParticleObject(int Mat, int RPartType) +{ + if(Mat >= MATERIAL_LAST) + { + Print(String("GetParticleObject out of material table " + itoa(Mat))) + Mat = 0 + } + if(RPartType >= PE_COUNT) + { + Print(String("GetParticleObject out of particle table " + itoa(RPartType))) + RPartType = 0 + } + vobject vobj = RicParticles[RPartType][Mat] + + if(!vobj) + vobj = RicParticles[RPartType][0] + + return vobj +} + +//--------------------------------------------------------------------------------- +void ShotEffects(ShotStorage stor, MinClass target, vector pos, vector norm, int sparm) +{ + //TODO: az budou ric soundy, tak se musi vytvorit temporalni entita, ktera jen prehraje zvuk a pak + // se smaze + + if(stor.shooter != World.Player && stor.MarkSize > 0) + { + if(target != World.Player && !IsBoxVisible(pos, pos, false)) + return + } + + float lifetime + + //ragdolly a spol. jsou narocny jako prase, tak to omezime + if(IsInherited(target, CCreatureClass)) + lifetime = 20.0 + else + lifetime = 45.0 + + if(InCutscene) + lifetime = 300.0 + + int RichMat = Surf2Mat(sparm) //material zo sounds/materials.h + int LogMat = GetLogicalMaterial(RichMat) //jeden z 11 default materialov + + bool dogore = true + +#ifdef GERMAN +//nebudem prznit mrtvoly + if(target.ClassType == ClassTypeCreature || IsInherited(target, CRBone)) + { + if(target.status >= STATE_DIE) + dogore = true + } +#endif + + //add bloody spurts + if(LogMat == MATERIAL_FLESH) + { + + + if(IsInherited(target, CAICreatureClass)) + { + CreatureClass ctarget = target + ctarget.AddBleedSource(stor) + ctarget.AddSSource(stor) + } + + + for(int n = 0; n < 2; n++) + { + vector v = Vector(norm[0] + frand(-0.3, 0.3), norm[1] + frand(-0.3, 0.3), -1) + VectorNormalize(v) + + MinClass other + vector to = v * 65.3 + pos + float plane[4] + + if(TraceLineEx(DEFAULT, pos, to, ZeroVec, ZeroVec, other, plane, NULL, NULL, TRACE_WORLD, NULL) < 1) + { +//AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos, to) + + CreateDecal(other, to, Vector(plane[0], plane[1], plane[2]) * -8, 1.0, 0, 32, BloodDecalShaders[rand(0,4)], lifetime, 61.0) + } + } + } + + + if(stor.StreakLength > 0 && stor.StreakShader != 0) + ShotStreak str = new ShotStreak(stor.VisualsFrom, stor.to, stor.StreakWidth, stor.StreakLength, stor.StreakSpeed, stor.StreakShader) + + misc_particle_effector eff = NULL + + //player nema particly, aby nestrikaly prez celou obrazovku + //a ani decaly, protoze nemaji smysl. + if(stor.power == -1 || target != World.Player) + { + vobject ParticlesObj = GetParticleObject(LogMat, stor.RicParticlesType) + + if(ParticlesObj && dogore) + { + eff = new misc_particle_effector + eff.SetParmsEx(ParticlesObj, pos, true, 2) + } + + if(stor.MarkSize != -1) + { + float nearplane + vector project + + if(target.ClassType == ClassTypeCreature || IsInherited(target, CRBone)) + { +#ifdef GERMAN + if(!dogore) + goto nogore +#endif + nearplane = 6.0 + project = stor.dir + VectorNormalize(project) + } + else + { + if(target == World) + nearplane = 1.0 + else + nearplane = 4.0 + + project = -norm + } + + CreateDecal(target, stor.to, project * 8.0, nearplane, 0, stor.MarkSize, GetDecalShader(LogMat, stor.RicDecalType), lifetime, 0) + } +nogore:; + + if(eff != NULL) + { + vector BounceVec = stor.dir //spravime si "odrazeny" vector + float backoff = norm * BounceVec + backoff *= 2 //2 = odraz presne podla uhla dopadu + vector change = norm * backoff + BounceVec -= change + + vector mat[4] + vector vec1 + vector vec2 + vec1[0] = BounceVec[1] //spravime si kolmy vektor + vec1[1] = BounceVec[2] + vec1[2] = BounceVec[0] + vec2 = BounceVec * vec1 + vec1 = vec2 * BounceVec + VectorNormalize(vec1) + VectorNormalize(vec2) + + mat[0] = vec1 + mat[1] = vec2 + mat[2] = BounceVec + mat[3] = pos + SetFlags(eff, TFL_FULLMATRIX) + SetMatrix(eff, mat) + UpdateEntity(eff) + } + } + + if(stor.RicSndType != -1) + { + hsound hSnd = GetRicSound(LogMat, stor.RicSndType) + + if(hSnd) + PlaySound(eff, hSnd, SF_ONCE) + } +} + + + + diff --git a/Alpha Prime/Mod/scripts/class_trigger.h b/Alpha Prime/Mod/scripts/class_trigger.h new file mode 100644 index 0000000..055f2f6 --- /dev/null +++ b/Alpha Prime/Mod/scripts/class_trigger.h @@ -0,0 +1,960 @@ +const int TRIGTYPE_BOX = 0 +const int TRIGTYPE_CYLINDER = 1 + +//================================================================================= +class TriggerClass extends ExtClass +{ + vector coords + vector mins, maxs + float angle, angle2, angle3 + string model + int flags + int type //0 box, 1 cylinder + bool IsCreated + + bool IsDynamic + string OnEnter, OnLeave + string actors + string Actors[16] + int ActorsNum + +#ifdef EDITOR + void EditorOpened() + { + if(!IsCreated) // + { + CreateTrigger(this) + IsCreated = true + } + UpdateEntity(this) + } + + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + SetOrigin(this, Pos) + SetAngles(this, Angs) + UpdateMainVisualizer() + UpdateEntity(this) + } +#endif + +//----------------------------------------------------------------- + void Enter(ExtClass other, int numinsiders) + { + } + + void Leave(ExtClass other, int numinsiders) + { + } + + void IsInside(MinClass other, int extra) + { + } + + void M_Enable(ExtClass other) + { + if(!IsCreated) + { + CreateTrigger(this) + IsCreated = true + } + + SetEventMask(this, EV_TOUCH) + } + + void M_Disable(ExtClass other) + { + if(IsCreated) + { + DestroyTrigger(this) + IsCreated = 0 + } + ClearEventMask(this, EV_TOUCH) + } + +//----------------------------------------------------------------- + void EOnExtra(MinClass other, int extra) + { + Leave(other, extra) + CallMethods(this, OnLeave) + } + +//----------------------------------------------------------------- + bool IsCorrectActor(ExtClass other) + { + if(IsInherited(other, CExtClass)) + { + if(ActorsNum == 0) //FIXME este inak to bude chciet ale zatial staci + { + if(other.ClassType == ClassTypeCreature && other.ClassNum == ClassNumPlayer) + return true + } + + for(int n = 0; n < ActorsNum; n ++) + { + if(other._name == Actors[n]) + return true + + if(Actors[n] == "enemies" && other.ClassType == ClassTypeCreature && other.ClassNum != ClassNumPlayer) + return true + } + } + + return false + } + +//----------------------------------------------------------------- + void EOnTouch(MinClass other, int extra) + { + if(!IsCorrectActor(other)) + return + + vector OrgThis, OrgOther + float rad + float lng + + if(type == TRIGTYPE_CYLINDER) + { + vector omins, omaxs + vector sizes + GetBoundBox(other, omins, omaxs) + sizes = omaxs - omins + sizes = sizes * 0.5 + float OtherRadius = sizes[0] + sizes[1] + OtherRadius *= 0.5 //ako radius pouzijeme priemer z XY suradnic boxu + + rad = maxs[0] + OrgThis = GetCenterOfEntity(this) + OrgOther = GetCenterOfEntity(other) + lng = VectorLength(OrgThis - OrgOther) + lng -= OtherRadius + } + + if(type == TRIGTYPE_BOX || lng < rad) + { + if(AddTriggerInsider(this, other) == true) + { + Enter(other, extra) + +#ifdef EDITOR + if(World.EditorActive == false) + { +#endif + if(flags & 1) + M_Disable(this) + +#ifdef EDITOR + } +#endif + + CallMethods(this, OnEnter) + } + else + IsInside(other, extra) + } + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + ClassType = ClassTypeTrigger + SetEventMask(this, EV_EXTRA) + IsDynamic = 1 - IsBrushEntity(this) + + if(IsDynamic) + { + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)/*Angles(angle)*/) + + if(angle != 0 || angle2 != 0 || angle3 != 0) + SetFlags(this, TFL_OBBCOLLISION) + + if(mins == ZeroVec) + mins = "-16 -16 -16" + + if(maxs == ZeroVec) + maxs = "16 16 16" + + CreateModel(this, mins, maxs) + } + else + SelectObject(this, GetObject(model)) + + if(actors) + { + string Parms[32] + int NumParms = ParseString(actors, Parms) + + for(int n = 0; n < NumParms; n += 2) + Actors[ActorsNum++] = Parms[n] + } + + if(flags & 2) + return + else + SetEventMask(this, EV_TOUCH) + +/* if(type == 1) + AddDCylinder(0x44ffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, coords, maxs[0], maxs[2] * 2) + else + AddDShape(SHAPE_BBOX, 0x44ffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, coords + mins, coords + maxs)*/ + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + if(!flags & 2) + { + if(!IsCreated) + { + CreateTrigger(this) + IsCreated = true + } + } + +#ifdef EDITOR + if(World.EditorActive == true) + { + if(!IsCreated) + { + CreateTrigger(this) + IsCreated = true + } + } +#endif + + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void TriggerClass() + { + SetEventMask(this, EV_INIT|EV_LOADED) + } + +//----------------------------------------------------------------- + void ~TriggerClass() + { + if(IsCreated) + { + ClearEventMask(this, EV_EXTRA) + DestroyTrigger(this) + } + + if(IsDynamic) + RemoveModel(this) + } +} + +//================================================================================= +class trigger_universal extends TriggerClass +{ +} + +class trigger_hurt extends TriggerClass +{ + float hurtdelay + int damage + CreatureClass Insiders[16] + float HurtTimers[16] + int NumInsiders + ShotStorage HurtInfo + +//----------------------------------------------------------------- + void Enter(ExtClass other, int numinsiders) + { + if(IsInherited(other, CCreatureClass) == false) + return + + if(NumInsiders >= sizeof(Insiders)) + return + + Insiders[NumInsiders] = other + HurtTimers[NumInsiders++] = 0 + CreatureClass cc = other + cc.Shoot(HurtInfo) + + SetEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void Leave(ExtClass other, int numinsiders) + { + int index = -1 + int n + + for(n = 0; n < NumInsiders; n++) + { + if(Insiders[n] == other) + { + index = n + break + } + } + + if(index == -1) + return + + Insiders[index] = NULL + HurtTimers[n] = 0 + NumInsiders-- + + for(n = index; n < NumInsiders; n++) + { + Insiders[n] = Insiders[n + 1] + HurtTimers[n] = HurtTimers[n + 1] + } + + if(NumInsiders <= 0) + ClearEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + CreatureClass cc + + for(int n = 0; n < NumInsiders; n++) + { + cc = Insiders[n] + + if(cc) + { + HurtTimers[n] = HurtTimers[n] + (ftime * 100) + + if(HurtTimers[n] >= hurtdelay) + { + HurtTimers[n] = 0 + cc.Shoot(HurtInfo) + } + } + } + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(hurtdelay == 0) + hurtdelay = 100 + + if(damage == 0) + damage = 100 + + HurtInfo = new ShotStorage //mozno dat do classu + HurtInfo.HurtType = HT_HURT_TRIGGER + HurtInfo.damage = damage + HurtInfo.shooter = this + } +} + + + + +//================================================================================= +class trigger_item_detector extends TriggerClass +{ + RigidBodyClass item + string itemangles + +//----------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(GetEventMask(this) & EV_TOUCH) + return ACT_BLOCKED + + return ACT_DISABLE + } + +//----------------------------------------------------------------- + bool IsCorrectActor(MinClass other) + { + if(IsInherited(other, CItemMisc) == false) + return false + + if(other.ClassNum != UseClass) + return false + + return true + } + +//----------------------------------------------------------------- + void M_Clear(ExtClass other) + { + if(item) + { + delete item + item = NULL + } + SetEventMask(this, EV_TOUCH) + } + +//----------------------------------------------------------------- + void Enter(ExtClass other, int numinsiders) + { + ExtClass pla = World.Player + pla.Activate(1, this) + ClearEventMask(this, EV_TOUCH) + item = other + item.RemoveBodyAndGeom() + item.SetPickable(false) + ClearFlags(item, TFL_FULLMATRIX) + AddChild(this, item, 7) + SetOrigin(item, ZeroVec) + SetAngles(item, atov(itemangles)) + CallMethods(this, OnSuccess) + } + + void trigger_item_detector() + { + SetFlags(this, TFL_SOLID | TFL_OBBCOLLISION) //player ho musi detekovat trasovanim + } +} + + + +//================================================================================= +class trigger_hack_detector extends TriggerClass +{ + string hackentities + string HackNames[8] + int HackNamesNum + trigger_hack_detector NextSiblingTrigger + ExtClass HackEntities[8] + int HackEntitiesNum + +//----------------------------------------------------------------- + void UpdateEntitiesList() + { + HackEntitiesNum = 0 + ExtClass ent + + for(int n = 0; n < HackNamesNum; n++) //musime zakazdym prehladat pretoze niektore entity ako napriklad mina sa mazu takze nemusia existovat + { + ent = FindClass(HackNames[n]) + + if(ent && ent.HackInterf/* && ent.HackInterf.CanHacking()*/) + HackEntities[HackEntitiesNum++] = ent + } + } + +//----------------------------------------------------------------- + int GetHackAdepts(ExtClass adepts[]) //vola player ked sa rozhodne pre tento trigger + { + UpdateEntitiesList() + + for(int n = 0; n < HackEntitiesNum; n++) + adepts[n] = HackEntities[n] + + return HackEntitiesNum + } + +//----------------------------------------------------------------- + bool ContainHackableEntities() + { + ExtClass ent + for(int n = 0; n < HackEntitiesNum; n++) + { + ent = HackEntities[n] + + if(ent.HackInterf && ent.HackInterf.CanHacking()) + return true + } + return false + } + +//get nearest corner of AABB +//----------------------------------------------------------------- + vector GetNearestPosition(vector pos) + { + vector res + + if(pos[0] <= mins[0]) + res[0] = mins[0] + else + { + if(pos[0] >= maxs[0]) + res[0] = maxs[0] + else + res[0] = pos[0] + } + + if(pos[1] <= mins[1]) + res[1] = mins[1] + else + { + if(pos[1] >= maxs[1]) + res[1] = maxs[1] + else + res[1] = pos[1] + } + + if(pos[2] <= mins[2]) + res[2] = mins[2] + else + { + if(pos[2] >= maxs[2]) + res[2] = maxs[2] + else + res[2] = pos[2] + } + + return res + } + +//----------------------------------------------------------------- + bool IsCorrectActor(MinClass other) + { + if(other == World.Player) + return true + + return false + } +/* +//----------------------------------------------------------------- + void Enter(ExtClass other, int numinsiders) + { + UpdateEntitiesList() +// CallMethods(this, OnSuccess) + } + +//----------------------------------------------------------------- + void Leave(ExtClass other, int numinsiders) + { + CreatureClass pla = World.Player + pla.SetHackAdepts(NULL, 0) +// CallMethods(this, OnSuccess) + } +*/ +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + if(hackentities) + { + string Parms[16] + int NumParms = ParseString(hackentities, Parms) + + for(int n = 0; n < NumParms; n += 2) + HackNames[HackNamesNum++] = Parms[n] + } + UpdateEntitiesList() + } + + void trigger_hack_detector() + { + SetEventMask(this, EV_LOADED) + } +} + + + +//================================================================================= +class trigger_motion extends ExtClass +{ + ExtClass Entity + vector tmins, tmaxs + int CleaningFrame //pouzivaju to dvojkridlove dvere + +//----------------------------------------------------------------- + void EOnTouch(MinClass other, int extra) + { + if(!GetFlags(other) & TFL_TOUCHTRIGGERS) + return +// if(!other.IsRigidBody()) +// return + + if( AddTriggerInsider(this, other) == true) + { + //zavolame virtualni fci. Kazda materska entita si ji osetri po svem + Entity.Activate(1, other) + } + } + +//----------------------------------------------------------------- + void trigger_motion(ExtClass ent, vector mins, vector maxs) + { + tmins = mins + tmaxs = maxs + + CreateModel(this, tmins, tmaxs) + CallMethods(this, OnLoad) + + ClassType = ClassTypeTrigger + CreateTrigger(this) + + SetEventMask(this, EV_EXTRA) + + SetEventMask(this, EV_TOUCH) + + Entity = ent + } + +//----------------------------------------------------------------- + void ~trigger_motion() + { + DestroyTrigger(this) + RemoveModel(this) + } +} + + + +//================================================================================= +class trigger_teleport extends ExtClass +{ + string model + string OnEnter, OnLeave + int flags + vector Pos + float angle + float dist + trigger_teleport trig2 + + vector GetTracedPos(MinClass Ent) + { + MinClass entity = NULL + int in1, in2 + float pla[4] + vector start = GetCenterOfEntity(Ent) + "0 0 50" + vector end = start + "0 0 -250" + vector vec = start - end + VectorNormalize(vec) + end = end + vec + int efl, pfl + + pfl = ClearFlags(World.Player, TFL_SOLID) + efl = ClearFlags(Ent, TFL_SOLID) + + TraceLine(World.Player, start, end, entity, pla, in1, in2) + + SetFlags(World.Player, pfl) + SetFlags(Ent, efl) + return end + } + + void Wait() + { + ActionNum = 1 + Sleep(10) + ActionNum = 0 + } +//----------------------------------------------------------------- + void Enter(ExtClass other, int numinsiders) + { + if(other.ClassNum != ClassNumPlayer) + return + + if(trig2) + { + if(trig2.ActionNum > 0) + return + + thread Wait() + vector vec = Angles2Vector(Angles(trig2.angle)) + vec = vec * dist + vec = Pos + vec + SetOrigin(World.Player, vec) + CreatureClass cc = World.Player + cc.ChangeYaw(trig2.angle) + SetVelocity(World.Player, ZeroVec) + UpdateEntity(World.Player) + } + } + + void Leave(ExtClass other, int numinsiders) + { + } + + void IsInside(MinClass other, int extra) + { + } + + void M_Enable(ExtClass other) + { + SetEventMask(this, EV_TOUCH) + } + + void M_Disable(ExtClass other) + { + ClearEventMask(this, EV_TOUCH) + } + +//----------------------------------------------------------------- + void EOnExtra(MinClass other, int extra) + { + CallMethods(this, OnLeave) + Leave(other, extra) + trig2 = FindClass(link) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + trig2 = FindClass(link) + + if(trig2) + { + Pos = GetTracedPos(trig2)//GetCenterOfEntity(trig2) + Throw(trig2, this, EV_EXTRA, 0) //nutne koli editoru + } + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + ClassType = ClassTypeTrigger + + SetEventMask(this, EV_EXTRA) + SetEventMask(this, EV_TOUCH) + + SelectObject(this, GetObject(model)) + SetEventMask(this, EV_LOADED) + } +//----------------------------------------------------------------- + void EOnTouch(MinClass other, int extra) + { + if(flags & 1) + { + if(other.ClassType != ClassTypeCreature) + return + if(other.ClassNum != ClassNumPlayer) + return + } + + if( AddTriggerInsider(this,other) == true) + { + CallMethods(this, OnEnter) + Enter(other, extra) + } + else + IsInside(other, extra) + } + +//----------------------------------------------------------------- + void trigger_teleport() + { + CreateTrigger(this) + } + +//----------------------------------------------------------------- + void ~trigger_teleport() + { + DestroyTrigger(this) + } +} + + + + + +//================================================================================= +class trigger_motion2 extends ExtClass +{ + ExtClass Owner + vector tmins, tmaxs + +//----------------------------------------------------------------- + void EOnTouch(MinClass other, int extra) + { + if(!IsInherited(other, CRigidBodyClass) && !IsInherited(other, CCreatureClass)) + return + + Owner.Activate(1, other) + } + +//----------------------------------------------------------------- + void trigger_motion2(ExtClass owner, vector mins, vector maxs) + { + Owner = owner + tmins = mins + tmaxs = maxs + + ClassType = ClassTypeTrigger + SetEventMask(this, EV_TOUCH | EV_EXTRA) + CreateModel(this, tmins, tmaxs) + CreateTrigger(this) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void ~trigger_motion2() + { + DestroyTrigger(this) + RemoveModel(this) + } +} + +//----------------------------------------------------------------- +class trigger_look extends ExtClass +{ + int flags + float lookangle + float lookdist + vector coords + string OnLook + bool enabled + +//----------------------------------------------------------------- + void M_Enable(ExtClass other) + { + enabled = true + } + +//----------------------------------------------------------------- + void M_Disable(ExtClass other) + { + enabled = false + } + +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + vector dir = GetMatrix(this, 3) - World.CameraPos + float dist = VectorNormalize(dir) + float dot = World.CameraNorm * dir + clamp dot<-1, 1> + float ang = acos(dot) * RAD2DEG + + if(ang < lookangle) //vidime ho + { + if(lookdist && dist > lookdist) + return 0 + + if(!enabled) + return 0 + + ClearEventMask(this, EV_VISIBLE) + + if(!flags & 1) //once + SetEventMask(this, EV_NOTVISIBLE) + + CallMethods(this, OnLook) + } + return 0 + } + +//----------------------------------------------------------------- + void EOnNotVisible(MinClass other, int extra) + { + ClearEventMask(this, EV_NOTVISIBLE) + SetEventMask(this, EV_VISIBLE) + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + int EOnInit(MinClass other, int extra) + { + if(lookangle == 0) + lookangle = 30 + + SetOrigin(this, coords) + } + +//----------------------------------------------------------------- + void trigger_look() + { + SetFlags(this, TFL_VISIBLE) + SetEventMask(this, EV_VISIBLE) + } +} + + +//================================================================= +class trigger_push extends TriggerClass +{ + int NumInsiders + float power + +//----------------------------------------------------------------- + void M_SetPower(ExtClass other) + { + power = atof(other._value) + + if(power < 0) + power = 0 + } + +//----------------------------------------------------------------- + void M_Disable(ExtClass other) + { + if(IsCreated) + { + DestroyTrigger(this) + IsCreated = 0 + } + ClearEventMask(this, EV_TOUCH|EV_FRAME) + } +/* +//----------------------------------------------------------------- + void Enter(ExtClass other, int numinsiders) + { +// SetEventMask(this, EV_FRAME) + }*/ + +//----------------------------------------------------------------- + void Enter(ExtClass other, int numinsiders) + { + M_Enable(this) + } + +//----------------------------------------------------------------- + void Leave(ExtClass other, int numinsiders) + { + if(numinsiders == 0) + ClearEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + bool IsCorrectActor(MinClass other) + { + if(other.IsRigidBody()) + return true + + return false + } + +//----------------------------------------------------------------- + void EOnTouch(MinClass other, int extra) + { + if(!IsCorrectActor(other)) + return + + SetEventMask(this, EV_FRAME) + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + MinClass Insiders[32] + MinClass Insider + NumInsiders = TriggerInsiders(this, Insiders) + vector ForceDir = GetMatrix(this, 0) + + for(int n = 0; n < NumInsiders; n++) + { + Insider = Insiders[n] + + if(Insider && Insider.IsRigidBody()) + dBodyApplyForce(Insider, ForceDir * power) + } + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + if(power == 0) + power = 2000 + + ClearEventMask(this, EV_FRAME) + } +} diff --git a/Alpha Prime/Mod/scripts/console.h b/Alpha Prime/Mod/scripts/console.h new file mode 100644 index 0000000..4d678f6 --- /dev/null +++ b/Alpha Prime/Mod/scripts/console.h @@ -0,0 +1,198 @@ +void g_mainstats() +{ + g_iStats++ + if(g_iStats >= 3) + g_iStats = 0 + +} + +void g_rasterstats() +{ + if(g_iWire == 0 && g_iDepthComplex == 0) + { + g_iWire = 1 + } + else + { + if(g_iWire == 1) + { + g_iWire = 0 + g_iDepthComplex = 1 + } + else + { + if(g_iDepthComplex == 1) + { + g_iDepthComplex = 0 + g_iWire = 0 + } + } + } +} + +void showai() +{ + g_bDoShowAI = true +} + +void leach() +{ + CheatNextLevel = true +} + +void rasputin() +{ + CheatImmortality = true +} + +void xylophone() +{ + CheatWeapons = true +} + +void fodder() +{ + CheatAmmo = true +} + +void quack() +{ + CheatHealth = true +} + +void coke() +{ + CheatHubbardium = true +} + +void pleasedaddydrawthisforme() +{ + CheatWeapons = true + CheatImmortality = true + CheatAmmo = true + CheatHubbardium = true +} + +void help() +{ + Print("www.alpha-prime.com") + Print("www.blackelement.net/forum") +} + +void version() +{ + Print(String("Alpha Prime" + AlphaPrimeVersion)) +} + +//================================================================================= +void q() +{ + g_iMInGame = 2 +} + +#ifdef EDITOR +void r_makecubemaps() +{ + if(globalmap == NULL) + return + + SetCurrentMap(globalmap) + + ctype ct = Type("info_cubemap") + info_cubemap ec + + for(ec = GetNextEntity(NULL, ct); ec != NULL; ec = GetNextEntity(ec, ct)) + { + ec.vflags = ClearFlags(ec, TFL_VISIBLE) + } + + for(ec = GetNextEntity(NULL, ct); ec != NULL; ec = GetNextEntity(ec, ct)) + { + UpdateCubeMap(ec, ec.size, ec._name) + } + + for(ec = GetNextEntity(NULL, ct); ec != NULL; ec = GetNextEntity(ec, ct)) + { + SetFlags(ec, ec.vflags) + } +} +#else +void r_makecubemaps() +{ + if(globalmap == NULL) + return + + SetCurrentMap(globalmap) + + ctype ct = Type("info_cubemap") + info_cubemap ec + + for(ec = GetNextEntity(NULL, ct); ec != NULL; ec = GetNextEntity(ec, ct)) + { + UpdateCubeMap(ec, ec.size, ec._name) + } +} +#endif + +#ifdef EDITOR +const bool RmapEnabled = false +#else +const bool RmapEnabled = true +#endif + +#ifdef DEVELOPER +//================================================================================= +void rmap() +{ + if(!RmapEnabled) + return + + if(g_sThisLevel == "") + { + Print("Can't reload map") + } + +int newmap +string fullname + + fullname = "worlds/" + g_sThisLevel + ".wrl" + + Print(String("*** Reloading map:" + fullname + " ***")) + + SetWidgetImage(WView, NULL) //avoid redraw during LoadEntities (can cause unwanted Exceptions on entities) + + g_bRMap = true + + if(globalmap != NULL) + { + ReloadMap(globalmap) + //FreeMap(globalmap) + g_iFly = false + //globalmap = LoadMap(fullname, true) + } + +/* + newmap = LoadMap(fullname) + if( newmap == NULL) + { + Print("Can't found") + } + else + { + if(globalmap != NULL) + FreeMap(globalmap) + + globalmap = newmap + } +*/ + SetWidgetImage(WView, globalmap) + Print("*** Reload done! ***") +} + +//================================================================================= +void x(string a) +{ + g_FromConsoleCall = a + a = "" +} +#endif \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/definitions/anim.h b/Alpha Prime/Mod/scripts/definitions/anim.h new file mode 100644 index 0000000..9f8dd07 --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/anim.h @@ -0,0 +1,639 @@ +const int s_death = 0 //overrides everything +const int s_pain = 1 //overrides everything +const int s_weapon = 2 //reloads,kickbacks,attacks etc. + +const int s_cutscene = 3 //3,4 + +const int s_custom = 6 +const int s_idlevar = 7 +const int s_walk = 8 //walk/run + +//bone groups +const int g_all = 1 +const int g_reload = 2 +const int g_headhands = 3 +const int g_smallpain = 4 +const int g_gesture = 5 +const int g_confirmgesture = 6 +const int g_legs = 7 + +//anim states +const int s_default = 0 +const int s_relaxed = 0 +const int s_alert = 1 +const int s_combat = 2 + +//base movement anim types +const int t_default = 0 +const int t_idle = 1 +const int t_walk = 2 +const int t_bwalk = 3 + +const int t_run = 4 +const int t_brun = 5 +const int t_lstrafe = 6 +const int t_rstrafe = 7 +const int t_run_aim = 8 //running, firing to front + +const int t_run_fb = 9 //running, firing behind back +const int t_run_fl = 10 //running, firing to left +const int t_run_fr = 11 //running, firing to right + +const int t_idle_fire = 12 //special anim when firing. For flamethrower for example + +//anims + +//IDLE +const int a_relax_idle = 100 +const int a_relax_idle_var = 108 + +const int a_alert_idle = 116 +const int a_alert_idle_var = 124 + +const int a_combat_idle = 132 +const int a_combat_idle_var = 140 + +//IDLE special +const int a_spot_idle_var = 148 +const int a_fight_idle_var = 156 +const int a_lost_idle_var = 164 + +const int a_combat_idle_fire = 168 + +//WALK +const int a_relax_walk = 10 +const int a_alert_walk = 12 +const int a_combat_walk = 14 + +//RUN +const int a_relax_run = 16 +const int a_relax_brun = 17 +const int a_alert_run = 18 +const int a_alert_brun = 19 +const int a_combat_run = 20 +const int a_combat_brun = 21 +const int a_combat_run_aim = 22 + +//TURN (left 180degrees, right 180degrees) +const int a_relax_turn = 28 +const int a_alert_turn = 30 +const int a_combat_turn = 32 + +//BACKWALK +const int a_relax_bwalk = 38 +const int a_alert_bwalk = 39 +const int a_combat_bwalk = 40 + +//STRAFE +const int a_relax_strafe = 42 +const int a_alert_strafe = 44 +const int a_combat_strafe = 46 + +//PAIN +const int a_pain = 48 +const int a_pain_strong = 52 +const int a_pain_inplace = 60 +const int a_pain_back = 64 + +//DEATH +const int a_death = 68 +const int a_death_strong = 72 +const int a_death_inplace = 80 + +//CROUCH +const int a_crouch = 88 +const int a_crouch_fire = 91 //+1 + +const int a_combat_run_fire = 96 //back, left, right + +const int a_jump_drop = 179 +const int a_combat_railjump = 180 +const int a_combat_windowjump = 181 +const int a_combat_crawl = 182 + +const int a_combat_llean = 184 //in, idle, out +const int a_combat_rlean = 187 //in, idle, out + +const int a_combat_grenade = 200 //up, down, left, right +const int a_combat_grenade_crouch = 204 //up, left, right + +const int a_combat_closecombat = 210 //+5 + +const int a_combat_cover = 220 //armored enemies don't run. Just cover + +//gestures +const int a_act_left_go = 225 +const int a_act_right_go = 226 +const int a_act_back_go = 227 +const int a_act_forward_go = 228 +const int a_act_hold = 229 + +const int a_act_look_left = 235 +const int a_act_look_right = 236 + +//human body pivots +const int p_lhand = 0 +const int p_rhand = 1 +const int p_rhand2 = 2 + +const int p_weapon0 = 3 +const int p_weapon1 = 4 +const int p_weapon2 = 5 +const int p_weapon3 = 6 +const int p_camera = 7 + +//any purpose pivots +const int p_pivot0 = 0 +const int p_pivot1 = 1 +const int p_pivot2 = 2 +const int p_pivot3 = 3 +const int p_pivot4 = 4 +const int p_pivot5 = 5 +const int p_pivot6 = 6 +const int p_pivot7 = 7 + +//Human body skeleton. Common bones +const int B_SCENE_ROOT = 0 +const int B_Layer1 = 1 +const int B_Common_Body = 2 //priblizne stred trupu +const int B_Common_Head = 3 + + +//Human body NEW skeleton +const int B_Hips = 2 +const int B_Head = 3 +const int B_Spine = 4 +const int B_Spine1 = 5 +const int B_Spine2 = 6 +const int B_Neck = 7 +const int B_Pelvis = 8 +const int B_LeftShoulderBlade = 9 +const int B_LeftShoulder = 10 +const int B_LeftArm = 11 +const int B_LeftArmRoll = 12 +const int B_LeftForeArm = 13 +const int B_LeftForeArmRoll = 14 +const int B_LeftHand = 15 +const int B_LeftHandPivot = 16 + +const int B_LeftHandThumb1 = 17 +const int B_LeftHandThumb2 = 18 +const int B_LeftHandIndex1 = 19 +const int B_LeftHandIndex2 = 20 +const int B_LeftHandMiddle1 = 21 +const int B_LeftHandMiddle2 = 22 + + +const int B_RightShoulderBlade = 23 +const int B_RightShoulder = 24 +const int B_RightArm = 25 +const int B_RightArmRoll = 26 +const int B_RightForeArm = 27 +const int B_RightForeArmRoll = 28 +const int B_RightHand = 29 +const int B_RightHandPivot = 30 + +const int B_RightHandThumb1 = 31 +const int B_RightHandThumb2 = 32 +const int B_RightHandIndex1 = 33 +const int B_RightHandIndex2 = 34 +const int B_RightHandMiddle1 = 35 +const int B_RightHandMiddle2 = 36 + +const int B_LeftUpLeg = 37 +const int B_LeftUpLegRoll = 38 +const int B_LeftLeg = 39 +const int B_LeftLegRoll = 40 +const int B_LeftFoot = 41 +const int B_LeftBackFoot = 42 //FIXME: chybicka, duplicitni nazev +const int B_LeftToeBase = 42 +const int B_RightUpLeg = 43 +const int B_RightUpLegRoll = 44 +const int B_RightLeg = 45 +const int B_RightLegRoll = 46 +const int B_RightFoot = 47 +const int B_RightToeBase = 48 + +const int B_LeftHandThumb3 = 49 +const int B_LeftHandMiddle3 = 50 +const int B_LeftHandIndex3 = 51 + +const int B_LeftFingerRoll = 52 +const int B_LeftHandPinky1 = 53 +const int B_LeftHandPinky2 = 54 +const int B_LeftHandPinky3 = 55 +const int B_LeftHandRing1 = 56 +const int B_LeftHandRing2 = 57 +const int B_LeftHandRing3 = 58 +const int B_RightHandThumb3 = 59 +const int B_RightHandMiddle3 = 60 +const int B_RightHandIndex3 = 61 +const int B_RightFingerRoll = 62 +const int B_RightHandPinky1 = 63 + +const int B_RightHandPinky2 = 64 +const int B_RightHandPinky3 = 65 + +const int B_RightHandRing1 = 66 +const int B_RightHandRing2 = 67 +const int B_RightHandRing3 = 68 + +//Human body OLD skeleton +const int B_Spine01 = B_Common_Body +const int B_Hlava = B_Common_Head +const int B_Skeleton_Root = 4 +const int B_Spine02 = 5 +const int B_Krk = 6 +const int B_L_Rameno = 7 +const int B_L_Rameno_2 = 8 +const int B_L_Zarameni = 9 +const int B_L_Zarameni_2 = 10 +const int B_L_Predlokti = 11 +const int B_L_Predlokti_2 = 12 +const int B_L_Zapesti = 13 +const int B_R_Rameno = 14 +const int B_R_Rameno_2 = 15 +const int B_R_Zarameni = 16 +const int B_R_Zarameni_2 = 17 +const int B_R_Predlokti = 18 +const int B_R_Predlokti_2 = 19 +const int B_R_Zapesti = 20 +const int B_L_Kycle = 21 +const int B_L_Stehno = 22 +const int B_L_Lejtko = 23 +const int B_L_Noha = 24 +const int B_R_Kycle = 25 +const int B_R_Stehno = 26 +const int B_R_Lejtko = 27 +const int B_R_Noha = 28 +const int B_Spine03 = 29 +const int B_Celist = 30 + +const int B_L_Stehno_2 = 43 +const int B_L_Noha_2 = 44 +const int B_R_Stehno_2 = 45 +const int B_R_Noha_2 = 46 + +//Player Fingers +const int B_L_Palec = 31 +const int B_L_Palec_2 = 32 +const int B_L_Prsty = 33 +const int B_L_Ukazovacek = 34 +const int B_L_Ukazovacek_2 = 35 +const int B_L_Prsty_2 = 36 +const int B_R_Palec = 37 +const int B_R_Palec_2 = 38 +const int B_R_Prsty = 39 +const int B_R_Ukazovacek = 40 +const int B_R_Ukazovacek_2 = 41 +const int B_R_Prsty_2 = 42 + +//Human - pivots +const int B_CameraPivot = 57 +const int B_L_Ruka_Pivot = 58 +const int B_R_Ruka_Pivot = 59 +const int B_Weapon_P4 = 60 +const int B_Weapon_P3 = 61 +const int B_Weapon_P2 = 62 +const int B_Weapon_P1 = 63 + +//FPS HANDS ------------------------------- +//Player FPS Hands Fingers +const int B_L_Palec1 = 31 +const int B_L_Palec2 = 32 +const int B_L_Ukaz1 = 33 +const int B_L_Ukaz2 = 34 +const int B_L_Prost1 = 35 +const int B_L_Prost2 = 36 +const int B_L_Prst1 = 37 +const int B_L_Prst2 = 38 +const int B_L_Mali1 = 39 +const int B_L_Mali2 = 40 +const int B_R_Palec1 = 41 +const int B_R_Palec2 = 42 +const int B_R_Ukaz1 = 21 +const int B_R_Ukaz2 = 22 +const int B_R_Prost1 = 23 +const int B_R_Prost2 = 24 +const int B_R_Prst1 = 25 +const int B_R_Prst2 = 26 +const int B_R_Mali1 = 27 +const int B_R_Mali2 = 28 + + + +//SCIFI ROBOT ----------------------------- +const int B_Podvozek = B_Common_Body +const int B_SkeletonRoot = 4 +const int B_RF_KycelKloub = 7 +const int B_RF_Kycel = 8 +const int B_RF_Stehno = 9 +const int B_RF_Lejtko = 10 +const int B_RF_Noha = 11 +const int B_LF_KycelKloub = 12 +const int B_LF_Kycel = 13 +const int B_LF_Stehno = 14 +const int B_LF_Lejtko = 15 +const int B_LF_Noha = 16 +const int B_RB_KycelKloub = 17 +const int B_RB_Kycel = 18 +const int B_RB_Stehno = 19 +const int B_RB_Lejtko = 20 +const int B_RB_Noha = 21 +const int B_LB_KycelKloub = 22 +const int B_LB_Kycel = 23 +const int B_LB_Stehno = 24 +const int B_LB_Lejtko = 25 +const int B_LB_Noha = 26 + +const int B_Body = B_Common_Head +const int B_Kridlo_R = 4 +const int B_Kridlo_D = 5 +const int B_Kridlo_L = 6 +const int B_Rameno_L = 7 +const int B_Antena_T = 8 +const int B_Hlava2 = 27 +const int B_P_Fire = 28 + +//gun +const int B_fixed = 2 +const int B_Fixed = 2 +const int B_P_Shell = 3 +const int B_Ammo = 4 +const int B_Zaver = 5 +const int B_Rotor = 6 + + +//plamenomet +const int B_P_Flame = 10 +const int B_L_Ammo = 11 +const int B_R_Ammo = 12 +const int B_Flame_rod = 13 + +//raketomet +const int B_RL_TL = 10 +const int B_RL_TR = 11 +const int B_RL_BL = 12 +const int B_RL_BR = 13 +const int B_dolni = 14 +const int B_horni = 15 +const int B_horni_2 = 16 + +//sniperka +const int B_Sniper_Display = 4 +const int B_Sniper_Ammo = 5 + +//shotgun +const int B_Shot_Slider = 4 + +//mina +const int B_mine = 31 + +const int B_OxDev_pist = 4 +const int B_OxDev_fixed = 5 +const int B_OxygenDevice_lwo = 6 + +const int B_HlthDev_pist = 4 +const int B_HlthDev_fixed = 5 + +//handle +const int B_SD1_HANDLE = 4 + +//capsule +const int B_CPSL01_L = 4 +const int B_CPSL01_R = 5 + + +const int B_airdoor4_base = 4 +const int B_airdoor4_lock = 5 + +const int B_loader_arm1_L = 4 +const int B_loader_arm2_L = 5 +const int B_loader_arm3_L = 6 +const int B_loader_arm4_L = 7 +const int B_loader_arm2pist2_L = 8 +const int B_loader_arm2pist1_L = 9 +const int B_loader_arm1_R = 10 +const int B_loader_arm2_R = 11 +const int B_loader_arm3_R = 12 +const int B_loader_arm4_R = 13 +const int B_loader_arm2pist2_R = 14 +const int B_container = 15 +const int B_loader_arm2pist1_R = 16 +const int B_HLOAD_con1 = 17 + +const int B_crane = 18 +const int B_arm_BASE = 19 + +const int B_bedna01 = 4 +const int B_bedna02 = 5 +const int B_bedna03 = 6 +const int B_bedna04 = 7 +const int B_bedna05 = 8 +const int B_bedna06 = 9 + +const int B_meteorBONE1 = 4 +const int B_meteorBONE2 = 5 +const int B_meteorBONE3 = 6 + +const int B_GunHead = 4 +const int B_GunBody = 5 + +const int B_safedoor_base = 4 +const int B_safedoor_rot = 5 +const int B_safedoor_lock = 6 + +const int B_TRSP_door = 4 + +//facial anim morphs +const int B_BrowsDown_L = 4 +const int B_BrowsDown_R = 5 +const int B_BrowsUp_L = 6 +const int B_BrowsUp_R = 7 +const int B_BrowsUpSide_L = 8 +const int B_BrowsUpSide_R = 9 +const int B_Mrkani_L = 10 +const int B_Mrkani_R = 11 +const int B_Privreni_L = 12 +const int B_Privreni_R = 13 +const int B_Angry = 14 +const int B_Sad = 15 +const int B_AI = 16 +const int B_BMP = 17 +const int B_CDG = 18 +const int B_E = 19 +const int B_FV = 20 +const int B_O = 21 +const int B_QW = 22 +const int B_U = 23 +const int B_T = 24 + + + +int P1 = 16 +int P2 = 17 +//3,14159265358979 +//----------------------------------------------------------------- +void InitSkeletons() +{ + //full skeleton +/* + BeginGroup(g_reload) + Bone(B_SCENE_ROOT) + Bone(B_Layer1) + Bone(B_Hips) + Bone(B_Head) + Bone(B_Spine) + Bone(B_Spine1) + Bone(B_Spine2) + Bone(B_Neck) + Bone(B_Pelvis) + Bone(B_LeftShoulderBlade) + Bone(B_LeftShoulder) + Bone(B_LeftArm) + Bone(B_LeftArmRoll) + Bone(B_LeftForeArm) + Bone(B_LeftForeArmRoll) + Bone(B_LeftHand) + Bone(B_LeftHandPivot) + Bone(B_RightShoulderBlade) + Bone(B_RightShoulder) + Bone(B_RightArm) + Bone(B_RightArmRoll) + Bone(B_RightForeArm) + Bone(B_RightForeArmRoll) + Bone(B_RightHand) + Bone(B_RightHandPivot) + Bone(B_LeftUpLeg) + Bone(B_LeftUpLegRoll) + Bone(B_LeftLeg) + Bone(B_LeftLegRoll) + Bone(B_LeftFoot) + Bone(B_LeftToeBase) + Bone(B_RightUpLeg) + Bone(B_RightUpLegRoll) + Bone(B_RightLeg) + Bone(B_RightLegRoll) + Bone(B_RightFoot) + Bone(B_RightToeBase) +*/ + + + BeginGroup(g_headhands) + Bone(B_Head) + Bone(B_Neck) + Bone(B_LeftShoulderBlade) + Bone(B_LeftShoulder) + Bone(B_LeftArm) + Bone(B_LeftArmRoll) + Bone(B_LeftForeArm) + Bone(B_LeftForeArmRoll) + Bone(B_LeftHand) + Bone(B_RightShoulderBlade) + Bone(B_RightShoulder) + Bone(B_RightArm) + Bone(B_RightArmRoll) + Bone(B_RightForeArm) + Bone(B_RightForeArmRoll) + Bone(B_RightHand) + Bone(B_RightHandPivot) + + BeginGroup(g_reload) + Bone(B_Head) + Bone(B_Spine) + Bone(B_Spine1) + Bone(B_Spine2) + Bone(B_Neck) + Bone(B_LeftShoulderBlade) + Bone(B_LeftShoulder) + Bone(B_LeftArm) + Bone(B_LeftArmRoll) + Bone(B_LeftForeArm) + Bone(B_LeftForeArmRoll) + Bone(B_LeftHand) + Bone(B_RightShoulderBlade) + Bone(B_RightShoulder) + Bone(B_RightArm) + Bone(B_RightArmRoll) + Bone(B_RightForeArm) + Bone(B_RightForeArmRoll) + Bone(B_RightHand) + Bone(B_RightHandPivot) + + BeginGroup(g_gesture) + Bone(B_Head) + Bone(B_Spine) + Bone(B_Spine1) + Bone(B_Spine2) + Bone(B_Neck) + Bone(B_LeftShoulderBlade) + Bone(B_LeftShoulder) + Bone(B_LeftArm) + Bone(B_LeftArmRoll) + Bone(B_LeftForeArm) + Bone(B_LeftForeArmRoll) + Bone(B_LeftHand) + Bone(B_RightShoulderBlade) + Bone(B_RightShoulder) + Bone(B_RightArm) + Bone(B_RightArmRoll) + Bone(B_RightForeArm) + Bone(B_RightForeArmRoll) + Bone(B_RightHand) + Bone(B_RightHandPivot) + + BeginGroup(g_confirmgesture) + Bone(B_Head) + Bone(B_Spine) + Bone(B_Spine1) + Bone(B_Spine2) + Bone(B_Neck) + + BeginGroup(g_smallpain) + Bone(B_Head) + Bone(B_Spine) + Bone(B_Spine1) + Bone(B_Spine2) + Bone(B_Neck) +// Bone(B_Pelvis) -- pevlis se nesmi pouzivat pro upper body protoze je nadrazenej oboum noham (panev) + Bone(B_LeftShoulderBlade) + Bone(B_LeftShoulder) + Bone(B_LeftArm) + Bone(B_LeftArmRoll) + Bone(B_LeftForeArm) + Bone(B_LeftForeArmRoll) + Bone(B_LeftHand) + Bone(B_LeftHandPivot) + Bone(B_RightShoulderBlade) + Bone(B_RightShoulder) + Bone(B_RightArm) + Bone(B_RightArmRoll) + Bone(B_RightForeArm) + Bone(B_RightForeArmRoll) + Bone(B_RightHand) + Bone(B_RightHandPivot) + + BeginGroup(g_all) + SetAllBones() + + BeginGroup(g_legs) + Bone(B_SCENE_ROOT) + Bone(B_Layer1) + Bone(B_Spine) + Bone(B_Spine1) + Bone(B_Spine2) + Bone(B_Hips) + Bone(B_Pelvis) + Bone(B_LeftUpLeg) + Bone(B_LeftUpLegRoll) + Bone(B_LeftLeg) + Bone(B_LeftLegRoll) + Bone(B_LeftFoot) + Bone(B_LeftToeBase) + Bone(B_RightUpLeg) + Bone(B_RightUpLegRoll) + Bone(B_RightLeg) + Bone(B_RightLegRoll) + Bone(B_RightFoot) + Bone(B_RightToeBase) +} diff --git a/Alpha Prime/Mod/scripts/definitions/animset.h b/Alpha Prime/Mod/scripts/definitions/animset.h new file mode 100644 index 0000000..dd4240a --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/animset.h @@ -0,0 +1,1147 @@ +//------------------------- ----------------------------------------------- +/* +a_relax_idle +0...7 //0 je zakladni loop +a_relax_idle_var +0...7 + +a_alert_idle +0...7 //0 je zakladni loop +a_alert_idle_var +0...7 + +a_combat_idle +0...7 //0 je zakladni loop +a_combat_idle_var +0...7 + +a_spot_idle_var +0...7 +a_fight_idle_var +0...7 //Nepouzito +a_lost_idle_var +0...7 //Nepouzito (shortrange zbran a player nedosazitelny) + +a_relax_walk //walk +a_relax_bwalk //backwalk + +a_alert_walk +a_alert_bwalk + +a_combat_walk +a_combat_bwalk + +a_relax_run //run +a_relax_brun //backrun + +a_alert_run +a_alert_brun + +a_combat_run +a_combat_brun //Neco mezi behem a chuzi, s namirenou zbrani + +a_combat_run_aim //Neco mezi behem a chuzi, s namirenou zbrani + +a_relax_turn +0 left 180' +1 right 180' +a_alert_turn +0 left 180' +1 right 180' +a_combat_turn +0 left 180' +1 right 180' + + +a_relax_strafe +0 left, +1 right +a_alert_strafe +0 left, +1 right +a_combat_strafe +0 left, +1 right //Neco mezi behem a chuzi, s namirenou zbrani + +a_crouch +0 idle +1 down +2 up +a_crouch_fire +0 +1, strileni prez prekazku + +a_pain +0...3 painy pri zasahu zpredu +a_pain_back +0...3 painy pri zasahu zezadu + + +a_pain_strong //zatim nepouzito +a_pain_inplace //zatim nepouzito + +a_combat_run_fire //panicky uprk+strileni do stran: +0 back, +1 left, +2 right + +a_jump_drop //dopad na zem ze skoku +a_combat_railjump //preskok 1m zabradli +a_combat_windowjump //proskoceni oknem + +a_combat_llean = 182 //+0 in, +1 idle, +2 out +a_combat_rlean = 185 //+0 in, +1 idle, +2 out + +a_combat_run_jump //skok¶kotoul? +a_combat_run_roll //prekuleni prez prekazku? +a_combat_crawl //podlezeni prekazky + +a_combat_grenade //hozeni granatu +*/ + +//------------------------------------------------------------------------ +// BeginAnimSet("jmeno") zacne definice noveho animsetu + +// Anim(slot, "animace" [, fps]) prida animaci do animsetu +// Import("animset") naimportuje do aktualniho animsetu jiny animset. Pouze ty animace, ktere jsme jeste nezadali! +//----------------------------------------------------------------- +void WorldClass::InitAnimSets() +{ +//----------------------------------------------------------------------- + BeginAnimSet("HeavySpider") +//----------------------------------------------------------------------- + ApplyAnimFlags(ASF_AIMING) + Anim(a_relax_idle + 0,"anm/heavyspider01/r_idle.anm") + Anim(a_relax_idle_var + 0,"anm/heavyspider01/r_idle_var1.anm") + Anim(a_relax_idle_var + 1,"anm/heavyspider01/r_idle_var2.anm") + Anim(a_relax_idle_var + 2,"anm/heavyspider01/r_idle_var3.anm") + + Anim(a_alert_idle + 0, "anm/heavyspider01/a_idle.anm") + Anim(a_alert_idle_var + 0, "anm/heavyspider01/a_idle_var1.anm") + Anim(a_alert_idle_var + 1, "anm/heavyspider01/a_idle_var2.anm") + Anim(a_alert_idle_var + 2, "anm/heavyspider01/a_idle_var3.anm") + Anim(a_alert_idle_var + 3, "anm/heavyspider01/a_idle_var4.anm") + + Anim(a_combat_idle + 0, "anm/heavyspider01/c_idle.anm") + //Anim(a_combat_idle_var + 0, "anm/heavyspider01/a_idle_var1.anm") + + Anim(a_fight_idle_var + 0, "anm/heavyspider01/a_idle_var1.anm") + Anim(a_spot_idle_var + 0, "anm/heavyspider01/a_idle_var2.anm") + Anim(a_lost_idle_var + 0, "anm/heavyspider01/a_idle_var3.anm") + + Anim(a_relax_walk + 0,"anm/heavyspider01/r_walk.anm") + Anim(a_alert_walk + 0,"anm/heavyspider01/a_walk.anm") + Anim(a_combat_walk + 0,"anm/heavyspider01/c_walk.anm") + + Anim(a_relax_bwalk + 0,"anm/heavyspider01/r_backwalk.anm") + Anim(a_alert_bwalk + 0,"anm/heavyspider01/a_backwalk.anm") + Anim(a_combat_bwalk + 0,"anm/heavyspider01/c_backwalk.anm") + + Anim(a_relax_run + 0,"anm/heavyspider01/r_walk.anm") + Anim(a_alert_run + 0,"anm/heavyspider01/a_walk.anm") + Anim(a_combat_run + 0,"anm/heavyspider01/c_walk.anm") + Anim(a_combat_run_aim + 0,"anm/heavyspider01/c_walk.anm") + + Anim(a_relax_strafe + 0,"anm/heavyspider01/r_strafel.anm") + Anim(a_relax_strafe + 1,"anm/heavyspider01/r_strafer.anm") + Anim(a_alert_strafe + 0,"anm/heavyspider01/a_strafel.anm") + Anim(a_alert_strafe + 1,"anm/heavyspider01/a_strafer.anm") + Anim(a_combat_strafe + 0,"anm/heavyspider01/c_strafel.anm") + Anim(a_combat_strafe + 1,"anm/heavyspider01/c_strafer.anm") + + Anim(a_relax_turn + 0,"anm/heavyspider01/r_rotate90l.anm") + Anim(a_relax_turn + 1,"anm/heavyspider01/r_rotate90r.anm") + Anim(a_alert_turn + 0,"anm/heavyspider01/a_rotate90l.anm") + Anim(a_alert_turn + 1,"anm/heavyspider01/a_rotate90r.anm") + Anim(a_combat_turn + 0,"anm/heavyspider01/c_rotate90l.anm") + Anim(a_combat_turn + 1,"anm/heavyspider01/c_rotate90r.anm") + +//----------------------------------------------------------------------- + BeginAnimSet("Dron") +//----------------------------------------------------------------------- +const vector mvec = "100 0 0" +const vector mvec2 = "40 0 0" +const vector mvec3 = "0 40 0" + + ApplyAnimFlags(ASF_AIMING) + Anim(a_relax_idle + 0,"anm/dron01/r_idle.anm") + Anim(a_relax_idle_var + 0, "anm/dron01/r_idlevar_1.anm") + + Anim(a_alert_idle + 0, "anm/dron01/a_idle.anm") + Anim(a_alert_idle_var + 0, "anm/dron01/a_idlevar_1.anm") + Anim(a_alert_idle_var + 1, "anm/dron01/a_idlevar_2.anm") + Anim(a_alert_idle_var + 2, "anm/dron01/a_idlevar_3.anm") + + Anim(a_combat_idle + 0, "anm/dron01/c_idle.anm") + Anim(a_combat_idle_var + 0, "anm/dron01/c_idlevar_1.anm") + + Anim(a_fight_idle_var + 0, "anm/dron01/c_idlevar_1.anm") + Anim(a_spot_idle_var + 0, "anm/dron01/a_idlevar_2.anm") + Anim(a_lost_idle_var + 0, "anm/dron01/a_idlevar_1.anm") + + Anim(a_relax_walk + 0,"anm/dron01/r_walk.anm", 30, mvec2) + Anim(a_alert_walk + 0,"anm/dron01/a_walk.anm", 30, mvec2) + Anim(a_combat_walk + 0,"anm/dron01/c_walk.anm",30, mvec2) + + Anim(a_relax_bwalk + 0,"anm/dron01/r_walk.anm", 30, -mvec2) + Anim(a_alert_bwalk + 0,"anm/dron01/a_walk.anm", 30, -mvec2) + Anim(a_combat_bwalk + 0,"anm/dron01/c_walk.anm", 30, -mvec2) + + Anim(a_relax_run + 0,"anm/dron01/r_walk.anm", 30, mvec) + Anim(a_alert_run + 0,"anm/dron01/a_walk.anm", 30, mvec) + Anim(a_combat_run + 0,"anm/dron01/c_walk.anm", 30, mvec) + Anim(a_combat_run_aim + 0,"anm/dron01/c_walk.anm", 30, mvec) + + Anim(a_relax_strafe + 0,"anm/dron01/r_walk.anm", 30, mvec3) + Anim(a_relax_strafe + 1,"anm/dron01/r_walk.anm", 30, -mvec3) + Anim(a_alert_strafe + 0,"anm/dron01/a_walk.anm", 30, mvec3) + Anim(a_alert_strafe + 1,"anm/dron01/a_walk.anm", 30, -mvec3) + Anim(a_combat_strafe + 0,"anm/dron01/c_walk.anm",30, mvec3) + Anim(a_combat_strafe + 1,"anm/dron01/c_walk.anm",30, -mvec3) + + Anim(a_pain + 0,"anm/dron01/pain_01.anm", 30, "-100 0 0") + Anim(a_pain + 1,"anm/dron01/pain_02.anm", 30, "-100 0 0") + Anim(a_pain + 2,"anm/dron01/pain_03.anm", 30, "-100 0 0") + Anim(a_pain + 3,"anm/dron01/pain_04.anm", 30, "-100 0 0") + Anim(a_pain_inplace + 0,"anm/dron01/pain_05.anm") + Anim(a_pain_inplace + 1,"anm/dron01/pain_06.anm") + Anim(a_pain_inplace + 0,"anm/dron01/pain_05.anm") + Anim(a_pain_inplace + 1,"anm/dron01/pain_06.anm") + +//----------------------------------------------------------------------- +BeginAnimSet("HumanoidNPC") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/civil_pistol/R_Idle.anm") + Anim(a_relax_idle_var + 0,"anm/CombatTest/R_Idle_Var01.anm") + Anim(a_relax_idle_var + 1,"anm/CombatTest/R_Idle_Var02.anm") + Anim(a_relax_idle_var + 2,"anm/CombatTest/R_Idle_Var03.anm") + Anim(a_alert_idle + 0, "anm/CombatTest/R_Idle.anm") + Anim(a_alert_idle_var + 0,"anm/CombatTest/R_Idle_Var01.anm") + Anim(a_alert_idle_var + 1,"anm/CombatTest/R_Idle_Var02.anm") + Anim(a_alert_idle_var + 2,"anm/CombatTest/R_Idle_Var03.anm") + Anim(a_combat_idle + 0, "anm/CombatTest/c_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_spot_idle_var + 0, "anm/combattest/c_disturb_l.anm") + Anim(a_spot_idle_var + 1, "anm/combattest/c_disturb_r.anm") + + Anim(a_relax_walk, "anm/CombatTest/R_WalkF.anm") + Anim(a_alert_walk, "anm/CombatTest/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_walk, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_bwalk, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_bwalk, "anm/CombatTest/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_bwalk, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run, "anm/CombatTest/R_RunF.anm") + Anim(a_alert_run, "anm/CombatTest/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run, "anm/CombatTest/C_RunF.anm") + Anim(a_combat_run_aim, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_turn + 0,"anm/player/r_rotate90l.anm") + Anim(a_relax_turn + 1,"anm/player/r_rotate90r.anm") + Anim(a_alert_turn + 0,"anm/player/r_rotate90l.anm") + Anim(a_alert_turn + 1,"anm/player/r_rotate90r.anm") + Anim(a_combat_turn + 0,"anm/CombatTest/C_Turn180L.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_turn + 1,"anm/CombatTest/C_Turn180R.anm") + AnimFlags(ASF_AIMING) + + Anim(a_crouch + 0, "anm/CombatTest/C_Crouch_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 1, "anm/CombatTest/C_Crouch_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 2, "anm/CombatTest/C_Crouch_Out.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch_fire + 0, "anm/CombatTest/C_Crouch_fire_1h.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch_fire + 1, "anm/CombatTest/C_Crouch_fire_2h.anm") + AnimFlags(ASF_AIMING) + + Anim(a_act_left_go, "anm/act/Act_RifleC_Commands_LeftGo.anm") + Anim(a_act_right_go, "anm/act/Act_RifleC_Commands_RightGo.anm") + Anim(a_act_back_go, "anm/act/Act_RifleC_Commands_BackGo.anm") + Anim(a_act_forward_go, "anm/act/Act_RifleC_Commands_AllGo02.anm") + Anim(a_act_hold, "anm/act/Act_RifleC_Commands_Hold.anm") + Anim(a_act_look_left, "anm/act/Act_RifleC_Look_Left.anm") + Anim(a_act_look_right, "anm/act/Act_RifleC_Look_Right.anm") + +//----------------------------------------------------------------------- + BeginAnimSet("ServiceBot") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0,"anm/humanoidTest/r_idle.anm") + Anim(a_alert_idle + 0, "anm/humanoidTest/c_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_idle + 0, "anm/humanoidTest/c_idle.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_walk + 0,"anm/humanoidTest/r_walk.anm") + Anim(a_alert_walk + 0,"anm/humanoidTest/c_walk.anm") + Anim(a_combat_walk + 0,"anm/humanoidTest/c_walk.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_bwalk + 0,"anm/humanoidTest/r_backwalk.anm") + Anim(a_alert_bwalk + 0,"anm/humanoidTest/c_backwalk.anm") + Anim(a_combat_bwalk + 0,"anm/humanoidTest/c_backwalk.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run + 0,"anm/humanoidTest/r_run.anm") + Anim(a_alert_run + 0,"anm/humanoidTest/a_run.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run + 0,"anm/humanoidTest/c_run.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_aim + 0,"anm/humanoidTest/c_run.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/humanoidTest/c_strafel.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/humanoidTest/c_strafer.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/humanoidTest/c_strafel.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/humanoidTest/c_strafer.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/humanoidTest/c_strafel.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/humanoidTest/c_strafer.anm") + AnimFlags(ASF_AIMING) + + Anim(a_alert_turn + 0,"anm/CombatTest/C_Turn180L.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_turn + 1,"anm/CombatTest/C_Turn180R.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_turn + 0,"anm/CombatTest/C_Turn180L.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_turn + 1,"anm/CombatTest/C_Turn180R.anm") + AnimFlags(ASF_AIMING) + + Anim(a_crouch + 0, "anm/humanoidtest/c_crouch_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 1, "anm/humanoidtest/c_crouch_down.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 2, "anm/humanoidtest/c_crouch_up.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain + 0,"anm/humanoidtest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 1,"anm/humanoidtest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 2,"anm/humanoidtest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 3,"anm/humanoidtest/c_pain01.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain_back + 0,"anm/humanoidtest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 1,"anm/humanoidtest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 2,"anm/humanoidtest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 3,"anm/humanoidtest/c_pain02.anm") + AnimFlags(ASF_AIMING) + +//----------------------------------------------------------------------- + BeginAnimSet("SecuritySpider") +//----------------------------------------------------------------------- + ApplyAnimFlags(ASF_AIMING) + Anim(a_relax_idle + 0,"anm/securityspider01/idle.anm") + Anim(a_relax_idle_var + 0,"anm/securityspider01/idle_var1.anm") + Anim(a_relax_idle_var + 1,"anm/securityspider01/idle_var2.anm") + + Anim(a_alert_idle + 0, "anm/securityspider01/idle.anm") + Anim(a_alert_idle_var + 0, "anm/securityspider01/idle_var1.anm") + Anim(a_alert_idle_var + 1, "anm/securityspider01/idle_var2.anm") + + Anim(a_combat_idle + 0, "anm/securityspider01/idle.anm") + + Anim(a_fight_idle_var + 0, "anm/securityspider01/idle_var1.anm") + Anim(a_spot_idle_var + 0, "anm/securityspider01/idle_var2.anm") + Anim(a_lost_idle_var + 0, "anm/securityspider01/idle_var1.anm") + + Anim(a_relax_walk + 0,"anm/securityspider01/r_walk.anm") + Anim(a_alert_walk + 0,"anm/securityspider01/c_walk.anm") + Anim(a_combat_walk + 0,"anm/securityspider01/c_walk.anm") + + Anim(a_relax_bwalk + 0,"anm/securityspider01/r_backwalk.anm") + Anim(a_alert_bwalk + 0,"anm/securityspider01/c_backwalk.anm") + Anim(a_combat_bwalk + 0,"anm/securityspider01/c_backwalk.anm") + + Anim(a_relax_run + 0,"anm/securityspider01/r_walk.anm") + Anim(a_alert_run + 0,"anm/securityspider01/c_walk.anm") + Anim(a_combat_run + 0,"anm/securityspider01/c_walk.anm") + Anim(a_combat_run_aim + 0,"anm/securityspider01/c_walk.anm") + + Anim(a_relax_strafe + 0,"anm/securityspider01/c_strafel.anm") + Anim(a_relax_strafe + 1,"anm/securityspider01/c_strafer.anm") + Anim(a_alert_strafe + 0,"anm/securityspider01/c_strafel.anm") + Anim(a_alert_strafe + 1,"anm/securityspider01/c_strafer.anm") + Anim(a_combat_strafe + 0,"anm/securityspider01/c_strafel.anm") + Anim(a_combat_strafe + 1,"anm/securityspider01/c_strafer.anm") + + Anim(a_relax_turn + 0,"anm/securityspider01/c_rotate90l.anm") + Anim(a_relax_turn + 1,"anm/securityspider01/c_rotate90r.anm") + Anim(a_alert_turn + 0,"anm/securityspider01/c_rotate90l.anm") + Anim(a_alert_turn + 1,"anm/securityspider01/c_rotate90r.anm") + Anim(a_combat_turn + 0,"anm/securityspider01/c_rotate90l.anm") + Anim(a_combat_turn + 1,"anm/securityspider01/c_rotate90r.anm") + +//----------------------------------------------------------------------- +//-------- MACHINE GUN -------------------------------------------------- + BeginAnimSet("LightTrooper") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/CombatTest/R_Idle.anm") + Anim(a_relax_idle_var + 0,"anm/CombatTest/R_Idle_Var01.anm") + Anim(a_relax_idle_var + 1,"anm/CombatTest/R_Idle_Var02.anm") + Anim(a_relax_idle_var + 2,"anm/CombatTest/R_Idle_Var03.anm") + Anim(a_alert_idle + 0, "anm/CombatTest/R_Idle.anm") + Anim(a_alert_idle_var + 0,"anm/CombatTest/R_Idle_Var01.anm") + Anim(a_alert_idle_var + 1,"anm/CombatTest/R_Idle_Var02.anm") + Anim(a_alert_idle_var + 2,"anm/CombatTest/R_Idle_Var03.anm") + Anim(a_combat_idle + 0, "anm/CombatTest/c_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_idle_var + 0,"anm/CombatTest/C_Idle_Var_01.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_idle_var + 1,"anm/CombatTest/C_Idle_Var_02.anm") + AnimFlags(ASF_AIMING) + + Anim(a_spot_idle_var + 0, "anm/combattest/c_disturb_l.anm") + Anim(a_spot_idle_var + 1, "anm/combattest/c_disturb_r.anm") + + Anim(a_spot_idle_var + 2, "anm/act/Act_Rifle_RelaxToCombatAim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_walk, "anm/CombatTest/R_WalkF.anm") + Anim(a_alert_walk, "anm/CombatTest/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_walk, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_bwalk, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_bwalk, "anm/CombatTest/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_bwalk, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run, "anm/CombatTest/R_RunF.anm") + Anim(a_alert_run, "anm/CombatTest/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run, "anm/CombatTest/C_RunF.anm") + Anim(a_combat_run_aim, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_brun, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_brun, "anm/CombatTest/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_brun, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_alert_turn + 0,"anm/CombatTest/C_Turn180L.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_turn + 1,"anm/CombatTest/C_Turn180R.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_turn + 0,"anm/CombatTest/C_Turn180L.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_turn + 1,"anm/CombatTest/C_Turn180R.anm") + AnimFlags(ASF_AIMING) + + Anim(a_crouch + 0, "anm/CombatTest/C_Crouch_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 1, "anm/CombatTest/C_Crouch_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 2, "anm/CombatTest/C_Crouch_Out.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch_fire + 0, "anm/CombatTest/C_Crouch_fire_1h.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch_fire + 1, "anm/CombatTest/C_Crouch_fire_2h.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_run_fire + 0, "anm/CombatTest/C_RunF_BAim_Panic.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_fire + 1, "anm/CombatTest/C_RunF_LAim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_fire + 2, "anm/CombatTest/C_RunF_RAim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain + 0,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 1,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 2,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 3,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain_back + 0,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 1,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 2,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 3, "anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + +//NEW + Anim(a_jump_drop, "anm/CombatTest/C_Railing_jump_drop.anm") + Anim(a_combat_railjump, "anm/CombatTest/C_Railing_jump.anm") + Anim(a_combat_windowjump, "anm/CombatTest/C_window_Roll.anm") + Anim(a_combat_crawl, "anm/act/Act_RifleC_PodlejzaniDveri.anm") + + Anim(a_combat_llean + 0, "anm/CombatTest/C_LeanL_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 1, "anm/CombatTest/C_LeanL_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 2, "anm/CombatTest/C_LeanL_Out.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 0, "anm/CombatTest/C_LeanR_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 1, "anm/CombatTest/C_LeanR_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 2, "anm/CombatTest/C_LeanR_Out.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_grenade + 0, "anm/CombatTest/C_Grenade.anm") + Anim(a_combat_grenade + 1, "anm/CombatTest/C_Grenade_L.anm") + Anim(a_combat_grenade + 2, "anm/CombatTest/C_Grenade_R.anm") + Anim(a_combat_grenade + 3, "anm/CombatTest/C_Grenade_Down.anm") + + Anim(a_combat_grenade_crouch + 0, "anm/CombatTest/C_Crouch_Grenade_Up.anm") + Anim(a_combat_grenade_crouch + 1, "anm/CombatTest/C_Crouch_Grenade_L.anm") + Anim(a_combat_grenade_crouch + 2, "anm/CombatTest/C_Crouch_Grenade_R.anm") + + Anim(a_combat_closecombat + 0, "anm/CombatTest/C_CloseHit_1.anm") + Anim(a_combat_closecombat + 1, "anm/CombatTest/C_CloseHit_4.anm") + Anim(a_combat_closecombat + 2, "anm/CombatTest/C_CloseHit_5.anm") + + Anim(a_act_left_go, "anm/act/Act_RifleC_Commands_LeftGo.anm") + Anim(a_act_right_go, "anm/act/Act_RifleC_Commands_RightGo.anm") + Anim(a_act_back_go, "anm/act/Act_RifleC_Commands_BackGo.anm") + Anim(a_act_forward_go, "anm/act/Act_RifleC_Commands_AllGo02.anm") + Anim(a_act_hold, "anm/act/Act_RifleC_Commands_Hold.anm") + Anim(a_act_look_left, "anm/act/Act_RifleC_Look_Left.anm") + Anim(a_act_look_right, "anm/act/Act_RifleC_Look_Right.anm") + +//-------- ROCKET LAUNCHER ---------------------------------------------- + BeginAnimSet("HeavyTrooperRL") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/CombatTest/R_Idle.anm") + Anim(a_relax_idle_var + 0,"anm/CombatTest/R_Idle_Var01.anm") + Anim(a_relax_idle_var + 1,"anm/CombatTest/R_Idle_Var02.anm") + Anim(a_relax_idle_var + 2,"anm/CombatTest/R_Idle_Var03.anm") + Anim(a_alert_idle + 0, "anm/CombatTest/R_Idle.anm") + Anim(a_alert_idle_var + 0,"anm/CombatTest/R_Idle_Var01.anm") + Anim(a_alert_idle_var + 1,"anm/CombatTest/R_Idle_Var02.anm") + Anim(a_alert_idle_var + 2,"anm/CombatTest/R_Idle_Var03.anm") + Anim(a_combat_idle + 0, "anm/CombatTest/c_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_idle_var + 0,"anm/CombatTest/C_Idle_Var_01.anm") + Anim(a_combat_idle_var + 1,"anm/CombatTest/C_Idle_Var_02.anm") + Anim(a_combat_idle_fire, "anm/CombatTest/c_idle.anm") + AnimFlags(ASF_AIMING) + + Anim(a_spot_idle_var + 0, "anm/combattest/c_disturb_l.anm") + Anim(a_spot_idle_var + 1, "anm/combattest/c_disturb_r.anm") + + Anim(a_relax_walk, "anm/CombatTest/R_WalkF.anm") + Anim(a_alert_walk, "anm/CombatTest/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_walk, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_bwalk, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_bwalk, "anm/CombatTest/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_bwalk, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run, "anm/CombatTest/R_RunF.anm") + Anim(a_alert_run, "anm/CombatTest/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run, "anm/CombatTest/C_RunF.anm") + Anim(a_combat_run_aim, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_crouch + 0, "anm/CombatTest/C_Crouch_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 1, "anm/CombatTest/C_Crouch_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 2, "anm/CombatTest/C_Crouch_Out.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_brun, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_brun, "anm/CombatTest/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_brun, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_alert_turn + 0,"anm/CombatTest/C_Turn180L.anm") + Anim(a_alert_turn + 1,"anm/CombatTest/C_Turn180R.anm") + + Anim(a_combat_turn + 0,"anm/CombatTest/C_Turn180L.anm") + Anim(a_combat_turn + 1,"anm/CombatTest/C_Turn180R.anm") + + Anim(a_pain + 0,"anm/CombatTest/c_pain01.anm") + Anim(a_pain + 1,"anm/CombatTest/c_pain01.anm") + Anim(a_pain + 2,"anm/CombatTest/c_pain01.anm") + Anim(a_pain + 3,"anm/CombatTest/c_pain01.anm") + + Anim(a_pain_back + 0,"anm/CombatTest/c_pain02.anm") + Anim(a_pain_back + 1,"anm/CombatTest/c_pain02.anm") + Anim(a_pain_back + 2,"anm/CombatTest/c_pain02.anm") + Anim(a_pain_back + 3, "anm/CombatTest/c_pain02.anm") + +//NEW + Anim(a_jump_drop, "anm/CombatTest/C_Railing_jump_drop.anm") + Anim(a_combat_railjump, "anm/CombatTest/C_Railing_jump.anm") + Anim(a_combat_windowjump, "anm/CombatTest/C_window_Roll.anm") + Anim(a_combat_crawl, "anm/act/Act_RifleC_PodlejzaniDveri.anm") + + Anim(a_combat_llean + 0, "anm/CombatTest/C_LeanL_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 1, "anm/CombatTest/C_LeanL_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 2, "anm/CombatTest/C_LeanL_Out.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 0, "anm/CombatTest/C_LeanR_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 1, "anm/CombatTest/C_LeanR_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 2, "anm/CombatTest/C_LeanR_Out.anm") + AnimFlags(ASF_AIMING) + +//----------------------------------------------------------------------- + BeginAnimSet("HeavyTrooperFT") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/heavytrooperft/c_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_idle + 0, "anm/heavytrooperft/c_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_idle + 0, "anm/heavytrooperft/c_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_idle_fire, "anm/heavytrooperft/c_idle_fire.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_walk, "anm/heavytrooperft/C_RunF.anm") + Anim(a_alert_walk, "anm/heavytrooperft/C_RunF.anm") + Anim(a_combat_walk, "anm/heavytrooperft/C_RunF.anm") + + Anim(a_relax_bwalk, "anm/heavytrooperft/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_bwalk, "anm/heavytrooperft/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_bwalk, "anm/heavytrooperft/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run, "anm/heavytrooperft/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_run, "anm/heavytrooperft/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run, "anm/heavytrooperft/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_aim, "anm/heavytrooperft/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_brun, "anm/heavytrooperft/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_brun, "anm/heavytrooperft/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_brun, "anm/heavytrooperft/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/heavytrooperft/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/heavytrooperft/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/heavytrooperft/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/heavytrooperft/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/heavytrooperft/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/heavytrooperft/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_run_fire + 0, "anm/heavytrooperft/C_RunF.anm") + Anim(a_combat_run_fire + 1, "anm/CombatTest/C_RunF_LAim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_fire + 2, "anm/CombatTest/C_RunF_RAim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_jump_drop, "anm/CombatTest/C_Railing_jump_drop.anm") + Anim(a_combat_railjump, "anm/CombatTest/C_Railing_jump.anm") + Anim(a_combat_windowjump, "anm/CombatTest/C_window_Roll.anm") + Anim(a_combat_crawl, "anm/act/Act_RifleC_PodlejzaniDveri.anm") + + Anim(a_combat_llean + 0, "anm/CombatTest/C_LeanL_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 1, "anm/CombatTest/C_LeanL_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 2, "anm/CombatTest/C_LeanL_Out.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 0, "anm/CombatTest/C_LeanR_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 1, "anm/CombatTest/C_LeanR_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 2, "anm/CombatTest/C_LeanR_Out.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_cover + 0, "anm/HeavyTrooperft/C_Cover_In.anm") + Anim(a_combat_cover + 1, "anm/HeavyTrooperft/C_Cover_Idle.anm") + Anim(a_combat_cover + 2, "anm/HeavyTrooperft/C_Cover_Out.anm") + +//------------- PISTOL -------------------------------------------------- + BeginAnimSet("Technician_pistol") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/civil_pistol/R_Idle.anm") + Anim(a_alert_idle + 0, "anm/civil_pistol/R_Idle.anm") + Anim(a_combat_idle + 0, "anm/civil_pistol/c_idle.anm") + AnimFlags(ASF_AIMING) + + Anim(a_spot_idle_var + 0, "anm/combattest/c_disturb_l.anm") + Anim(a_spot_idle_var + 1, "anm/combattest/c_disturb_r.anm") + + Anim(a_relax_walk, "anm/civil_pistol/R_WalkF.anm") + Anim(a_alert_walk, "anm/civil_pistol/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_walk, "anm/civil_pistol/C_RunF.anm") + + Anim(a_relax_bwalk, "anm/civil_pistol/C_2RunB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_bwalk, "anm/civil_pistol/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_bwalk, "anm/civil_pistol/C_2RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run, "anm/civil_pistol/C_RunF.anm") + Anim(a_alert_run, "anm/civil_pistol/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run, "anm/civil_pistol/C_RunF.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_aim, "anm/civil_pistol/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_brun, "anm/civil_pistol/C_2RunB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_brun, "anm/civil_pistol/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_brun, "anm/civil_pistol/C_2RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/civil_pistol/C_2RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/civil_pistol/C_2RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/civil_pistol/C_2RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/civil_pistol/C_2RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/civil_pistol/C_2RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/civil_pistol/C_2RunR_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_crouch + 0, "anm/civil_pistol/C_Crouch_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 1, "anm/civil_pistol/C_Crouch_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 2, "anm/civil_pistol/C_Crouch_Out.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_run_fire + 0, "anm/civil_pistol/C_RunF.anm") + Anim(a_combat_run_fire + 1, "anm/civil_pistol/C_RunF_AimL.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_fire + 2, "anm/civil_pistol/C_RunF_AimR.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain + 0,"anm/civil_pistol/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 1,"anm/civil_pistol/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 2,"anm/civil_pistol/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 3,"anm/civil_pistol/c_pain01.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain_back + 0,"anm/civil_pistol/c_pain02.anm") + Anim(a_pain_back + 1,"anm/civil_pistol/c_pain02.anm") + Anim(a_pain_back + 2,"anm/civil_pistol/c_pain02.anm") + Anim(a_pain_back + 3, "anm/civil_pistol/c_pain02.anm") + + Anim(a_jump_drop, "anm/CombatTest/C_Railing_jump_drop.anm") + Anim(a_combat_railjump, "anm/CombatTest/C_Railing_jump.anm") + Anim(a_combat_windowjump, "anm/CombatTest/C_window_Roll.anm") + Anim(a_combat_crawl, "anm/act/act_pistolc_podlejzanidveri.anm") + + Anim(a_combat_llean + 0, "anm/CombatTest/C_LeanL_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 1, "anm/CombatTest/C_LeanL_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 2, "anm/CombatTest/C_LeanL_Out.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 0, "anm/CombatTest/C_LeanR_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 1, "anm/CombatTest/C_LeanR_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 2, "anm/CombatTest/C_LeanR_Out.anm") + AnimFlags(ASF_AIMING) + + Anim(a_alert_turn + 0,"anm/civil_pistol/C_Turn180L.anm",45) + Anim(a_alert_turn + 1,"anm/civil_pistol/C_Turn180R.anm",45) + + Anim(a_combat_turn + 0,"anm/civil_pistol/C_Turn180L.anm",45) + Anim(a_combat_turn + 1,"anm/civil_pistol/C_Turn180R.anm",45) + + +//----------------------------------------------------------------------- +//-------- SHOT GUN ----------------------------------------------------- + BeginAnimSet("Guard") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/CombatTest/R_Idle.anm") + Anim(a_relax_idle_var + 0,"anm/CombatTest/R_Idle_Var01.anm") + Anim(a_relax_idle_var + 1,"anm/CombatTest/R_Idle_Var02.anm") + Anim(a_relax_idle_var + 2,"anm/CombatTest/R_Idle_Var03.anm") + Anim(a_alert_idle + 0, "anm/CombatTest/R_Idle.anm") + Anim(a_alert_idle_var + 0,"anm/CombatTest/R_Idle_Var01.anm") + Anim(a_alert_idle_var + 1,"anm/CombatTest/R_Idle_Var02.anm") + Anim(a_alert_idle_var + 2,"anm/CombatTest/R_Idle_Var03.anm") + + Anim(a_combat_idle + 0, "anm/shotgun/c_idle.anm") + AnimFlags(ASF_AIMING) + + Anim(a_spot_idle_var + 0, "anm/shotgun/c_disturb_l.anm") + Anim(a_spot_idle_var + 1, "anm/shotgun/c_disturb_r.anm") + + Anim(a_relax_walk, "anm/CombatTest/R_WalkF.anm") + Anim(a_alert_walk, "anm/CombatTest/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_walk, "anm/shotgun/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_bwalk, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_bwalk, "anm/CombatTest/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_bwalk, "anm/shotgun/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run, "anm/CombatTest/R_RunF.anm") + Anim(a_alert_run, "anm/CombatTest/A_WalkF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run, "anm/CombatTest/C_RunF.anm") + Anim(a_combat_run_aim, "anm/shotgun/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_brun, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_brun, "anm/CombatTest/A_WalkB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_brun, "anm/shotgun/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/shotgun/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/shotgun/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/shotgun/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/shotgun/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/shotgun/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/shotgun/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_alert_turn + 0,"anm/CombatTest/C_Turn180L.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_turn + 1,"anm/CombatTest/C_Turn180R.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_turn + 0,"anm/CombatTest/C_Turn180L.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_turn + 1,"anm/CombatTest/C_Turn180R.anm") + AnimFlags(ASF_AIMING) + + Anim(a_crouch + 0, "anm/CombatTest/C_Crouch_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 1, "anm/CombatTest/C_Crouch_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 2, "anm/CombatTest/C_Crouch_Out.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch_fire + 0, "anm/CombatTest/C_Crouch_fire_1h.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch_fire + 1, "anm/CombatTest/C_Crouch_fire_2h.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_run_fire + 0, "anm/CombatTest/C_RunF_BAim_Panic.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_fire + 1, "anm/CombatTest/C_RunF_LAim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run_fire + 2, "anm/CombatTest/C_RunF_RAim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain + 0,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 1,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 2,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 3,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain_back + 0,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 1,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 2,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 3, "anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + +//NEW + Anim(a_combat_railjump, "anm/CombatTest/C_Railing_jump.anm") + Anim(a_combat_windowjump, "anm/CombatTest/C_window_Roll.anm") + Anim(a_jump_drop, "anm/CombatTest/C_Railing_jump_drop.anm") + Anim(a_combat_crawl, "anm/act/Act_RifleC_PodlejzaniDveri.anm") + + Anim(a_combat_llean + 0, "anm/CombatTest/C_LeanL_In.anm") + Anim(a_combat_llean + 1, "anm/CombatTest/C_LeanL_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 2, "anm/CombatTest/C_LeanL_Out.anm") + Anim(a_combat_rlean + 0, "anm/CombatTest/C_LeanR_In.anm") + Anim(a_combat_rlean + 1, "anm/CombatTest/C_LeanR_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 2, "anm/CombatTest/C_LeanR_Out.anm") + + Anim(a_combat_grenade + 0, "anm/CombatTest/C_Grenade.anm") + Anim(a_combat_grenade + 1, "anm/CombatTest/C_Grenade_L.anm") + Anim(a_combat_grenade + 2, "anm/CombatTest/C_Grenade_R.anm") + Anim(a_combat_grenade + 3, "anm/CombatTest/C_Grenade_Down.anm") + + Anim(a_combat_grenade_crouch + 0, "anm/CombatTest/C_Crouch_Grenade_Up.anm") + Anim(a_combat_grenade_crouch + 1, "anm/CombatTest/C_Crouch_Grenade_L.anm") + Anim(a_combat_grenade_crouch + 2, "anm/CombatTest/C_Crouch_Grenade_R.anm") + + Anim(a_combat_closecombat + 0, "anm/CombatTest/C_CloseHit_1.anm") + Anim(a_combat_closecombat + 1, "anm/CombatTest/C_CloseHit_4.anm") + Anim(a_combat_closecombat + 2, "anm/CombatTest/C_CloseHit_5.anm") + + Anim(a_act_left_go, "anm/act/Act_RifleC_Commands_LeftGo.anm") + Anim(a_act_right_go, "anm/act/Act_RifleC_Commands_RightGo.anm") + Anim(a_act_back_go, "anm/act/Act_RifleC_Commands_BackGo.anm") + Anim(a_act_forward_go, "anm/act/Act_RifleC_Commands_AllGo02.anm") + Anim(a_act_hold, "anm/act/Act_RifleC_Commands_Hold.anm") + Anim(a_act_look_left, "anm/act/Act_RifleC_Look_Left.anm") + Anim(a_act_look_right, "anm/act/Act_RifleC_Look_Right.anm") + +//----------------------------------------------------------------------- +BeginAnimSet("Player") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/player/hackIdle.anm") + + Anim(a_combat_idle + 0, "anm/CombatTest/c_idle.anm") + Anim(a_combat_idle + 1, "anm/civil_pistol/c_idle.anm") + + Anim(a_combat_walk, "anm/CombatTest/C_RunF_Aim.anm") +// Anim(a_combat_walk+1, "anm/CombatTest/C_RunF_Aim.anm") + Anim(a_combat_walk + 1, "anm/civil_pistol/C_RunF_Aim.anm") + + Anim(a_combat_bwalk, "anm/CombatTest/C_RunB_Aim.anm") +// Anim(a_combat_bwalk+1, "anm/CombatTest/C_RunB_Aim.anm") + Anim(a_combat_bwalk + 1, "anm/civil_pistol/C_RunB_Aim.anm") + + Anim(a_combat_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + Anim(a_combat_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + + Anim(a_crouch + 0, "anm/CombatTest/C_Crouch_Idle.anm") + Anim(a_crouch + 1, "anm/CombatTest/C_Crouch_In.anm") + Anim(a_crouch + 2, "anm/CombatTest/C_Crouch_Out.anm") + + +//----------------------------------------------------------------------- +//-------- MACHINE GUN -------------------------------------------------- + BeginAnimSet("SecurityBot") //servicebot cervenej - combat +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/CombatTest/R_Idle.anm") + Anim(a_alert_idle + 0, "anm/CombatTest/c_idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_idle + 0, "anm/CombatTest/c_idle.anm") + AnimFlags(ASF_AIMING) + + Anim(a_spot_idle_var + 0, "anm/combattest/c_disturb_l.anm") + Anim(a_spot_idle_var + 1, "anm/combattest/c_disturb_r.anm") + + Anim(a_relax_walk, "anm/CombatTest/R_WalkF.anm") + Anim(a_alert_walk, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_walk, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_bwalk, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_bwalk, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_bwalk, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run, "anm/CombatTest/R_RunF.anm") + Anim(a_alert_run, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_run, "anm/CombatTest/C_RunF.anm") + Anim(a_combat_run_aim, "anm/CombatTest/C_RunF_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_brun, "anm/CombatTest/R_WalkB.anm") + Anim(a_alert_brun, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_brun, "anm/CombatTest/C_RunB_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/CombatTest/C_RunL_Aim.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/CombatTest/C_RunR_Aim.anm") + AnimFlags(ASF_AIMING) + + Anim(a_alert_turn + 0,"anm/CombatTest/C_Turn180L.anm") + Anim(a_alert_turn + 1,"anm/CombatTest/C_Turn180R.anm") + + Anim(a_combat_turn + 0,"anm/CombatTest/C_Turn180L.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_turn + 1,"anm/CombatTest/C_Turn180R.anm") + AnimFlags(ASF_AIMING) + + Anim(a_crouch + 0, "anm/CombatTest/C_Crouch_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 1, "anm/CombatTest/C_Crouch_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_crouch + 2, "anm/CombatTest/C_Crouch_Out.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain + 0,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 1,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 2,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain + 3,"anm/CombatTest/c_pain01.anm") + AnimFlags(ASF_AIMING) + + Anim(a_pain_back + 0,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 1,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 2,"anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + Anim(a_pain_back + 3, "anm/CombatTest/c_pain02.anm") + AnimFlags(ASF_AIMING) + +//NEW + Anim(a_jump_drop, "anm/CombatTest/C_Railing_jump_drop.anm") + Anim(a_combat_railjump, "anm/CombatTest/C_Railing_jump.anm") + Anim(a_combat_windowjump, "anm/CombatTest/C_window_Roll.anm") + Anim(a_combat_crawl, "anm/act/Act_RifleC_PodlejzaniDveri.anm") + + Anim(a_combat_llean + 0, "anm/CombatTest/C_LeanL_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 1, "anm/CombatTest/C_LeanL_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_llean + 2, "anm/CombatTest/C_LeanL_Out.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 0, "anm/CombatTest/C_LeanR_In.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 1, "anm/CombatTest/C_LeanR_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_rlean + 2, "anm/CombatTest/C_LeanR_Out.anm") + AnimFlags(ASF_AIMING) + +//-------- SHOT GUN ----------------------------------------------------- + BeginAnimSet("Boss") +//----------------------------------------------------------------------- + Anim(a_relax_idle + 0, "anm/boss/C_Idle.anm") + Anim(a_relax_idle_var + 0,"anm/boss/C_Idle_Var1.anm") + Anim(a_relax_idle_var + 1,"anm/boss/C_Idle_Var1.anm") + Anim(a_relax_idle_var + 2,"anm/boss/C_Idle_Var1.anm") + + Anim(a_alert_idle + 0, "anm/boss/C_Idle.anm") + Anim(a_alert_idle_var + 0,"anm/boss/C_Idle_Var1.anm") + Anim(a_alert_idle_var + 1,"anm/boss/C_Idle_Var1.anm") + Anim(a_alert_idle_var + 2,"anm/boss/C_Idle_Var1.anm") + + Anim(a_combat_idle + 0, "anm/boss/C_Idle.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_idle_var + 0,"anm/boss/C_Idle_Var1.anm") + Anim(a_combat_idle_var + 1, "anm/boss/C_Fire_secondary.anm") + + Anim(a_relax_walk, "anm/boss/C_WalkF.anm") + Anim(a_alert_walk, "anm/boss/C_WalkF.anm") + Anim(a_combat_walk, "anm/boss/C_WalkF.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_bwalk, "anm/boss/C_WalkB.anm") + Anim(a_alert_bwalk, "anm/boss/C_WalkB.anm") + Anim(a_combat_bwalk, "anm/boss/C_WalkB.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_run, "anm/boss/C_WalkF.anm") + Anim(a_alert_run, "anm/boss/C_WalkF.anm") + Anim(a_combat_run, "anm/boss/C_WalkF.anm") + AnimFlags(ASF_AIMING) + + Anim(a_combat_run_aim, "anm/boss/C_WalkF.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_brun, "anm/boss/C_WalkB.anm") + Anim(a_alert_brun, "anm/boss/C_WalkB.anm") + Anim(a_combat_brun, "anm/boss/C_WalkB.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_strafe + 0,"anm/boss/C_WalkL.anm") + AnimFlags(ASF_AIMING) + Anim(a_relax_strafe + 1,"anm/boss/C_WalkR.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 0,"anm/boss/C_WalkL.anm") + AnimFlags(ASF_AIMING) + Anim(a_alert_strafe + 1,"anm/boss/C_WalkR.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 0,"anm/boss/C_WalkL.anm") + AnimFlags(ASF_AIMING) + Anim(a_combat_strafe + 1,"anm/boss/C_WalkR.anm") + AnimFlags(ASF_AIMING) + + Anim(a_relax_turn + 0,"anm/boss/C_Turn180L.anm") + Anim(a_relax_turn + 1,"anm/boss/C_Turn180R.anm") + + Anim(a_alert_turn + 0,"anm/boss/C_Turn180L.anm") + Anim(a_alert_turn + 1,"anm/boss/C_Turn180R.anm") + + Anim(a_combat_turn + 0,"anm/boss/C_Turn180L.anm") + Anim(a_combat_turn + 1,"anm/boss/C_Turn180R.anm") + +/* + Anim(a_combat_run_fire + 0, "anm/boss/C_RunF_BAim_Panic.anm") + Anim(a_combat_run_fire + 1, "anm/boss/C_RunF_LAim.anm") + Anim(a_combat_run_fire + 2, "anm/boss/C_RunF_RAim.anm") +*/ + Anim(a_combat_closecombat + 0, "anm/boss/C_Fire_secondary.anm") + Anim(a_combat_closecombat + 1, "anm/boss/C_Fire_secondary.anm") + Anim(a_combat_closecombat + 2, "anm/boss/C_Fire_secondary.anm") + +} diff --git a/Alpha Prime/Mod/scripts/definitions/gameplay.h b/Alpha Prime/Mod/scripts/definitions/gameplay.h new file mode 100644 index 0000000..abab305 --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/gameplay.h @@ -0,0 +1,332 @@ +#ifdef DEMO + string AlphaPrimeVersion = "Demo 1.3" //vpravo dole v main menu +#else + string AlphaPrimeVersion = "1.3" //vpravo dole v main menu +#endif + +// !!!!!!!! NEMENIT Start !!!!!!!! +//vyska kamery (je PlayerCapsuleExtends[crouch] * 2) + PlayerCapsuleRadius +const float PlayerCapsuleRadius = 11 //polomer kapsuly +const float PlayerCapsuleExtends[2] = {17, 6} //od stredu kapsuly po zaciatok obluku +const float PlayerCameraOffset = 4 //od zaciatku horneho poloobluku sa kamera umiestni o tuto hodnotu vysie +const float PlayerMaxLeanAngle = 25 //maximalny uhol naklonu do stran +const float PlayerMaxSurfaceAngle = 60 //do jak strmeho kopca bude schopny vyliezt. 0 - 90 +const float PlayerMaxSurfaceAngleForNormalJump = 40 //ped je na sikmejsej ploche nez toto tak uz neskace smerom hore ale v smere normaly kontaktu +const float PlayerMaxStairHeight = 19 //jak velku prekazku (schod) dokaze zdolat + + +const float PlayerWalkSpeed = 189 //maximalna rychlost chodze //160 +const float PlayerRunSpeed = 194 +const float PlayerCrouchSpeed = 90 +const float PlayerJumpPow = 14000//dwefault 10008 +const float PlayerExactAimSpeed = 169 + + +const float PlayerWalkAccel = 3500 //jak rychle bude zrychlovat z 0 na normalnu rychlost +const float PlayerRunAccel = 3000 +const float PlayerCrouchAccel = 2000 +const float PlayerExactAimAccel = 2000 +const float PlayerJumpControlAccel = 275 +const float PlayerFootstepTime = 43 + +// !!!!!!!! NEMENIT End !!!!!!!! + +const float IdleWarAnimWaitMin = 1100 +const float IdleWarAnimWaitMax = 2200 + + +//const float DoorTriggerOverrunFront = 70 //o kolko presahuje interny trigger dveri smerom pred a za dvere (ked pozerame priamo na nich) +//const float DoorTriggerOverrunSide = 12 //o kolko presahuje interny trigger dveri smerom do stran (ked pozerame priamo na nich) +const float DoorTriggerOverrunFront = 54 //o kolko presahuje interny trigger dveri smerom pred a za dvere (ked pozerame priamo na nich) +const float DoorTriggerOverrunSide = 6 //o kolko presahuje interny trigger dveri smerom do stran (ked pozerame priamo na nich) + +const float ReconSignalDistFromTrigger = 660 //maximalana vzdialenost playera od okraja hackovaceho triggeru kde este "chyta signal" + +const float BulletTimeScale = 0.26 //spomalenie pre bulletTime +const float BulletTimeMax = 79 //cas po ktory vydrzi plny bullet time (v sekudach) + + +const float FlashLightMaxTime = 20 //vydrz baterky v sekundach (cas) +const float FlashLightCharging = 4 //za jaky cas sa baterka nabije. v sekundach (cas) + +const float PlayerHealthUpSpeed = 0.5 //0 - 1 percento z playeroveho zdravia ktore sa mu pripocita za jednu sekundu doplnovania +const float PlayerHealthPumpWait = 4 //cas po ktory sa od playeroveho zranenia nebude pripocitavat health (v sekundach) + +const float MineActivationDistance = 200 //vdialenost ktora je potrebna k aktivovaniu miny (item_weapon_mine) +//========================================================================================= +//const float PLAYER_DAMAGE_SCALE[3] = {2.0, 1.5, 1.2} //globalni faktor na posileni playera. EASY NORMAL HARD +//const float ENEMY_DAMAGE_SCALE[3] = {0.7, 0.8, 1.0} //globalni faktor na posileni nepratel EASY NORMAL HARD +//1.3 +const float ENEMY_DAMAGE_SCALE[3] = {0.7, 0.8, 1.0} //globalni faktor na posileni nepratel EASY NORMAL HARD + +//========================================================================================= +//Ruzne nastaveni +//========================================================================================= + +const float DISTANCE_TO_CLOSECOMBAT = 55 //pri teto vzdalenosti mezi playerem a nepritelem dojde k close-hitu + //Nezvysovat! pokud se nezvysi i AttackDistMin + +const float DIST_TO_IMMED_REACTION = 99 //pod tuto vzdalenost reaguje okamzite, jinak ma trochu dlouhe vedeni, + //v zavislosti na vzdalenosti, aby mel player sanci nakouknout a hned + //zmizet aniz by vzbudil pozornost + +const float MIN_OBSTACLE_SIZE = 10 //pod tuto velikost (plati pro vsechny osy) se nevytvari prekazka pro patfinder + +//do jake vzdalenosti jsou slyset nasledujici ruchy +const float NOISERANGE_FOOTSTEP = 200 //kroky behu (chuze slyset neni) +const float NOISERANGE_THUD = 250 //dopad ze skoku +const float NOISERANGE_SHOOT = 580 //vystrel +const float NOISERANGE_ATTACK = 320 // +const float NOISERANGE_PHYSICS = 200 //dopad fyzikalniho objektu +const float NOISERANGE_FLAME = 385 + +//========================================================================================= +// Ammo +//========================================================================================= + +const int PistolAmmoPerMagazine = 10 +const int ShotgunAmmoPerMagazine = 9 +const int MachinegunAmmoPerMagazine = 31 +const int SniperRifleAmmoPerMagazine = 5 +const int RocketLauncherAmmoPerMagazine = 2 +const int FlameThrowerAmmoPerMagazine = 500 +const int GrenadeAmmoPerMagazine = 1 + +//v akom poradi sa ma pokusat volit zbrane ked v tej ktoru drzime nam dosli naboje +const int BestWeapChoices[9][7] = { 4,3,2,5,7,6,1, //CDummyWeapon 0 + 4,3,2,5,7,6,8, //CJackHammer 1 + 3,4,5,7,1,8,6, //CPistol 2 + 4,5,7,2,1,8,6, //CShotgun 3 + 3,5,7,2,1,8,6, //CMachinegun 4 + 4,3,7,2,1,8,6, //CSniperRifle 5 + 4,3,5,7,2,1,8, //CRocketLauncher 6 + 4,3,5,2,1,8,6, //CFlameThrower 7 + 4,3,5,7,2,1,6} //CGrenade 8 + +//naboje do playerovych zbrani na zaciatku hry. kedze na zaciatku ma len kladivo tak uz to neni aktualne +const int PistolAmmoOnStart = 60 +const int ShotgunAmmoOnStart = 26 +const int MachinegunAmmoOnStart = 17 +const int SniperRifleAmmoOnStart = 5 +const int RocketLauncherAmmoOnStart = 4 +const int FlameThrowerAmmoOnStart = 400 +const int GrenadeAmmoOnStart = 2 +const int GrenadeMaximumAmmo = 10 + +//mnozstvo nabojov v krabickach najdenych v levloch EASY NORMAL HARD +const int AmmoGunQuantity[3] = {24, 20, 8} +const int AmmoShotgunQuantity[3] = {19, 12, 5} +const int AmmoMachinegunQuantity[3] = {60, 50, 16} +const int AmmoSniperRifleQuantity[3] = {12, 10, 4} +const int AmmoRocketLauncherQuantity[3] = {4, 2, 1} +const int AmmoFlameThrowerQuantity[3] = {720, 600, 200} + +//naboje v zbraniach po zabitych enemakoch EASY NORMAL HARD +const int DroppedAmmoGunQuantityMin[3] = {5, 4, 2} +const int DroppedAmmoGunQuantityMax[3] = {10, 10, 4} + +const int DroppedAmmoShotgunQuantityMin[3] = {5, 3, 2} +const int DroppedAmmoShotgunQuantityMax[3] = {8, 6, 5} + +const int DroppedAmmoMachinegunQuantityMin[3] = {5, 2, 1} +const int DroppedAmmoMachinegunQuantityMax[3] = {19, 16, 7} + +const int DroppedAmmoSniperRifleQuantityMin[3] = {1, 1, 1} +const int DroppedAmmoSniperRifleQuantityMax[3] = {8, 5, 3} + +const int DroppedAmmoRocketLauncherQuantityMin[3] = {2, 1, 1} +const int DroppedAmmoRocketLauncherQuantityMax[3] = {4, 4, 3} + +const int DroppedAmmoFlameThrowerQuantityMin[3] = {1, 1, 1} +const int DroppedAmmoFlameThrowerQuantityMax[3] = {230, 210, 60} + +//maximalne ammo pre jednotlive zbrane +const int MaxAmmos[9] = { 1, //CDummyWeapon 0 + 1, //CJackHammer 1 + 250, //CPistol 2 + 120, //CShotgun 3 + 370, //CMachinegun 4 + 50, //CSniperRifle 5 + 20, //CRocketLauncher 6 + 9999999, //CFlameThrower 7 + 10} //CGrenade 8 + +//========================================================================================= +// Health +//========================================================================================= + +const float PlayerMaxHealth = 6000 +const int MedikitHealth[3] = {4000, 2800, 2000} //EASY NORMAL HARD +const float HealthDeviceHealth[3] = {7500, 5500, 2000} //EASY NORMAL HARD +const float HealthPumpUpSpeed = 1200 //kolik jednotek kysliku pribudne za jednu sekundu cerpani z entity func_health_device +const float PlayerMaxOxygen = 90 //plny zasobnik kysliku +const float OxygenPumpUpSpeed = 20 //kolik jednotek kysliku pribudne za jednu sekundu cerpani z entity func_oxygen +const float OxygenDownSpeeds[3] = {1.5, 1.0, 0.7} //jak rychle mu klesa zasoba kysliku v nedychatelnej atmosfere. jednotky za sekundu {MaximumToxicity, MediumToxicity, MinimumToxicity} +const float NoOxygenHurtTime = 1 //ked nema co dychat a nema zasobu kysliku tak bude zranovany v tomto intervale (v sekundach) +const float NoOxygenHealthDown = 30 //vzdy ked bude zraneny tym ze nema kyslik, uberie sa mu tato ciastka + +const float PlayerDropDownHurtHeight = 140 //vyska od ktorej to pri pade playera zacina zranovat. (skok z tejto vysky zacina zranovat) +const float PlayerDropDownHurtRange = 190 //PlayerDropDownHurtHeight + tato hodnota je vyska ktora znamena zabite playera aj ked ma plnu health + +/* +const float FaggioliHealth = 5000 +const float WarrenHealth = 5000 +const float NPCcommanderHealth = 5000 +const float Dron1Health = 600 +const float HeavySpiderHealth = 7000 +const float ServiceBot1Health = 2000 //servisak +const float ServiceBot2Health = 2000 //cerveny agresivni servisak +const float SecuritySpiderHealth = 6000 + +const float TechnicianHealth = 900 +const float GuardHealth = 1800 +const float LightTrooperHealth = 3500 +const float HeavyTrooperRLHealth = 7000 + +//plamenometcik musi mit podstatne vetsi vydrz, nez cokoliv jineho +//protoze se pohybuje pomalu, ma kratky dostrel a musi byt videt, jak se i obcas kryje +//nez ho player udola. Ted sel sejmout behem 10sec +const float HeavyTrooperFTHealth = 9000 + +const float CommanderHealth = 6000 + +const float BossHealth = 100000 +*/ + +// 1.3 version +const float ThrowDamage = 200 //kolik sebere zasah vrzenym predmetem +const float FaggioliHealth = 4100 +const float WarrenHealth = 4100 +const float NPCcommanderHealth = 1500 +const float Dron1Health = 700 +const float HeavySpiderHealth = 6500 +const float ServiceBot1Health = 1800//servisak +const float ServiceBot2Health = 1900 //cerveny agresivni servisak +const float SecuritySpiderHealth = 3800 + +const float TechnicianHealth = 980 +const float GuardHealth = 1500 +const float LightTrooperHealth = 2900 +const float HeavyTrooperRLHealth = 5000 + +//plamenometcik musi mit podstatne vetsi vydrz, nez cokoliv jineho +//protoze se pohybuje pomalu, ma kratky dostrel a musi byt videt, jak se i obcas kryje +//nez ho player udola. Ted sel sejmout behem 10sec +const float HeavyTrooperFTHealth = 9000 + +const float CommanderHealth = 4000 + +const float BossHealth = 100000 + +//========================================================================================= +// Weapon/Monster damage +//========================================================================================= + +//rana zbrani do drzky. Mela by byt HODNE silna, aby se radeji player k nepratelum moc nesral +const float WDmgCloseHit = 1900 + +const float WDmgJackHammer = 1700 +const float WDmgGun = 760 +const float WDmgShotgun = 590 //nasobeno poctem broku, takze je ta hodnota v realu 8x vyssi! + +const float WDmgMachinegun = 490 +const float WDmgSniperRifle = 2500 +const float WDmgRocketLauncher = 1800 +const float WDmgFlameThrower = 60 +const float WDmgGrenade = 3350 +const float WDmgTachyonGrenade = 5580 + +const float WDmgTurret = 250 +const float WDmgHeavyTurret = 3000 +const float WDmgMine = 3500 + +const float WDmgFaggioli = 150 +const float WDmgWarren = 150 +const float WDmgNPCcommander = 150 +const float WDmgSpiderRobot = 60 +const float WDmgDron = 10 +const float WDmgServiceBot1 = 100 +const float WDmgServiceBot2 = 189 +const float WDmgSecuritySpider1 = 120 + +const float WDmgTechnician = 160 +const float WDmgGuard1 = 200 //shotgun +const float WDmgGuard2 = 175 //machinegun +const float WDmgLightTrooper = 190 //machinegun +const float WDmgLightTrooper2 = 200 //shotgun +const float WDmgLightTrooper3 = 335 //sniperrifle + +const float WDmgHeavyTrooperRL = 1950 +const float WDmgHeavyTrooperFT = 48 + +const float WDmgCommander = 250 + +const float WDmgEnemyGrenade = 2400 + +const float WDmgBoss = 2000 //rockets +const float WDmgBoss2 = 1000 //sperma/second + +//========================================================================================= +// Definice zranovaci tabulky pro jednotlive typy nepratel +//========================================================================================= +float HumanHurtFactors[64] + +void InitHurtFactors() +{ + //HumanHurtFactors + HumanHurtFactors[B_Hips] = 0.95 + +// HumanHurtFactors[B_Head] = 2.0 +// HumanHurtFactors[B_Neck] = 2.0 +//1.3 + HumanHurtFactors[B_Head] = 3.5 + HumanHurtFactors[B_Neck] = 2.7 + + HumanHurtFactors[B_Hips] = 0.8 + + HumanHurtFactors[B_Spine] = 1.2 + HumanHurtFactors[B_Spine1] = 0.9 + HumanHurtFactors[B_Spine2] = 1.25 + HumanHurtFactors[B_Pelvis] = 1.5 + HumanHurtFactors[B_LeftShoulderBlade] = 0.7 + HumanHurtFactors[B_LeftShoulder] = 0.75 + HumanHurtFactors[B_LeftArm] = 0.85 + HumanHurtFactors[B_LeftArmRoll] = 0.89 + HumanHurtFactors[B_LeftForeArm] = 0.95 + HumanHurtFactors[B_LeftForeArmRoll] = 1.15 + HumanHurtFactors[B_LeftHand] = 0.87 + HumanHurtFactors[B_LeftHandPivot] = 0.82 + HumanHurtFactors[B_LeftHandThumb1] = 0.78 + HumanHurtFactors[B_LeftHandThumb2] = 0.78 + HumanHurtFactors[B_LeftHandIndex1] = 0.78 + HumanHurtFactors[B_LeftHandIndex2] = 0.78 + HumanHurtFactors[B_LeftHandMiddle1] = 0.78 + HumanHurtFactors[B_LeftHandMiddle2] = 0.78 + HumanHurtFactors[B_RightShoulderBlade] = 0.85 + HumanHurtFactors[B_RightShoulder] = 0.9 + HumanHurtFactors[B_RightArm] = 0.85 + HumanHurtFactors[B_RightArmRoll] = 0.7 + HumanHurtFactors[B_RightForeArm] = 0.7 + HumanHurtFactors[B_RightForeArmRoll] = 1.15 + HumanHurtFactors[B_RightHand] = 0.79 + HumanHurtFactors[B_RightHandPivot] = 0.7 + HumanHurtFactors[B_RightHandThumb1] = 0.7 + HumanHurtFactors[B_RightHandThumb2] = 0.7 + HumanHurtFactors[B_RightHandIndex1] = 0.7 + HumanHurtFactors[B_RightHandIndex2] = 0.7 + HumanHurtFactors[B_RightHandMiddle1] = 0.7 + HumanHurtFactors[B_RightHandMiddle2] = 0.7 + HumanHurtFactors[B_LeftUpLeg] = 0.9 + HumanHurtFactors[B_LeftUpLegRoll] = 1.2 + HumanHurtFactors[B_LeftLeg] = 0.98 + HumanHurtFactors[B_LeftLegRoll] = 1.0 + HumanHurtFactors[B_LeftFoot] = 0.8 + HumanHurtFactors[B_LeftToeBase] = 0.7 + HumanHurtFactors[B_RightUpLeg] = 0.9 + HumanHurtFactors[B_RightUpLegRoll] = 1.2 + HumanHurtFactors[B_RightLeg] = 0.98 + HumanHurtFactors[B_RightLegRoll] = 1.0 + HumanHurtFactors[B_RightFoot] = 0.8 + HumanHurtFactors[B_RightToeBase] = 0.7 +} + diff --git a/Alpha Prime/Mod/scripts/definitions/globals.h b/Alpha Prime/Mod/scripts/definitions/globals.h new file mode 100644 index 0000000..988268c --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/globals.h @@ -0,0 +1,316 @@ + +float currenttime +const float DefaultFOV = 65 +float g_fDecalLifetime = 99 + +float PlayerCapsuleHeights[2] //celkove vysky kapsul playera (normal a crouch) +float PlayerCapsuleHalfHeights[2] //Polovicne vysky kapsul playera (normal a crouch) + +const float JOY_DEATH_ZONE = 100 +const float JOY_MAX_POW = 500 + +//physics +const int JOINT_FIXED = 1 +const int JOINT_BALL = 2 +const int JOINT_HINGE = 3 +const int JOINT_SLIDING = 4 +const int JOINT_ANGLIMIT = 5 +const int JOINT_LINLIMIT = 6 +const int JOINT_FIXEDORIENT = 7 +const int JOINT_PRISMATIC = 8 +const int JOINT_SPRINGDAMPER = 9 +const int JOINT_ANGSPRINGDAMPER = 10 + + +const float defaultBreakLimit = 30 +const float defaultWeight = 5 +const float defaultWeapScale = 1 +const float halfWeapScale = 0.5 +const float defaultBodyHealth = 100 +const float defaultJointHealth = 50 +const float ShootImpactScale = 124.671 //WeaponDamage * ShootImpactScale = fyzikalna sila pre zasah +const float ExplosionImpactScale = 41.04 //ExplosionDamage * ShootImpactScale = fyzikalna sila pre zasah v ohnisku vybuchu +const float MinImpactSoundsDelay = 0.1666 //impact sound jedneho body nesmie zahrat po sebe skor ako je tato hodnota v sekundach + +const int GEOMTYPE_NONE = 0 //z modelu +const int GEOMTYPE_BOX = 1 +const int GEOMTYPE_SPHERE = 2 +const int GEOMTYPE_CAPSULE = 3 +const int GEOMTYPE_NULL = 4 //ziadna + +#ifdef GERMAN + const float RAGDOLL_TIMEOUT = 48 //po kolika vterinach se ragdolly deaktivoujou +#else + const float RAGDOLL_TIMEOUT = 196 //po kolika vterinach se ragdolly deaktivoujou +#endif + +const int MaxAvailableWeapons = 8 + +//========================================================================================= +// Defs & globals +//========================================================================================= + +const int ASF_AIMING = 1 +const int ASF_MOVEMENT = 2 +const int ASF_ALL = 0xffffffff + + +const int DisableFuncFlag = 0x400 //(bit 10, 11. v poradi) + + //class types +const int ClassTypeWorld = 1 + +const int ClassTypeFunc = 2 + const int ClassNumDoor = 3 + const int ClassNumRotDoor = 4 + const int ClassNumRotating = 9 + +const int ClassTypeTrigger = 3 + +const int ClassTypeLight = 5 + +const int ClassTypeSound = 7 + +const int ClassTypeInfo = 8 + const int ClassNumNull = 2 + const int ClassNumImpacter = 3 + +const int ClassTypeCreature = 9 + const int ClassNumPlayer = 1 + +const int CTypeInfoWaypoint = 10 +const int CTypeInfoWpGroup = 11 + +const int ClassTypeItem = 13 + +const int ClassTypeMisc = 14 + +const int ClassTypeTrapAnim = 17 + +const int ClassTypeEnterableVehicle = 18 + +const int ClassTypeMiscPhysicsGlass = 200 + const int ClassNumMiscPhysicsGlass2 = 1 + +const int ClassTypeMiscShootDetector = 201 +const int ClassTypeMiscModel = 202 +const int ClassTypePhysicsPart = 203 +const int ClassTypeMiscShootingShield = 204 +const int ClassTypeRBone = 205 +const int ClassTypeFuncTrain = 206 + +//flags for noise identification +const int NOISE_FOOTSTEP = 0x00000001 +const int NOISE_SHOOT = 0x00000002 +const int NOISE_THUD = 0x00000004 +const int NOISE_PAIN = 0x00000008 +const int NOISE_PHYSICS = 0x00000010 +const int NOISE_ATTACK = 0x00000020 +const int NOISE_FLAME = 0x00000040 + +//AI states +//alertable +const int STATE_WALK = 1 +const int STATE_IDLE = 2 +const int STATE_OBSERVE = 3 +const int STATE_SCRIPT = 4 +const int STATE_GUARD = 5 //guarding +const int STATE_RETURN = 6 //return to last position +const int STATE_LOST_TARGET = 7 + +//alerted +const int STATE_1STSIGHT = 8 +const int STATE_CHASE = 9 +const int STATE_LR_ATTACK = 10 +const int STATE_ATTACK = 11 +const int STATE_CLOSECOMBAT = 12 + +//unalertable +const int STATE_COVER = 13 +const int STATE_ROAMING = 14 +const int STATE_BORN = 15 +const int STATE_COVERFROMDANGER = 16 + +const int STATE_DIE = 17 +const int STATE_DEAD = 18 + +//flagy u potvor. Promenna flags +const int FL_GUARD = 0x001 +const int FL_COMBAT = 0x002 +const int FL_FRIENDLY = 0x004 +const int FL_WAIT4TRIGGER = 0x008 +const int FL_PUPPET = 0x010 +const int FL_SUMMON = 0x020 +const int FL_NOTEST = 0x040 +const int FL_ROAM = 0x080 //automaticky nastavuje TACTICS_ROAM pro potvurky +const int FL_NODISABLE = 0x100 + +const int FL_SUMMON_TRIGGER = 0x028 + +//private +const int FL_SEE = 0x1000 +const int FL_HEAR = 0x2000 +const int FL_FEEL = 0x4000 +const int FL_HURTENEMIES = 0x8000 +const int FL_CANOPENDOORS = 0x10000 +const int FL_NOPAIN = 0x20000 +const int FL_FROZEN = 0x40000 + +const int ET_WORLD = 1 +const int ET_NOCOLLISION = 2 +const int ET_DEFAULT = 4 //veciam pre ktore nemaju nastavene nieco ine, nutno nastavit toto! +const int ET_PLAYER = 8 +const int ET_NPC = 16 + +const int ET_RAGDOLL = 32 +const int ET_DEBRIS = 64 +const int ET_GRENADE = 128 +const int ET_SHELL = 512 +const int ET_DOOR = 1024 + +const int ET_VEHICLE = 2048 +const int ET_PLAYERCAST = 4096 +const int ET_MANIPULATING = 8192 + +const int ET_PLAYERCLIP = 16384 + +//typy munice. Nastavit u zbrane v AmmoType +#ifdef EDITOR +const string AmmoTypeEditor[3] = {"AmmoPistol", "AmmoShotgun", "AmmoMachinegun"} +#endif + +const int AmmoJackHammer = 1 +const int AmmoPistol = 2 +const int AmmoShotgun = 3 +const int AmmoMachinegun = 4 +const int AmmoSniperRifle = 5 +const int AmmoRocketLauncher = 6 +const int AmmoFlameThrower = 7 +const int AmmoGrenade = 8 + +//----------------------------------------------------------------------------- + +const string bloodmark_names[4] = {"decals/gore/bloodmark1","decals/gore/bloodmark2","decals/gore/bloodmark3","decals/gore/bloodmark4"} +int bloodmarks[4] +int s_BurnShader + + +int s_hurt[4] + +//defaultne materialy. dalsie su v sound/materials.h +const int MATERIAL_METAL = 1 //plne zelezo +const int MATERIAL_IRON = 2 //plech +const int MATERIAL_GLASS = 3 //sklo +const int MATERIAL_PLASTIC = 4 //umela hmota +const int MATERIAL_LIQUID = 5 //tekutiny, voda +const int MATERIAL_SLIME = 6 //sliz, olej apod. +const int MATERIAL_BETON = 7 //beton +const int MATERIAL_RUBBER = 8 //guma, linoeum +const int MATERIAL_FLESH = 9 //maso, humanoidi +const int MATERIAL_STONE = 10 //kamen, skala +const int MATERIAL_GRAVEL = 11 //sterk + +const int MATERIAL_LAST = 12 //last one + +//----------------------------------------------------------------------------- +int Surf2Mat(int surf) +{ + if(!surf & SURF_MATERIAL_MASK) + return MATERIAL_METAL + + surf = surf & SURF_MATERIAL_MASK >> SURF_MATERIAL_SHIFT + surf = surf & 255 + return surf +} + +//----------------------------------------------------------------------------- +string SoundPaths[6] //cesty k ambientom pre aktualny level +float SoundVolumes[6] //hlasitosti ambientov +const int BS_NONE = -2 +const int BS_AMBIENT = 0 +const int BS_ATMOSPHERE = 1 +const int BS_FIGHT = 2 +const int BS_FIGHT2 = 3 +const int BS_DIALOG = 4 +const int BS_DIALOG2 = 5 + + +const int DefaultWeight = 40 + +//----------------------------------------------------------------------------- +// Global variables +//----------------------------------------------------------------------------- +//player stat widgets +widget WFlash + + +widget WView, WText, WMousePointer +widget WDialogText + +//widget LevelNumber + +int SmallFont, LargeFont, MainFont + +ctype CMinClass, CExtClass, CFuncClass, CDoorClass, CItemClass, CMiscPhysicsModel, CItemWeaponSteel, CItemMisc +ctype CSteelWeaponClass, CFireWeaponClass, CWeaponClass +ctype CAICreatureClass, CCreatureClass +ctype CGlassDebris, CBrkDebris, CProjectile +ctype CMiscPhysicsGlass +ctype CItemWeaponMine +ctype CParticleEffector +ctype CTriggerClass, CTriggerDynamic, CTriggerHackDetector +ctype CFuncDoor, CFuncDoorRot +ctype CRigidBodyClass, CMiscPhysicsPack, CPhysicsPart +ctype CInfoPath, CInfoConnection, CInfoWaypoint, CInfoNull +ctype CInfoPathSwitch +ctype CEnterableVehicle +ctype CRBone +ctype CJointClass + +const vobject VNULL +const hsound HNULL + +int g_iFly + +//----------------------------------------------------------------------------- +// Clima globals +//----------------------------------------------------------------------------- +//vector g_climaWind = ZeroVec +//vector g_climaWindDir = ZeroVec +//float g_WindPower +//float wind_val + +//----------------------------------------------------------------------------- +//mouse parms +int MouseX +int MouseY +float g_fMouseSpeedH +float g_fMouseSpeedV +int g_InvMouse +int g_MSpeedH +int g_MSpeedV +//----------------------------------------------------------------------------- + +bool CheatNextLevel +bool CheatWeapons +bool CheatAmmo +bool CheatImmortality +bool CheatHubbardium +bool CheatHealth + +bool IsPlayerID(int id) +{ + return true +/* + for(int n = 0; n < sizeof(g_iPlayerIDs); n++) + { + int i = g_iPlayerIDs[n] + if(i == id) + return true + + if(i < 0) + break + } + + return false*/ +} diff --git a/Alpha Prime/Mod/scripts/definitions/items.h b/Alpha Prime/Mod/scripts/definitions/items.h new file mode 100644 index 0000000..7be2673 --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/items.h @@ -0,0 +1,23 @@ +//Pouzite predmety ve hre. Rozsah 0...255. Globalni pro celou hru!!! + +const int CJackHammer = 1 +const int CPistol = 2 +const int CShotgun = 3 +const int CMachinegun = 4 +const int CSniperRifle = 5 +const int CRocketLauncher = 6 +const int CFlameThrower = 7 +const int CGrenade = 8 +const int CDummyWeapon = 9 + +const int CDronWeapon = 11 +const int CBossWeapon = 12 + +const int CustomProjectile1 = 10 +const int CustomProjectile2 = 11 +const int CustomProjectile3 = 12 +const int CustomProjectile4 = 13 +const int CustomProjectile5 = 14 +const int CustomProjectile6 = 15 + + diff --git a/Alpha Prime/Mod/scripts/definitions/items_def.h b/Alpha Prime/Mod/scripts/definitions/items_def.h new file mode 100644 index 0000000..ee5c758 --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/items_def.h @@ -0,0 +1,130 @@ +//-------------- OBSOLETE --------------------- +WEAPON CJackHammer + name "#Hammer" + model "obj/weapons/hammer.xob" + physics 1 + pickable 1 +//--------------------------------------------- + +WEAPON CPistol + name "#Pistol" + model "obj/items/pistol_item.xob" + physics 1 + pickable 1 + +WEAPON CShotgun + name "#Shotgun" + model "obj/items/ShotGun_item.xob" + physics 1 + pickable 1 + +//-------------- GATLING LE --------------------- +WEAPON CMachinegun + name "#Gatling_LE" + model "obj/items/gatlingLE_item.xob" + physics 1 + pickable 1 +//----------------------------------------------- + +WEAPON CSniperRifle + name "#Sniper_Rifle" + model "obj/items/SniperRifle_Item.xob" + physics 1 + pickable 1 + +WEAPON CRocketLauncher + name "#Rocket_Launcher" + model "obj/items/rocketlauncher_item.xob" + physics 1 + pickable 1 + +WEAPON CFlameThrower + name "#Flamethrower" + model "obj/items/flamethrower_item.xob" + physics 1 + pickable 1 + +WEAPON CGrenade + name "#Grenade" + model "obj/items/grenade.xob" + physics 1 + pickable 1 + +//-------------- TO DO ---------------------- +ITEM ammo_pistol + name "#Pistol_ammo" + model "obj/items/pistol_ammo.xob" + physics 1 + pickable 1 + +ITEM ammo_Shotgun + name "#Shotgun_ammo" + model "obj/items/Shotgun_ammo.xob" + physics 1 + pickable 1 + +//-------------- Gatling LE Ammo --------------- +ITEM ammo_Machinegun + name "#Gatling_LE_ammo" + model "obj/items/gatlingLE_ammo.xob" + physics 1 + pickable 1 +//--------------------------------------------- + +ITEM ammo_SniperRifle + name "#Sniper_Rifle_ammo" + model "obj/items/SniperRifle_ammo.xob" + physics 1 + pickable 1 + +ITEM ammo_FlameThrower + name "#Flamethrower_ammo" + model "obj/items/flamethrower_ammo.xob" + physics 1 + pickable 1 + +ITEM ammo_RocketLauncher + name "#Rocketlauncher_ammo" + model "obj/items/rocketlauncher_ammo.xob" + physics 1 + pickable 1 + +ITEM Hubbardium + name "#Refined_Hubbardium" + model "obj/items/hubb.xob" + physics 1 + pickable 1 + +ITEM Medikit + name "#Medikit" + model "obj/items/health01.xob" + physics 1 + pickable 1 + + +//---------------------------------------------------------- +ITEM plechovka_mala + name "#Small_can" + model "obj/physics/canlight.xob" + physics 1 + pickable 0 + +ITEM Transmitter + name "#Headset_transmitter" + model "obj/items/HeadSet.xob" + physics 1 + pickable 1 + +ITEM GeneratorBattery + name "#Generator_battery" + model "obj/items/battery_01.xob" + physics 1 + pickable 0 + +ITEM GeneratorBatterySmaller + name "#Generator_battery" + model "obj/items/battery_02.xob" + physics 1 + pickable 0 + + diff --git a/Alpha Prime/Mod/scripts/definitions/keys.h b/Alpha Prime/Mod/scripts/definitions/keys.h new file mode 100644 index 0000000..c223f5d --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/keys.h @@ -0,0 +1,459 @@ +const int KC_ESCAPE = 0x01 +const int KC_1 = 0x02 +const int KC_2 = 0x03 +const int KC_3 = 0x04 +const int KC_4 = 0x05 +const int KC_5 = 0x06 +const int KC_6 = 0x07 +const int KC_7 = 0x08 +const int KC_8 = 0x09 +const int KC_9 = 0x0a +const int KC_0 = 0x0b +const int KC_MINUS = 0x0c /* - on main keyboard */ +const int KC_EQUALS = 0x0d +const int KC_BACK = 0x0e /* backspace */ +const int KC_TAB = 0x0f +const int KC_Q = 0x10 +const int KC_W = 0x11 +const int KC_E = 0x12 +const int KC_R = 0x13 +const int KC_T = 0x14 +const int KC_Y = 0x15 +const int KC_U = 0x16 +const int KC_I = 0x17 +const int KC_O = 0x18 +const int KC_P = 0x19 +const int KC_LBRACKET = 0x1a +const int KC_RBRACKET = 0x1b +const int KC_RETURN = 0x1c /* Enter on main keyboard */ +const int KC_LCONTROL = 0x1d +const int KC_A = 0x1e +const int KC_S = 0x1f +const int KC_D = 0x20 +const int KC_F = 0x21 +const int KC_G = 0x22 +const int KC_H = 0x23 +const int KC_J = 0x24 +const int KC_K = 0x25 +const int KC_L = 0x26 +const int KC_SEMICOLON = 0x27 +const int KC_APOSTROPHE = 0x28 +const int KC_GRAVE = 0x29 /* accent grave */ +const int KC_LSHIFT = 0x2a +const int KC_BACKSLASH = 0x2b +const int KC_Z = 0x2c +const int KC_X = 0x2d +const int KC_C = 0x2e +const int KC_V = 0x2f +const int KC_B = 0x30 +const int KC_N = 0x31 +const int KC_M = 0x32 +const int KC_COMMA = 0x33 +const int KC_PERIOD = 0x34 /* . on main keyboard */ +const int KC_SLASH = 0x35 /* / on main keyboard */ +const int KC_RSHIFT = 0x36 +const int KC_MULTIPLY = 0x37 /* * on numeric keypad */ +const int KC_LMENU = 0x38 /* left Alt */ +const int KC_SPACE = 0x39 +const int KC_CAPITAL = 0x3a +const int KC_F1 = 0x3b +const int KC_F2 = 0x3c +const int KC_F3 = 0x3d +const int KC_F4 = 0x3e +const int KC_F5 = 0x3f +const int KC_F6 = 0x40 +const int KC_F7 = 0x41 +const int KC_F8 = 0x42 +const int KC_F9 = 0x43 +const int KC_F10 = 0x44 +const int KC_NUMLOCK = 0x45 +const int KC_SCROLL = 0x46 /* Scroll Lock */ +const int KC_NUMPAD7 = 0x47 +const int KC_NUMPAD8 = 0x48 +const int KC_NUMPAD9 = 0x49 +const int KC_SUBTRACT = 0x4a /* - on numeric keypad */ +const int KC_NUMPAD4 = 0x4b +const int KC_NUMPAD5 = 0x4c +const int KC_NUMPAD6 = 0x4d +const int KC_ADD = 0x4e /* + on numeric keypad */ +const int KC_NUMPAD1 = 0x4f +const int KC_NUMPAD2 = 0x50 +const int KC_NUMPAD3 = 0x51 +const int KC_NUMPAD0 = 0x52 +const int KC_DECIMAL = 0x53 /* . on numeric keypad */ +const int KC_OEM_102 = 0x56 /* < > | on UK/Germany keyboards */ +const int KC_F11 = 0x57 +const int KC_F12 = 0x58 +const int KC_NUMPADEQUALS = 0x8d /* = on numeric keypad (NEC PC98) */ +const int KC_PREVTRACK = 0x90 /* Previous Track (DIKC_CIRCUMFLEX on Japanese keyboard) */ +const int KC_AT = 0x91 /* (NEC PC98) */ +const int KC_COLON = 0x92 /* (NEC PC98) */ +const int KC_UNDERLINE = 0x93 /* (NEC PC98) */ +const int KC_STOP = 0x95 /* (NEC PC98) */ +const int KC_AX = 0x96 /* (Japan AX) */ +const int KC_UNLABELED = 0x97 /* (J3100) */ +const int KC_NEXTTRACK = 0x99 /* Next Track */ +const int KC_NUMPADENTER = 0x9c /* Enter on numeric keypad */ +const int KC_RCONTROL = 0x9d +const int KC_MUTE = 0xa0 /* Mute */ +const int KC_CALCULATOR = 0xa1 /* Calculator */ +const int KC_PLAYPAUSE = 0xa2 /* Play / Pause */ +const int KC_MEDIASTOP = 0xa4 /* Media Stop */ +const int KC_VOLUMEDOWN = 0xae /* Volume - */ +const int KC_VOLUMEUP = 0xb0 /* Volume + */ +const int KC_WEBHOME = 0xb2 /* Web home */ +const int KC_NUMPADCOMMA = 0xb3 /* , on numeric keypad (NEC PC98) */ +const int KC_DIVIDE = 0xb5 /* / on numeric keypad */ +const int KC_SYSRQ = 0xb7 +const int KC_RMENU = 0xb8 /* right Alt */ +const int KC_PAUSE = 0xc5 /* Pause */ +const int KC_HOME = 0xc7 /* Home on arrow keypad */ +const int KC_UP = 0xc8 /* UpArrow on arrow keypad */ +const int KC_PRIOR = 0xc9 /* PgUp on arrow keypad */ +const int KC_LEFT = 0xcb /* LeftArrow on arrow keypad */ +const int KC_RIGHT = 0xcd /* RightArrow on arrow keypad */ +const int KC_END = 0xcf /* End on arrow keypad */ +const int KC_DOWN = 0xd0 /* DownArrow on arrow keypad */ +const int KC_NEXT = 0xd1 /* PgDn on arrow keypad */ +const int KC_INSERT = 0xd2 /* Insert on arrow keypad */ +const int KC_DELETE = 0xd3 /* Delete on arrow keypad */ +const int KC_LWIN = 0xdb /* Left Windows key */ +const int KC_RWIN = 0xdc /* Right Windows key */ +const int KC_APPS = 0xdd /* AppMenu key */ +const int KC_POWER = 0xde /* System Power */ +const int KC_SLEEP = 0xdf /* System Sleep */ +const int KC_WAKE = 0xe3 /* System Wake */ +const int KC_MEDIASELECT = 0xed /* Media Select */ + + +//----------------------------------------------------------------- +#ifdef _XBOX + +const int JB_A = 0 +const int JB_B = 1 +const int JB_X = 2 +const int JB_Y = 3 +const int JB_BLACK = 4 +const int JB_WHITE = 5 +const int JB_LTRIGGER = 6 +const int JB_RTRIGGER = 7 +const int JB_DPAD_UP = 8 +const int JB_DPAD_DOWN = 9 +const int JB_DPAD_LEFT = 10 +const int JB_DPAD_RIGHT = 11 +const int JB_START = 12 +const int JB_BACK = 13 +const int JB_LTHUMB = 14 +const int JB_RTHUMB = 15 + +int JoyButtons2[16] + +bool JoyButtonState(int butt, bool clear = false) +{ + if(JoyButtons2[butt] == 1) + { + if(clear) + JoyButtons2[butt] = -1 + + return true + } + + return false +} + +void ClearJoyButton(int butt) +{ + JoyButtons2[butt] = -1 +} + +void UpdateJoyButtons() +{ + for(int n = 0; n < 16; n++) + { + if(JoyButtons[n]) + { + if(JoyButtons2[n] != -1) + JoyButtons2[n] = 1 + } + else + JoyButtons2[n] = 0 + } + +} +#endif + +const int MOVE_F = 0 //3 +const int MOVE_B = 1 //4 +const int LEFT = 2 //5 +const int RIGHT = 3 //6 +const int JUMP = 4 //10 +const int CROUCH = 5 //11 +const int WALK_MODE = 8 //11 +const int P_ATTACK = 14 //1 +const int S_ATTACK = 15 //2 +const int PREV_WEAPON = 17 //9 +const int NEXT_WEAPON = 18 //8 +const int RELOAD = 16 //7 +const int USE = 9 //0 +const int FLASHLIGHT = 12 +const int CONTROLLER = 10 +const int BULLET_TIME = 11 +const int TASKLIST = 13 +const int LEAN_LEFT = 6 +const int LEAN_RIGHT = 7 + +const int WEAP_JACKHAMMER = 19 +const int WEAP_PISTOL = 20 +const int WEAP_SHOTGUN = 21 +const int WEAP_MACHINEGUN = 22 +const int WEAP_SNIPER_RIFLE = 23 +const int WEAP_ROCKET_LAUNCHER = 24 +const int WEAP_FLAMETHROWER = 25 +const int WEAP_GRENADE = 26 + +const int QUICKLOAD = 27 +const int QUICKSAVE = 28 + +#ifndef XBOX +//xbox klavesy ktore su navyse +#endif + + +int g_KeyDef1[256] +int g_KeyDef2[256] +int g_KeyDef1_temp[256] +int g_KeyDef2_temp[256] +int g_MouseState[14] = {-1, -2, -3, -4, -5, + -6, -7, -8, -9, -10, -11, -12, -13} + +int g_JoyButtons[8] +int g_LMB //Status of Left Mouse Button. +int g_MMB //MMB +int g_RMB //RMB +int g_WHEEL_UP //MMB +int g_WHEEL_DOWN //RMB + +#ifndef _XBOX +void UpdateMouseButtons() +{ + for(int n = 0; n < 8; n++) + { + if(g_JoyButtons[n] != -1) + g_JoyButtons[n] = JoyButtons[n] + else + { + if(JoyButtons[n] == 0) + g_JoyButtons[n] = 0 + } + } + if(g_LMB != -1) + { + g_LMB = LMB + } + else + { + if(LMB == 0) + g_LMB = 0 + } + + if(g_MMB != -1) + { + g_MMB = MMB + } + else + { + if(MMB == 0) + g_MMB = 0 + } + + if(g_RMB != -1) + { + g_RMB = RMB + } + else + { + if(RMB == 0) + g_RMB = 0 + } + + if(g_WHEEL_UP != -1) + { + if(MouseWheel > 0) + g_WHEEL_UP = 1 + else + g_WHEEL_UP = 0 + } + else + { + if(MouseWheel <= 0) + g_WHEEL_UP = 0 + } + + if(g_WHEEL_DOWN != -1) + { + if(MouseWheel < 0) + g_WHEEL_DOWN = 1 + else + g_WHEEL_DOWN = 0 + } + else + { + if(MouseWheel >= 0) + g_WHEEL_DOWN = 0 + } +} +#endif + +//================================================================================= + +int IsButtonSet(int code, bool clear) +{ + switch(code) + { + case -1: //LMB + if(g_LMB > 0) + { + if(clear) + g_LMB = -1 + return code + } + return 0 + case -2: //MMB + if(g_MMB > 0) + { + if(clear) + g_MMB = -1 + return code + } + return 0 + case -3: //RMB + if(g_RMB > 0) + { + if(clear) + g_RMB = -1 + return code + } + return 0 + case -4: //WheelUP + if(g_WHEEL_UP > 0) + { + if(clear) + g_WHEEL_UP = -1 + return code + } + return 0 + case -5: //WheelDOWN + if(g_WHEEL_DOWN > 0) + { + if(clear) + g_WHEEL_DOWN = -1 + return code + } + } + + if(code <= -6) + { + int n = -code - 6 + + if(g_JoyButtons[n] > 0) + { + if(clear) + g_JoyButtons[n] = -1 + + return code + } + } + + return 0 +} + +//pokud byla zmacknuta primarni nebo sekundarni nadefinovana klavesa tak vraci jeji keycode. Inak nulu +//Clear == true hned clearuje +int KEY(int def_key, bool Clear) +{ +#ifdef _XBOX + switch(def_key) + { + case USE: + return JoyButtonState(JB_X, Clear) + case P_ATTACK: + return JoyButtonState(JB_RTRIGGER, Clear) + case S_ATTACK: + return JoyButtonState(JB_LTRIGGER, Clear) + case MOVE_F: + return JoyButtonState(JB_DPAD_UP, Clear) + case MOVE_B: + return JoyButtonState(JB_DPAD_DOWN, Clear) + case LEFT: + return JoyButtonState(JB_DPAD_LEFT, Clear) + case RIGHT: + return JoyButtonState(JB_DPAD_RIGHT, Clear) + case JUMP: + return JoyButtonState(JB_A, Clear) + case CROUCH: + return JoyButtonState(JB_B, Clear) + case FLASHLIGHT: + return JoyButtonState(JB_WHITE, Clear) + case RELOAD: + return JoyButtonState(JB_Y, Clear) + + } + + return 0 +#endif +/* +#ifdef EDITOR + if(World.EditorActive) + { + if(KeyState(g_KeyDef1[def_key]) + { + if(def_key != MOVE_F && def_key != MOVE_B && def_key != LEFT && def_key != RIGHT) + return 0 + } + + if(KeyState(g_KeyDef2[def_key]) + { + if(def_key != MOVE_F && def_key != MOVE_B && def_key != LEFT && def_key != RIGHT) + return 0 + } + } +#endif +*/ + //Toto je volano opravdu hodnekrat, takze rychlost kodu je primarni. Na vzhled seru + int key = g_KeyDef1[def_key] + if(key != 0) + { + if(key > 0) + { + if(KeyState(key) == true) + { + if(Clear) + ClearKey(key) + return key + } + goto nokey1 + } + + if(IsButtonSet(key, Clear)) //je zmacknuto + return key + } + +nokey1: + key = g_KeyDef2[def_key] + //stejne druha klavesa neexistuje + if(key == 0) + return 0 + + if(key > 0) + { + if(KeyState(key) == true) + { + if(Clear) + ClearKey(key) + return key + } + return 0 + } + else + return IsButtonSet(key, Clear) +} diff --git a/Alpha Prime/Mod/scripts/definitions/shoteffects.h b/Alpha Prime/Mod/scripts/definitions/shoteffects.h new file mode 100644 index 0000000..b8eab5f --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/shoteffects.h @@ -0,0 +1,195 @@ +//typ striel pre partikly +const int PE_PLAYERBULLET = 0 //player ma specialni efekty bez zbufferu, ktery potvory nesmi pouzivat!!! +const int PE_PLAYERPLASMA = 1 +const int PE_BULLET = 2 +const int PE_PLASMA = 3 +const int PE_COUNT = 4 //celkovy pocet efektu. Pri pridani dalsich je nutno zvysit podle potreby + +//typ striel pre decaly +const int DE_BULLET = 0 +const int DE_PLASMA = 1 +const int DE_COUNT = 2 //celkovy pocet decalu. Pri pridani dalsich je nutno zvysit podle potreby + +//typ striel pre ric zvuky +const int SE_BULLET = 0 +const int SE_PLASMA = 1 +const int SE_HAMMER = 2 +const int SE_COUNT = 3 //celkovy pocet zvuku. Pri pridani dalsich je nutno zvysit podle potreby + +vobject RicParticles[PE_COUNT][12] +hshader DecalShaders[DE_COUNT][12] +hsound RicSounds[SE_COUNT][12] +hshader BloodDecalShaders[4] + +//Tomuto poli odpovida ShellType u zbrane. ShellType se indexuje od 1 (0 znamena zadny shell) +//Podle potreby mozno zvetsovat +const string ShellObjectNames[1] = { + "obj/weapons/shell.xob"} + +//Tomuto poli odpovida StreakType u zbrane. Indexuje se od 1, (0 znamena zadny streak) +const string StreakShaderNames[5] = { + "sprites/streak/streak1", + "sprites/streak/streak2", + "sprites/streak/streak3", + "sprites/streak/streak4", + "spr/shotstreak"} + +//--------------------------------------------------------------------------------- +void InitRicParticles(int PShotType) +{ + if(RicParticles[PShotType][0]) //uz to bolo inicializovane. default tam je vzdy + return + + switch(PShotType) + { + case PE_BULLET: + RicParticles[PE_BULLET][0] = GetObject("particle/ric_plastic.ptc") + RicParticles[PE_BULLET][MATERIAL_METAL] = GetObject("particle/ric_metal.ptc") + RicParticles[PE_BULLET][MATERIAL_IRON] = GetObject("particle/ric_iron.ptc") +// RicParticles[PE_BULLET][MATERIAL_GLASS] = GetObject("particle/ric_plastic.ptc") + RicParticles[PE_BULLET][MATERIAL_PLASTIC] = GetObject("") +// RicParticles[PE_BULLET][MATERIAL_LIQUID] = GetObject("") +// RicParticles[PE_BULLET][MATERIAL_SLIME] = GetObject("particle/physx/fluidtest.ptc") + RicParticles[PE_BULLET][MATERIAL_BETON] = GetObject("particle/ric_beton.ptc") + RicParticles[PE_BULLET][MATERIAL_RUBBER] = GetObject("particle/ric_rubber.ptc") + RicParticles[PE_BULLET][MATERIAL_FLESH] = GetObject("particle/hit_blood.ptc") + + RicParticles[PE_BULLET][MATERIAL_GRAVEL] = GetObject("particle/ric_gravel.ptc") + break + + case PE_PLAYERBULLET: + RicParticles[PE_PLAYERBULLET][0] = GetObject("particle/ric_plastic.ptc") + RicParticles[PE_PLAYERBULLET][MATERIAL_METAL] = GetObject("particle/ric_metal.ptc") + RicParticles[PE_PLAYERBULLET][MATERIAL_IRON] = GetObject("particle/ric_iron.ptc") +// RicParticles[PE_PLAYERBULLET][MATERIAL_GLASS] = GetObject("") + RicParticles[PE_PLAYERBULLET][MATERIAL_PLASTIC] = GetObject("particle/ric_plastic.ptc") +// RicParticles[PE_PLAYERBULLET][MATERIAL_LIQUID] = GetObject("") +// RicParticles[PE_PLAYERBULLET][MATERIAL_SLIME] = GetObject("particle/physx/fluidtest.ptc") + RicParticles[PE_PLAYERBULLET][MATERIAL_BETON] = GetObject("particle/ric_beton.ptc") + RicParticles[PE_PLAYERBULLET][MATERIAL_RUBBER] = GetObject("particle/ric_rubber.ptc") + RicParticles[PE_PLAYERBULLET][MATERIAL_FLESH] = GetObject("particle/hit_blood.ptc") + + RicParticles[PE_PLAYERBULLET][MATERIAL_GRAVEL] = GetObject("particle/ric_gravel.ptc") + break + + case PE_PLAYERPLASMA: + RicParticles[PE_PLAYERPLASMA][0] = GetObject("particle/ric_plastic.ptc") + RicParticles[PE_PLAYERPLASMA][MATERIAL_METAL] = GetObject("particle/ric_metal.ptc") + RicParticles[PE_PLAYERPLASMA][MATERIAL_IRON] = GetObject("particle/ric_iron.ptc") +// RicParticles[PE_PLAYERPLASMA][MATERIAL_GLASS] = GetObject("") + RicParticles[PE_PLAYERPLASMA][MATERIAL_PLASTIC] = GetObject("particle/ric_plastic.ptc") +// RicParticles[PE_PLAYERPLASMA][MATERIAL_LIQUID] = GetObject("") +// RicParticles[PE_PLAYERPLASMA][MATERIAL_SLIME] = GetObject("particle/physx/fluidtest.ptc") + RicParticles[PE_PLAYERPLASMA][MATERIAL_BETON] = GetObject("particle/ric_beton.ptc") + RicParticles[PE_PLAYERPLASMA][MATERIAL_RUBBER] = GetObject("particle/ric_rubber.ptc") + RicParticles[PE_PLAYERPLASMA][MATERIAL_FLESH] = GetObject("particle/hit_blood.ptc") + +// RicParticles[PE_PLAYERPLASMA][MATERIAL_STONE] = GetObject("") + + case PE_PLASMA: + + RicParticles[PE_PLASMA][0] = GetObject("particle/ric_plastic.ptc") + RicParticles[PE_PLASMA][MATERIAL_METAL] = GetObject("particle/ric_metal.ptc") + RicParticles[PE_PLASMA][MATERIAL_IRON] = GetObject("particle/ric_iron.ptc") +// RicParticles[PE_PLASMA][MATERIAL_GLASS] = GetObject("") + RicParticles[PE_PLASMA][MATERIAL_PLASTIC] = GetObject("particle/ric_plastic.ptc") +// RicParticles[PE_PLASMA][MATERIAL_LIQUID] = GetObject("") +// RicParticles[PE_PLASMA][MATERIAL_SLIME] = GetObject("particle/physx/fluidtest.ptc") + RicParticles[PE_PLASMA][MATERIAL_BETON] = GetObject("particle/ric_beton.ptc") + RicParticles[PE_PLASMA][MATERIAL_RUBBER] = GetObject("particle/ric_rubber.ptc") + RicParticles[PE_PLASMA][MATERIAL_FLESH] = GetObject("particle/hit_blood.ptc") + +// RicParticles[PE_PLASMA][MATERIAL_STONE] = GetObject("") + break + } +} + +//--------------------------------------------------------------------------------- +void InitDecalDefs() +{ + BloodDecalShaders[0] = GetShader("decals/blood1") + BloodDecalShaders[1] = GetShader("decals/blood2") + BloodDecalShaders[2] = GetShader("decals/blood3") + BloodDecalShaders[3] = GetShader("decals/blood4") + + DecalShaders[DE_BULLET][0] = GetShader("decals/decaliron") + DecalShaders[DE_BULLET][MATERIAL_METAL] = GetShader("decals/decalmetal") + DecalShaders[DE_BULLET][MATERIAL_IRON] = GetShader("decals/decaliron") + DecalShaders[DE_BULLET][MATERIAL_GLASS] = GetShader("decals/decalglass") + DecalShaders[DE_BULLET][MATERIAL_PLASTIC] = GetShader("decals/decalplastic") + DecalShaders[DE_BULLET][MATERIAL_LIQUID] = GetShader("decals/decalliquid") + DecalShaders[DE_BULLET][MATERIAL_SLIME] = GetShader("decals/decalslime") + DecalShaders[DE_BULLET][MATERIAL_BETON] = GetShader("decals/decalbeton") + DecalShaders[DE_BULLET][MATERIAL_RUBBER] = GetShader("decals/decalrubber") + DecalShaders[DE_BULLET][MATERIAL_FLESH] = GetShader("decals/decalflesh") + DecalShaders[DE_BULLET][MATERIAL_STONE] = GetShader("decals/decalstone") + + DecalShaders[DE_PLASMA][0] = GetShader("decals/decaliron") + DecalShaders[DE_PLASMA][MATERIAL_METAL] = GetShader("decals/decalmetal") + DecalShaders[DE_PLASMA][MATERIAL_IRON] = GetShader("decals/decaliron") + DecalShaders[DE_PLASMA][MATERIAL_GLASS] = GetShader("decals/decalglass") + DecalShaders[DE_PLASMA][MATERIAL_PLASTIC] = GetShader("decals/decalplastic") + DecalShaders[DE_PLASMA][MATERIAL_LIQUID] = GetShader("decals/decalliquid") + DecalShaders[DE_PLASMA][MATERIAL_SLIME] = GetShader("decals/decalslime") + DecalShaders[DE_PLASMA][MATERIAL_BETON] = GetShader("decals/decalbeton") + DecalShaders[DE_PLASMA][MATERIAL_RUBBER] = GetShader("decals/decalrubber") + DecalShaders[DE_PLASMA][MATERIAL_FLESH] = GetShader("decals/decalflesh") + DecalShaders[DE_PLASMA][MATERIAL_STONE] = GetShader("decals/decalstone") + +} + +//--------------------------------------------------------------------------------- +void InitRicSounds(int RSndType) +{ + if(RSndType == -1 || RicSounds[RSndType][0]) + return + + switch(RSndType) + { + case SE_BULLET: + RicSounds[SE_BULLET][0] = GetSoundEx("Rics_Metal", 0, 0) + RicSounds[SE_BULLET][MATERIAL_METAL] = GetSoundEx("Rics_Metal", 0, 0) + RicSounds[SE_BULLET][MATERIAL_IRON] = GetSoundEx("Rics_Metal", 0, 0) + RicSounds[SE_BULLET][MATERIAL_GLASS] = GetSoundEx("Rics_Metal", 0, 0) +// RicSounds[SE_BULLET][MATERIAL_PLASTIC] = GetSoundEx("", 0, 0) +// RicSounds[SE_BULLET][MATERIAL_LIQUID] = GetSoundEx("", 0, 0) +// RicSounds[SE_BULLET][MATERIAL_SLIME] = GetSoundEx("", 0, 0) +// RicSounds[SE_BULLET][MATERIAL_BETON] = GetSoundEx("", 0, 0) +// RicSounds[SE_BULLET][MATERIAL_RUBBER] = GetSoundEx("", 0, 0) + RicSounds[SE_BULLET][MATERIAL_FLESH] = GetSoundEx("Rics_Flesh", 0, 0) +// RicSounds[SE_BULLET][MATERIAL_STONE] = GetSoundEx("", 0, 0) + RicSounds[SE_BULLET][MATERIAL_GRAVEL] = GetSoundEx("Rics_PISEK", 0, 0) + break + + case SE_PLASMA: + RicSounds[SE_PLASMA][0] = GetSoundEx("Rics_Metal", 0, 0) + RicSounds[SE_PLASMA][MATERIAL_METAL] = GetSoundEx("Rics_Metal", 0, 0) +// RicSounds[SE_PLASMA][MATERIAL_IRON] = GetSoundEx("", 0, 0) +// RicSounds[SE_PLASMA][MATERIAL_GLASS] = GetSoundEx("", 0, 0) +// RicSounds[SE_PLASMA][MATERIAL_PLASTIC] = GetSoundEx("", 0, 0) +// RicSounds[SE_PLASMA][MATERIAL_LIQUID] = GetSoundEx("", 0, 0) +// RicSounds[SE_PLASMA][MATERIAL_SLIME] = GetSoundEx("", 0, 0) +// RicSounds[SE_PLASMA][MATERIAL_BETON] = GetSoundEx("", 0, 0) +// RicSounds[SE_PLASMA][MATERIAL_RUBBER] = GetSoundEx("", 0, 0) + RicSounds[SE_PLASMA][MATERIAL_FLESH] = GetSoundEx("Rics_Flesh", 0, 0) +// RicSounds[SE_PLASMA][MATERIAL_STONE] = GetSoundEx("", 0, 0) + RicSounds[SE_PLASMA][MATERIAL_GRAVEL] = GetSoundEx("Rics_PISEK", 0, 0) + break + + case SE_HAMMER: + RicSounds[SE_HAMMER][0] = GetSoundEx("Rics_MetalHammer", 0, 0) + RicSounds[SE_HAMMER][MATERIAL_METAL] = GetSoundEx("Rics_MetalHammer", 0, 0) + RicSounds[SE_HAMMER][MATERIAL_IRON] = GetSoundEx("Rics_MetalHammer", 0, 0) +// RicSounds[SE_HAMMER][MATERIAL_GLASS] = GetSoundEx("", 0, 0) + RicSounds[SE_HAMMER][MATERIAL_PLASTIC] = GetSoundEx("Rics_BetonHammer", 0, 0) +// RicSounds[SE_HAMMER][MATERIAL_LIQUID] = GetSoundEx("", 0, 0) +// RicSounds[SE_HAMMER][MATERIAL_SLIME] = GetSoundEx("", 0, 0) + RicSounds[SE_HAMMER][MATERIAL_BETON] = GetSoundEx("Rics_BetonHammer", 0, 0) + RicSounds[SE_HAMMER][MATERIAL_RUBBER] = GetSoundEx("Rics_BetonHammer", 0, 0) + RicSounds[SE_HAMMER][MATERIAL_FLESH] = GetSoundEx("Rics_Flesh", 0, 0) + RicSounds[SE_HAMMER][MATERIAL_STONE] = GetSoundEx("Rics_Gravel", 0, 0) + RicSounds[SE_HAMMER][MATERIAL_GRAVEL] = GetSoundEx("Rics_PISEK", 0, 0) + break + } +} + diff --git a/Alpha Prime/Mod/scripts/definitions/sounds.h b/Alpha Prime/Mod/scripts/definitions/sounds.h new file mode 100644 index 0000000..e96345e --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/sounds.h @@ -0,0 +1,92 @@ + +string WS_WeaponHammer[5] = {"","Hammer_miss01","", "", ""} //hammer +string WS_WeaponGun[5] = {"pistol_shot01","","noammo", "", ""} //pistol +string WS_WeaponShotgun[5] = {"ShotGun_01","","noammo", "shotgun_reload02", ""} //shotgun +string WS_WeaponMachinegun[5] = {"gatlingLE_loop","","noammo", "gatlingLE_end", ""} //samopal +string WS_WeaponSniperRifle[5] = {"Sniper01","","noammo", "SniperServo01", ""} //Sniperka +string WS_WeaponRocketLauncher[5] = {"RocketLauncher_fire01","","", "", ""} +string WS_WeaponFlameThrower[5] = {"flameThrower_loop01","","noammo", "flameThrower_end01", ""} +string WS_WeaponGrenade[5] = {"","","", "", ""} //Granat +string WS_WeaponDron[5] = {"dron_shot01","Reload_01","noammo", "", ""} //dron +string WS_WeaponSpider[5] = {"robot_shot01","","", "", ""} //spider + +string WS_WeaponBoss[5] = {"RocketLauncher_fire01","Reload_01","noammo", "flameThrower_loop01", ""} //BOSS + + +//nahoda je blbec. Nechame to tak velky, kolik je materialu, i kdyz se vsechny nepouzivaji +hsound RagdollPhysicsSounds[32] +hsound g_sCommonSounds[128] + +hsound LFootstepSounds[8][32] +hsound RFootstepSounds[8][32] + +const int FSNone = 0 //defaultne - zadne zvuky +const int FSPlayer = 1 +const int FSHumanoidRobot = 2 //humanoidni kovovi roboti +const int FSSpiderRobot = 3 +const int FSHumanoidNPC = 4 //Faggioli, Baldur apod + +//--------------------------------------------------------------------------------- +void LoadSounds() +{ + LoadSoundSet("Common", g_sCommonSounds, true) + + RagdollPhysicsSounds[MATERIAL_METAL] = GetSoundEx("physic_metal01", 0, 0) + RagdollPhysicsSounds[MATERIAL_PLASTIC] = GetSoundEx("physic_metal01", 0, 0) + RagdollPhysicsSounds[MATERIAL_IRON] = GetSoundEx("physic_metal01", 0, 0) + RagdollPhysicsSounds[MATERIAL_RUBBER] = GetSoundEx("physic_metal01", 0, 0) + RagdollPhysicsSounds[MATERIAL_FLESH] = GetSoundEx("flesh_hard01", 0, 0) + + LFootstepSounds[FSPlayer][MATERIAL_METAL] = GetSoundEx("fs_01a", 0, 0) + RFootstepSounds[FSPlayer][MATERIAL_METAL] = GetSoundEx("fs_01b", 0, 0) + LFootstepSounds[FSPlayer][MATERIAL_IRON] = GetSoundEx("fsIron_01a", 0, 0) + RFootstepSounds[FSPlayer][MATERIAL_IRON] = GetSoundEx("fsIron_01b", 0, 0) +// LFootstepSounds[FSPlayer][MATERIAL_GLASS] = GetSoundEx("blabla", 0, 0) +// RFootstepSounds[FSPlayer][MATERIAL_GLASS] = GetSoundEx("blabla", 0, 0) + LFootstepSounds[FSPlayer][MATERIAL_PLASTIC] = GetSoundEx("fsPlast_01a", 0, 0) + RFootstepSounds[FSPlayer][MATERIAL_PLASTIC] = GetSoundEx("fsPlast_01b", 0, 0) + LFootstepSounds[FSPlayer][MATERIAL_BETON] = GetSoundEx("fsBeton_01a", 0, 0) + RFootstepSounds[FSPlayer][MATERIAL_BETON] = GetSoundEx("fsBeton_01b", 0, 0) + LFootstepSounds[FSPlayer][MATERIAL_RUBBER] = GetSoundEx("fsPlast_01a", 0, 0) + RFootstepSounds[FSPlayer][MATERIAL_RUBBER] = GetSoundEx("fsPlast_01b", 0, 0) + LFootstepSounds[FSPlayer][MATERIAL_GRAVEL] = GetSoundEx("fsOut_02a", 0, 0) + RFootstepSounds[FSPlayer][MATERIAL_GRAVEL] = GetSoundEx("fsOut_02b", 0, 0) + LFootstepSounds[FSPlayer][MATERIAL_STONE] = GetSoundEx("fsOut_01a", 0, 0) + RFootstepSounds[FSPlayer][MATERIAL_STONE] = GetSoundEx("fsOut_01b", 0, 0) + + LFootstepSounds[FSHumanoidRobot][MATERIAL_METAL] = GetSoundEx("HRobot_fstep01", 0, 0) + RFootstepSounds[FSHumanoidRobot][MATERIAL_METAL] = GetSoundEx("HRobot_fstep01", 0, 0) + LFootstepSounds[FSHumanoidRobot][MATERIAL_IRON] = GetSoundEx("fsIron_02", 0, 0) + RFootstepSounds[FSHumanoidRobot][MATERIAL_IRON] = GetSoundEx("fsIron_02", 0, 0) +/* LFootstepSounds[FSHumanoidRobot][MATERIAL_GLASS] = GetSoundEx("blabla", 0, 0) + RFootstepSounds[FSHumanoidRobot][MATERIAL_GLASS] = GetSoundEx("blabla", 0, 0) + */ + LFootstepSounds[FSHumanoidRobot][MATERIAL_PLASTIC] = GetSoundEx("HRobot_fstep01", 0, 0) + RFootstepSounds[FSHumanoidRobot][MATERIAL_PLASTIC] = GetSoundEx("HRobot_fstep01", 0, 0) + LFootstepSounds[FSHumanoidRobot][MATERIAL_BETON] = GetSoundEx("HRobot_fstep01", 0, 0) + RFootstepSounds[FSHumanoidRobot][MATERIAL_BETON] = GetSoundEx("HRobot_fstep01", 0, 0) + LFootstepSounds[FSHumanoidRobot][MATERIAL_RUBBER] = GetSoundEx("fsPlast_01a", 0, 0) + RFootstepSounds[FSHumanoidRobot][MATERIAL_RUBBER] = GetSoundEx("fsPlast_01b", 0, 0) + LFootstepSounds[FSHumanoidRobot][MATERIAL_STONE] = GetSoundEx("HRobot_fstep01", 0, 0) + RFootstepSounds[FSHumanoidRobot][MATERIAL_STONE] = GetSoundEx("HRobot_fstep01", 0, 0) + LFootstepSounds[FSHumanoidRobot][MATERIAL_GRAVEL] = GetSoundEx("fsOut_02a", 0, 0) + RFootstepSounds[FSHumanoidRobot][MATERIAL_GRAVEL] = GetSoundEx("fsOut_02b", 0, 0) +/* + LFootstepSounds[FSSpiderRobot][MATERIAL_METAL] = GetSoundEx("blabla", 0, 0) + RFootstepSounds[FSSpiderRobot][MATERIAL_METAL] = GetSoundEx("blabla", 0, 0) + LFootstepSounds[FSSpiderRobot][MATERIAL_IRON] = GetSoundEx("blabla", 0, 0) + RFootstepSounds[FSSpiderRobot][MATERIAL_IRON] = GetSoundEx("blabla", 0, 0) + LFootstepSounds[FSSpiderRobot][MATERIAL_GLASS] = GetSoundEx("blabla", 0, 0) + RFootstepSounds[FSSpiderRobot][MATERIAL_GLASS] = GetSoundEx("blabla", 0, 0) + LFootstepSounds[FSSpiderRobot][MATERIAL_PLASTIC] = GetSoundEx("blabla", 0, 0) + RFootstepSounds[FSSpiderRobot][MATERIAL_PLASTIC] = GetSoundEx("blabla", 0, 0) + LFootstepSounds[FSSpiderRobot][MATERIAL_BETON] = GetSoundEx("blabla", 0, 0) + RFootstepSounds[FSSpiderRobot][MATERIAL_BETON] = GetSoundEx("blabla", 0, 0) + LFootstepSounds[FSSpiderRobot][MATERIAL_RUBBER] = GetSoundEx("blabla", 0, 0) + RFootstepSounds[FSSpiderRobot][MATERIAL_RUBBER] = GetSoundEx("blabla", 0, 0) +*/ + LFootstepSounds[FSSpiderRobot][MATERIAL_STONE] = GetSoundEx("fsOut_01a", 0, 0) + RFootstepSounds[FSSpiderRobot][MATERIAL_STONE] = GetSoundEx("fsOut_01b", 0, 0) + LFootstepSounds[FSSpiderRobot][MATERIAL_GRAVEL] = GetSoundEx("fsOut_02a", 0, 0) + RFootstepSounds[FSSpiderRobot][MATERIAL_GRAVEL] = GetSoundEx("fsOut_02b", 0, 0) +} diff --git a/Alpha Prime/Mod/scripts/definitions/soundsets.h b/Alpha Prime/Mod/scripts/definitions/soundsets.h new file mode 100644 index 0000000..0f2f542 --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/soundsets.h @@ -0,0 +1,1067 @@ +soundset "i_1_fred" + { + sound 1, "drinking computer0001" + sound 2, "drinking computer0003" + sound 3, "chlcomputer0062" + sound 4, "chlcomputer0063" + sound 5, "chlcomputer0064" + sound 6, "chlcomputer0065" + sound 7, "chlcomputer0066" + sound 8, "chlcomputer0067" + sound 9, "chlcomputer0068" + sound 10, "chlcomputer0069" + sound 11, "chlcomputer0070" + sound 12, "chlcomputer0071" + sound 13, "chlcomputer0072" + sound 14, "chlcomputer0012" + sound 15, "chlcomputer0013" + sound 16, "chlcomputer0014" + sound 17, "chlcomputer0015" + sound 18, "chlcomputer0016" + sound 19, "chlcomputer0017" + sound 20, "chlcomputer0018" + sound 21, "chlcomputer0019" + sound 22, "chlcomputer0020" + sound 23, "chlcomputer0021" + sound 24, "chlcomputer0022" + sound 25, "chlcomputer0023" + sound 26, "chlcomputer0024" + sound 27, "chlcomputer0025" + sound 28, "chlcomputer0026" + sound 29, "chlcomputer0027" + sound 30, "chlcomputer0028" + sound 31, "chlcomputer0029" + sound 32, "chlcomputer0030" + sound 33, "chlcomputer0031" + sound 34, "chlcomputer0032" + sound 35, "chlcomputer0033" + sound 36, "chlcomputer0034" + sound 37, "chlcomputer0035" + sound 38, "chlcomputer0036" + sound 39, "chlcomputer0037" + sound 40, "chlcomputer0038" + sound 41, "chlcomputer0039" + sound 42, "chlcomputer0040" + sound 43, "chlcomputer0041" + sound 44, "chlcomputer0042" + sound 45, "chlcomputer0043" + sound 46, "chlcomputer0044" + sound 47, "chlcomputer0045" + sound 48, "chlcomputer0046" + sound 49, "chlcomputer0047" + sound 50, "chlcomputer0048" + sound 51, "chlcomputer0049" + sound 52, "chlcomputer0050" + sound 53, "chlcomputer0051" + sound 54, "chlcomputer0052" + sound 55, "chlcomputer0053" + sound 56, "chlcomputer0054" + sound 57, "chlcomputer0055" + sound 58, "chlcomputer0056" + sound 59, "chlcomputer0057" + sound 60, "chlcomputer0058" + sound 61, "chlcomputer0059" + sound 62, "chlcomputer0060" + sound 63, "chlcomputer0061" + + } + +soundset "i_1_arnold" + { + sound 1, "rust04" + sound 2, "fs1" + sound 3, "fs2" + sound 4, "fs4" + sound 5, "fs5" + sound 6, "fs6" + sound 7, "fs7" + sound 8, "fs3" + sound 9, "rust11" + sound 10, "rustle9-01" + sound 11, "rust13" + sound 12, "rust08" + sound 13, "rust10" + } + +soundset "i_1_livia" + { + sound 1, "gravel1" + sound 2, "gravel2" + sound 3, "gravel3" + sound 4, "gravel4" + sound 5, "rust04" + sound 6, "Crouch_Up2" + sound 7, "rust01" + sound 8, "rustle9-01" + sound 9, "rust07" + sound 10, "rust02" + sound 11, "fs5" + sound 12, "Crouch_Down" + sound 13, "rustle6-01" + sound 14, "fs4" + sound 15, "fs3" + sound 16, "rust08" + } + +soundset "Boss" +{ + sound 05, "boss_attack01" + sound 06, "boss_idle01" + sound 21, "boss_death01" + sound 20, "boss_pain01" + sound 51, "boss_fs01" + sound 52, "artemisboom" +} + +soundset "2_5_ital" + { + sound 1, "fs6" + sound 2, "fs7" + sound 3, "fs4" + sound 4, "fs2" + sound 5, "fs1" + sound 6, "rust07" + sound 7, "boots03" + sound 8, "boots01" + sound 9, "rustle003" + sound 10, "boots04" + sound 11, "gravel1" + sound 12, "gravel2" + sound 13, "gravel3" + sound 14, "gravel4" + } + +soundset "2_5_arnold" + { + sound 1, "fs1" + sound 2, "fs2" + sound 3, "fs3" + sound 4, "fs4" + sound 5, "gravel2" + sound 6, "gravel1" + sound 7, "keyboard03" + sound 8, "keyboard04" + sound 9, "fs5" + sound 10, "fs6" + sound 11, "rust04" + sound 12, "fs7" + sound 13, "rust05" + sound 14, "keyboard05" + sound 15, "disp_efx_50" + sound 16, "disp_efx_33" + } + +soundset "2_1_arnold" + { + sound 1, "mriz02" + sound 2, "rustle005" + sound 3, "boots03" + sound 4, "fs1" + sound 5, "fs2" + sound 6, "boots01-01" + sound 7, "boots02" + sound 8, "boots03-01" + sound 9, "boots04" + sound 10, "boots05" + sound 11, "boots01" + sound 12, "keyboard03" + sound 13, "keyboard04" + sound 14, "keyboard05" + sound 16, "rustle003" + sound 18, "breath002a" + sound 19, "breath003b" + sound 20, "Warning05" + sound 21, "chain15" + sound 22, "rustle006" + sound 23, "disp_efx_29" + sound 24, "Vytah-11" + sound 25, "Vytah-12" + sound 26, "Vytah-13" + } + +soundset "2_1_ital" + { + sound 1, "Vytah-11" + sound 2, "Vytah-12" + sound 3, "Vytah-13" + sound 4, "rustle003" + sound 5, "rustle004" + sound 6, "rustle003-01" + sound 7, "Rfs_01" + sound 8, "boots01" + sound 9, "fs1" + sound 10, "fs2" + sound 11, "fs3" + sound 12, "fs4" + sound 13, "fs5" + sound 14, "rust07" + sound 15, "rust04" + sound 16, "Crouch_Up2" + sound 17, "rustle001" + sound 18, "Vytah-10" + } + + +soundset "10_3_olivier" + { + sound 1, "rustle003" + sound 2, "boots02" + sound 3, "boots03" + sound 4, "rust07" + sound 5, "fs1" + sound 6, "boots01" + sound 7, "boots05" + sound 8, "boots06" + sound 9, "boots07" + sound 10, "fs_out05" + sound 11, "rustle5-01" + sound 12, "HTservo02" + sound 13, "rust04" + sound 14, "fs_out01" + sound 15, "rustle004" + sound 16, "boots04" + sound 17, "fs3" + sound 18, "rust11" + sound 19, "rustle6-01" + sound 20, "shotgun_reload01" + sound 21, "Crouch_Up2" + } + +soundset "10_3_arnold" + { + sound 1, "gravel1" + sound 2, "gravel2" + sound 3, "gravel3" + sound 4, "gravel4" + sound 5, "rust04" + sound 6, "gatling_IN01" + sound 7, "boots01" + sound 8, "boots02" + sound 9, "boots04" + sound 10, "fs2" + sound 11, "fs3" + sound 12, "fs4" + sound 13, "fs5" + sound 14, "fs6" + sound 15, "fs7" + } + +soundset "10_4_livia" + { + sound 1, "gravel1" + sound 2, "gravel2" + sound 3, "gravel3" + sound 4, "gravel4" + sound 5, "rust07" + sound 6, "rust04" + sound 7, "rust08" + sound 8, "rustle4-14" + sound 9, "rustle8-01" + sound 10, "rustle1-01" + sound 11, "rics_flesh14" + sound 12, "nabojnice_03" + sound 13, "fs3" + sound 14, "rustle9-01" + sound 15, "pistol01-01" + sound 16, "sum2" + sound 17, "rustle5-01" + sound 18, "pistol3-01" + sound 19, "Crouch_Down" + sound 20, "Crouch_Up2" + sound 21, "pistol2" + sound 22, "pistol4-01" + sound 23, "nabojnice_04" + sound 24, "bulletIN01" + sound 25, "boomflashwav-01" + } + +soundset "10_4_arnold" + { + sound 1, "fs1" + sound 2, "fs2" + sound 3, "fs3" + sound 4, "rust01" + sound 5, "Crouch_Up2" + sound 6, "rust07" + sound 7, "rust12" + sound 8, "fs4" + sound 9, "fs5" + sound 10, "rust04" + sound 11, "rust03" + sound 12, "gravel1" + sound 13, "rustle9-01" + sound 14, "rustle8-01" + sound 15, "fs6" + sound 16, "fs7" + sound 17, "rust13" + sound 18, "rustle5-01" + sound 19, "flesh_solid01" + sound 20, "flesh_solid03" + sound 21, "flesh_hard02" + sound 22, "rustle7-01" + sound 23, "flesh_solid02" + sound 24, "bulletIN01" + sound 25, "boomflashwav-01" + } + +soundset "6_4_warren" + { + sound 1, "gravel1" + sound 2, "gravel2" + sound 3, "gravel3" + sound 4, "gravel4" + } + +soundset "6_4_olivier" + { + sound 1, "fs1" + sound 2, "fs4" + sound 3, "fs6" + sound 4, "fs7" + sound 5, "rust04" + sound 6, "fs2" + sound 7, "fs3" + sound 8, "Rfs_01" + sound 9, "Rfs_02" + sound 10, "Rfs_04" + } + +soundset "6_4_arnold" + { + sound 1, "rust04" + sound 2, "rust03" + sound 3, "fs1" + sound 4, "gravel2" + sound 5, "fs3" + sound 6, "gravel3" + sound 7, "fs5" + sound 8, "fs6" + sound 9, "fs2" + sound 10, "Crouch_Down" + sound 11, "Crouch_Up2" + sound 12, "rustle9-01" + sound 13, "rustle5-01" + sound 14, "rustle11-15" + sound 15, "boom_05" + sound 16, "flesh_fall3" + sound 17, "boots01" + sound 18, "boots03" + sound 19, "rust11" + sound 20, "impact3_01" + sound 21, "flesh_fall2" + sound 22, "boom_03" + sound 23, "rust07" + sound 24, "rustle003" + sound 25, "boots05" + sound 26, "rics_flesh09" + } + +soundset "0_3_Arnold" + { + sound 1, "data02" + sound 2, "data15" + sound 3, "disp_efx_50" + sound 4, "fs1" + sound 5, "fs2" + sound 6, "rust04" + sound 7, "rust03" + sound 8, "data13" + sound 9, "rust10" + sound 10, "boots06" + sound 11, "boots04" + sound 12, "boots05" + } + +soundset "1_8_Ital" + { + sound 1, "rust04" + sound 2, "rust03" + } + +soundset "1_8_arnold" + { + sound 1, "rust07" + sound 2, "fs1" + sound 3, "fs2" + sound 4, "fs3" + sound 5, "rust04" + } + +soundset "5_1_warren" + { + sound 1, "rust03" + sound 2, "boots05" + sound 3, "boots02" + sound 4, "gravel1" + sound 5, "gravel2" + sound 6, "gravel3" + sound 7, "rust04" + sound 8, "gravel4" + sound 9, "fs3" + sound 10, "rustle12-01" + sound 11, "rustle1-01" + } + +soundset "5_1_arnold" + { + sound 1, "fs1" + sound 2, "fs2" + sound 3, "rust04" + sound 4, "rustle4-14" + sound 5, "fs3" + sound 6, "fs4" + sound 7, "fs5" + sound 8, "fs6" + sound 9, "fs7" + sound 10, "rust03" + sound 11, "rust02" + sound 12, "rust07" + sound 13, "rust12" + sound 14, "rust13" + sound 15, "rust09" + sound 16, "rust10" + } + +soundset "7_2_olivier" + { + sound 1, "Rfs_01" + sound 2, "boots01" + sound 3, "Rfs_02" + sound 4, "boots05" + sound 5, "boots06" + sound 6, "Rfs_03" + sound 7, "Rfs_04" + sound 8, "rust04" + sound 9, "boots02" + sound 10, "boots04" + sound 11, "rust03" + sound 12, "boots03" + sound 13, "boots07" + sound 14, "rust05" + sound 15, "rust13" + } + +soundset "7_2_arnold" + { + sound 1, "fs1" + sound 2, "fs2" + sound 3, "fs3" + sound 4, "fs4" + sound 5, "rust01" + sound 6, "MGreload01_a" + sound 7, "misc02" + sound 8, "rust04" + sound 9, "rust07" + sound 10, "rust03" + sound 11, "rustle9-01" + sound 12, "rust13" + sound 13, "gravel1" + sound 14, "rust02" + sound 15, "rust08" + sound 16, "fs6" + sound 17, "fs7" + sound 18, "fs5" + sound 19, "rustle003" + sound 20, "Crouch_Down" + } + +soundset "8_2_warren" + { + sound 1, "rustle8-01" + sound 2, "rust01" + sound 3, "rust08" + sound 4, "rust05" + } + +soundset "8_2_bruce" + { + sound 1, "Crouch_Up2" + sound 2, "Crouch_Down" + sound 3, "rust03" + sound 4, "rust05" + sound 5, "rust07" + sound 6, "rustle4-14" + sound 7, "rust04" + sound 8, "fs1" + sound 9, "rustle11-15" + sound 10, "rustle9-01" + sound 11, "fs2" + sound 12, "fs3" + sound 13, "boots06" + sound 14, "rustle1-01" + sound 15, "rustle004" + sound 16, "fs6" + sound 17, "rust11" + sound 18, "fs5" + sound 19, "fs7" + sound 20, "gravel2" + sound 21, "rustle8-01" + sound 22, "fs4" + } + +soundset "8_2_arnold" + { + sound 1, "rust03" + sound 2, "boots02" + sound 3, "rust04" + sound 4, "fs1" + sound 5, "fs3" + sound 6, "fs5" + sound 7, "fs7" + sound 8, "fs2" + sound 9, "rustle9-01" + sound 10, "rust01" + sound 11, "gravel3" + sound 12, "gravel4" + sound 13, "rust07" + sound 14, "rust05" + sound 15, "rust02" + sound 16, "boots01" + sound 17, "fs4" + sound 18, "fs6" + sound 19, "Crouch_Down" + sound 20, "rustle8-01" + sound 21, "gravel2" + sound 22, "gravel1" + sound 23, "Crouch_Up2" + sound 24, "rustle003" + } + +soundset "6_1_arnold" + { + sound 1, "rust13" + sound 2, "rust03" + sound 3, "Crouch_Up2" + sound 4, "rust02" + sound 5, "Crouch_Down" + sound 6, "rust12" + sound 7, "rust05" + sound 8, "rust06" + sound 9, "rust04" + sound 10, "rustle9-01" + sound 11, "rust07" + sound 12, "rust01" + sound 13, "rustle8-01" + sound 14, "fs1" + sound 15, "rust10" + sound 16, "boots07" + sound 17, "rust08" + sound 18, "rustle4-14" + sound 19, "fs3" + sound 20, "fs2" + sound 21, "fs5" + sound 22, "boots01" + sound 23, "boots02" + sound 24, "fs4" + sound 25, "boots06" + sound 26, "boots04" + sound 27, "gatling_IN01" + sound 28, "shotgun_reload01" + } + +soundset "6_1_warren" + { + sound 1, "fs3" + sound 2, "rustle003" + sound 3, "rust12" + sound 4, "rust13" + sound 5, "rust11" + sound 6, "rust07" + sound 7, "rust01" + sound 8, "rust05" + sound 9, "rust03" + sound 10, "rustle11-15" + sound 11, "rustle9-01" + sound 12, "fs1" + sound 13, "fs2" + sound 14, "rust04" + sound 15, "gravel4" + sound 16, "keyboard04" + sound 17, "keyboard001" + sound 18, "keyboard02" + sound 19, "rustle4-14" + sound 20, "rustle8-01" + sound 21, "keyboard03" + sound 22, "keyboard05" + sound 23, "Crouch_Up2" + sound 24, "fs7" + sound 25, "fs4" + sound 26, "rust10" + sound 27, "gravel2" + sound 28, "fs5" + sound 29, "fs6" + sound 30, "boots01" + sound 31, "boots02" + } + +soundset "2_2_ital" + { + sound 1, "rustle3" + sound 2, "rust05" + sound 3, "rust11" + sound 4, "rust09" + sound 5, "rust06" + sound 6, "rust07" + sound 7, "rust03" + sound 8, "rust04" + sound 9, "rustle1" + sound 10, "rustle002" + sound 11, "rustle006" + sound 12, "rust12" + } + +soundset "2_2_arnold" + { + sound 1, "rust10" + sound 2, "rustle006" + sound 3, "rust07" + sound 4, "rust08" + sound 5, "rust05" + sound 6, "rust12" + sound 7, "rust06" + sound 8, "rust04" + sound 9, "rustle003" + } + +soundset "1_6_arnold" + { + sound 1, "rustle004" + sound 2, "rustle003" + sound 3, "rustle006" + sound 4, "boots01" + sound 5, "boots02" + sound 6, "boots03" + sound 7, "boots04" + sound 8, "boots05" + sound 9, "rustle4" + sound 10, "rustle6" + sound 11, "rustle3" + sound 12, "rustle001" + sound 13, "Crouch_Up2" + } + +soundset "1_6_ital" + { + sound 1, "rustle3" + sound 2, "impact3_01" + sound 3, "rustle4" + sound 4, "rustle003" + sound 5, "llop2" + sound 6, "rustle004" + sound 7, "rustle006" + sound 8, "rustle6" + sound 9, "data13-01" + sound 10, "doors7" + } + +soundset "0_1_arnold" + { + sound 1, "boots03" + sound 2, "boots02" + sound 3, "boots04" + sound 4, "rustle4" + sound 5, "rustle003" + sound 6, "rustle004" + sound 7, "rustle002" + sound 8, "boots01" + sound 9, "rustle006" + sound 10, "rustle001" + sound 11, "boots05" + sound 12, "boots07" + sound 13, "rustle005" + sound 14, "rustle3" + sound 15, "Crouch_Up2" + } + +soundset "3_3_vojak" + { + sound 1, "rustle12" + sound 2, "boots01" + sound 3, "rustle003" + sound 4, "rustle5" + sound 5, "rustle6" + sound 6, "boots02" + sound 7, "boots03" + sound 8, "boots04" + sound 9, "door_01_START" + sound 10, "door_01_END" + } + + +soundset "3_3_ital" + { + sound 1, "rustle002" + sound 2, "flesh_solid03" + sound 3, "flesh_hard01" + sound 4, "rustle6" + sound 5, "rustle8" + sound 6, "flesh_solid01" + sound 7, "rustle5" + sound 8, "rustle004" + sound 9, "fs1" + sound 10, "rustle3" + sound 11, "rustle003" + sound 12, "boots02" + sound 13, "boots03" + sound 14, "boots04" + sound 15, "door_01_START" + sound 16, "door_01_END" + sound 17, "rustle12" + sound 18, "flesh_solid02" + sound 19, "boots05" + sound 20, "rustle2" + } + + +soundset "3_3_olivier" + { + sound 1, "rustle006" + sound 2, "rustle4" + sound 3, "rustle003" + sound 4, "boots03" + sound 5, "Crouch_Up2" + sound 6, "rustle8" + sound 7, "boots01" + sound 8, "boots04" + sound 9, "rustle001" + sound 10, "boots05" + sound 11, "boots02" + sound 12, "boots07" + sound 13, "rustle005" + sound 14, "rustle004" + sound 15, "rustle002" + sound 16, "rustle3" + sound 17, "rustle6" + } + + +soundset "3_1_arnold" + { + sound 1, "rustle006" + sound 2, "fs2" + } + + +soundset "3_1_ital" + { + sound 1, "Crouch_Up2" + sound 2, "rustle3" + sound 3, "fs2" + sound 4, "fs4" + sound 5, "fs5" + sound 6, "fs6" + sound 7, "fs1" + sound 8, "fs3" + sound 9, "fs7" + sound 10, "rustle003" + sound 11, "rustle006" + sound 12, "rustle004" + sound 13, "rustle001" + sound 14, "rustle002" + sound 15, "rustle005" + sound 16, "rustle4" + sound 17, "Ruchy_02" + sound 18, "rustle6" + sound 19, "rustle12" + sound 20, "rustle5" + sound 21, "rustle8" + sound 22, "rustle2" + } + + +soundset "Common" +{ + sound 0, "fs_01a" //Footsteps + sound 1, "Ammo_Pick" + sound 2, "Shell01" //cinkanie nabonic + + sound 3, "WeaponGUI_ScrollIn" + sound 4, "WeaponGUI_ScrollOut" + sound 5, "WeaponGUI_Select" + sound 6, "WeaponGUI_BadSelect" + sound 7, "WeaponGUI_ButtonEnter" + + sound 8, "Hubbardium_Pick" + sound 9, "hearthbeat02" + + sound 10, "dron_shot01" + + sound 11, "WeaponGUI_ScrollIn" + sound 12, "WeaponGUI_ScrollOut" + sound 13, "Disp_effect_44b" + sound 14, "Disp_effect_49b" + + sound 15, "player_pains" + sound 16, "player_deaths" + + sound 17, "BulletTimeIn" + sound 18, "BulletTimeLoop" + sound 19, "BulletTimeOut" + //sound 20, "Gexplosion01", 1, SF_3D) + sound 21, "Gactivate01" + sound 22, "Reload01a" + sound 23, "Reload01b" + sound 24, "Disp_effect_31b" + sound 25, "shotgun_reload01a" + sound 26, "shotgun_reload01b" + sound 27, "shotgun_reload01c" + sound 28, "pistol_reload01a" + sound 29, "pistol_reload01b" + sound 30, "pistol_reload01c" + sound 31, "player_flashlight" + sound 32, "Keyboard001" + sound 33, "Weapon_Pick" + sound 34, "HackingAreaInfo" + sound 35, "HackingModeStart" + sound 36, "HackingModeEnd" + sound 37, "HackingGUILoop" + sound 38, "HackingGUISelect" + + sound 39, "shield_loop" + sound 40, "Oxygene_nadech01" + sound 41, "Oxygene_vydech01" + + sound 45, "safeDoor01_start" + sound 46, "safeDoor01_loop" + sound 47, "safeDoor01_end" + sound 48, "RocketLauncher_reload01a" //rocketLauncher reload + sound 49, "RocketLauncher_reload01b" //rocketLauncher reload + sound 50, "RocketLauncher_IN" //rocketLauncher IN + sound 51, "gatling_IN" //Gatling IN + sound 52, "rustle01" //Grenade IN + sound 53, "flame_IN" //Flamethrower IN + sound 54, "hackLoop" + sound 55, "hackEnd" + sound 58, "shotgun_reload02" + sound 59, "Hammer_miss01" + + sound 60, "Hall01" + sound 61, "Hall02" + sound 62, "Hall03" + sound 63, "Hall04" + sound 64, "Hall05" + sound 65, "Hall06" + sound 66, "Hall07" + + sound 67, "ringtone01" + sound 68, "shotgun_IN" //shotgun IN + //sound 1, "sound/creatures/player/CrouchDOWN" +} + +soundset "Technician" +{ + sound 20, "Technician_pain01" + sound 21, "Technician_death01" + + sound 51, "fs_specForces_01" + sound 55, "LTrooper_breath01a" + sound 56, "LTrooper_breath01b" + sound 57, "LTrooper_rustle01" + sound 59, "LTrooper_rustle02" +} + +soundset "Guard" +{ + sound 20, "Guard_pain01" + sound 21, "Guard_death01" + + sound 51, "fs_specForces_01" + sound 55, "LTrooper_breath01a" + sound 56, "LTrooper_breath01b" + sound 57, "LTrooper_rustle01" + sound 59, "LTrooper_rustle02" +} + +soundset "LightTrooper" +{ + sound 6, "LTrooper_fsight01" + sound 20, "LTrooper_pain01" + sound 21, "LTrooper_death01" + + sound 51, "fs_specForces_01" + sound 55, "LTrooper_breath01a" + sound 56, "LTrooper_breath01b" + sound 57, "LTrooper_rustle01" + sound 59, "LTrooper_rustle02" +} + +soundset "HeavyTrooperFT" +{ + sound 20, "HTrooper_pain01" + sound 21, "HTrooper_death01" + + sound 51, "Hfs_01" + sound 55, "HTrooper_breath01a" + sound 56, "HTrooper_breath01b" + sound 57, "LTrooper_rustle01" + sound 59, "LTrooper_rustle02" + sound 60, "HTrooper_HTservo01" + sound 61, "HTrooper_HTservo02" + sound 62, "HTrooper_HTservo03" +} + +soundset "HeavyTrooperRL" +{ + sound 20, "HTrooper_pain01" + sound 21, "HTrooper_death01" + + sound 51, "Hfs_01" + sound 55, "HTrooper_breath01a" + sound 56, "HTrooper_breath01b" + sound 57, "LTrooper_rustle01" + sound 59, "LTrooper_rustle02" + sound 60, "HTrooper_HTservo01" + sound 61, "HTrooper_HTservo02" + sound 62, "HTrooper_HTservo03" +} + +soundset "HeavyCommander" +{ + sound 6, "LTrooper_fsight01" + sound 20, "LTrooper_pain01" + sound 21, "LTrooper_death01" + + sound 51, "Hfs_01" + sound 55, "LTrooper_breath01a" + sound 56, "LTrooper_breath01b" + sound 57, "LTrooper_rustle01" + sound 59, "LTrooper_rustle02" +} + +soundset "Faggioli" +{ + sound 20, "Hrobot_pain_01" + + sound 51, "rustle01" +} + +soundset "Warren" +{ + sound 20, "Hrobot_pain_01" + sound 51, "rustle01" +} + +soundset "NPCCommander" +{ + sound 20, "Hrobot_pain_01" + sound 51, "rustle01" +} + +soundset "HeavySpider" +{ + sound 20, "robot_pain_01" + sound 21, "robot_death_01" + sound 22, "robot_pain_01" + sound 23, "robot_pain_01" + sound 24, "servo_001" + sound 25, "servo_002" + sound 26, "servo_003" + sound 27, "servo_004" + sound 28, "servo_005" + sound 29, "servo_006" + sound 30, "servo_007" + + //---------------SPECIFIC SOUNDS-------------------------// + sound 51, "loop_alertIdle" + sound 52, "loop_alertWalk" + sound 53, "loop_combatIdle" + sound 54, "loop_combatWalk" + sound 55, "loop_relaxIdle" + sound 56, "servo_06b" + + sound 57, "robot_idle_01" + sound 58, "servo_02" + sound 59, "syk_01" + sound 60, "Fsteps" +} + +soundset "SecuritySpider" +{ + sound 20, "SRobot_pain", 0, 0) + sound 21, "SRobot_death", 0, 0) + sound 22, "SRobot_firstsight", 0, 0) + sound 23, "SRobot_idle", 0, 0) + sound 24, "SRobot_cwalkA", 0, 0) + sound 25, "SRobot_cwalkB", 0, 0) + sound 26, "SRobot_rwalkA", 0, 0) + sound 27, "SRobot_rwalkB", 0, 0) + sound 28, "ShortServo01", 0, 0) + sound 29, "ShortServo02", 0, 0) + sound 30, "ShortServo03", 0, 0) + sound 31, "ShortServo04", 0, 0) + + //---------------SPECIFIC SOUNDS-------------------------// + sound 51, "strafe_loop", 0, 0) + sound 52, "Idle_loop", 0, 0) + sound 53, "loop_combatIdle", 0, 0) + sound 54, "loop_combatWalk", 0, 0) + sound 55, "loop_relaxIdle", 0, 0) + sound 56, "servo_06b", 0, 0) + + sound 57, "robot_idle_01", 0, 0) + sound 58, "servo_02", 0, 0) + sound 59, "syk_01", 0, 0) + sound 60, "SRobot_fs", 0, 0) +} + +soundset "Dron" +{ + sound 20, "dron_18" //Short sounds + sound 21, "Disp_effect_speak02" //speak 2 - alert + sound 22, "dron_15" // idle + sound 23, "Disp_effect_03" + sound 24, "dron_death01" //death + sound 25, "dron_pain01" //pain + sound 26, "dron_susp01" //suspicious + sound 27, "dron_idle01" //idle 01 - 5 sounds + sound 28, "dron_idle02" //idle 02 - 5 sounds + sound 29, "dron_1stsight01" //First sight + sound 30, "dron_death02" //death - explosion + sound 31, "zkrat_02" //Bebicko + //---------------SPECIFIC SOUNDS LOOPS-------------------------// + sound 50, "dron_04" //ALERT_idle + sound 51, "Disp_effect_10" + sound 52, "dron_03" //ALERT_walk + sound 53, "dron_12" //COMBAT_idle + sound 54, "dron_01" //COMBAT_walk + sound 55, "dron_14" //RELAX_idle + sound 56, "dron_16" //RELAX_walk + sound 57, "dron_13" // + sound 58, "dron_17" //Voice + sound 59, "Disp_effect_40" // + sound 60, "Disp_effect_41" +} + +soundset "ServiceBot" +{ + sound 20, "Hrobot_pain_01" + sound 21, "robot_death_01" + sound 22, "robot_pain_01" + sound 23, "robot_pain_01" + sound 24, "HRobot_servo01" + sound 25, "HRobot_servo02" + sound 26, "HRobot_servo03" + sound 27, "HRobot_servo04" + sound 28, "servo_005" + sound 29, "servo_006" + sound 30, "servo_007" + + //---------------SPECIFIC SOUNDS-------------------------// + sound 41, "speech01" + sound 42, "speech02" + sound 43, "speech03" + sound 44, "speech04" + sound 45, "speech05" + sound 46, "speech06" + sound 51, "HRobot_move01" + sound 52, "Hfs_01" + sound 53, "loop_combatIdle" + sound 54, "loop_combatWalk" + sound 55, "speech07" + sound 56, "HRobot_loop01" + + sound 57, "robot_idle_01" + sound 58, "HRobot_loop02" + sound 59, "misc_mech_01" + sound 60, "Fsteps" +} diff --git a/Alpha Prime/Mod/scripts/definitions/speechset.h b/Alpha Prime/Mod/scripts/definitions/speechset.h new file mode 100644 index 0000000..61640e7 --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/speechset.h @@ -0,0 +1,65 @@ +/* +ST_RELOADING //prebijeni zbrane. Vykriky kryjte me apod. +ST_CHANGINGWP //zmena strelecke pozice, protoze stavajici stoji za hovno. +ST_TAKECOVER //dostal kour a klidi se na krytou pozici. +ST_ALERT //byl v klidu a spatril nepritele. +ST_ALERTBYATTACK //byl v klidu a uvidel jak do jeho kamose strili nepritel +ST_ALERTBYSOUND //byl v klidu a zaslechl podezrely zvuk, takze se jde podivat, co se deje. Obvykle + //vzapeti nasleduje faze 4. protoze treba zaslechne kroky a otoci se, cimz spatri nepritele. +ST_ALERTBYDEAD //byl v klidu a nasel mrtvolu. Jde se podivat o co jde. +ST_ALERTBYSHOT // byl v klidu a dostal zasah. +ST_ALERTBYFRIENDISSHOT // byl v klidu a videl kamose, jak dostal zasah. +ST_SQUADATTACKED //jednotka byla napadena +ST_TEAMMATEKILLED //nekdo z jednotky byl zabit +ST_SQUADLASTMAN //zbyva posledni clen jednotky +ST_GRENADE //vykrik pri spatreni/zaslechnuti granatu +*/ +//----------------------------------------------------------------- +void WorldClass::InitSpeechSet() +{ + BeginSpeechSet("Trooper") + SpeechType(ST_RELOADING) + Speech("LTrooper_coverme") + //Speech("LTrooper_reloading") + //Speech("LTrooper_giveme") + SpeechType(ST_CHANGINGWP) + Speech("LTrooper_ST_CHANGINGWP") + //Speech("LTrooper_common") + //Speech("LTrooper_move") + SpeechType(ST_TAKECOVER) + Speech("LTrooper_ST_TAKECOVER") + Speech("omen") + Speech("LTrooper_listen") + SpeechType(ST_ALERT) + //Speech("LTrooper_ST_ALERT") + Speech("LTrooper_righthere") + Speech("LTrooper_whoisthat") + SpeechType(ST_ALERTBYATTACK) + Speech("LTrooper_ST_ALERTBYATTACK") + Speech("LTrooper_watchback") + Speech("LTrooper_turnaround") + SpeechType(ST_ALERTBYSOUND) + Speech("LTrooper_righthere") + Speech("LTrooper_whoisthat") + SpeechType(ST_ALERTBYDEAD) + Speech("LTrooper_letsgo") + SpeechType(ST_ALERTBYSHOT) + Speech("LTrooper_ST_ALERTBYSHOT") + Speech("LTrooper_shit") + Speech("LTrooper_common2") + SpeechType(ST_ALERTBYFRIENDISSHOT) + Speech("LTrooper_ST_ALERTBYFRIENDISSHOT") + Speech("LTrooper_niceshot") + /*SpeechType(ST_RANDOM) + Speech("LTrooper_mumraj") + */ + SpeechType(ST_SQUADATTACKED) + Speech("LTrooper_ST_SQUADATTACKED") + Speech("LTrooper_attacked") + SpeechType(ST_TEAMMATEKILLED) + Speech("LTrooper_ST_TEAMMATEKILLED") + SpeechType(ST_SQUADLASTMAN) + Speech("LTrooper_ST_SQUADLASTMAN") + SpeechType(ST_GRENADE) + Speech("LTrooper_ST_GRENADE") +} diff --git a/Alpha Prime/Mod/scripts/definitions/strings.h b/Alpha Prime/Mod/scripts/definitions/strings.h new file mode 100644 index 0000000..6648b92 --- /dev/null +++ b/Alpha Prime/Mod/scripts/definitions/strings.h @@ -0,0 +1,204 @@ + +string KeyNames[256] + +void Init_Keynames() +{ + KeyNames[0] = "" + KeyNames[KC_ESCAPE] = "#kc_ESCAPE" + KeyNames[KC_1] = "#kc_1" + KeyNames[KC_2] = "#kc_2" + KeyNames[KC_3] = "#kc_3" + KeyNames[KC_4] = "#kc_4" + KeyNames[KC_5] = "#kc_5" + KeyNames[KC_6] = "#kc_6" + KeyNames[KC_7] = "#kc_7" + KeyNames[KC_8] = "#kc_8" + KeyNames[KC_9] = "#kc_9" + KeyNames[KC_0] = "#kc_0" + KeyNames[KC_MINUS] = "#kc_MINUS" + KeyNames[KC_EQUALS] = "#kc_EQUALS" + KeyNames[KC_BACK] = "#kc_BACK" + KeyNames[KC_TAB] = "#kc_TAB" + KeyNames[KC_Q] = "#kc_Q" + KeyNames[KC_W] = "#kc_W" + KeyNames[KC_E] = "#kc_E" + KeyNames[KC_R] = "#kc_R" + KeyNames[KC_T] = "#kc_T" + KeyNames[KC_Y] = "#kc_Y" + KeyNames[KC_U] = "#kc_U" + KeyNames[KC_I] = "#kc_I" + KeyNames[KC_O] = "#kc_O" + KeyNames[KC_P] = "#kc_P" + KeyNames[KC_LBRACKET] = "#kc_LBRACKET" + KeyNames[KC_RBRACKET] = "#kc_RBRACKET" + KeyNames[KC_RETURN] = "#kc_RETURN" + KeyNames[KC_LCONTROL] = "#kc_LCONTROL" + KeyNames[KC_A] = "#kc_A" + KeyNames[KC_S] = "#kc_S" + KeyNames[KC_D] = "#kc_D" + KeyNames[KC_F] = "#kc_F" + KeyNames[KC_G] = "#kc_G" + KeyNames[KC_H] = "#kc_H" + KeyNames[KC_J] = "#kc_J" + KeyNames[KC_K] = "#kc_K" + KeyNames[KC_L] = "#kc_L" + KeyNames[KC_SEMICOLON] = "#kc_SEMICOLON" + KeyNames[KC_APOSTROPHE] = "#kc_APOSTROPHE" + KeyNames[KC_GRAVE] = "#kc_GRAVE" + KeyNames[KC_LSHIFT] = "#kc_LSHIFT" + KeyNames[KC_BACKSLASH] = "#kc_BACKSLASH" + KeyNames[KC_Z] = "#kc_Z" + KeyNames[KC_X] = "#kc_X" + KeyNames[KC_C] = "#kc_C" + KeyNames[KC_V] = "#kc_V" + KeyNames[KC_B] = "#kc_B" + KeyNames[KC_N] = "#kc_N" + KeyNames[KC_M] = "#kc_M" + KeyNames[KC_COMMA] = "#kc_COMMA" + KeyNames[KC_COMMA] = "#kc_PERIOD" + KeyNames[KC_SLASH] = "#kc_SLASH" + KeyNames[KC_RSHIFT] = "#kc_RSHIFT" + KeyNames[KC_MULTIPLY] = "#kc_MULTIPLY" + KeyNames[KC_LMENU] = "#kc_LMENU" + KeyNames[KC_SPACE] = "#kc_SPACE" + KeyNames[KC_CAPITAL] = "#kc_CAPITAL" + KeyNames[KC_F1] = "#kc_F1" + KeyNames[KC_F2] = "#kc_F2" + KeyNames[KC_F3] = "#kc_F3" + KeyNames[KC_F4] = "#kc_F4" + KeyNames[KC_F5] = "#kc_F5" + KeyNames[KC_F6] = "#kc_F6" + KeyNames[KC_F7] = "#kc_F7" + KeyNames[KC_F8] = "#kc_F8" + KeyNames[KC_F9] = "#kc_F9" + KeyNames[KC_F10] = "#kc_F10" + KeyNames[KC_NUMLOCK] = "#kc_NUMLOCK" + KeyNames[KC_SCROLL] = "#kc_SCROLL" + KeyNames[KC_NUMPAD7] = "#kc_NUMPAD7" + KeyNames[KC_NUMPAD8] = "#kc_NUMPAD8" + KeyNames[KC_NUMPAD9] = "#kc_NUMPAD9" + KeyNames[KC_SUBTRACT] = "#kc_SUBTRACT" + KeyNames[KC_NUMPAD4] = "#kc_NUMPAD4" + KeyNames[KC_NUMPAD5] = "#kc_NUMPAD5" + KeyNames[KC_NUMPAD6] = "#kc_NUMPAD6" + KeyNames[KC_ADD] = "#kc_ADD" + KeyNames[KC_NUMPAD0] = "#kc_NUMPAD0" + KeyNames[KC_NUMPAD1] = "#kc_NUMPAD1" + KeyNames[KC_NUMPAD2] = "#kc_NUMPAD2" + KeyNames[KC_NUMPAD3] = "#kc_NUMPAD3" + KeyNames[KC_NUMPAD4] = "#kc_NUMPAD4" + KeyNames[KC_DECIMAL] = "#kc_DECIMAL" + KeyNames[KC_OEM_102] = "#kc_OEM 102" + KeyNames[KC_F11] = "#kc_F11" + KeyNames[KC_F12] = "#kc_F12" + KeyNames[KC_NUMPADEQUALS] = "#kc_NUMPADEQUALS" + KeyNames[KC_PREVTRACK] = "#kc_PREVTRACK" + KeyNames[KC_AT] = "#kc_AT" + KeyNames[KC_COLON] = "#kc_COLON" + KeyNames[KC_UNDERLINE] = "#kc_UNDERLINE" + KeyNames[KC_STOP] = "#kc_STOP" + KeyNames[KC_AX] = "#kc_AX" + KeyNames[KC_UNLABELED] = "#kc_UNLABELED" + KeyNames[KC_NEXTTRACK] = "#kc_NEXTTRACK" + KeyNames[KC_NUMPADENTER] = "#kc_NUMPAD_ENTER" + KeyNames[KC_RCONTROL] = "#kc_RCONTROL" + KeyNames[KC_MUTE] = "#kc_MUTE" + KeyNames[KC_CALCULATOR] = "#kc_CALCULATOR" + KeyNames[KC_PLAYPAUSE] = "#kc_PLAYPAUSE" + KeyNames[KC_MEDIASTOP] = "#kc_MEDIASTOP" + KeyNames[KC_VOLUMEDOWN] = "#kc_VOLUMEDOWN" + KeyNames[KC_VOLUMEUP] = "#kc_VOLUMEUP" + KeyNames[KC_WEBHOME] = "#kc_WEBHOME" + KeyNames[KC_NUMPADCOMMA] = "#kc_NUMPADCOMMA" + KeyNames[KC_DIVIDE] = "#kc_DIVIDE" + KeyNames[KC_SYSRQ] = "#kc_SYSRQ" + KeyNames[KC_RMENU] = "#kc_RMENU" + KeyNames[KC_PAUSE] = "#kc_PAUSE" + KeyNames[KC_HOME] = "#kc_HOME" + KeyNames[KC_UP] = "#kc_UP" + KeyNames[KC_PRIOR] = "#kc_PRIOR" + KeyNames[KC_LEFT] = "#kc_LEFT" + KeyNames[KC_RIGHT] = "#kc_RIGHT" + KeyNames[KC_END] = "#kc_END" + KeyNames[KC_DOWN] = "#kc_DOWN" + KeyNames[KC_NEXT] = "#kc_NEXT" + KeyNames[KC_INSERT] = "#kc_INSERT" + KeyNames[KC_DELETE] = "#kc_DELETE" + KeyNames[KC_LWIN] = "#kc_LWIN" + KeyNames[KC_RWIN] = "#kc_RWIN" + KeyNames[KC_APPS] = "#kc_APPS" + KeyNames[KC_POWER] = "#kc_POWER" + KeyNames[KC_SLEEP] = "#kc_SLEEP" + KeyNames[KC_WAKE] = "#kc_WAKE" + KeyNames[KC_MEDIASELECT] = "#kc_MEDIASELECT" +} + +#ifdef XBOX +string KeyItems[64] = {"#k_forward", + "#k_backward", + "#k_left", + "#k_right", + "#k_jump", + "#k_crouch", + "#k_lean_left", + "#k_lean_right", + "#k_walk", + "#k_use", + "#k_controller", + "#k_bullet_time", + "#k_flashlight", + "#k_tasklist", + "#k_prim_attack", + "#k_sec_attack", + "#k_reload", + "#k_prev_weap", + "#k_next_weap"} //pre pridanie dalsej klavesy nezabudnut zvatsit ListboxItemsNum + +#else +string KeyItems[64] = {"#k_forward", + "#k_backward", + "#k_left", + "#k_right", + "#k_jump", + "#k_crouch", + "#k_lean_left", + "#k_lean_right", + "#k_walk", + "#k_use", + "#k_controller", + "#k_bullet_time", + "#k_flashlight", + "#k_tasklist", + "#k_prim_attack", + "#k_sec_attack", + "#k_reload", + "#k_prev_weap", + "#k_next_weap", + "#k_jackhammer", + "#k_pistol", + "#k_shotgun", + "#k_machinegun", + "#k_sniper_rifle", + "#k_rocket_launcher", + "#k_flamethrower", + "#k_grenade", + "#k_quickload", + "#k_quicksave"} +#endif + + +// Patch 1.2 +string OtherNames[14] = { "", + "#LEFT_MOUSE", + "#MIDLE_MOUSE", + "#RIGHT_MOUSE", + "#MOUSE_WHEEL_UP", + "#MOUSE_WHEEL_DOWN", + "#Joystick_A", + "#Joystick_B", + "#Joystick_C", + "#Joystick_X", + "#Joystick_Y", + "#Joystick_Z", + "#Joystick_1", + "#Joystick_2"} diff --git a/Alpha Prime/Mod/scripts/definitions/vssver.scc b/Alpha Prime/Mod/scripts/definitions/vssver.scc new file mode 100644 index 0000000..940f3a5 Binary files /dev/null and b/Alpha Prime/Mod/scripts/definitions/vssver.scc differ diff --git a/Alpha Prime/Mod/scripts/editor.h b/Alpha Prime/Mod/scripts/editor.h new file mode 100644 index 0000000..00e0778 --- /dev/null +++ b/Alpha Prime/Mod/scripts/editor.h @@ -0,0 +1,5267 @@ + +//==================================================================== +class PrefabEnt +{ + string ID + string ClassName + string PrefabKeys[64] + string PrefabKeyValues[64] + int NumPrefabKeys + +//-------------------------------------------------------------------- + string GetPrefabKeyValue(string key) + { + if(!key) + return "" + + for(int n = 0; n < NumPrefabKeys; n++) + { + if(key == PrefabKeys[n]) + return PrefabKeyValues[n] + } + return "" + } + +//-------------------------------------------------------------------- + bool AddPrefabKey(string key, string value) + { + if(!key) + return false + + if(NumPrefabKeys >= sizeof(PrefabKeys)) + return false + + PrefabKeys[NumPrefabKeys] = key + PrefabKeyValues[NumPrefabKeys++] = value + return true + } + +//-------------------------------------------------------------------- + bool SetPrefabKeyValue(string key, string value) + { + if(!key) + return false + + for(int n = 0; n < NumPrefabKeys; n++) + { + if(key == PrefabKeys[n]) + { + PrefabKeyValues[n] = value + return true + } + } + return false + } +} + +//==================================================================== +class Prefab +{ + string ID + PrefabEnt PrefabEntities[32] + int NumPrefabEntities + +//-------------------------------------------------------------------- + PrefabEnt GetPrefabEnt(string id) + { + PrefabEnt current + for(int n = 0; n < NumPrefabEntities; n++) + { + current = PrefabEntities[n] + + if(id == current.ID) + return PrefabEntities[n] + } + return NULL + } + +//-------------------------------------------------------------------- + bool AddPrefabEnt(PrefabEnt ent) + { + if(NumPrefabEntities >= sizeof(PrefabEntities)) + return false + + PrefabEntities[NumPrefabEntities++] = ent + return true + } + +//-------------------------------------------------------------------- + bool RemovePrefabEnt(PrefabEnt ent) + { + Prefab current + for(int n = 0; n < NumPrefabEntities; n++) + { + current = PrefabEntities[n] + if(current == ent) + { + delete PrefabEntities[n] + PrefabEntities[n] = NULL + + for(int k = n; k < NumPrefabEntities; k++) + PrefabEntities[k] = PrefabEntities[k + 1] + + PrefabEntities[NumPrefabEntities--] = NULL + return true + } + } + return false + } + +//-------------------------------------------------------------------- + void ~Prefab() + { + for(int n = 0; n < NumPrefabEntities; n++) + { + delete PrefabEntities[n] + PrefabEntities[n] = NULL + } + } +} + +//==================================================================== +class PrefabManager +{ + Prefab Prefabs[512] + int NumPrefabs + string PrefabFile + +//-------------------------------------------------------------------- + Prefab GetPrefab(string id) + { + Prefab current + for(int n = 0; n < NumPrefabs; n++) + { + current = Prefabs[n] + + if(id == current.ID) + return Prefabs[n] + } + return NULL + } + +//-------------------------------------------------------------------- + bool AddPrefab(Prefab pref) + { + if(NumPrefabs >= sizeof(Prefabs)) + return false + + if(pref == NULL) + return false + + Prefabs[NumPrefabs++] = pref + return true + } + +//-------------------------------------------------------------------- + bool RemovePrefab(Prefab pref) + { + if(pref == NULL) + return false + + Prefab current + for(int n = 0; n < NumPrefabs; n++) + { + current = Prefabs[n] + if(current == pref) + { + delete Prefabs[n] + Prefabs[n] = NULL + + for(int k = n; k < NumPrefabs; k++) + Prefabs[k] = Prefabs[k + 1] + + Prefabs[NumPrefabs--] = NULL + return true + } + } + return false + } + +//-------------------------------------------------------------------- + bool LoadPrefabs() + { + int n = 0 + string tokens[30] + int NumTokens + string uv = tostr(34) + tparse tp = BeginParse(PrefabFile) + Prefab CurPrefab + PrefabEnt CurPrefEnt + string key + string val + + if(!tp) + { + string msg = "No found file " + PrefabFile + Print(msg) + return false + } + + NumTokens = ParseLine(tp, n++, tokens) + + while(NumTokens) + { + switch(tokens[0]) + { + case "$prefab": + CurPrefab = new Prefab + CurPrefab.ID = tokens[1] + AddPrefab(CurPrefab) + break + + case "$ent": + if(CurPrefab) + { + CurPrefEnt = new PrefabEnt + CurPrefEnt.ClassName = tokens[1] + CurPrefEnt.ID = tokens[2] + CurPrefab.AddPrefabEnt(CurPrefEnt) + } + break + + case "{": + n = n + break + + case "}": + if(CurPrefEnt) + CurPrefEnt = NULL + else + CurPrefab = NULL + break + + default: + if(CurPrefEnt && tokens[1] == "=") + { + key = tokens[0] + val = RemoveQuotes(tokens[2]) + CurPrefEnt.AddPrefabKey(key, val) + } + break + } + + tokens[0] = "" + tokens[1] = "" + tokens[2] = "" + NumTokens = ParseLine(tp, n++, tokens) + } + + EndParse(tp) + return true + } + +//-------------------------------------------------------------------- + bool SavePrefabs() + { +/* string fname = PrefabFile + string nfname = substr(fname, 0, strlen(fname) - 4) + CopyFileA(fname, nfname + ".bak", false)*/ + + int f = OpenFile(PrefabFile, FILEMODE_WRITE) + string line + string uv = tostr(34) //uvodzovky + string val + string key + bool Defined + string UserEv, UserEvVal + Prefab CurPref + PrefabEnt CurPrefEnt + string spacer1 = " " + string spacer2 = " " + + if(!f) + return false + + for(int n = 0; n < NumPrefabs; n++) + { + CurPref = Prefabs[n] + + FPrintln(f, "") + line = "//--------------------------------------------------------------------" + FPrintln(f, line) + line = "$prefab " + CurPref.ID + FPrintln(f, line) + line = "{" + FPrintln(f, line) + + for(int j = 0; j < CurPref.NumPrefabEntities; j++) + { + CurPrefEnt = CurPref.PrefabEntities[j] + + line = spacer1 + "$ent " + CurPrefEnt.ClassName + " " + CurPrefEnt.ID + FPrintln(f, line) + line = spacer1 + "{" + FPrintln(f, line) + + for(int k = 0; k < CurPrefEnt.NumPrefabKeys; k++) + { + key = CurPrefEnt.PrefabKeys[k] + val = CurPrefEnt.PrefabKeyValues[k] + + if(key != "prefab") + { + line = spacer2 + key + " = " + uv + val + uv + FPrintln(f, line) + } + } + + line = spacer1 + "}" + FPrintln(f, line) + + int last = CurPref.NumPrefabEntities - 1 + + if(j < last) + FPrintln(f, "") + } + + line = "}" + FPrintln(f, line) + } + CloseFile(f) + return true + } + +//-------------------------------------------------------------------- + void PrefabManager() + { + PrefabFile = GetFilePath("scripts/entities.prf") + LoadPrefabs() + } + +//-------------------------------------------------------------------- + void ~PrefabManager() + { + for(int n = 0; n < NumPrefabs; n++) + { + delete Prefabs[n] + Prefabs[n] = NULL + } + } +} + +PrefabManager PrefManager + + + + +//--------------------------------------------------------------------- +string GetValueFromKey(ExtClass ent, string key) +{ + for(int n = 0; n < ent.DefPtr.NumKeys; n++) + { + if(ent.DefPtr.Keys[n] == key) + return ent.EKeyValues[n] + } + + return "" +} + +//--------------------------------------------------------------------- +ExtClass GetEntityPointerFromName(string entname) +{ + ExtClass ec + + if(entname == "player") + return World.Player + + if(substr(entname, 0, strlen(entname) - 1) == "info_player_start") + return World.Player + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec._name == entname) + return ec + } + + return NULL +} + +//--------------------------------------------------------------------- +void AddDefinedKeysToEntity(ExtClass ActEnt) +{ + if(!ActEnt) + return + + ActEnt.DefPtr = DefManager.GetDefinition(ClassName(ActEnt)) + + if(!ActEnt.DefPtr) + { + string ErrMsg = "Unknown entity type " + ClassName(ActEnt) + ". Missing definition in entities.def?" + DPrint(ErrMsg) + RequestDialog(ErrMsg, "Error", GUI_DIALOG_OK ) + } +} + +void AddKeyValueToEntity(ExtClass ActEnt, string key, string value) +{ + for(int n = 0; n < ActEnt.DefPtr.NumKeys; n++) + { + if(ActEnt.DefPtr.Keys[n] == key) + { + ActEnt.EKeyValues[n] = value + return + } + } +} + + + +//#include "scripts/editor2.h" +string PrefabsList[2048] //temp pole koli sortovaniu a predavaniu win GUIicku +string MaterialNames[2048] +int NumMaterials = 0 + +string CopyKeyValues[16][70] +int CopyKeyTypes[16][70] +string CopyClassName[16] +string CopyName[16] +EntityDef CopyDefPtr[16] +int NumCopyValues[16] +int NumCopiedEntities +vector CopyOffsets[16] +string CopyStates[16] + +void ParseMaterials() +{ + if(NumMaterials) + return + + int tp = BeginParse("shaders/shaders.s") + + if(tp) + { + string tokens[64] + int line = 0 + + while(ParseLine(tp, line++, tokens)) + { + if(tokens[0] == "shader") + { + if(strlen(tokens[1]) > 2) + MaterialNames[NumMaterials++] = tokens[1] + } + } + + EndParse(tp) + } + + Sort(MaterialNames, NumMaterials) +} + +//---------------------------------------------------------------------------------- +int FindMaterialName(string mat) +{ + for(int index = 0; index < NumMaterials; index++) + { + if(MaterialNames[index] == mat) + return index + } + + return 0 +} + +string remap[16][2] +int numremap + +//---------------------------------------------------------------------------------- +void AddOrReplaceRemap(string mat, string rmat) +{ + for(int n = 0; n < numremap; n++) + { + if(remap[n][0] == mat) + { + remap[n][1] = rmat + return + } + } + + remap[numremap][0] = mat + remap[numremap][1] = rmat + numremap++ +} + +//---------------------------------------------------------------------------------- +string ParseRemapping(string rem) +{ + numremap = 0 + + while(true) + { + int p = strstr(rem, "$remap") + if(p == -1) + break + + rem = substr(rem, p + 6, strlen(rem) - p - 6) + rem = trim(rem) + + p = strstr(rem, "'") + if(p == -1) + break + + rem = substr(rem, p + 1, strlen(rem) - 1) + + p = strstr(rem, "'") + if(p == -1) + break + + string mat = substr(rem, 0, p) + + rem = trim(substr(rem, p + 1, strlen(rem) - p - 1)) + + p = strstr(rem, "'") + if(p == -1) + break + + rem = substr(rem, p + 1, strlen(rem) - 1) + + p = strstr(rem, "'") + if(p == -1) + break + + string rmat = substr(rem, 0, p) + + AddOrReplaceRemap(mat, rmat) + } +} + + +//---------------------------------------------------------------------------------- +string UnparseRemap() +{ + string result = "" + + for(int n = 0; n < numremap; n++) + { + if(remap[n][0] != remap[n][1]) + { + result += "$remap '" + remap[n][0] + "' '" + remap[n][1] + "';" + } + } + return result +} + +//---------------------------------------------------------------------------------- +string GetRemap(string mat) +{ + for(int n = 0; n < numremap; n++) + { + if(remap[n][0] == mat) + return remap[n][1] + } + + return mat +} + +void SetVariableTypes(ExtClass EntVar) +{ + int in + float fl + vector vec + string str + string ss, vv + int Typ + + for(int k = 0; k < EntVar.DefPtr.NumKeys; k++) + { + Typ = 0 + ss = EntVar.EKeyValues[k] //ActiveLbox.LinesTexts[k][1] + vv = EntVar.DefPtr.Keys[k] + + if(SetValue(EntVar, vv, 0, in)) //je to integer + { + if(SetVar(in, ss)) + Typ = 1 + else + Typ = 11 + } + else + { + if(SetValue(EntVar, vv, 0, fl)) //je to float + { + if(SetVar(fl, ss)) + Typ = 2 + else + Typ = 12 + } + else + { + if(SetValue(EntVar, vv, 0, vec)) //je to vector + { + if(SetVar(vec, ss)) + Typ = 3 + else + Typ = 13 + } + else + Typ = 4 //je to string + } + } + + if(Typ > 10) //bola zadana blbost + { + Typ -= 10 +// ActiveLbox.SetLineText(k, 1, EditLineBefore) //toto je treba nastavit ked bude spolahlivo fungovat kontrola u if(SetVar(fl, ss)) + } + + EntVar.EKeyTypes[k] = Typ //zapametame si datovy typ kluca + } +} + + + + + +//---------------------------------------------------------------------------------- +string BackUpKeyValues[70] +int BKeyTypes[70] +EntityDef BDef + +void BackUpKeys(ExtClass ent) +{ + int n + BDef = ent.DefPtr + + for(n = 0; n < ent.DefPtr.NumKeys; n++) + BackUpKeyValues[n] = ent.EKeyValues[n] + + for(n = 0; n < ent.DefPtr.NumKeys; n++) + BKeyTypes[n] = ent.EKeyTypes[n] +} + +void RestoreKeys(ExtClass ent) +{ + int n + ent.DefPtr = BDef + + for(n = 0; n < ent.DefPtr.NumKeys; n++) + ent.EKeyValues[n] = BackUpKeyValues[n] + + for(n = 0; n < ent.DefPtr.NumKeys; n++) + ent.EKeyTypes[n] = BKeyTypes[n] +} + +void ThrowEvent(local ExtClass ent, local int Event) +{ + int mask = GetEventMask(ent) + + if(mask & Event) + Throw(ent, World, Event, 0) + + if(Event == EV_LOADED) + { + ent.CreateEditorVisuals() + UpdateEntity(ent) + ent.AfterReloadInEditor() + } +} + + +string ChildEntNames[64] +int ChildEntNamesNum + +void GrabChildsNamesFrom(local ExtClass ent) +{ + local int n + local ExtClass Child + + for(n = 0; n < ent.ChildsNamesNum; n++) + { + Child = FindClass(ent.ChildsNames[n]) + + if(Child) + { + ChildEntNames[ChildEntNamesNum++] = Child._name + GrabChildsNamesFrom(Child) + } + } +} + +void SavePositionsOfChilds(local ExtClass ent) +{ + local int n + local ExtClass Child + + for(n = 0; n < ent.ChildsNamesNum; n++) + { + Child = FindClass(ent.ChildsNames[n]) + + if(Child) + { +/* local ExtClass root = Child.FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + Child.RefreshInEditor()*/ + + UpdateEntity(Child) + AddKeyValueToEntity(Child, "coords", vectoa(GetMatrix(Child, 3))) + SavePositionsOfChilds(Child) + } + } +} + +void SetEntityOrientationKeys(ExtClass ent, vector Coords, vector Angles) +{ + int k + + if(!ent) + return + + for(k = 0; k < ent.DefPtr.NumKeys; k++) + { + + if(ent.DefPtr.Keys[k] == "coords") + { + ent.EKeyValues[k] = vectoa(Coords) + ent.EKeyTypes[k] = 3 + } + + float rr + int tt + if(ent.DefPtr.Keys[k] == "angle3") + { + rr = Angles[0] + tt = rr + ent.EKeyValues[k] = itoa(tt) + ent.EKeyTypes[k] = 1 + } + + if(ent.DefPtr.Keys[k] == "angle") + { + rr = Angles[1] + tt = rr + ent.EKeyValues[k] = itoa(tt) + ent.EKeyTypes[k] = 1 + } + + if(ent.DefPtr.Keys[k] == "angle2") + { + rr = Angles[2] + tt = rr + ent.EKeyValues[k] = itoa(tt) + ent.EKeyTypes[k] = 1 + } + } +} + +void SetEntitySizeKeys(ExtClass ent, vector Mins, vector Maxs) +{ + int k + + if(!ent) + return + + for(k = 0; k < ent.DefPtr.NumKeys; k++) + { + if(ent.DefPtr.Keys[k] == "mins") + { + ent.EKeyValues[k] = vectoa(Mins) + ent.EKeyTypes[k] = 3 + } + + if(ent.DefPtr.Keys[k] == "maxs") + { + ent.EKeyValues[k] = vectoa(Maxs) + ent.EKeyTypes[k] = 3 + } + } +} + +bool IsNumber(string str) +{ + if(str == "0" || str == "1" || str == "2" || str == "3" || str == "4") + return true + + if(str == "5" || str == "6" || str == "7" || str == "8" || str == "9") + return true + + return false +} + +string GetIncrementNameForNew(string oldname) +{ + int IncNumbers[1024] + int IncNumbersNum = 0 + + string tmp + int pos = 0 + int spos = 0 + int lng,lng2, n + + ExtClass ec + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec.DefPtr && ec._name) + { + spos = strstr(ec._name, oldname) + lng = strlen(oldname) + lng2 = strlen(ec._name) + + if(spos != -1 && lng2 > lng) //ak nase meno obsahuje ina entita tak ostatne znaky musia byt iba incrementy + { + int len = lng2 - lng + bool Increment = true + + for(int i = 0; i < len; i++) + { + string st = substr(ec._name, lng + i, 1) + if(IsNumber(st) == false) + { + Increment = false + break + } + } + + if(Increment) + { + lng2 = lng2 - lng + + tmp = substr(ec._name, lng, lng2) + lng = atoi(tmp) + IncNumbers[IncNumbersNum++] = lng + } + } + } + } +/* + if(IncNumbersNum == 0) //v levele sme taky nazov nenasli takze v tom pripade vyhodime pripadne cisla z konca + { + int OldNameLng = strlen(oldname) + string LastChar = substr(oldname, OldNameLng - 1, 1) + + while(OldNameLng >= 1 && IsNumber(LastChar) == true) + { + oldname = substr(oldname, 0, OldNameLng - 1) + OldNameLng = strlen(oldname) + + if(OldNameLng >= 1) + LastChar = substr(oldname, OldNameLng - 1, 1) + else + LastChar = "NoNumberOnEnd" + } + } +*/ + int HNumber = -1 + + for(n = 0; n < IncNumbersNum; n++) + { + if(IncNumbers[n] > HNumber) + HNumber = IncNumbers[n] + } + + string newname = oldname + itoa(++HNumber) + + return newname +} + +void ShowDuplicityError() +{ + string ErrMsg2 = "Entita s timhle nazvem uz existuje !!!" + RequestDialog(ErrMsg2, "Error", GUI_DIALOG_OK ) +} + +bool DuplicityTestOK(string newname) +{ + ExtClass ec + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec._name == newname) + return false + } + + return true +} + + + + + + +#include "scripts/editor_links.h" + + +string Submenu[512] +int EntPopUpID[512] +int NumIDs = 0 +string IDnames[512] + +const int ST_SELECTING = 1 //selektime entity +const int ST_EDITCOORDS = 2 //menime pozicie entit + +string SndShadNames[512] +int SndShadNamesNum +int g_NumEditors //pocet instancii + +class EntityEditorTempClass extends PathEditor/*MinClass*/ +{ + ExtClass NewEntity(string NewClName, vector pos) + { + } + + void Hide(ExtClass other, bool HideStat) + { + } +} + + +class EntityEditor extends EntityEditorTempClass +{ + bool AreasVisible + bool LightsVisible + bool ClipsVisible + + int Status + ExtClass Ent //poiner pri selectovani + string EditLine + vector OldOrigin + string LastCreated //ClassName poslednej vytvorenej entity + UIMenu PopupMenu + UIMenu PopSubmenus[32] + UIMenu PopMenuHide + vector PosForNewEntity + vector LastEntityCoords + TraceContact SelectingContact + + vector g_ValMins, g_ValMaxs + vector g_AngleVal + vector g_NewEntityCoords + vector MovingOffset[32] //offsety ostatnych selektnutych entit k hlavnej + vector AnglesBeforeChange //uhly hlavnej entity pred ich zmenou + string NameForNew + //================================================================================= + ExtClass MainSel + ExtClass Selected[17] //o 1 viac koli procesu v AddSelection + int SelectedNum + + void RemoveSelection(ExtClass ent) + { + if(!ent) + return + + int n + int index = -1 + + for(n = 0; n < SelectedNum; n++) + { + if(Selected[n] == ent) + { + index = n + Selected[n] = NULL + SelectedNum-- + break + } + } + + if(index == -1) + { + // debug //toto by sa nemalo nikdy stat + MainSel = Selected[0] + return + } + + for(n = index; n < SelectedNum; n++) + { + Selected[n] = Selected[n + 1] + Selected[n + 1] = NULL + } + + MainSel = Selected[0] + } + + void AddSelection(ExtClass ent) + { + if(!ent) + return + + if(SelectedNum > 15) + return + + int n + for(n = 0; n < SelectedNum; n++) //mohlo by to tam uz byt + { + if(Selected[n] == ent) + { + RemoveSelection(ent) + break + } + } + + for(n = SelectedNum; n > 0; n--) + Selected[n] = Selected[n - 1] + + Selected[0] = ent + SelectedNum++ + MainSel = Selected[0] + } + + void UnselectAll() + { + for(int n = 0; n < SelectedNum; n++) + Selected[n] = NULL + + SelectedNum = 0 + MainSel = Selected[0] + } + + void ReplaceSelection(ExtClass Old, ExtClass New) + { + if(!Old || !New) + return + + int n + for(n = 0; n < SelectedNum; n++) //mohlo by to tam uz byt + { + if(Selected[n] == Old) + { + Selected[n] = New + MainSel = Selected[0] + break + } + } + } + + ExtClass GetSelected(int index) + { + return Selected[index] + } + + bool IsSelected(ExtClass ent) + { + for(int n = 0; n < SelectedNum; n++) + { + if(Selected[n] == ent) + return true + } + return false + } + + //---------------------------------------------------------------------------------- + ExtClass ReloadEntity(FuncClass ent, string NewClassName) + { + SetVariableTypes(ent) + + string tmp + + string model ; GetValue(ent, "model", 0, model) + string _name ; GetValue(ent, "_name", 0, _name) + + string _states = ent._userstates + string _events = ent._userevents + string _event0 = ent._userevent0 + string _event1 = ent._userevent1 + string _event2 = ent._userevent2 + string _event3 = ent._userevent3 + + BackUpKeys(ent) + + string classname = NewClassName//ClassName(ent) + if(IsInherited(ent, CFuncClass) && ent.Parent) + { + FuncClass ent2 = ent.Parent + ent2.Parent = NULL + ent.Parent = NULL + } + + ExtClass OldPtr = ent + + if(ent != World) + { + delete ent + ent = Spawn(Type(classname)) + } + + if(Ent == OldPtr) //mohlo by to byt pod kurzorom + Ent = ent + + SetValue(ent, "model", 0, model) + //SetValue(ent, "_name", 0, _name) + ent.SetName(_name) + + ent._userstates = _states + ent._userevents = _events + ent._userevent0 = _event0 + ent._userevent1 = _event1 + ent._userevent2 = _event2 + ent._userevent3 = _event3 + + RestoreKeys(ent) + + string key, value + vector coords + + for(int m = 0; m < ent.DefPtr.NumKeys; m++) + { + value = ent.EKeyValues[m] + key = ent.DefPtr.Keys[m] + + if(key == "coords") + coords = atov(value) + + switch(ent.EKeyTypes[m]) + { + case 1: + int In + SetValue(ent, key, 0, atoi(value)) + break + + case 2: + float Fl + SetValue(ent, key, 0, atof(value)) + break + + case 3: + int Vc + SetValue(ent, key, 0, atov(value)) + break + + case 4: + int St + SetValue(ent, key, 0, value) + break + } + } + return ent + } + + void ReloadEntitiesFromList(string names[], int NumEntities) + { + ExtClass Child + ExtClass Reloaded + int n + + for(n = 0; n < NumEntities; n++) + { + Child = FindClass(names[n]) + + if(Child) + { + Reloaded = ReloadEntity(Child, ClassName(Child)) + ReplaceSelection(Child, Reloaded) //keby to bolo nahodou selektnute tak zmeni pointer v Selected[] + } + } + + for(n = 0; n < NumEntities; n++) + { + Child = FindClass(names[n]) + + if(Child) + ThrowEvent(Child, EV_INIT) + } + + for(n = 0; n < NumEntities; n++) + { + Child = FindClass(names[n]) + + if(Child) + ThrowEvent(Child, EV_LOADED) + } + +/* for(n = 0; n < NumEntities; n++) + { + Child = FindClass(names[n]) + + if(Child && Child.GetParent() != NULL) + { + ExtClass root = Child.FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + Child.RefreshInEditor() + + Child.UpdateMainVisualizer() + } + }*/ + } + + void LoadEntKeysFromEntFile() + { + int n = 0 + string tokens[30] + string uv = tostr(34) + ExtClass ActEnt + + string EntFile = World.ThisLevelDir + World.ThisLevelName + ".ent"//substr(MapPath, 0, strlen(MapPath) - 3) + "ent" + tparse tp = BeginParse(EntFile) + n = 0 + + if(!tp) + { + string msg = "Not found file " + EntFile + Print(msg) + return + } + + while(ParseLine(tp, n++, tokens)) + { + switch(tokens[0]) + { + case "$ent": + ActEnt = GetEntityPointerFromName(tokens[2]) //najdeme si entitu s vyparsovanym menom + + if(ActEnt) + AddDefinedKeysToEntity(ActEnt) + + break + + default: + string val = tokens[2] + string key = tokens[0] + + if(substr(val, 0, 1) == tostr(34)) + val = substr(val, 1, strlen(val) - 2) + + if(ActEnt) + AddKeyValueToEntity(ActEnt, key, val) + break + } + + for(int k = 0; k < sizeof(tokens); k++) + tokens[k] = "" + } + EndParse(tp) + } + + void SaveEntitiesKeys() + { + string EntFile = World.ThisLevelDir + World.ThisLevelName + ".ent" + + string fname = GetFilePath(EntFile) + string nfname = substr(fname, 0, strlen(fname) - 4) + CopyFileA(fname, nfname + ".bak", false) + + int f = OpenFile(EntFile, FILEMODE_WRITE) + string line + string uv = tostr(34) //uvodzovky + string val + string key + bool Defined + string UserEv, UserEvVal + + if(!f) + { + RequestDialog("Cannot write to file " + EntFile, "Write error", GUI_DIALOG_OK ) + return + } + + ExtClass ec + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(!ec.DefPtr) //nebola z ent suboru + continue + + line = "$ent " + ClassName(ec) + " " + ec._name + FPrintln(f, line) + + int k + for(k = 0; k < ec.DefPtr.NumKeys; k++) + { + val = ec.EKeyValues[k] + key = ec.DefPtr.Keys[k] + Defined = true + + if(val == "") + continue + + if(val == "0") + continue + + if(val == "0 0 0") + continue + + if(ec.DefPtr) //je z ent suboru + { + for(int i = 0; i < 70; i++) + { + if(key == ec.DefPtr.Keys[i]) + Defined = false //je v def subore + } + } + + if(Defined == true) + continue + + if(val != "") + { + line = " " + key + " = " + uv + val + uv + FPrintln(f, line) + } + } + + UserEvVal = "" + GetValue(ec, "_userstates", 0, UserEvVal) + + if(UserEvVal != "") + { + UserEvVal = ReplaceChars(UserEvVal, ";", ",") + + line = " " + "_userstates" + " = " + uv + UserEvVal + uv + FPrintln(f, line) + } + + UserEvVal = "" + GetValue(ec, "_userevents", 0, UserEvVal) + + if(UserEvVal != "") + { + line = " " + "_userevents" + " = " + uv + UserEvVal + uv + FPrintln(f, line) + } + + for(k = 0; k < 8; k++) + { + UserEv = "_userevent" + itoa(k) + UserEvVal = "" + + GetValue(ec, UserEv, 0, UserEvVal) + + if(UserEvVal != "") + { + line = " " + UserEv + " = " + uv + UserEvVal + uv + FPrintln(f, line) + } + } + + FPrintln(f, "") + } + + CloseFile(f) + + Print(String("File " + EntFile + " is saved.")) + } + + ExtClass AddEntity(string classname, bool WriteToMap) + { + string _name = "" + vector coords = g_NewEntityCoords + int n + + ExtClass ent = Spawn(Type(classname)) + + if(!ent) + { + RequestDialog("Entity type not exist. Bad name in entities.def?", "Entity spawn error", GUI_DIALOG_OK ) + return NULL + } + + + // SetValue(ent, "model", 0, model) + SetValue(ent, "_name", 0, _name) + SetValue(ent, "coords", 0, coords) + + if(g_ValMins != ZeroVec) + { + SetValue(ent, "mins", 0, g_ValMins) + SetValue(ent, "maxs", 0, g_ValMaxs) + } + + if(WriteToMap) + { + //kontrolujeme ci ta entita je v .ent subore a ked ano tak zistime aky "_name" jej pridelime. inac return a nic sa nedeje + if(DefManager.GetDefinition(classname)) + { + _name = classname + "0" + int poc = 0 + + bool Duplicity + ExtClass ec + + while(Duplicity) + { + Duplicity = false + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(_name == ec._name) + { + poc++ + _name = classname + itoa(poc) + Duplicity = true + } + } + } + } + + if(_name == "") + { + string ErrMsg = "Entita " + classname + " neni nadefinovana v entities.def !" + RequestDialog(ErrMsg, "Error", GUI_DIALOG_OK ) + return NULL + } + + _name = NameForNew + ent.SetName(_name) + AddDefinedKeysToEntity(ent) + } + + int mask = GetEventMask(ent) + if(mask & EV_INIT) + Throw(ent, World, EV_INIT, 0) + + mask = GetEventMask(ent) + + if(mask & EV_LOADED) + Throw(ent, World, EV_LOADED, 0) + + OnDataChange() + return ent + } + +//----------------------------------------------------------------- + void AddNamesToGUI(ExtClass entities[], int NumEntities) + { + ExtClass CurEnt + string Names[64] + string ClassNames[64] + + for(int n = 0; n < NumEntities; n++) + { + CurEnt = entities[n] + Names[n] = CurEnt._name + ClassNames[n] = ClassName(CurEnt) + } + EntityListAdd(Names, ClassNames, NumEntities) + } + +//----------------------------------------------------------------- + void RemoveNamesFromGUI(ExtClass entities[], int NumEntities) + { + ExtClass CurEnt + string Names[64] + string ClassNames[64] + + for(int n = 0; n < NumEntities; n++) + { + CurEnt = entities[n] + Names[n] = CurEnt._name + ClassNames[n] = ClassName(CurEnt) + } + EntityListRemove(Names, ClassNames, NumEntities) + } + + string FilterClassNames[256] + int FilterClassNamesNum + +//----------------------------------------------------------------- + void UpdateEntitiesList() //volane z GUI + { + string AllEntities[4096] + string AllEntitiesClassNames[4096] + int AllEntitiesNum = 0 + ExtClass ec + string ClName + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec.DefPtr) //je z ent suboru + { + ClName = ClassName(ec) + + if(AllEntitiesNum < 4096) + { + AllEntities[AllEntitiesNum] = ec._name + AllEntitiesClassNames[AllEntitiesNum++] = ClassName(ec) + } + } + } + EntityListAdd(AllEntities, AllEntitiesClassNames, AllEntitiesNum) + } + + // ---------------------------------------------------------------------------- + void ShowCursorPernamently(bool status) + { + int cur; + + if(status == true) + { + cur = 0; + while(cur <= 0) + cur = ShowCursor(true); + } + else + { + cur = 1; + while(cur >= 0) + cur = ShowCursor(false); + } + } + +//-------------------------------------------------------------------- + bool IsNotEditableKey(string key) + { + if(key == "prefab" || key == "_surfaces" || key == "PrefabsIncrement") //toto neni pristupne (viditelne) v edit okne + return true + + return false + } + +//-------------------------------------------------------------------- + bool IsPathKey(string key) + { + if(key == "model" || key == "display" || key == "anim" || key == "sound") + return true + + return false + } + + bool Update3DCursor() + { + if(EdMode == EDITMODE_PATH) + return true + + return false + } + + void ShowMiscModels(bool show) + { + int nn = g_iShowFilter + + if(show) + nn |= 2 + else + nn &= 0xffffffff - 2 + + g_iShowFilter = nn + } + + void ShowLights(bool show) + { + ExtClass ec + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ClassName(ec) == "light") + { + if(show) + ec.CreateEditorVisuals() + else + ec.DestroyEditorVisuals() + } + } + } + + bool GetAreasVis() + { + return AreasVisible + } + + void ShowBBoxOfEntity(MinClass En, int color) + { + if(!En) + return + + vector mins, maxs, org + GetBoundBox(En, mins, maxs) + org = GetMatrix(En, 3) +/* + vector Dmins, Dmaxs + if(GetValue(En, "mins", 0, Dmins) && GetValue(En, "maxs", 0, Dmaxs)) + { + if(Status == ST_EDITCOORDS) + { + mins = g_ValMins + maxs = g_ValMaxs + } + else + { + mins = Dmins + maxs = Dmaxs + } + } +*/ + if(VectorLength(maxs - mins) < 1) + { + mins = "-8 -8 -8" + maxs = "8 8 8" + } + + TriggerClass trig = NULL + bool IsNonBrushTrigger = false + bool ShapeType = 0 + + if(IsInherited(En, CTriggerClass)) + { + trig = En + IsNonBrushTrigger = trig.IsDynamic + ShapeType = trig.type + } + + if(ClassName(En) == "clima_bugs") + ShapeType = 0 + + if(IsNonBrushTrigger || ClassName(En) == "clima_bugs") + { + GetValue(En, "mins", 0, mins) + GetValue(En, "maxs", 0, maxs) + } + + if(ShapeType == 0) + { + vector mat[4] + mat[0] = GetMatrix(En, 0) + mat[1] = GetMatrix(En, 1) + mat[2] = GetMatrix(En, 2) + mat[3] = GetMatrix(En, 3) + + Shape nn = AddDShape(SHAPE_BBOX, color, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, mins + "-0.1 -0.1 -0.1", maxs + "0.1 0.1 0.1") + nn.SetMatrix(mat) + } + + if(ShapeType == 1) + { + AddDCylinder(color, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, org, maxs[0], maxs[2] * 2) + } + + AddDShape(SHAPE_BBOX, 0xff222222, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, org + "-0.2 -0.2 -0.2", org + "0.2 0.2 0.2") + } + + + void AddSubmenuItems(string buffer[], int BufferSize, int MenuIndex, string pref) + { + for(int n = 0; n < BufferSize; n++) + { + UIMenu mm = PopSubmenus[MenuIndex] + string sss = buffer[n] + + if(strstr(sss, pref + "_") != -1) + { + mm.AddTextItem("&" + sss, 0x8000 + NumIDs) + IDnames[NumIDs++] = sss + } + } + } + + string GetNameFromPopup(string buffer[], int BufferSize, bool submenu, int Xpos, int Ypos) + { + int spos = 0 + string NewLine + int LinesNum = 0 + int n + bool Sub = false + int NumSubMenus = 0 + NumIDs = 0 + + PopupMenu = new UIMenu() + + for(n = 0; n < 32; n++) + PopSubmenus[n] = new UIMenu() + + for(n = 0; n < sizeof(Submenu); n++) + Submenu[n] = "" + + for(n = 0; n < BufferSize; n++) + { + if(buffer[n] == "world" || strstr(buffer[n], "Class") >= 0) + continue + + Sub = false + NewLine = "" + spos = strstr(buffer[n], "_") + + if(spos != -1 && submenu) + { + NewLine = substr(buffer[n], 0, spos) + Sub = true + } + else + NewLine = buffer[n] + + + bool add = true + for(int k = 0; k < n; k++) + { + if(NewLine == Submenu[k]) + add = false + } + + if(NewLine == "") + add = false + + if(add) + { + if(Sub) + { + PopupMenu.AddSubMenu(PopSubmenus[NumSubMenus], NewLine) + AddSubmenuItems(buffer, BufferSize, NumSubMenus++, NewLine) + } + else + { + PopupMenu.AddTextItem("&" + NewLine, 0x8000 + NumIDs) + IDnames[NumIDs++] = NewLine + } + + Submenu[LinesNum++] = NewLine + } + } + + int c = PopupMenu.IPopup(Xpos, Ypos) + int res = c - 0x8000 + ClearKey(KC_ESCAPE) + + delete PopupMenu + PopupMenu = NULL + + for(n = 0; n < 32; n++) + { + delete PopSubmenus[n] + PopSubmenus[n] = NULL + } + + RestetGUIInput() //toto popup zapricinuje ze sa keyup u klaves uz nevykona takze musime vyclearovat + + if(res < 0 || res > NumIDs) //nebolo nic vybrane + return "" + + SetFocusToRenderWindow() + return IDnames[res] //vracia to na co bolo kliknute + } + + bool FlagIsSet(int flg, int bit) + { + if(flg & bit) + return true + else + return false + } + +/* string GetKeyHelp(string key) + { + for(int n = 0; n < ent.DefPtr.NumKeys; n++) + { + if(key == MainSel.DefPtr.Keys[n]) + return DefEntKeyHelps[MainSel.EDefIndex][n] + } + return "" + } + + string GetMethodHelp(string method) + { + for(int n = 0; n < DefEntNumMethods[MainSel.EDefIndex]; n++) + { + if(method == DefEntMethods[MainSel.EDefIndex][n]) + return DefEntMethodHelps[MainSel.EDefIndex][n] + } + return "" + }*/ + + bool IsEvent(ExtClass ent, string key) + { + for(int n = 0; n < ent.DefPtr.NumEvents; n++) + { + if(key == ent.DefPtr.Events[n]) + return true + } + return false + } + + void MemSelectionOffsets(vector OffsetArray[]) + { + vector MainSelMat[4] + ExtClass OtherEnt + vector OtherPos, OtherAng + vector OldCoords + + AnglesBeforeChange[0] = atoi(GetValueFromKey(MainSel, "angle3")) + AnglesBeforeChange[1] = atoi(GetValueFromKey(MainSel, "angle")) + AnglesBeforeChange[2] = atoi(GetValueFromKey(MainSel, "angle2")) + OldCoords = atov(GetValueFromKey(MainSel, "coords")) + + RollPitchYawMatrix2(AnglesBeforeChange, MainSelMat) //matica pred zmenou + MainSelMat[3] = OldCoords + + for(int n = 1; n < SelectedNum; n++) //zo starej matice potrebujeme offsety aby sme ich potom previedli do novej matice + { + OtherEnt = Selected[n] + vector off = atov(GetValueFromKey(OtherEnt, "coords")) - OldCoords + OffsetArray[n] = VectorMatrixInvMultiply3(MainSelMat, off) //zapameame si offsety v objectspace hlavnej entity + } + } + + void TransformateSelectedEntities(vector OffsetArray[]) + { + vector MainSelMat[4] + ExtClass OtherEnt + vector OtherPos, OtherAng + + g_AngleVal[0] = atoi(GetValueFromKey(MainSel, "angle3")) //ziskame hodnoty do matice po zmene klucov + g_AngleVal[1] = atoi(GetValueFromKey(MainSel, "angle")) + g_AngleVal[2] = atoi(GetValueFromKey(MainSel, "angle2")) + vector Coords = atov(GetValueFromKey(MainSel, "coords")) + + RollPitchYawMatrix2(g_AngleVal, MainSelMat) //matica po zmene + MainSelMat[3] = Coords + + for(int n = 1; n < SelectedNum; n++) //hlavnej entite nemusime menit nic. ta to ma spravne naplnene z listboxu + { + OtherEnt = Selected[n] + OtherPos = VectorMatrixMultiply3(MainSelMat, OffsetArray[n]) + OtherPos = Coords + OtherPos + OtherAng[0] = atoi(GetValueFromKey(OtherEnt, "angle3")) + OtherAng[1] = atoi(GetValueFromKey(OtherEnt, "angle")) + OtherAng[2] = atoi(GetValueFromKey(OtherEnt, "angle2")) + + vector AngOff = g_AngleVal - AnglesBeforeChange + AngOff = FixAngles(AngOff) + + OtherAng = AngOff + OtherAng + OtherAng = FixAngles(OtherAng) + +/* string DirAngle = GetValueFromKey(OtherEnt, "dirangle") + + if(DirAngle) + { + OtherAng + }*/ + + SetEntityOrientationKeys(OtherEnt, OtherPos, OtherAng) + } + + for(n = 1; n < SelectedNum; n++) + ReplaceSelection(Selected[n], ReloadEntity(Selected[n], ClassName(Selected[n]))) + + for(n = 1; n < SelectedNum; n++) + ThrowEvent(Selected[n], EV_INIT) + + for(n = 1; n < SelectedNum; n++) + ThrowEvent(Selected[n], EV_LOADED) + } + +//----------------------------------------------------------------- + string DecodePrefabNameFromKey(string CodedString) //vracia ID prefabu z kluca "prefab" + { + int spos = strstr(CodedString, ";") + string PrefabName = "" + + if(spos > 1) + PrefabName = substr(CodedString, 0, spos) + + return PrefabName + } + +//----------------------------------------------------------------- + string DecodePrefabEntNameFromKey(string CodedString) //vracia ID definicie entity z prefabu z kluca "prefab" + { + int spos = strstr(CodedString, ";") + string PrefabEntName = "" + int lng + string temp + + if(spos > 1) + { + lng = strlen(CodedString) + lng -= spos + 1 + temp = substr(CodedString, spos + 1, lng) + + spos = strstr(temp, ";") + + if(spos > 1) + { + lng = strlen(temp) + lng -= spos + 1 + temp = substr(temp, spos + 1, lng) + } + + PrefabEntName = temp + } + return PrefabEntName + } + +//----------------------------------------------------------------- + string DecodePrefabInstanceIncerementFromKey(string CodedString) //vracia ID definicie entity z prefabu z kluca "prefab" + { + int spos = strstr(CodedString, ";") + string PrefabEntName = "" + int lng + string temp + + if(spos > 1) + { + lng = strlen(CodedString) + lng -= spos + 1 + temp = substr(CodedString, spos + 1, lng) + + spos = strstr(temp, ";") + + if(spos > 1) + PrefabEntName = substr(temp, 0, spos) + } + return PrefabEntName + } + +//------------------------------------------------------------------------------ + string GetPrefabNameOfEntity(ExtClass ent) + { + string CodedPrefabID = ent.GetKeyValue("prefab") + string RealPrefabID = DecodePrefabNameFromKey(CodedPrefabID) + return RealPrefabID + } + +//------------------------------------------------------------------------------ + Prefab GetPrefabOfEntity(ExtClass ent) + { + string CodedPrefabID = ent.GetKeyValue("prefab") + string RealPrefabID = DecodePrefabNameFromKey(CodedPrefabID) + return PrefManager.GetPrefab(RealPrefabID) + } + +//------------------------------------------------------------------------------ + PrefabEnt GetPrefabSegmentOfEntity(ExtClass ent) + { + string CodedPrefabID = ent.GetKeyValue("prefab") + string RealPrefabID = DecodePrefabNameFromKey(CodedPrefabID) + string RealEntPrefabID = DecodePrefabEntNameFromKey(CodedPrefabID) + + Prefab pref = PrefManager.GetPrefab(RealPrefabID) + + if(!pref) + return NULL + + PrefabEnt PrefEnt = pref.GetPrefabEnt(RealEntPrefabID) + + if(!PrefEnt) + return NULL + + return PrefEnt + } + +//------------------------------------------------------------------------------ + bool IsPrefabed(ExtClass ent) + { + if(GetPrefabSegmentOfEntity(ent)) + return true + + return false + } + +//------------------------------------------------------------------------------ + bool IsKeyOfPrefabChangeable(ExtClass ent, string key) + { + string ClName = ClassName(ent) + + if(key == "prefab" || key == "coords" || key == "angle" || key == "angle2" || key == "angle3" || key == "flags" || key == "dirangle") + return false + + if(key == "HackCameraFrom") + return false + + if(ClName == "func_plat") + { + if(key == "length" || key == "model") + return false + } + + if(key == "wait" && IsInherited(ent, CDoorClass)) + return false + + if(key == "intensity" && ClName == "dlight_dynamic") + return false + + if(key == "_userstates") //trochu prasarna pretoze userstates neni kluc ale v prefaboch sa uklada ako kluc a preto tu musi byt + return false + + if(key == "_materialremap") + return false + + if(IsInherited(ent, CTriggerClass)) + { + if(key == "actors" || key == "mins" || key == "maxs") + return false + } + + if(IsInherited(ent, CJointClass)) + { + if(key == "body1" || key == "body2") + return false + } + + if(IsEvent(ent, key) == true) + return false + + return true + } + +//----------------------------------------------------------------- + int FillKeyValuesFromPrefab(ExtClass ent, string CodedPrefabID) + { + int ChangeCounter = 0 + string RealPrefabID = DecodePrefabNameFromKey(CodedPrefabID) + string RealEntPrefabID = DecodePrefabEntNameFromKey(CodedPrefabID) + + Prefab pref = PrefManager.GetPrefab(RealPrefabID) + + if(!pref) + return ChangeCounter + + PrefabEnt PrefEnt = pref.GetPrefabEnt(RealEntPrefabID) + + if(!PrefEnt) + return ChangeCounter + + string key, val + bool Apply + + for(int k = 0; k < PrefEnt.NumPrefabKeys; k++) //naplnime hodnoty z prefabu + { + key = PrefEnt.PrefabKeys[k] + val = PrefEnt.PrefabKeyValues[k] + + if(IsKeyOfPrefabChangeable(ent, key) == false) + continue + + string OldVal = ent.GetKeyValue(key) + + Apply = true + + if(OldVal == val) + Apply = false + else + { + if(OldVal == "" && val == "0") //berieme ze su rovnake + Apply = false + + if(OldVal == "0" && val == "") + Apply = false + } + + if(Apply) + { + AddKeyValueToEntity(ent, key, val) +// Print(key) + ChangeCounter++ + } + } + + if(ChangeCounter > 0) + OnDataChange() + + return ChangeCounter + } + +//----------------------------------------------------------------- + void WritePrefabsValuesToAllEntities() + { + ExtClass ec + string PrefabCodedID + int ChangedEntities = 0 + int AllChangedKeys = 0 + int ChangedKeys + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec._name && ec.DefPtr) //je to entita z mapy a ma definiciu v entities.def + { + PrefabCodedID = ec.GetKeyValue("prefab") + + if(PrefabCodedID) + { + ChangedKeys = FillKeyValuesFromPrefab(ec, PrefabCodedID) + + if(ChangedKeys > 0) + { + ChangedEntities++ + AllChangedKeys += ChangedKeys + } + } + } + } + + if(ChangedEntities > 0) + { + string StrChangedEntities = itoa(ChangedEntities) + RequestDialog("Prefabs applied to " + StrChangedEntities + " entities (" + itoa(AllChangedKeys) + " keys rewritten)", "Applying prefabs result", GUI_DIALOG_OK) + } + } + +//----------------------------------------------------------------- + void TestPrefabsForUniqueInstances() + { + ExtClass ec, dup + string PrefabCodedID + string RealPrefabID + string PrefabInstanceID + + string CodedID2 + string InstanceID2 + string PrefabID2 + + int NumInstancies + int NumErrors + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec._name && ec.DefPtr) //je to entita z mapy a ma definiciu v entities.def + { + NumInstancies = 0 + NumErrors = 0 + PrefabCodedID = ec.prefab//ec.GetKeyValue("prefab") + + if(PrefabCodedID) + { + RealPrefabID = DecodePrefabNameFromKey(PrefabCodedID) + PrefabInstanceID = DecodePrefabInstanceIncerementFromKey(PrefabCodedID) + Prefab pref = PrefManager.GetPrefab(RealPrefabID) + + if(pref) + { + // for(dup = GetNextEntity(NULL, CExtClass); dup != NULL; dup = GetNextEntity(dup, CExtClass)) + dup = GetNextEntity(NULL, CExtClass) + while(dup) + { + if(dup._name && dup.DefPtr) + { + CodedID2 = dup.prefab//GetKeyValue("prefab") + + if(CodedID2) + { + PrefabID2 = DecodePrefabNameFromKey(CodedID2) + InstanceID2 = DecodePrefabInstanceIncerementFromKey(CodedID2) + + if(InstanceID2 == PrefabInstanceID) //co ma rovnake unikatne ID + { + if(PrefabID2 != RealPrefabID) //to musi mat aj rovnaky prefab + NumErrors++ + else + NumInstancies++ //kontrolujeme aj ci sedi pocet entit s tymto unikatnym cislom + } + } + } + dup = GetNextEntity(dup, CExtClass) + } + + if(NumInstancies > pref.NumPrefabEntities) + { + int NumErr = NumInstancies - pref.NumPrefabEntities + RequestDialog("Too much prefabed entities with instance ID " + PrefabInstanceID + ". " + itoa(NumErr) + " errors", "Prefabs error", GUI_DIALOG_OK ) + } + } + } + + if(NumErrors) + RequestDialog("Equal instance ID between different prefab instances detected! " + itoa(NumErrors) + " errors", "Prefabs error", GUI_DIALOG_OK ) + } + } + } + +//------------------------------------------------------------------------------ + bool ChangePrefabFromEntity(ExtClass ent) //klucami entity prepise prefab ktory ma nadefinovany + { + if(!ent) + return false + + PrefabEnt PrefEntDef = GetPrefabSegmentOfEntity(ent) + + if(!PrefEntDef) + return false + + int n + string Val + string Key + + for(n = 0; n < ent.DefPtr.NumKeys; n++) + { + Val = ent.EKeyValues[n] + Key = ent.DefPtr.Keys[n] + + if(IsKeyOfPrefabChangeable(ent, Key) == false) + continue + + PrefEntDef.SetPrefabKeyValue(Key, Val) + } + return true + } + +//----------------------------------------------------------------- + int FillChoicesArrayForKey(ExtClass ent, string Key, string ChoicesArray[]) + { + int ChoicesNum = 0 + int n + + if(Key == "name") + { + if(IsInherited(ent, CItemMisc)) + { + n = 0 + ItemDef CurItem + + for(n = 10; n < World.ItemColPtr.ItemsNum; n++) + { + CurItem = World.ItemColPtr.Items[n] + + if(CurItem) + ChoicesArray[ChoicesNum++] = CurItem.ID + } + return ChoicesNum + } + + if(IsInherited(ent, CMiscPhysicsPack)) + { + for(n = 0; n <= BrkGroupsNum; n++) + ChoicesArray[ChoicesNum++] = BrkGroups[n] + + return ChoicesNum + } + } + +/* if(Key == "flags") + { + for(n = 0; n < DefEntFlagsNum[ent.EDefIndex]; n++) + ChoicesArray[ChoicesNum++] = DefEntFlags[ent.EDefIndex][n] + + return ChoicesNum + }*/ + + if(Key == "model") + { + if(IsInherited(ent, CParticleEffector)) + { + ChoicesArray[ChoicesNum++] = "Particle files (*.ptc)|*.ptc" + ChoicesArray[ChoicesNum++] = "particle" //defaultna cesta kde sa otvori filedialog + } + else + { + ChoicesArray[ChoicesNum++] = "XOB files (*.xob)|*.xob" + ChoicesArray[ChoicesNum++] = "obj" //defaultna cesta kde sa otvori filedialog + } + return ChoicesNum + } + + if(Key == "anim" || Key == "baseanim" || Key == "beforeopenanim" || Key == "aftercloseanim" || Key == "pose") + { + ChoicesArray[ChoicesNum++] = "Anim files (*.anm)|*.anm" + ChoicesArray[ChoicesNum++] = "anm" + return ChoicesNum + } + + if(Key == "display") + { + ChoicesArray[ChoicesNum++] = "Display files (*.dpl)|*.dpl" + ChoicesArray[ChoicesNum++] = "displays" + return ChoicesNum + } + return 0 + } + +//----------------------------------------------------------------- + string GetUserStatesOfSelected() + { + if(MainSel) + return MainSel._userstates + } + +//----------------------------------------------------------------- + void SetUserStatesOfSelected(string states) + { + if(MainSel) + { + MainSel._userstates = states + OnDataChange() + } + } + +//----------------------------------------------------------------- + void ShowPropertiesOfSelecting() + { + if(!MainSel) + return +/* + string ColTexts0[60] + string ColTexts1[60] + string EntMethodsHelps[60] + + int ColColors0[60] + int ColColors1[60] + int BackgroundColor = 0xff222222 //default pozadie + string Label + int LinesNum + int n + int Edit //true - hodnoty budu editovatelne + + LinesNum = 0 + Edit = 1 + ExtClass CurSel, Another + int NumPrefabed = 0 + + for(int s = 0; s < SelectedNum; s++) + { + CurSel = Selected[s] + + if(IsPrefabed(CurSel)) + NumPrefabed++ + } + + if(SelectedNum > 1) + { + Label = itoa(SelectedNum) + " entities (" + itoa(NumPrefabed) + " PREFABED)" + + if(NumPrefabed > 0) + BackgroundColor = ARGB(255, 86, 0, 0) + } + else + { + Label = MainSel._name + + if(NumPrefabed > 0) + { + BackgroundColor = ARGB(255, 86, 0, 0) + Prefab prf = GetPrefabOfEntity(MainSel) + Label += " (PREFABED to " + prf.ID + ")" + } + else + Label += " (NOT PREFABED)" + } + + if(SelectedNum == 1) + { + for(n = 0; n < MainSel.DefPtr.NumKeys; n++) + { + if(IsNotEditableKey(MainSel.DefPtr.Keys[n])) + continue + + ColTexts0[LinesNum] = MainSel.DefPtr.Keys[n] + ColTexts1[LinesNum] = MainSel.EKeyValues[n] + + if(IsEvent(MainSel, ColTexts0[LinesNum])) + ColColors0[LinesNum] = ARGB(255, 255, 100, 100) + else + ColColors0[LinesNum] = ARGB(255, 255, 255, 0) + + ColColors1[LinesNum] = ARGB(255, 255, 255, 255) + LinesNum++ + } + } + else + { + string KeysToEdit[256] + int KeysToEditNum = 0 + string CurKey, CurValue, AnotherKey + int NumDup + + for(s = 0; s < SelectedNum; s++) + { + CurSel = Selected[s] + + for(int c = 0; c < CurSel.DefPtr.NumKeys; c++) + { + CurKey = CurSel.DefPtr.Keys[c] + NumDup = 0 + + for(int r = 0; r < SelectedNum; r++) + { + Another = Selected[r] + + if(CurSel != Another) + { + for(int a = 0; a < Another.DefPtr.NumKeys; a++) + { + AnotherKey = Another.DefPtr.Keys[a] + + if(AnotherKey == CurKey) + { + NumDup++ + break + } + } + } + } + + int CorrectNum = SelectedNum - 1 + bool AddKey = true + + if(NumDup == CorrectNum) + { + for(int k = 0; k < KeysToEditNum; k++) + { + if(KeysToEdit[k] == CurKey) + { + AddKey = false + break + } + } + + if(AddKey) + KeysToEdit[KeysToEditNum++] = CurKey + } + } + } + + for(k = 0; k < KeysToEditNum; k++) + { + CurKey = KeysToEdit[k] + CurValue = MainSel.GetKeyValue(CurKey) + + if(IsNotEditableKey(CurKey) + continue + + ColTexts0[LinesNum] = CurKey + ColTexts1[LinesNum] = MainSel.GetKeyValue(CurKey) + + if(IsEvent(MainSel, CurKey) + ColColors0[LinesNum] = ARGB(255, 255, 100, 100) + else + ColColors0[LinesNum] = ARGB(255, 255, 255, 0) + + ColColors1[LinesNum] = ARGB(255, 255, 255, 255) + LinesNum++ + } + } + + string KeyChoices[1024] + int KeyChoicesNum = 0 + int VarType, ControlType + string Key, Val +*/ + ShowSelectionProperties(ClassName(MainSel), MainSel.DefPtr.Keys, MainSel.EKeyValues, MainSel.DefPtr.NumKeys) + } + +//------------------------------------------------------------------------------ + ExtClass NewEntity(string NewClName, vector pos) + { + if(!DefManager.GetDefinition(NewClName)) //entita neni v entities.def + { + string ErrMsg = "Entita " + NewClName + " neni nadefinovana v entities.def" + RequestDialog(ErrMsg, "Error", GUI_DIALOG_OK ) + return NULL + } + + g_NewEntityCoords = pos + + ExtClass SpawnedEnt = AddEntity(NewClName, true) + + if(!SpawnedEnt) + return NULL + + AddSelection(SpawnedEnt) + SetMoveType(MainSel, NONE) + UpdateEntity(MainSel) + LastCreated = ClassName(MainSel) + + vector mins, maxs, tm + GetBoundBox(MainSel, mins, maxs) + if(GetValue(MainSel, "mins", 0, tm)) + { + g_ValMins = mins + g_ValMaxs = maxs + } + + float height = maxs[2] - mins[2] + vector xxx = GetTracPos(MainSel, g_NewEntityCoords + Vector(0, 0, height), "0 0 -500") + + SetEntityOrientationKeys(MainSel, xxx, ZeroVec) + ReplaceSelection(MainSel, ReloadEntity(MainSel, ClassName(MainSel))) + ThrowEvent(MainSel, EV_INIT) + ThrowEvent(MainSel, EV_LOADED) + + UpdateEntityLinks(true) + g_ValMins = ZeroVec + g_ValMaxs = ZeroVec + + Status = ST_SELECTING + return MainSel + } + + bool CanEditKey(ExtClass ent, string key) //zistujeme ci sa nejedna o entitu ktora je z prefabu + { + if(IsPrefabed(ent) == true) //ak je to prefabovana entita tak zmena klucov s vynimkou coords, angles a eventov znamena zmenit to v prefabe a vsetkych entitach ktore pouzivaju ten prefab + { + if(IsKeyOfPrefabChangeable(ent, key) == false) //je to kluc ktory nema nema vplyv na prefab takze sa prefab menit nebude + return true + + if(PrfIsWritable() == false) + { + RequestDialog("Prefabs file is read only!", "Error", GUI_DIALOG_OK) + return false + } + + if(RequestDialog("This entity is prefabed. Changing this value will change prefab and all entities that uses it. Really accept?", "Warning for prefab changing", GUI_DIALOG_YES_NO) == GUI_REQUEST_YES) + return true //user potvrdil ze mu nevadi zmena prefabu + + return false + } + else + return true + } + +//-------------------------------------------- + MinClass GetTracEnt(MinClass ent, vector from, vector dir) + { + vector mins, maxs + vector start = from + vector end = from + dir + float Plane[4] + ExtClass TargEnt = NULL + + if(ent) + GetBoundBox(ent, mins, maxs) + else + { + mins = ZeroVec + maxs = ZeroVec + } + + float fl = TraceLineEx(DEFAULT, start, end, mins, maxs, TargEnt, Plane, NULL, NULL, TRACE_WORLD, NULL) + + if(fl == 1) + return NULL + else + return TargEnt + } + + int GetCameraPosFactor() + { + float Angle + vector Pos = GetMatrix(MainSel, 3) + vector offset = World.CameraPos - Pos + + vector ang = Vector2Angles(offset) + Angle = ang[1] + + if(Angle >= 315 && Angle < 360) + return 1 + + if(Angle >= 0 && Angle < 45) + return 1 + + if(Angle >= 45 && Angle < 135) + return 2 + + if(Angle >= 135 && Angle < 225) + return 3 + + if(Angle >= 225 && Angle < 315) + return 4 + } + +//----------------------------------------------------------------- + bool PrfIsWritable() + { + return IsFileWritable("scripts/entities.prf") + } + +//----------------------------------------------------- + bool Filter2(ExtClass other) + { + return true + } + +//----------------------------------------------------- + void SetEditMode(int mode) //entity <-> area edit mode + { + EdMode = mode + + if(EdMode == EDITMODE_ENTITY) + { + r_bright = false + ShowClips(false) + Status = ST_SELECTING + } + + if(EdMode == EDITMODE_PATH) + { + r_bright = true + ShowClips(ClipsVisible) + ShowGrid = 1 + } + + if(EdMode == EDITMODE_NONE) + { + r_bright = false + ShowClips(false) + ShowGrid = 0 + } + + PrintToStatusBar(0, "") + PrintToStatusBar(1, "") + PrintToStatusBar(2, "") + PrintToStatusBar(3, "") + SetAreasVis() + Ent = NULL + UnselectAll() + } +//----------------------------------------------------- + + bool PickEntity() + { + if(EntIsWritable() == false) + { + RequestDialog("File is Read Only!", "Error", GUI_DIALOG_OK) + return false + } + + if(IsBrushEntity(MainSel)) + return false + + if(MainSel == World) + return false + + if(MainSel.ParentName && SelectedNum > 1) + { + Print("Cannot change orientation of group when main selection is child of other entity!") + return false + } + + vector mins, maxs + GetBoundBox(MainSel, mins, maxs) + + vector tm1, tm2 + if(GetValue(MainSel, "mins", 0, tm1) && GetValue(MainSel, "maxs", 0, tm2)) + { + if(IsInherited(MainSel, CDoorClass)) //dvere maju v pravych uhloch tieto hodnoty uz transformovane podla otocenia. Debug box by sa potom zobrazil blbo + { + g_ValMins = mins + g_ValMaxs = maxs + } + else + { + g_ValMins = tm1 + g_ValMaxs = tm2 + } + } + + g_AngleVal[0] = atoi(GetValueFromKey(MainSel, "angle3")) + g_AngleVal[1] = atoi(GetValueFromKey(MainSel, "angle")) + g_AngleVal[2] = atoi(GetValueFromKey(MainSel, "angle2")) + + if(MainSel.ParentName) + g_NewEntityCoords = GetOrigin(MainSel) + else + { + string TmpVal + TmpVal = GetValueFromKey(MainSel, "coords") + g_NewEntityCoords = atov(TmpVal) + } + + OldOrigin = g_NewEntityCoords + LastEntityCoords = g_NewEntityCoords + + MemSelectionOffsets(MovingOffset) //zapametame si offsety na hlavnu entitu + ShowCursorPernamently(false) + return true + } + + string ClearIncerementFromName(string Name) + { + string ext = substr(Name, strlen(Name) - 1, 1) + + while(IsNumber(ext)) + { + if(strlen(Name) > 0) + Name = substr(Name, 0 , strlen(Name) - 1) + + ext = substr(Name, strlen(Name) - 1, 1) + } + + return Name + } + + void Hide(ExtClass other, bool HideStat) + { + if(HideStat) //hide + { + if(!other) + return + + other.HideInEditor(true) + other.DestroyEditorVisuals() + + if(IsSelected(other)) + { + RemoveSelection(other) + + if(MainSel) + { + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + } + else + OnUpdateSelection("", "", "", false) + } + } + else //unhide + { + if(other == NULL) + { + ExtClass ec + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec.DefPtr && ec != World) //je z ent suboru. ostatne musia byt osetrene tentitami ktore ich vytvorili + { + if(ec.Hidden == true) + { + ec.HideInEditor(false) + ec.CreateEditorVisuals() //ked je este vyfiltrovana tak sa aj tak nezobrazi + } + } + } + } + else + { + other.HideInEditor(false) + other.CreateEditorVisuals() + } + } + + UpdateEntityLinks(true) + } + +//-------------------------------------------------------------------- + bool InsertEntitiesFromPrefab(string prefab, vector pos, vector ForcedAngles) + { + Prefab pref = PrefManager.GetPrefab(prefab) + PrefabEnt CurPrefEnt + string key, val + + string ErrMsg + vector offset + vector Origin + vector OriginMain + int n + ExtClass CreatedEntities[16] + int CreatedEntitiesNum = 0 + + if(!pref) + { + ErrMsg = "Prefab " + prefab + " not found" + MessageBoxA(0, ErrMsg, "Error", 0) + return false + } + + for(n = 0; n < pref.NumPrefabEntities; n++) + { + CurPrefEnt = pref.PrefabEntities[n] + + if(!DefManager.GetDefinition(CurPrefEnt.ClassName)) //entita neni v entities.def + { + ErrMsg = "Entita " + CurPrefEnt.ClassName + " neni nadefinovana v entities.def" + MessageBoxA(0, ErrMsg, "Error", 0) + return false + } + } + + World.PrefabsIncrement = atoi(World.GetKeyValue("PrefabsIncrement")) + AddKeyValueToEntity(World, "PrefabsIncrement", itoa(++World.PrefabsIncrement)) + + UnselectAll() + g_NewEntityCoords = pos + + for(n = 0; n < pref.NumPrefabEntities; n++) + { + CurPrefEnt = pref.PrefabEntities[n] + string NewName = CurPrefEnt.ID + + NewName = ClearIncerementFromName(NewName) + + NameForNew = GetIncrementNameForNew(NewName) + + ExtClass SpawnedEnt = AddEntity(CurPrefEnt.ClassName, true) + + if(!SpawnedEnt) + continue + + AddSelection(SpawnedEnt) + + AddDefinedKeysToEntity(MainSel) //naplni kluce, eventy, metody, flagy proste vsetko ale bez hodnot + + for(int k = 0; k < CurPrefEnt.NumPrefabKeys; k++) //naplnime hodnoty z prefabu + { + key = CurPrefEnt.PrefabKeys[k] + val = CurPrefEnt.PrefabKeyValues[k] + + if(key == "_userstates") + MainSel._userstates = val + else + AddKeyValueToEntity(MainSel, key, val) + } + + UpdateEntity(MainSel) + LastCreated = ClassName(MainSel) + + if(n == 0) + { + vector bmins, bmaxs + GetBoundBox(MainSel, bmins, bmaxs) + float height = bmaxs[2] - bmins[2] + Origin = GetTracPos(MainSel, g_NewEntityCoords + Vector(0, 0, height + 10), "0 0 -500") + OriginMain = Origin + } + else + { + offset = atov(CurPrefEnt.GetPrefabKeyValue("coords")) + Origin = OriginMain + offset + } + + string CodedPrefabID = pref.ID + ";" + itoal(World.PrefabsIncrement, 6) //do kluca "prefab si zakodujeme ID prefabu a ID definicie entity v prefabe" + CodedPrefabID = CodedPrefabID + ";" + CurPrefEnt.ID +// string CodedPrefabID = pref.ID + ";" + itoal(World.PrefabsIncrement, 6) + ";" + CurPrefEnt.ID + AddKeyValueToEntity(MainSel, "prefab", CodedPrefabID) + + float ang3 = atof(CurPrefEnt.GetPrefabKeyValue("angle3")) + float ang = atof(CurPrefEnt.GetPrefabKeyValue("angle")) + float ang2 = atof(CurPrefEnt.GetPrefabKeyValue("angle2")) + + vector Angles = Vector(ang3, ang, ang2) + SetEntityOrientationKeys(MainSel, Origin, Angles) + + CreatedEntities[CreatedEntitiesNum++] = MainSel + } + + + string EventLine + string Temp1, Temp2 + string CurEntName + ExtClass CurEnt + ExtClass Created + PrefabEnt PrfEnt + int Spos + int lng + int IDlng + string SplitChar + + for(n = 0; n < CreatedEntitiesNum; n++) + { + CurEnt = CreatedEntities[n] + CurEntName = CurEnt._name + + for(k = 0; k < CurEnt.DefPtr.NumKeys; k++) + { + key = CurEnt.DefPtr.Keys[k] + val = CurEnt.EKeyValues[k] + + if(val && key && IsNotEditableKey(key) == false && IsPathKey(key) == false/* && IsEvent(CurEnt, key)*/) + { + EventLine = val + + for(int s = 0; s < pref.NumPrefabEntities; s++) + { + Created = CreatedEntities[s] + CurPrefEnt = pref.PrefabEntities[s] + IDlng = strlen(CurPrefEnt.ID) + Spos = strstroff(EventLine, 0, CurPrefEnt.ID) + + if(EventLine == CurPrefEnt.ID) //ak je v EventLine napisana iba jedna a nic viac tak to vybavime ihned + { + EventLine = Created._name + Spos = -1 + s = pref.NumPrefabEntities //zbytocne testovat dalsie entity + } + + while(Spos != -1) + { +// if(CurPrefEnt.ID == "MostB" && key == "actors" && EventLine == "MostA0,MostB0") +// debug + + if(Spos >= strlen(EventLine)) + break + + Temp1 = substr(EventLine, 0, Spos) + lng = strlen(EventLine) - Spos + int max = Spos + IDlng + 1 + + if(strlen(EventLine) > max) + SplitChar = substr(EventLine, Spos + IDlng, 1) + else + SplitChar = "" + + if(SplitChar == "." || SplitChar == "," || SplitChar == " " || SplitChar == ")" || SplitChar == "_") + { + bool miss = false + int BestLng = IDlng + + for(int i = 0; i < pref.NumPrefabEntities; i++) + { + PrfEnt = pref.PrefabEntities[i] + + if(PrfEnt.ID != CurPrefEnt.ID && strlen(PrfEnt.ID) > BestLng) + { + bool ok = false + int okpos = 0 + while(okpos != -1) + { + okpos = strstroff(EventLine, okpos, PrfEnt.ID) + + if(okpos == Spos) + ok = true + + if(okpos != -1) + { + okpos++ + + int lpos = strlen(EventLine) - 1 + if(okpos >= lpos) + okpos = -1 + } + } + + if(ok) + { + BestLng = strlen(PrfEnt.ID) + miss = true + } + } + } + + if(miss == false) //replacujeme nazov z prefabu za nazov novej entity ale iba v pripade ze neexistuje iny, dlhsi nazov ktory obsahuje tento v sebe + nieco naviac + { + Temp2 = substr(EventLine, Spos + IDlng, lng - IDlng) + EventLine = Temp1 + Created._name + Temp2 + Spos = strstroff(Temp2, 0, CurPrefEnt.ID) + + if(Spos != -1) + Spos += strlen(Temp1 + Created._name) + } + else //inac to preskocime + { + Spos += BestLng + int sp = strstroff(EventLine, Spos, CurPrefEnt.ID) + + if(sp != -1) + Spos += sp + else + Spos = -1 + } + } + else //IDcko sme v stringu nasli ale za nim neni split znak takze to bude ine IDcko ktore sa sklada z tohto naseho + nieco navyse alebo je na konci lajny + { + if(SplitChar) + { + Temp2 = substr(EventLine, Spos + IDlng, lng - IDlng) + Spos = strstroff(Temp2, 0, CurPrefEnt.ID) + + if(Spos != -1) + Spos += strlen(Temp1 + CurPrefEnt.ID) + } + else + { + int AfterIDpos = Spos + IDlng + int LastPos = strlen(EventLine) - 1 + + if(AfterIDpos >= LastPos) //sme na konci lajny takze mozeme prepisat nazov + EventLine = Temp1 + Created._name// + Temp2 + + Spos = -1 + } + } + } + } + + if(EventLine != val) + AddKeyValueToEntity(CurEnt, key, EventLine) + } + } + } + + UnselectAll() + + for(n = 0; n < CreatedEntitiesNum; n++) + { + CurEnt = CreatedEntities[n] + AddSelection(ReloadEntity(CurEnt, ClassName(CurEnt))) + } + + for(n = 0; n < SelectedNum; n++) + ThrowEvent(Selected[n], EV_INIT) + + for(n = 0; n < SelectedNum; n++) + ThrowEvent(Selected[n], EV_LOADED) + + ExtClass MainEnt = Selected[SelectedNum - 1] + RemoveSelection(MainEnt) + AddSelection(MainEnt) //bude selektnuta ako hlavna + + if(ForcedAngles != ZeroVec) //pri replacovani entity prefabom potrebujeme vnutit uhly + { + MemSelectionOffsets(MovingOffset) //zapametame si offsety na hlavnu entitu (este nepretocenu) + SetEntityOrientationKeys(MainSel, pos, ForcedAngles) + TransformateSelectedEntities(MovingOffset) //nastavime pozicie a uhly ostatnych selektnutych entit a reloadneme ich + ReplaceSelection(MainSel, ReloadEntity(MainSel, ClassName(MainSel))) + ThrowEvent(MainSel, EV_INIT) + ThrowEvent(MainSel, EV_LOADED) + } + + UpdateEntityLinks(true) + AddNamesToGUI(Selected, SelectedNum) + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + OnDataChange() + + g_ValMins = ZeroVec + g_ValMaxs = ZeroVec + Status = ST_SELECTING + return true + } + + //-------------------------------------------------------------------- + bool MakePrefab(string ID) + { + int n + string PrefEntName + string SelectedNames[32] + int SelectedNamesNum = 0 + ExtClass CurEnt + + for(n = 0; n < SelectedNum; n++) //skontrolujeme nazvy entit ci su vhodne pre prefab + { + CurEnt = Selected[n] + PrefEntName = ClearIncerementFromName(CurEnt._name) + + if(PrefEntName != CurEnt._name) + { + RequestDialog("Entity name " + CurEnt._name + " is incremental. This is not allowed for prefab!", "Bad name of entity", GUI_DIALOG_OK) + return false + } + + if(PrefEntName == "") + { + RequestDialog("Entity name " + CurEnt._name + " is not allowed!", "Bad name of entity", GUI_DIALOG_OK) + return false + } + + for(int k = 0; k < SelectedNamesNum; k++) + { + if(PrefEntName == SelectedNames[k]) + { + RequestDialog("Duplicity names detected after removing increments from names. Cannot create prefab!", "Make prefab error", GUI_DIALOG_OK) + return false + } + } + + SelectedNames[SelectedNamesNum++] = PrefEntName + } + + Prefab pref = new Prefab + pref.ID = ID + +// int DefIndex + string key, value + PrefabEnt PEnt + vector MainOrigin = GetMatrix(Selected[0], 3) + vector offset + + World.PrefabsIncrement = atoi(World.GetKeyValue("PrefabsIncrement")) + AddKeyValueToEntity(World, "PrefabsIncrement", itoa(++World.PrefabsIncrement)) + + for(n = 0; n < SelectedNum; n++) + { + CurEnt = Selected[n] + PrefEntName = ClearIncerementFromName(CurEnt._name) + string CodedPrefabID = ID + ";" + itoal(World.PrefabsIncrement, 6) + ";" + PrefEntName //do kluca "prefab si zakodujeme ID prefabu a ID definicie entity v prefabe" + AddKeyValueToEntity(CurEnt, "prefab", CodedPrefabID) + PEnt = new PrefabEnt + PEnt.ID = PrefEntName + PEnt.ClassName = ClassName(CurEnt) + PEnt.AddPrefabKey("_userstates", CurEnt._userstates) + + for(int j = 0; j < CurEnt.DefPtr.NumKeys; j++) + { + key = CurEnt.DefPtr.Keys[j] + + if(key == "coords") + { + if(n == 0) + value = "0 0 0" + else + { + offset = GetMatrix(Selected[n], 3) - MainOrigin + value = vectoa(offset) + } + } + else + value = CurEnt.EKeyValues[j] + + if(key != "_surfaces") //toto do prefabu nedavame + PEnt.AddPrefabKey(key, value) + } + pref.AddPrefabEnt(PEnt) + } + + for(n = 0; n < SelectedNum; n++) + { + CurEnt = Selected[n] + ReplaceSelection(CurEnt, ReloadEntity(CurEnt, ClassName(CurEnt))) + } + + for(n = 0; n < SelectedNum; n++) + ThrowEvent(Selected[n], EV_INIT) + + for(n = 0; n < SelectedNum; n++) + ThrowEvent(Selected[n], EV_LOADED) + + PrefManager.AddPrefab(pref) + OnDataChange() + return true + } + +//-------------------------------------------------------------------- + int UnprefabEntities(string PrefabID) + { + if(!PrefabID) + return 0 + + int count = 0 + ExtClass ec + string DecodedPrefabID + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec.DefPtr && ec != World/* && ec != World.Player*/) //je z ent suboru + { + DecodedPrefabID = DecodePrefabNameFromKey(ec.GetKeyValue("prefab")) + + if(DecodedPrefabID == PrefabID) + { + ec.NullKeyValue("prefab") + count++ + } + } + } + return count + } + +//-------------------------------------------------------------------- + void ProcessMakePrefab() + { + if(Selected[0]) + { + string PrefabID = "" +again: + if(TextEntryDialog(PrefabID, "New prefab name") == GUI_REQUEST_YES) + { + if(PrefabID == "") //odklepol ok ale nezadal nic + { + string ErrMsg2 = "Zadny nazev pro prefab !!!" + RequestDialog(ErrMsg2, "Error", GUI_DIALOG_OK) + goto again + } + else + { + if(PrefManager.GetPrefab(PrefabID)) + { + RequestDialog("Prefab with this name now exist!", "Error", GUI_DIALOG_OK) + goto again + } + + if(MakePrefab(PrefabID) == true) + { + PrefManager.SavePrefabs() + UpdateEntityLinks(true) + } + } + } + } + } + +//-------------------------------------------------------------------- + void ProcessDeletePrefab() + { + int n + Prefab CurPrefab + for(n = 0; n < PrefManager.NumPrefabs; n++) + { + CurPrefab = PrefManager.Prefabs[n] + PrefabsList[n] = CurPrefab.ID + } + + for(n = n; n < sizeof(PrefabsList); n++) + PrefabsList[n] = "" + + Sort(PrefabsList, PrefManager.NumPrefabs) + int sel = SingleChoiceDialog("select prefab to delete", PrefabsList, PrefManager.NumPrefabs, 0) + + if(sel >= 0) + { + if(RequestDialog("Really delete prefab " + PrefabsList[sel] + " ?", "Deleting prefab", GUI_DIALOG_YES_NO) == GUI_REQUEST_YES) + { + Prefab PrefToDel = PrefManager.GetPrefab(PrefabsList[sel]) + string ResultMsg + string ResultTitle + + if(PrefManager.RemovePrefab(PrefToDel) == true) + { + PrefManager.SavePrefabs() + int NumUnprefabed = UnprefabEntities(PrefabsList[sel]) + UpdateEntityLinks(true) + ResultMsg = "Prefab " + PrefabsList[sel] + " deleted. " + itoa(NumUnprefabed) + " entities successfully unprefabed!" + ResultTitle = "Unprefab result" + } + else + { + ResultMsg = "Cannot delete prefab " + PrefabsList[sel] + ". Unknown error" + ResultTitle = "Error" + } + + RequestDialog(ResultMsg, ResultTitle, GUI_DIALOG_OK) + } + } + } + +//-------------------------------------------------------------------- + void ProcessUnprefab() + { + if(SelectedNum == 0) + return + + if(RequestDialog("Really unprefab " + itoa(SelectedNum) + " entities?", "Unprefab", GUI_DIALOG_YES_NO) == GUI_REQUEST_NO) + return + + ExtClass CurEnt + int count = 0 + string CodedKey + string DecodedPrefabID + + for(int n = 0; n < SelectedNum; n++) + { + CurEnt = Selected[n] + CodedKey = CurEnt.GetKeyValue("prefab") + + if(!CodedKey) + continue + + CurEnt.NullKeyValue("prefab") + ReplaceSelection(CurEnt, ReloadEntity(CurEnt, ClassName(CurEnt))) + count++ + } + + for(n = 0; n < SelectedNum; n++) + ThrowEvent(Selected[n], EV_INIT) + + for(n = 0; n < SelectedNum; n++) + ThrowEvent(Selected[n], EV_LOADED) + + string ResultMsg + + if(count == 0) + ResultMsg = "Cannot unprefab not prefabed entities :-)" + else + ResultMsg = "From " + itoa(SelectedNum) + " selected entities was unprefabed " + itoa(count) + + RequestDialog(ResultMsg, "Unprefab result", GUI_DIALOG_OK) + + UpdateEntityLinks(true) + } + +//-------------------------------------------------------------------- + void ProcessReplaceEntityWithPrefab() + { + if(SelectedNum == 0) + return + + if(SelectedNum > 1) + { + RequestDialog("Pouze jednu entitu je mozno nahradit prefabem!", "Relacing entity with prefab", GUI_DIALOG_OK) + return + } + + int n + Prefab CurPrefab + for(n = 0; n < PrefManager.NumPrefabs; n++) + { + CurPrefab = PrefManager.Prefabs[n] + PrefabsList[n] = CurPrefab.ID + } + + for(n = n; n < sizeof(PrefabsList); n++) + PrefabsList[n] = "" + + Sort(PrefabsList, PrefManager.NumPrefabs) + int sel = SingleChoiceDialog("select prefab to replace", PrefabsList, PrefManager.NumPrefabs, 0) + + if(sel >= 0) + { + if(PrefabsList[sel]) + { + ExtClass EntToDelete = MainSel + UnselectAll() + vector PosForPrefab = atov(EntToDelete.GetKeyValue("coords")) + vector AnglesForPrefab + AnglesForPrefab[0] = atof(EntToDelete.GetKeyValue("angle3")) + AnglesForPrefab[1] = atof(EntToDelete.GetKeyValue("angle")) + AnglesForPrefab[2] = atof(EntToDelete.GetKeyValue("angle2")) + delete EntToDelete + EntToDelete = NULL + InsertEntitiesFromPrefab(PrefabsList[sel], PosForPrefab, AnglesForPrefab) + } + } + } + +//-------------------------------------------------------------------- + bool SelectPrefab(Prefab pref, string UniqueInstance) + { + string CurID + string CurEntID + PrefabEnt PEntMain + ExtClass ec + ExtClass MainEntity = NULL + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(!ec._name || !ec.DefPtr ) + continue + + if(ec.prefab) + { + CurID = DecodePrefabNameFromKey(ec.prefab) + + if(CurID == pref.ID && UniqueInstance == DecodePrefabInstanceIncerementFromKey(ec.prefab)) + { + AddSelection(ec) + CurEntID = DecodePrefabEntNameFromKey(ec.prefab) + PEntMain = pref.PrefabEntities[0] + + if(CurEntID == PEntMain.ID) + MainEntity = ec + } + } + } + + RemoveSelection(MainEntity) + AddSelection(MainEntity) //hlavna entita musi byt selektnuta ako poslena + + if(SelectedNum > 0) + return true + + return false + } + + void ProcessAddEntity() + { + if(EntIsWritable() == false) + { + RequestDialog("File is Read Only!", "Error", GUI_DIALOG_OK) + Status = ST_SELECTING + return + } + + PosForNewEntity = end + + if(EdKeyStates[wx_SHIFT] == 1) + { + int n + Prefab CurPrefab + for(n = 0; n < PrefManager.NumPrefabs; n++) + { + CurPrefab = PrefManager.Prefabs[n] + PrefabsList[n] = CurPrefab.ID + } + + for(n = n; n < sizeof(PrefabsList); n++) + PrefabsList[n] = "" + + string NewPrefabName = GetNameFromPopup(PrefabsList, PrefManager.NumPrefabs, true, EdScreenMouseX, EdScreenMouseY) + + if(NewPrefabName) + { + InsertEntitiesFromPrefab(NewPrefabName, PosForNewEntity, ZeroVec) + return + } + else + return + } + else + { + string AllClassNames[256] + int AllClassNamesNum = DefManager.GetClassNames(AllClassNames) + string NewClName = GetNameFromPopup(AllClassNames, AllClassNamesNum, true, EdScreenMouseX, EdScreenMouseY) + + if(NewClName) + { + if(NewClName == "creature_player") + { + if(FindClass("player")) + { + RequestDialog("Only one instance of creature_player allowed!", "Error", GUI_DIALOG_OK) + return + } + } + again: + if(!TextEntryDialog(NameForNew, "Name of new entity")) //user si to rozmyslel + { + Status = ST_SELECTING + return + } + + if(NameForNew == "") //odklepol ok ale nezadal nic + { + RequestDialog("Zadny nazev pro entitu !!!", "Error", GUI_DIALOG_OK) + goto again + } + else + { + while(DuplicityTestOK(NameForNew) == false) + { + ShowDuplicityError() + goto again + } + ExtClass EntNew = NewEntity(NewClName, PosForNewEntity) + + if(EntNew) + { + UnselectAll() + AddSelection(EntNew) + } + } + } + else + return + } + + if(MainSel) + { + AddNamesToGUI(Selected, SelectedNum) + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + } + + Status = ST_SELECTING + } + + void VizualizeSelected() + { + if(MainSel == NULL) + return + + if(MainSel.Hidden == true) + return + +// MainSel.ShowVisualsSharpColor() + + int color = 0x3fffffff + + if(Status == ST_EDITCOORDS) + { + vector DBoxPos = GetMatrix(MainSel, 3) + + if(GetTracEnt(MainSel, DBoxPos, ZeroVec)) + color = 0x3f555555 + else + color = 0x3fffffff + } + + string TmpVal = "0 " + GetValueFromKey(MainSel, "angle") + " 0" + vector TmpAng = atov(TmpVal) + + vector Or = GetMatrix(MainSel, 3) + vector dvec = GetMatrix(MainSel, 0)//Angles2Vector(TmpAng) + vector doff = "0 0 0"//"0 0 2" + dvec = dvec * 100.0 + dvec = dvec + doff + AddDShape(SHAPE_LINE, 0xffffaaaa, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, Or + doff, Or + dvec) + + vector Start = GetMatrix(MainSel, 3) + vector End = Start + "0 0 -1024" + float fplane[4] + TraceLineEx(PLAYER, Start, End, ZeroVec, ZeroVec, NULL, fplane, NULL, NULL, TRACE_WORLD, NULL) + + AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, Start, End) + AddDShape(SHAPE_BBOX, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, End + "-1 -1 -1", End + "1 1 1") + DrawGrid(ShowGrid, End) + + ShowBBoxOfEntity(MainSel, color) + + for(int n = 1; n < SelectedNum; n++) + ShowBBoxOfEntity(Selected[n], 0x3f8080ff) + } + + void OnMaterialRemapFromGUI() //na klavesu M + { + if(!World.EditorActive) + return + + if(!MainSel) + return + + string mremap + + if(GetValue(MainSel, "_materialremap", 0, mremap)) + { + TraceContact cont = new TraceContact + vector to = CursorDir * 1024 + end + + if(TraceLineToEntity(MainSel, World.CameraPos, to, cont)) + { + ParseRemapping(mremap) + + string mat = GetRemap(cont.Shader) + + int index = FindMaterialName(mat) + int sel = SingleChoiceDialog("Material list", MaterialNames, NumMaterials, index) + + if(sel >= 0) + { + AddOrReplaceRemap(cont.Shader, MaterialNames[sel]) + + string newremap = UnparseRemap() + + if(mremap != newremap) + { + AddKeyValueToEntity(MainSel, "_materialremap", newremap) + ReplaceSelection(MainSel, ReloadEntity(MainSel, ClassName(MainSel))) + ThrowEvent(MainSel, EV_INIT) + ThrowEvent(MainSel, EV_LOADED) + ChangeKeyInGUI("_materialremap", newremap, "string") + OnDataChange() + } + } + } + delete cont + } + } + +//--------------- pre zvuky ----------------------------- + void ParseSoundShaders() + { + int n = 0 + int lng + string tokens[32] + + string SndShadFile = "sound/shaders.h" + tparse tp = BeginParse(SndShadFile) + + if(!tp) + { + string msg = "No found file " + SndShadFile + Print(msg) + return + } + + SndShadNamesNum = 0 + while(ParseLine(tp, n++, tokens)) + { + if(tokens[0] == "sound") + { + lng = strlen(tokens[1]) + + if(lng > 2) + SndShadNames[SndShadNamesNum++] = substr(tokens[1], 1, lng - 2) + } + } + EndParse(tp) + } + +//=============================================================================================================== +//=== NEW EDITOR ================================================================================================ +//=============================================================================================================== + + void ProcessSelecting() + { + UpdateWayEnts() + + vector CursorDir + vector pos = UnprojectVector(EdMouseX, EdMouseY, CursorDir) + end = pos + end = CursorDir * (float)8192 + pos + float plane[4] + ExtClass TracEnt = NULL + string MaterialName = "" + + float f = TraceLineEx(PLAYER, pos, end, ZeroVec, ZeroVec, TracEnt, plane, NULL, NULL, TRACE_WORLD, NULL) + + if(!IsInherited(TracEnt, CExtClass)) + TracEnt = NULL + + if(TracEnt == World) + MaterialName = "Material: " + g_strTraceShader + +/* if(EdMode == EDITMODE_PATH) //area editor + { + end = UserSnapPoint(end) + DrawGrid(ShowGrid, end) + end = end + CursorOffset + SetOrigin(mc, end) + }*/ + + vector targ = end + CursorDir //jeden unit za kontaktny bod + Ent = PointEntity(targ) + + string EntName = "" + string EntClName = "" + string GetValTmp + + if(Ent) + { + MaterialName = "" + vector to = CursorDir * 1024 + end + + if(TraceLineToEntity(Ent, World.CameraPos, to, SelectingContact)) + MaterialName = "Material: " + SelectingContact.Shader + + Ent = Ent.GetEventualOwner() + + if(!Ent.DefPtr || Ent._name == "world") //nepochadza z .ent suboru + Ent = NULL + + if(Ent) + { + EntName = "Name: " + Ent._name + EntClName = "ClassName: " + ClassName(Ent) + } + } + + PrintToStatusBar(0, EntName) + PrintToStatusBar(1, EntClName) + PrintToStatusBar(2, MaterialName) +// if(Ent) +// ShowBBoxOfEntity(Ent, 0x0f00ffff) + + if(EdLMBdown) //drzime stlacenu lavu mys + { + if(MainSel) + { + if(abs(EdMouseDeltaX) > 0 || abs(EdMouseDeltaY) > 0) //pohybom mysi prepina na edit coords + { + ClearMousePress(0) + + if(PickEntity()) + { + Status = ST_EDITCOORDS + ClipCursorInsideWindow(true) + return + } + } + } + } + + if(EdRMBdown) //drzime stlacenu pravu mys + { + if(MainSel) + { + if(abs(EdMouseDeltaX) > 0 || abs(EdMouseDeltaY) > 0) //pohybom mysi prepina na edit coords + { + ClearMousePress(0) + + if(PickEntity()) + { + Status = ST_EDITCOORDS + ClipCursorInsideWindow(true) + return + } + } + } + } + } + +//----------------------------------------------------------------- + void OnJumpCameraToEntityFromGUI() + { + if(!World.EditorActive) + return + + if(!MainSel) + return + + World.CameraPos = GetMatrix(MainSel, 3) + "0 0 50" //premiestnime sa nad entitu + } + +//----------------------------------------------------------------- + void OnHideFromGUI(bool hide) + { + if(!World.EditorActive) + return + + ExtClass ToHide = Ent + + if(hide) + { + if(!ToHide) + ToHide = MainSel + + Hide(ToHide, true) + + if(Ent == ToHide) + Ent = NULL + } + else + { +/* if(MainSel) + ToHide = MainSel + else + ToHide = NULL + */ + Hide(NULL, false) + } + } + +//----------------------------------------------------------------- + void OnClearFilterFromGUI() + { + if(!World.EditorActive) + return + + FilterClassNamesNum = 0 + } + +//----------------------------------------------------------------- + void OnAddItemToFilterFromGUI(string ClName) + { + if(!World.EditorActive) + return + + if(FilterClassNamesNum >= sizeof(FilterClassNames)) + return + + FilterClassNames[FilterClassNamesNum++] = ClName + } + +//----------------------------------------------------------------- + void OnApplyEntitiesFilterFromGUI() + { + if(!World.EditorActive) + return + + ExtClass ec + bool NeedBeHidden + string ClName + + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + ClName = ClassName(ec) + + if(ec.DefPtr) + { + NeedBeHidden = false + + for(int n = 0; n < FilterClassNamesNum; n++) + { + if(ClName == FilterClassNames[n]) + { + NeedBeHidden = true + break + } + } + + if(ec.CategoryHidden == false && NeedBeHidden == true) //co neni skryte a ma byt to skryjeme + ec.HideByCategory(true) + + if(ec.CategoryHidden == true && NeedBeHidden == false) //co je skryte a nema byt to odkryjeme + ec.HideByCategory(false) + + if(ClName != "light" && ClName != "world") + { + if(NeedBeHidden) + ec.DestroyEditorVisuals() + else + ec.CreateEditorVisuals() //vo vnutri je osetrene keby bola este hidnuta + } + } + } + + UpdateEntityLinks(true) + } + +//----------------------------------------------------------------- + void OnApplyOtherFilterFromGUI(bool Areas, bool Lights, bool Clips) + { + if(!World.EditorActive) + return + + AreasVisible = Areas + LightsVisible = Lights + ClipsVisible = Clips + + if(EdMode == EDITMODE_ENTITY) //path editor ich ma zapnute vzdy + ShowAreas(Areas) + + ShowLights(Lights) + ShowClips(Clips) + } + +//----------------------------------------------------------------- + void OnUnselectFromGUI() + { + if(!World.EditorActive) + return + + UnselectAll() + OnUpdateSelection("", "", "", false) + } + +//----------------------------------------------------------------- + void OnSaveEntitiesFromGUI() + { + if(!World.EditorActive) + return + + SaveEntitiesKeys() + } + +//----------------------------------------------------------------- + void OnCreatePrefabFromGUI() + { + if(!World.EditorActive) + return + + if(PrfIsWritable() == false) + RequestDialog("Prefab file is read only!", "Error", GUI_DIALOG_OK) + else + ProcessMakePrefab() //proces konci po skonceni funkcie + } + +//----------------------------------------------------------------- + void OnDeletePrefabFromGUI() + { + if(!World.EditorActive) + return + + if(PrfIsWritable() == false) + RequestDialog("Prefab file is read only!", "Error", GUI_DIALOG_OK) + else + ProcessDeletePrefab() //proces konci po skonceni funkcie + } + +//----------------------------------------------------------------- + void OnForcePostitionFromGUI() + { + if(!World.EditorActive) + return + + if(!MainSel) + return + + if(!EntIsWritable()) + { + RequestDialog("File is Read Only!", "Error", GUI_DIALOG_OK) + return + } + + if(MainSel != World && ClassName(MainSel) != "misc_model" && !IsBrushEntity(MainSel)) + { + AddKeyValueToEntity(MainSel, "coords", vectoa(end)) + ReplaceSelection(MainSel, ReloadEntity(MainSel, ClassName(MainSel))) + ThrowEvent(MainSel, EV_INIT) + ThrowEvent(MainSel, EV_LOADED) + + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + UpdateEntityLinks(true) + OnDataChange() + } + } + +//----------------------------------------------------------------- + void OnUnprefabSelectionFromGUI() + { + if(!World.EditorActive) + return + + ProcessUnprefab() + } + +//----------------------------------------------------------------- + void OnReplaceEntityWithPrefabFromGUI() + { + if(!World.EditorActive) + return + + ProcessReplaceEntityWithPrefab() + } + +//----------------------------------------------------------------- + void OnCopySelectionFromGUI() + { + if(!World.EditorActive) + return + + ExtClass EntCopy + + if(SelectedNum == 0) + return + + NumCopiedEntities = 0 + + for(int s = 0; s < SelectedNum; s++) + { + EntCopy = Selected[s] + CopyClassName[s] = ClassName(EntCopy) + CopyName[s] = EntCopy._name + CopyDefPtr[s] = EntCopy.DefPtr + NumCopyValues[s] = EntCopy.DefPtr.NumKeys + CopyStates[s] = EntCopy._userstates + NumCopiedEntities++ + + int n + for(n = 0; n < EntCopy.DefPtr.NumKeys; n++) + CopyKeyValues[s][n] = EntCopy.EKeyValues[n] + + for(n = 0; n < EntCopy.DefPtr.NumKeys; n++) + CopyKeyTypes[s][n] = EntCopy.EKeyTypes[n] + } + MemSelectionOffsets(CopyOffsets) + } + +//----------------------------------------------------------------- + void OnPasteSelectionFromGUI() + { + if(!World.EditorActive) + return + + if(EntIsWritable() == false) + { + RequestDialog("File is Read Only!", "Error", GUI_DIALOG_OK) + return + } + + if(Ent) + return + + if(NumCopiedEntities == 0) + return + + UnselectAll() + string UsedPrefabs[16] + int PrefabIndex[16] + int PrefabUniqueIncrements[16] + int UsedPrefabsNum = 0 + string CodedPrefabID + string RealPrefabID + string RealPrefabEntID + + for(int p = 0; p < NumCopiedEntities; p++) + { + if(CopyClassName[p] == "") + continue + + string Cname = CopyName[p] + + if(strlen(Cname) > 0) + { + if(IsNumber(substr(Cname, strlen(Cname) - 1, 1))) //ak je koncovka cislo + { + Cname = ClearIncerementFromName(Cname) + NameForNew = GetIncrementNameForNew(Cname) + } + else + NameForNew = "" + } + else + NameForNew = "" + + if(NameForNew == "") + { + again: + if(!TextEntryDialog(NameForNew, "Name of new entity")) //user si to rozmyslel + { + OnUpdateSelection("", "", "", false) + return + } + else + { + while(DuplicityTestOK(NameForNew) == false) + { + ShowDuplicityError() + goto again + } + } + + if(NameForNew == "") //odklepol ok ale nezadal nic + { + RequestDialog("Zadny nazev pro entitu !!!", "Error", GUI_DIALOG_OK) + goto again + } + } + + ExtClass EntNew = NewEntity(CopyClassName[p], end) + + if(!EntNew) + continue + + EntNew.DefPtr = CopyDefPtr[p] + + int n + for(n = 0; n < NumCopyValues[p]; n++) + EntNew.EKeyValues[n] = CopyKeyValues[p][n] + + for(n = 0; n < NumCopyValues[p]; n++) + EntNew.EKeyTypes[n] = CopyKeyTypes[p][n] + + EntNew._userstates = CopyStates[p] + + if(IsPrefabed(EntNew)) + { + CodedPrefabID = EntNew.GetKeyValue("prefab") + RealPrefabID = DecodePrefabNameFromKey(CodedPrefabID) +// RealPrefabEntID = DecodePrefabEntNameFromKey(CodedPrefabID) +// return PrefManager.GetPrefab(RealPrefabID) + + bool exist = false + + for(int k = 0; k < UsedPrefabsNum; k++) + { + if(RealPrefabID == UsedPrefabs[k]) + { + PrefabIndex[p] = k + exist = true + break + } + } + + if(exist == false) + { + UsedPrefabs[UsedPrefabsNum] = RealPrefabID + PrefabIndex[p] = UsedPrefabsNum++ + } + } + else + PrefabIndex[p] = -1 + } + + if(UsedPrefabsNum > 0) //ked su entity prefabovane tak im musime zvysit instance ID a ked maju spolocny prefab tak instance ID bude rovnake ale iba v pripade ze v samotnom prefabe sa entita vola inac + { + for(p = 0; p < UsedPrefabsNum; p++) + { + World.PrefabsIncrement = atoi(World.GetKeyValue("PrefabsIncrement")) + AddKeyValueToEntity(World, "PrefabsIncrement", itoa(++World.PrefabsIncrement)) + PrefabUniqueIncrements[p] = World.PrefabsIncrement + } + + ExtClass CurEnt + string NewCodedPrefabID + string RealPrefabIDs[32] + string RealPrefabEntIDs[32] + int NumAddedIncrements = 0 + + for(p = 0; p < SelectedNum; p++) + { + CurEnt = Selected[SelectedNum - 1 - p] + + if(PrefabIndex[p] != -1) + { + CodedPrefabID = CurEnt.GetKeyValue("prefab")//UsedPrefabs[PrefabIndex[p]] + RealPrefabID = DecodePrefabNameFromKey(CodedPrefabID) + RealPrefabEntID = DecodePrefabEntNameFromKey(CodedPrefabID) + + RealPrefabIDs[NumAddedIncrements] = RealPrefabID + RealPrefabEntIDs[NumAddedIncrements] = RealPrefabEntID + + bool NeedExtraIncrement = false + for(k = 0; k < NumAddedIncrements; k++) + { + string CurAdedPrefabID = RealPrefabIDs[k] + string CurAdedPrefabEntID = RealPrefabEntIDs[k] + + if(CurAdedPrefabID == RealPrefabID && CurAdedPrefabEntID == RealPrefabEntID) //kopirovane entity s rovnakym prefabom ale aj rovnakym nazvom v prefabe nemozu mat rovnake instanceID takze pre nich dame uplne nove cislo + { + NeedExtraIncrement = true + break + } + } + + NumAddedIncrements++ + + int NewIncrement + if(NeedExtraIncrement) + { + World.PrefabsIncrement = atoi(World.GetKeyValue("PrefabsIncrement")) + AddKeyValueToEntity(World, "PrefabsIncrement", itoa(++World.PrefabsIncrement)) + NewIncrement = World.PrefabsIncrement + } + else + NewIncrement = PrefabUniqueIncrements[PrefabIndex[p]] + + CodedPrefabID = RealPrefabID + ";" + itoal(NewIncrement, 6) + ";" + RealPrefabEntID //do kluca "prefab si zakodujeme ID prefabu a ID definicie entity v prefabe" + AddKeyValueToEntity(CurEnt, "prefab", CodedPrefabID) + } + } + } + + ExtClass Ptrs[16] + int PtrsNum = SelectedNum + + for(p = 0; p < SelectedNum; p++) + Ptrs[p] = Selected[p] + + UnselectAll() + + for(p = 0; p < PtrsNum; p++) + AddSelection(Ptrs[p]) + + g_NewEntityCoords = end + vector xxx = GetTracPos(MainSel, g_NewEntityCoords + "0 0 50", "0 0 -500") + AddKeyValueToEntity(MainSel, "coords", vectoa(xxx)) + TransformateSelectedEntities(CopyOffsets) //nastavime pozicie a uhly ostatnych selektnutych entit a reloadneme ich + ReplaceSelection(MainSel, ReloadEntity(MainSel, ClassName(MainSel))) + ThrowEvent(MainSel, EV_INIT) + ThrowEvent(MainSel, EV_LOADED) + + AddNamesToGUI(Selected, SelectedNum) + ShowPropertiesOfSelecting() +// ChangeKeyInGUI("coords", vectoa(xxx), "vector") + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + UpdateEntityLinks(true) + OnDataChange() + } + +//----------------------------------------------------------------- + void OnDeleteSelectionFromGUI() + { + if(!World.EditorActive) + return + + if(EdMode != EDITMODE_ENTITY) //osetrenie nutnej prasarny. v GUI mame iba jedno delete a tak vola toto ale aj PathEditoru OnDeleteSelectedAreaFromGUI() + return + + if(!MainSel) + return + + ExtClass CurSel + for(int n = 0; n < SelectedNum; n++) + { + CurSel = Selected[n] + + if(CurSel._name == "player") + { + RequestDialog("Cannot delete creature_player entity!", "Delete", GUI_DIALOG_OK) + return + } + } + + if(SelectedNum > 1) //na mazanie viacerych entit sa radsej este spytame + { + if(RequestDialog("Really delete " + itoa(SelectedNum) + " entities?", "Delete", GUI_DIALOG_YES_NO) == GUI_REQUEST_NO) + return + } + + ExtClass CurEnt + string DelNames[64] + string DelClassNames[64] + int DelNum = SelectedNum + for(n = 0; n < SelectedNum; n++) + { + CurEnt = Selected[n] + DelNames[n] = CurEnt._name + DelClassNames[n] = ClassName(CurEnt) + } + + ExtClass EntDel + while(MainSel) + { + EntDel = MainSel + RemoveSelection(MainSel) + + if(IsBrushEntity(EntDel) == false) + { + delete EntDel + EntDel = NULL + } + } + + EntityListRemove(DelNames, DelClassNames, DelNum) + Ent = NULL + UpdateEntityLinks(true) + OnUpdateSelection("", "", "", false) + } + +//----------------------------------------------------------------- + void OnRenameSelectionFromGUI() + { + if(!World.EditorActive) + return + + ExtClass ToRename + + if(!MainSel && !Ent) + return + + if(Ent) + ToRename = Ent + else + ToRename = MainSel + + string oldname = ToRename._name + string newname = oldname + +again: + if(!TextEntryDialog(newname, "Name of new entity")) + return + + while(DuplicityTestOK(newname) == false) + { + ShowDuplicityError() + goto again + } + + ExtClass ToRenameArray[1] + ToRenameArray[0] = ToRename + RemoveNamesFromGUI(ToRenameArray, 1) + + ToRename.SetName(newname) + ExtClass EntRename = ReloadEntity(ToRename, ClassName(ToRename)) + ReplaceSelection(ToRename, EntRename) + + ThrowEvent(EntRename, EV_INIT) + ThrowEvent(EntRename, EV_LOADED) + + UpdateEntityLinks(true) + ToRenameArray[0] = EntRename + AddNamesToGUI(ToRenameArray, 1) + + if(MainSel) + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + } + +//----------------------------------------------------------------- + void RenameClassNameFromGUI() + { + if(!World.EditorActive) + return + + ExtClass ToRename + + if(!MainSel) + return + + if(!IsInherited(MainSel, CCreatureClass)) + { + RequestDialog("Class change works only on creatures!", "Error", GUI_DIALOG_OK ) + return + } + + ToRename = MainSel + + string oldname = ClassName(ToRename) + string newname = oldname + +again: + if(!TextEntryDialog(newname, "Enter type (class) to overwrite current")) + return + + if(!DefManager.GetDefinition(newname)) + { + string ErrMsg = "Unknown class type " + newname + RequestDialog(ErrMsg, "Error", GUI_DIALOG_OK ) + goto again + } + + ExtClass EntRename = ReloadEntity(ToRename, newname) + ReplaceSelection(ToRename, EntRename) + ThrowEvent(EntRename, EV_INIT) + ThrowEvent(EntRename, EV_LOADED) + UpdateEntityLinks(true) + + if(MainSel) + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + } + +//----------------------------------------------------------------- + void EditCoordsUpdate(bool SnapToGrid) + { + vector gr + gr[0] = grid + gr[1] = grid + gr[2] = grid + vector FinalPos = g_NewEntityCoords + + if(ShowGrid != 0 && SnapToGrid) + FinalPos = SnapVector(FinalPos, gr) + + MainSel.OnPositionChangingInEditor(FinalPos, g_AngleVal) //update hlavnej entity + ChangeKeyInGUI("coords", vectoa(FinalPos), "vector") + + vector MainSelMat2[4] + ExtClass OtherEnt2 + vector OtherPos2, OtherAng2 + RollPitchYawMatrix2(g_AngleVal, MainSelMat2) + MainSelMat2[3] = FinalPos + + for(int n = 1; n < SelectedNum; n++) + { + OtherEnt2 = Selected[n] + OtherPos2 = VectorMatrixMultiply3(MainSelMat2, MovingOffset[n]) + OtherPos2 = FinalPos + OtherPos2 + OtherAng2[0] = atoi(GetValueFromKey(OtherEnt2, "angle3")) + OtherAng2[1] = atoi(GetValueFromKey(OtherEnt2, "angle")) + OtherAng2[2] = atoi(GetValueFromKey(OtherEnt2, "angle2")) + + vector AngOff = g_AngleVal - AnglesBeforeChange + AngOff = FixAngles(AngOff) + + OtherAng2 = AngOff + OtherAng2 + OtherAng2 = FixAngles(OtherAng2) + + if(!OtherEnt2.ParentName) + OtherEnt2.OnPositionChangingInEditor(OtherPos2, OtherAng2) //update ostatnych selektnutych entit + } + UpdateWayEnts() + } + +//----------------------------------------------------------------- + void DropEntity(bool SnapToGrid) //koniec posuvania + { + if(!MainSel) + return + + int n + string EntClName = ClassName(MainSel) + vector grd + grd[0] = grid + grd[1] = grid + grd[2] = grid + vector FinePos = g_NewEntityCoords + + if(MainSel.ParentName) + { + //FinePos = GetMatrix(MainSel, 3) + FinePos = atov(MainSel.GetKeyValue("coords")) //pocas movingu sa ten kluc meni + } + else + { + if(ShowGrid != 0 && SnapToGrid) + FinePos = SnapVector(FinePos, grd) + } + + ChildEntNamesNum = 0 //vytiahneme vsetky nazvy parentov zo selektnutych entit + for(n = 0; n < SelectedNum; n++) + { + GrabChildsNamesFrom(Selected[n]) + SavePositionsOfChilds(Selected[n]) //hned ulozime aktualne pozicie vsetkych childov do klucov + } + + SetEntitySizeKeys(MainSel, g_ValMins, g_ValMaxs) + SetEntityOrientationKeys(MainSel, FinePos, g_AngleVal) + TransformateSelectedEntities(MovingOffset) //nastavime pozicie a uhly ostatnych selektnutych entit a reloadneme ich + ReplaceSelection(MainSel, ReloadEntity(MainSel, ClassName(MainSel))) + ThrowEvent(MainSel, EV_INIT) + ThrowEvent(MainSel, EV_LOADED) + + ReloadEntitiesFromList(ChildEntNames, ChildEntNamesNum) //reloadneme childy selektnutych entit v poradi konstruktor/init/loaded + + UpdateEntityLinks(true) + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + OnDataChange() + ChangeKeyInGUI("coords", vectoa(FinePos), "vector") + ChangeKeyInGUI("angle", ftoa(g_AngleVal[1]), "float") +// ChangeKeyInGUI("angle2", ftoa(g_AngleVal[2]), "float") +// ChangeKeyInGUI("angle3", ftoa(g_AngleVal[0]), "float") + + g_ValMins = ZeroVec + g_ValMaxs = ZeroVec + g_AngleVal = ZeroVec + + Status = ST_SELECTING + ClipCursorInsideWindow(false) + ShowCursorPernamently(true) + ClearKey(KC_LEFT) + ClearKey(KC_RIGHT) + ClearKey(KC_UP) + ClearKey(KC_DOWN) + ClearKey(KC_ADD) + ClearKey(KC_SUBTRACT) + } + +//----------------------------------------------------------------- + void OnKeyChangeFromGUI(string key, string val) + { + if(!World.EditorActive) + return + + if(!MainSel) + return + + if(MainSel == World) //world sa nesmie reloadovat ani transformovat! + { + AddKeyValueToEntity(MainSel, key, val) + OnDataChange() + return + } + + int n + ExtClass CurSel + + if(PickEntity()) + { + Status = ST_EDITCOORDS + + if(key == "angle" || key == "angle2" || key == "angle3") + { + float ang = atof(MainSel.GetKeyValue("angle")) + float ang2 = atof(MainSel.GetKeyValue("angle2")) + float ang3 = atof(MainSel.GetKeyValue("angle3")) + + if(key == "angle") + g_AngleVal = Vector(ang3, atof(val), ang2) + + if(key == "angle2") + g_AngleVal = Vector(ang3, ang, atof(val)) + + if(key == "angle3") + g_AngleVal = Vector(atof(val), ang, ang2) + } + else + { + for(int s = 0; s < SelectedNum; s++) + { + CurSel = Selected[s] + AddKeyValueToEntity(CurSel, key, val) + } + } + + if(key == "coords") + { + if(MainSel.ParentName) + g_NewEntityCoords = GetOrigin(MainSel) + else + g_NewEntityCoords = atov(val) + + AddKeyValueToEntity(MainSel, key, val) + } + + EditCoordsUpdate(false) + DropEntity(false) + + int NumPrefabed = 0 + + for(s = 0; s < SelectedNum; s++) + { + CurSel = Selected[s] + + if(IsPrefabed(CurSel) == true) + { + NumPrefabed++ + ChangePrefabFromEntity(CurSel) + } + } + + if(NumPrefabed > 0) + { + PrefManager.SavePrefabs() + WritePrefabsValuesToAllEntities() //prepiseme vsetky hodnoty prefabovanych entit hodnotami z prefabov + } + + UpdateEntityLinks(true) + OnDataChange() + } + } + +//----------------------------------------------------------------- + void OnLMBupWhenSelecting() + { + int Shift = EdKeyStates[wx_SHIFT] + + if(Ent) //mame nieco pod kurzorom + { + if(MainSel) //mame uz nieco selektnute + { + if(Ent == MainSel) + { + RemoveSelection(Ent) + + if(MainSel) + { + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + } + else + OnUpdateSelection("", "", "", false) + + return + } + else + { + if(Shift == false) + UnselectAll() + + AddSelection(Ent) + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + return + } + } + else //nemame este nic selektnute + { + if(Shift == true) + { + AddSelection(Ent) + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + } + else + { + if(IsPrefabed(Ent)) + SelectPrefab(GetPrefabOfEntity(Ent), DecodePrefabInstanceIncerementFromKey(Ent.GetKeyValue("prefab"))) + else + AddSelection(Ent) + + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + } + + return + } + } + else + { + UnselectAll() + OnUpdateSelection("", "", "", false) + return + } + } + +//----------------------------------------------------------------- +/* int ShowUserPopupMenu() + { + AddUserPopupItem("item 0", 0, true) + AddUserPopupItem("item 1", 1, true) + AddUserPopupItem("item 2", 2, true) + int result = PopupUserMenu() + +// if(result == 1) +// kliknuto na "item 1" + + return result + }*/ + +//----------------------------------------------------------------- + void OnRMBupWhenSelecting() + { + if(Ent) + { + if(Ent == MainSel) + ShowEntityPopupMenu() +/* else + { + RemoveUserPoupItems() + + AddEditorPopupItem("copy", 1000, true) //label id active + AddEditorPopupItem("paste", 1001, false) + AddEditorPopupItem("delete", 1002, true) + + int result = Ent->ShowUserPopupMenu() + + +// if(result == 2) + + }*/ + +/* if(MainSel) + { + if(Ent == MainSel) + { +// Status = ST_EDITKEYS //budeme editovat kluce entity + return + } + else + { + if(IsSelected(Ent) == false) + UnselectAll() + + AddSelection(Ent) +// Status = ST_EDITKEYS //budeme editovat kluce entity + return + } + } + else + { + UnselectAll() + AddSelection(Ent) +// Status = ST_EDITKEYS //budeme editovat kluce entity + return + }*/ + } + else + { + ProcessAddEntity() + EdKeyStates[wx_SHIFT] = 0 //hack. popup sposobi ze ked je klavesa stlacena tak sa uz nevyvola keyup event. potom vyriestit systemovo +// Status = ST_NEWENTITY + return + } + } + +//----------------------------------------------------------------- + void OnSelectFromGUI(string EntName) + { + if(!World.EditorActive) + return + + ExtClass ent = FindClass(EntName) + + if(!ent) + return + + UnselectAll() + AddSelection(ent) + ShowPropertiesOfSelecting() + OnUpdateSelection(MainSel._name, ClassName(MainSel), GetPrefabNameOfEntity(MainSel), true) + } + +//----------------------------------------------------------------- + void OnKeyDownWhenEditCoords() + { + + } + +//----------------------------------------------------------------- + void OnLMBUpWhenEditCoords() + { + DropEntity(true) + } + +//----------------------------------------------------------------- + void OnRMBUpWhenEditCoords() + { + DropEntity(true) + } + +//----------------------------------------------------------------- + bool IsEntitySizable(ExtClass ent) + { + bool sizable = false + vector mins, maxs + GetBoundBox(ent, mins, maxs) + + vector tm1, tm2 + if(GetValue(ent, "mins", 0, tm1) && GetValue(ent, "maxs", 0, tm2)) + sizable = true + + return sizable + } + +//----------------------------------------------------------------- + void OnMouseMoveWhenEditCoords() + { + if(!World.EditorActive) + return +/* ExtClass cc + for(cc = GetNextEntity(NULL, CExtClass); cc != NULL; cc = GetNextEntity(cc, CExtClass)) + UpdateEntity(cc)*/ + + if(!MainSel) + return + + if(GUIKeyState(wx_CONTROL, false)) + { + if(IsEntitySizable(MainSel)) + { + int CameraFactor = GetCameraPosFactor() + + if(CameraFactor == 1 || CameraFactor == 3) + { + g_ValMaxs[0] = g_ValMaxs[0] + EdMouseDeltaY + g_ValMins[0] = g_ValMins[0] - EdMouseDeltaY + g_ValMaxs[1] = g_ValMaxs[1] + EdMouseDeltaX + g_ValMins[1] = g_ValMins[1] - EdMouseDeltaX + } + + if(CameraFactor == 2 || CameraFactor == 4) + { + g_ValMaxs[0] = g_ValMaxs[0] + EdMouseDeltaX + g_ValMins[0] = g_ValMins[0] - EdMouseDeltaX + g_ValMaxs[1] = g_ValMaxs[1] + EdMouseDeltaY + g_ValMins[1] = g_ValMins[1] - EdMouseDeltaY + } + + if(g_ValMaxs[0] < 1) + g_ValMaxs[0] = 1 + + if(g_ValMins[0] > -1) + g_ValMins[0] = -1 + + if(g_ValMaxs[1] < 1) + g_ValMaxs[1] = 1 + + if(g_ValMins[1] > -1) + g_ValMins[1] = -1 + + if(g_ValMaxs[2] < 1) + g_ValMaxs[2] = 1 + + if(g_ValMins[2] > -1) + g_ValMins[2] = -1 + + SetValue(MainSel, "mins", 0, g_ValMins) + SetValue(MainSel, "maxs", 0, g_ValMaxs) + AddKeyValueToEntity(MainSel, "mins", vectoa(g_ValMins)) + AddKeyValueToEntity(MainSel, "maxs", vectoa(g_ValMaxs)) + ChangeKeyInGUI("mins", vectoa(g_ValMins), "vector") + ChangeKeyInGUI("maxs", vectoa(g_ValMaxs), "vector") + OnDataChange() + } + } + else + { + vector Up = "0 0 1" + vector Left = g_CamMat[0] //"1 0 0" + vector Forward = Left * Up + + if(RMB) + { + vector off3 = Up * (float)EdMouseDeltaY + g_NewEntityCoords = g_NewEntityCoords - off3 + } + else + { + vector off1 = Forward * (float)EdMouseDeltaY + vector off2 = Left * (float)EdMouseDeltaX + g_NewEntityCoords = g_NewEntityCoords - off1 + g_NewEntityCoords = g_NewEntityCoords - off2 + } + AddKeyValueToEntity(MainSel, "coords", vectoa(GetMatrix(MainSel, 3))) //pocas posuvania zapisujeme poziciu z matice pretoze entita ktorou pohybujeme moze byt naparentena na inu + } + EditCoordsUpdate(true) + } + +//----------------------------------------------------------------- + void OnMouseLeaveFromGUI() + { + if(!World.EditorActive) + return + + if(EdMode == EDITMODE_ENTITY && Status == ST_SELECTING) + Ent = NULL + } + +//----------------------------------------------------------------- + void OnMouseDownFromGUI(int button) + { + if(!World.EditorActive) + return + + if(button == 0) + EdLMBdown = true + + if(button == 2) + EdRMBdown = true + + if(CameraMode == false) + { + if(EdMode == EDITMODE_PATH) + MainUpdateFromGUI() + } + } + +//----------------------------------------------------------------- + void OnMouseUpFromGUI(int button) + { + if(!World.EditorActive) + return + + if(button == 0) + { + EdLMBdown = false + + if(CameraMode == false) + { + if(EdMode == EDITMODE_PATH) + MainUpdateFromGUI() + + if(EdMode == EDITMODE_ENTITY) + { + if(Status == ST_SELECTING) + OnLMBupWhenSelecting() + + if(Status == ST_EDITCOORDS) + OnLMBUpWhenEditCoords() + } + } + } + + if(button == 2) + { + EdRMBdown = false + + if(CameraMode == false) + { + if(EdMode == EDITMODE_PATH) + MainUpdateFromGUI() + + if(EdMode == EDITMODE_ENTITY) + { + if(Status == ST_SELECTING) + OnRMBupWhenSelecting() + + if(Status == ST_EDITCOORDS) + OnRMBUpWhenEditCoords() + } + } + } + } + +//----------------------------------------------------------------- + void OnMouseMoveFromGUI(int PosX, int PosY, int DeltaX, int DeltaY) //vola GUI editor ked za zmeni pozicia mysi + { + if(!World.EditorActive) + return + + EdMouseX = PosX + EdMouseY = PosY + EdMouseDeltaX = DeltaX + EdMouseDeltaY = DeltaY + + EdScreenMouseX = EdMouseX + EdScreenMouseY = EdMouseY + ToScreenPos(EdScreenMouseX, EdScreenMouseY) + + if(CameraMode) //iba hybeme kamerou + { + float CamStepX = (float)EdMouseDeltaX * 0.3 + float CamStepY = (float)EdMouseDeltaY * 0.3 + + if(!g_InvMouse) + CamStepY = -CamStepY + + World.CameraAngs[0] = World.CameraAngs[0] - CamStepY + World.CameraAngs[1] = World.CameraAngs[1] - CamStepX + + if(World.CameraAngs[0] < -89) + World.CameraAngs[0] = -89 + + if(World.CameraAngs[0] > 89) + World.CameraAngs[0] = 89 + +// SetCamera(World.CameraPos, World.CameraAngs) +// CalcMatrixFromCamera() + ClipCursorInsideWindow(true) + ClampCursorInsideWindow() + } + else + { + if(EdMode == EDITMODE_PATH) + MainUpdateFromGUI() + + if(EdMode == EDITMODE_ENTITY) + { + if(Status == ST_SELECTING) + ProcessSelecting() + + if(Status == ST_EDITCOORDS) + OnMouseMoveWhenEditCoords() + } + } + } + +//----------------------------------------------------------------- + void OnMouseWheelFromGUI(int delta) + { + if(!World.EditorActive) + return + + if(MainSel && Status == ST_SELECTING) + { + if(GUIKeyState(wx_CONTROL, false)) //sizujeme triggery a po + { + if(IsEntitySizable(MainSel)) + { + if(PickEntity()) + { + g_ValMins = atov(MainSel.GetKeyValue("mins")) + g_ValMaxs = atov(MainSel.GetKeyValue("maxs")) + g_NewEntityCoords = atov(MainSel.GetKeyValue("coords")) + + if(delta > 0) + { + g_ValMaxs[2] = g_ValMaxs[2] + (float)grid + g_ValMins[2] = g_ValMins[2] - (float)grid + g_NewEntityCoords[2] = g_NewEntityCoords[2] + (float)grid + } + else + { + g_ValMaxs[2] = g_ValMaxs[2] - (float)grid + g_ValMins[2] = g_ValMins[2] + (float)grid + g_NewEntityCoords[2] = g_NewEntityCoords[2] - (float)grid + } + + if(g_ValMaxs[0] < 1) + g_ValMaxs[0] = 1 + + if(g_ValMins[0] > -1) + g_ValMins[0] = -1 + + if(g_ValMaxs[1] < 1) + g_ValMaxs[1] = 1 + + if(g_ValMins[1] > -1) + g_ValMins[1] = -1 + + if(g_ValMaxs[2] < 1) + g_ValMaxs[2] = 1 + + if(g_ValMins[2] > -1) + g_ValMins[2] = -1 + + SetValue(MainSel, "mins", 0, g_ValMins) + SetValue(MainSel, "maxs", 0, g_ValMaxs) + AddKeyValueToEntity(MainSel, "mins", vectoa(g_ValMins)) + AddKeyValueToEntity(MainSel, "maxs", vectoa(g_ValMaxs)) + AddKeyValueToEntity(MainSel, "coords", vectoa(g_NewEntityCoords)) + OnDataChange() + ChangeKeyInGUI("mins", vectoa(g_ValMins), "vector") + ChangeKeyInGUI("maxs", vectoa(g_ValMaxs), "vector") + EditCoordsUpdate(true) + DropEntity(true) + } + } + } + else + { + if(PickEntity()) + { + Status = ST_EDITCOORDS + int ang_ + float ang__ + + if(GetValue(MainSel, "angle", 0, ang_) || GetValue(MainSel, "angle", 0, ang__)) + { + if(delta > 0) + g_AngleVal[1] = g_AngleVal[1] + 5 + else + g_AngleVal[1] = g_AngleVal[1] - 5 + } + + g_AngleVal[0] = FixAngle(g_AngleVal[0]) + g_AngleVal[1] = FixAngle(g_AngleVal[1]) + g_AngleVal[2] = FixAngle(g_AngleVal[2]) + + EditCoordsUpdate(false) + DropEntity(false) + } + } + } + } + +//----------------------------------------------------------------- + int GetCameraMode() //pre editor + { + return CameraMode + } + +//----------------------------------------------------------------- + int IsMovementKeyPressed() + { + if(EdKeyStates[wx_W] == 1 || EdKeyStates[wx_S] == 1 || EdKeyStates[wx_A] == 1 || EdKeyStates[wx_D] == 1) + return 1 + + return 0 + } + + int LastTime + +//----------------------------------------------------------------- + void CheckForExactMoveKeys(int wxKeyCode) + { + int MoveFromKey = 0 + + if(wxKeyCode == wx_LEFT) + MoveFromKey = 1 + + if(wxKeyCode == wx_DOWN) + MoveFromKey = 2 + + if(wxKeyCode == wx_RIGHT) + MoveFromKey = 3 + + if(wxKeyCode == wx_UP) + MoveFromKey = 4 + + int CameraFactor = GetCameraPosFactor() + + if(MoveFromKey) + { + int AddAng = MoveFromKey + CameraFactor + + if(AddAng > 4) + AddAng = 0 + (AddAng - 4) + + MoveFromKey = AddAng + } + + if(wxKeyCode == wx_ADD) + MoveFromKey = 5 + + if(wxKeyCode == wx_SUBTRACT) + MoveFromKey = 6 + + if(MoveFromKey) + { + if(PickEntity()) + { + float Step = grid + + if(MoveFromKey == 1) //left //vo worldovych suradniciach ale smer prisposobeny pohladu kamery + g_NewEntityCoords[0] = g_NewEntityCoords[0] - Step + + if(MoveFromKey == 2) //down + g_NewEntityCoords[1] = g_NewEntityCoords[1] - Step + + if(MoveFromKey == 3) //right + g_NewEntityCoords[0] = g_NewEntityCoords[0] + Step + + if(MoveFromKey == 4) //up + g_NewEntityCoords[1] = g_NewEntityCoords[1] + Step + + if(MoveFromKey == 5) //upZ + g_NewEntityCoords[2] = g_NewEntityCoords[2] + Step + + if(MoveFromKey == 6) //downZ + g_NewEntityCoords[2] = g_NewEntityCoords[2] - Step + + EditCoordsUpdate(true) + DropEntity(true) + } + } + } + +//----------------------------------------------------------------- + void OnKeyDownFromGUI(int wxKeyCode) + { + if(!World.EditorActive) + return + + if(EdKeyStates[wxKeyCode] == -1) //je vyclearovana + return + + int MovementBefore = IsMovementKeyPressed() + EdKeyStates[wxKeyCode] = 1 + int MovementAfter = IsMovementKeyPressed() + + if(MovementBefore == 0 && MovementAfter == 1) + LastTime = GetWindowsCurrentTime() + + if(wxKeyCode == wx_SPACE) + { + CameraMode = 1 - CameraMode +// SetGUICursorType(CameraMode) + ClipCursorInsideWindow(CameraMode) + ShowCursorPernamently(1 - CameraMode) + } + + if(CameraMode == false) + { + if(EdMode == EDITMODE_PATH) + MainUpdateFromGUI() + } + + if(MainSel) + CheckForExactMoveKeys(wxKeyCode) + } + +//----------------------------------------------------------------- + void OnKeyUpFromGUI(int wxKeyCode) + { + if(!World.EditorActive) + return + + EdKeyStates[wxKeyCode] = 0 + + if(CameraMode == false) + { + if(EdMode == EDITMODE_PATH) + MainUpdateFromGUI() + } + } + +//----------------------------------------------------------------- + void BeforeRenderFromGUI() + { + if(!World.EditorActive) + return + + SetCamera(World.CameraPos, World.CameraAngs) + CalcMatrixFromCamera() + + if(EdMode == EDITMODE_ENTITY) + { + VizualizeSelected() + + if(!CameraMode) + { + if(Status == ST_SELECTING) + { + if(Ent) + ShowBBoxOfEntity(Ent, 0x0f00ffff) + } + } + } + + if(EdMode == EDITMODE_PATH) + { + UpdateArea() + + if(!CameraMode) + DrawGrid(ShowGrid, end) + } + } + +//----------------------------------------------------------------- + void OnActivateWindow(bool active) //aktivuje/deactivuje sa okno modulu s editorom + { +/* if(active) + { + SetCamera(World.CameraPos, World.CameraAngs) + CalcMatrixFromCamera() + }*/ + } + +//----------------------------------------------------------------- + int OnIdleFromGUI() //vraciame true ked chceme aby to bolo volane frekventovane + { + if(!World.EditorActive) + return 0 + + int CurTime = GetWindowsCurrentTime() + int Diff = CurTime - LastTime + float EdFtime = (float)Diff * 0.1 + float MovementSpeed = CameraMovementSpeed //default 2 + + if(EdKeyStates[wx_SHIFT]) + MovementSpeed *= 5 + + LastTime = CurTime + + clamp EdFtime<0.01, 2.6> //v dobe od stlacenia klavesy pre pohyb po prvy event OnIdle() moze prejst dlha doba takze LastTime je potom prilis velky + + if(CameraMode || EdMode == EDITMODE_PATH) + { + if(IsMovementKeyPressed()) + { + OnCameraMove() + vector CamStep = ZeroVec + float step = EdFtime * MovementSpeed//1 //* EdFtime//0.2f * ftime; + + vector mat[4] + vector angs = World.CameraAngs + float flip = angs[0] + angs[0] = -flip + RollPitchYawMatrix2(angs, mat) + + vector LeftVec = mat[1] + LeftVec = -LeftVec + vector ForwardVec = mat[0] + + if(EdKeyStates[wx_D] == 1) //vpravo + CamStep += LeftVec + + if(EdKeyStates[wx_A] == 1) //vlavo + CamStep -= LeftVec + + if(EdKeyStates[wx_W] == 1) //dopredu + CamStep += ForwardVec + + if(EdKeyStates[wx_S] == 1) //dozadu + CamStep -= ForwardVec + + VectorNormalize(CamStep) + CamStep = CamStep * step + World.CameraPos += CamStep + + // if(EdMouseDelatX == 0 && EdMouseDelatX == 0) + // { + // SetCamera(World.CameraPos, World.CameraAngs) + // CalcMatrixFromCamera() + // VizualizeSelected() + // } + return true + } + } + + if(!CameraMode) + { + if(EdMode == EDITMODE_PATH) + { + if(mode == 1) + { + if(NumPoints && IsAppActive()) + { + ClipCursorInsideWindow(true) //nepusti kurzor z plochy okna + int MinX = 0 + int MinY = 0 + int MaxX = g_iWidth - 3 + int MaxY = g_iHeight - 3 + float Tstep = EdFtime// * 2 + + if(EdMouseX <= MinX) + World.CameraAngs[1] = World.CameraAngs[1] + Tstep + + if(EdMouseX >= MaxX) + World.CameraAngs[1] = World.CameraAngs[1] - Tstep + + if(EdMouseY <= MinY) + World.CameraAngs[0] = World.CameraAngs[0] + Tstep + + if(EdMouseY >= MaxY) + World.CameraAngs[0] = World.CameraAngs[0] - Tstep + + if(World.CameraAngs[0] < -60) + World.CameraAngs[0] = -60 + + if(World.CameraAngs[0] > 60) + World.CameraAngs[0] = 60 + + return true + } + else + ClipCursorInsideWindow(false) + } + else + ClipCursorInsideWindow(false) + } + } + + return false + } + + + + +//=============================================================================================================== +//=== NEW EDITOR ================================================================================================ +//=============================================================================================================== + + + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + CalcMatrixFromCamera() + } + +//----------------------------------------------------------------- + void OnLoadedMap() //bola nahrana nova mapa. nevola sa pri reloadingu mapy ked sa prepiname do playmodu + { + DisableEnemies(false) + WritePrefabsValuesToAllEntities() + TestPrefabsForUniqueInstances() + ParseMaterials() + OnUpdateSelection("", "", "", false) + } + +//----------------------------------------------------------------- + void EntityEditor() + { + g_NumEditors++ + LoadEntKeysFromEntFile() + + if(!SelectingContact) + SelectingContact = new TraceContact + +//toto sa vola neskor z GUI +// WritePrefabsValuesToAllEntities() //prepiseme vsetky hodnoty prefabovanych entit hodnotami z prefabov +// TestPrefabsForUniqueInstances() //kontrola chyb prefabov + } + + void ~EntityEditor() + { + g_NumEditors-- + + if(SelectingContact) + { + delete SelectingContact + SelectingContact = NULL + } + +/* if(g_NumEditors == 0) + { + }*/ + } +} + + + + + + + + + + + + + + diff --git a/Alpha Prime/Mod/scripts/editor_links.h b/Alpha Prime/Mod/scripts/editor_links.h new file mode 100644 index 0000000..2505dba --- /dev/null +++ b/Alpha Prime/Mod/scripts/editor_links.h @@ -0,0 +1,226 @@ + +bool IsHidden(ExtClass other) +{ + if(!other) + return false + + if(other.Hidden || other.CategoryHidden) + return true + + return false +} + +bool TrcFilter5(ExtClass other) +{ + if(other._name == "") + return false + + if(!IsInherited(other, CExtClass)) + return false + + if(IsHidden(other)) + return false + + if(other.CanEdit() == false) //nieco sa editovat neda + return false + + return true +} + +ExtClass PointEntity(vector TargetPoint) +{ + ExtClass NoModelEnts[4096] + int NoModelEntsNum + vector Mins, Maxs + NoModelEntsNum = 0 + ExtClass ext + + for(ext = GetNextEntity(NULL, CExtClass); ext != NULL; ext = GetNextEntity(ext, CExtClass)) + { + if(ext._name) + { + ext.EngineFlags = GetFlags(ext) + SetFlags(ext, TFL_OBBCOLLISION | TFL_SOLID) + GetBoundBox(ext, Mins, Maxs) + + bool ContainModel = true + + if(Mins == ZeroVec && Maxs == ZeroVec) //entity bez objemu budeme zistovat dodatocne + ContainModel = false + else + { + if(ClassName(ext) == "misc_particle_effector") //snad jedina vynimka + ContainModel = false + } + + if(ContainModel == false) + NoModelEnts[NoModelEntsNum++] = ext + } + } + + ExtClass best = NULL + float bestdist = 9999999 + int cont, sparm + float norm[4], cfrac + bool Hidden + + vector from = World.CameraPos + vector to = TargetPoint//g_CamNorm * (float)8192 + from + + //vector mins, maxs + cfrac = TraceLineEx(DEFAULT, from, to, ZeroVec, ZeroVec, best, norm, NULL, NULL, TRACE_WORLD|TRACE_ENTS|TRACE_RAGDOLLS|TRACE_BONES, &TrcFilter5) +// AddDShape(SHAPE_BBOX, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, to - "0.1 0.1 0.1", to + "0.1 0.1 0.1") + + if(cfrac < 1 && best != World) + bestdist = VectorLength(from - to) + else + best = NULL + +//vratime flagy + for(ext = GetNextEntity(NULL, CExtClass); ext != NULL; ext = GetNextEntity(ext, CExtClass)) + { + if(ext._name) + SetFlags(ext, ext.EngineFlags) + } + + ExtClass ec = NULL + Hidden = true + int CurArrPos = -1 + + while(Hidden && CurArrPos < NoModelEntsNum) + { + ec = NoModelEnts[++CurArrPos]//GetNextEntity(ec, CExtClass) + + if(!ec) + break + + Hidden = IsHidden(ec) + } + + float x = g_iWidth * 0.5 + float y = g_iHeight * 0.5 + + float length = bestdist + + while(CurArrPos < NoModelEntsNum) + { + ec = NoModelEnts[CurArrPos++] + vector min, max + GetBoundBox(ec, min, max) + vector org = GetMatrix(ec, 3) + + if(min == ZeroVec) + min = "-8 -8 -8" + + if(max == ZeroVec) + max = "8 8 8" + + min += org + max += org + + if(ec != World && ec.DefPtr && ec._name != "" && !ec.NotEditable && IsBoxVisible(min, max, 1)) + { + float dist + + if(ec.DefPtr.VisualsType == "box" || ec.DefPtr.VisualsType == "diamond" || ec.DefPtr.VisualsType == "pyramid") + { + if(ec.DefPtr.VisualsSize == "?") //z modelu + GetBoundBox(ec, min, max) + else //z definicie v xml + { + string tokens[16] + int NumTok = ParseString(ec.DefPtr.VisualsSize, tokens) + float sx = atof(tokens[0]) + float sy = atof(tokens[1]) + float sz = atof(tokens[2]) + min = Vector(sx, sy, sz) + sx = atof(tokens[3]) + sy = atof(tokens[4]) + sz = atof(tokens[5]) + max = Vector(sx, sy, sz) + } + + if(min == ZeroVec) + min = "-8 -8 -8" + + if(max == ZeroVec) + max = "8 8 8" + + min += org + max += org + + dist = IntersectRayBox(from, to, min, max) + } + + if(ec.DefPtr.VisualsType == "sphere") + { + float radius = atof(ec.DefPtr.VisualsSize) + dist = IntersectRaySphere(from, to, org, radius) + } + + if(dist > 0) + { + vector mid = to - from * dist + from + + dist *= length + if(dist < bestdist) + { + bestdist = dist + best = ec + } + } + } + + Hidden = true + + while(Hidden && CurArrPos < NoModelEntsNum) + { + ec = NoModelEnts[CurArrPos] + + if(!ec) + break + + Hidden = IsHidden(ec) + + if(Hidden) + CurArrPos++ + } + } + + if(best == World) + return NULL + + return best +} + + +//----------------------------------------------------------------- +Shape WayBoxShapes[1024] +int NumWayBoxes +ExtClass BoxOwners[1024] +Shape WayLineShapes[1024] +int NumWayLines +ExtClass WayEnts[1024] +int WayWidgets[1024] +int NumWayEnts + +//----------------------------------------------------------------- +vector GetEntityCenter(ExtClass ec) +{ + vector min,max + + GetBoundBox(ec, min, max) + return min + max * (float)0.5 + GetOrigin(ec) +} + +//----------------------------------------------------------------- +void UpdateEntityLinks(bool show) +{ + return +} + +//----------------------------------------------------------------- +void UpdateWayEnts() +{ + return +} diff --git a/Alpha Prime/Mod/scripts/editor_main.c b/Alpha Prime/Mod/scripts/editor_main.c new file mode 100644 index 0000000..5573273 --- /dev/null +++ b/Alpha Prime/Mod/scripts/editor_main.c @@ -0,0 +1,337 @@ + +#define DEVELOPER +#define EDITOR + +proto native void OnCameraMove() +proto native void RestetGUIInput() +proto native void ClipCursorInsideWindow(int clip) +proto native void ClampCursorInsideWindow() +proto native void SetGUICursorType(int type) +proto native int GetWindowsCurrentTime() +proto native int IsAppActive() +proto native void SetFocusToRenderWindow() +proto native void SetLoadProgress(int pos) +proto int TextEntryDialog(string EditText, string Label) +proto int RequestDialog(string Request, string Label, int Type) +proto int SingleChoiceDialog(string Label, string Choices[], int NumChoices, int Select) +proto void ToScreenPos(int X, int Y) +proto native void PrintToStatusBar(int Field, string text) +proto void PrintAreaEditInfo(int line, string text) +proto void UpdateAreaGroupList(string Groups[], int NumGroups) +proto void UpdateGroupSelection(string group) +proto native void SetCurrentAreaAccesibility(int status) +proto native void SetAreaFlagsInGUI(int flags) +proto native int GetAreaFlags() +proto string GetAreaNameInGUI() +proto void SetAreaNameInGUI(string name) +proto native void OnDataChange() +proto native int GetNotebookActivePage() +proto native int GetKeyDefIndex(int XMLElement, string name) //vracia index konkretneho kluca z XML elementu definujuceho entitu. napriklad coords je na druhej pozicii +proto int GetClassNamesFromXML(string ClassNames[]) +proto native void ShowEntityPopupMenu() +proto void SetItemNames(string names[], int NumNames) + +proto void GetEntityDefinitionsFromXML(class definition, string ClassName) + +proto void ShowSelectionProperties(string ClassName, string Keys[], string Values[], int NumKeys) +proto void FillMethodsViewComponent(string Methods[], int NumMethods, string HelpTexts[]) +proto void EntityListAdd(string EntNames[], string EntClassNames[], int NumEntities) +proto void EntityListRemove(string EntNames[], string EntClassNames[], int NumEntities) +proto void FillEntityStates(string States[], int NumStates) +proto void FillFilter(string ClassNames[], int NumClassNames) + +proto native void BeginSetupKeyEditComponent() +proto void AddKeyToEditComponent(string Key, string Value, string Choices[], int NumChoices, int VarType, int ControlType, string HelpText) +proto native void EndSetupKeyEditComponent() +proto void ChangeKeyInGUI(string key, string val, string VarType) +proto void OnUpdateSelection(string EntName, string ClName, string PrefabName, int NeedSelect) +proto void UpdatePlayerPointer(class PlayerPtr) + + +const int wx_BACK = 8 +const int wx_TAB = 9 +const int wx_RETURN = 13 +const int wx_ESCAPE = 27 +const int wx_SPACE = 32 +const int wx_DELETE = 127 + + +const int wx_START = 301 +const int wx_LBUTTON = 302 +const int wx_RBUTTON = 303 +const int wx_CANCEL = 304 +const int wx_MBUTTON = 305 +const int wx_CLEAR = 306 +const int wx_SHIFT = 306 //je to divne. niektore akoby nesedeli +const int wx_CONTROL = 308 +const int wx_MENU = 309 +const int wx_PAUSE = 310 +const int wx_CAPITAL = 311 +const int wx_PRIOR = 312 +const int wx_NEXT = 313 +const int wx_END = 314 +const int wx_HOME = 315 +const int wx_LEFT = 316 +const int wx_UP = 317 +const int wx_RIGHT = 318 +const int wx_DOWN = 319 +const int wx_SELECT = 320 +const int wx_PRINT = 321 +const int wx_EXECUTE = 322 +const int wx_SNAPSHOT = 323 +const int wx_INSERT = 324 +const int wx_HELP = 325 +const int wx_NUMPAD0 = 326 +const int wx_NUMPAD1 = 327 +const int wx_NUMPAD2 = 328 +const int wx_NUMPAD3 = 329 +const int wx_NUMPAD4 = 330 +const int wx_NUMPAD5 = 331 +const int wx_NUMPAD6 = 332 +const int wx_NUMPAD7 = 333 +const int wx_NUMPAD8 = 334 +const int wx_NUMPAD9 = 335 +const int wx_MULTIPLY = 336 +const int wx_ADD = 392//337 +const int wx_SEPARATOR = 338 +const int wx_SUBTRACT = 394//339 +const int wx_DECIMAL = 340 +const int wx_DIVIDE = 341 +const int wx_F1 = 342 +const int wx_F2 = 343 +const int wx_F3 = 344 +const int wx_F4 = 345 +const int wx_F5 = 346 +const int wx_F6 = 347 +const int wx_F7 = 348 +const int wx_F8 = 349 +const int wx_F9 = 350 +const int wx_F10 = 351 +const int wx_F11 = 352 +const int wx_F12 = 353 +const int wx_F13 = 354 +const int wx_F14 = 355 +const int wx_F15 = 356 +const int wx_F16 = 357 +const int wx_F17 = 358 +const int wx_F18 = 359 +const int wx_F19 = 360 +const int wx_F20 = 361 +const int wx_F21 = 362 +const int wx_F22 = 363 +const int wx_F23 = 364 +const int wx_F24 = 365 +const int wx_NUMLOCK = 366 +const int wx_SCROLL = 367 + +const int wx_ALT = 309 +const int wx_A = 65 +const int wx_D = 68 +const int wx_W = 87 +const int wx_S = 83 + +const int wx_1 = 49 +const int wx_4 = 52 +const int wx_5 = 53 +const int wx_L = 76 +const int wx_X = 88 +const int wx_Q = 81 +const int wx_E = 69 +const int wx_O = 79 +const int wx_N = 78 +const int wx_H = 72 +const int wx_G = 71 +const int wx_T = 84 + + + + +const int GUI_REQUEST_YES = 1 +const int GUI_REQUEST_NO = 0 + +const int GUI_DIALOG_OK = 0 +const int GUI_DIALOG_YES_NO = 1 + +const int CtrlType_EditBox = 0 +const int CtrlType_ComboBox = 1 +const int CtrlType_CheckBox = 2 +const int CtrlType_Slider = 3 +const int CtrlType_IncrementBox = 4 +const int CtrlType_FileRequester = 5 +const int CtrlType_FlagsEdit = 6 +const int CtrlType_EventButton = 7 + +const int VarType_Int = 0 +const int VarType_Float = 1 +const int VarType_Bool = 2 +const int VarType_String = 3 +const int VarType_Vector = 4 + +#include "scripts/script.c" + +/* + Timhle se rekne skriptu, ze tyto metody existuji, jake maji parametry + a jakym stylem se volaji. Ty, co jsou 'native' maji 1:1 prototypy s + implemetaci v C++. Ty co nejsou, dostavaji pole script-promennych jako + parametry. Vyhoda je, ze se z teto reprezentace da zjistit daleko vic, + nez jen z pouhych dat... +*/ + +//================================================================================= +void UpdateEditor() +{ + currenttime += 0.02//ftime + UpdateShaders() + UpdateMouseButtons() + UpdateMouseStatus() + UpdateStatKeys() +} + +//================================================================================= +void InitEditor(int hodnota) +{ + LoadConfig() + g_iWidth = 640 + g_iHeight = 480 + g_iFullscreen = false + g_iVSync = 0 + g_lod = 0.21 + g_iFly = false + g_fDopplerFactor = 1.5 +} + +//----------------------------------------------------------------------------------- +void InitEditor2() +{ + BasicInit() + CommonInit(true, true) + BeforeRunFromCommandLine(DIFFICULTY_HARD) +} + +//----------------------------------------------------------------------------------- +void OpenScriptEditor() +{ + if(World.EditorActive == true) + return + + EntityEditor Editor = World.Editor + creature_player pla = World.Player + + Editor.Activate(true) + Editor.SetCam(World.CameraPos, World.CameraAngs) + pla.ShowHUD(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + World.Cross.Show(false) + World.EditorActive = true + World.WorkbenchActive = true +} + +//----------------------------------------------------------------------------------- +void CloseScriptEditor() +{ + if(World.EditorActive == false) + return + + EntityEditor Editor = World.Editor + creature_player pla = World.Player + Editor.Activate(false) + pla.ShowHUD(-1, -1, -1, 1, -1, 1, 1, 0, 0, -1) + + if(World.Cross) + World.Cross.Show(true) + + World.EditorActive = false +} + +//----------------------------------------------------------------------------------- +void InitScriptEditor() +{ + if(!World.Editor) + World.Editor = new EntityEditor +} +//----------------------------------------------------------------------------------- +void OnInitApplication() //uz je inicializovane MDI okno ale este sa nespustil ziadny modul +{ +// DeleteEntityDefinitions() //vymazeme definicie z entities.def +// LoadEntKeysFromRadiantDef() //nahrajeme nove definicie +} + +void OnCloseApplication() //po tomto bude zmazany engine +{ + if(PrefManager) + { + delete PrefManager + PrefManager = NULL + } + + if(DefManager) + { + delete DefManager + DefManager = NULL + } +} + +//----------------------------------------------------------------------------------- +void OnInitEditorInstance() //initializovalo sa GUI editoru ale este neni nahrana mapa +{ + if(!DefManager) + DefManager = new EntityDefManager() + + if(!PrefManager) + PrefManager = new PrefabManager() + + string Current + string ListArray[256] + int ListArrayNum = 0 + EntityDef CurDef + + for(int n = 0; n < DefManager.EntDefsNum; n++) + { + CurDef = DefManager.EntDefs[n] + Current = CurDef.ClassName + + if(Current == "MinClass" || Current == "RigidBodyClass" || Current == "TriggerClass" || Current == "FuncClass" || Current == "ItemClass" || Current == "DoorClass") + continue + + if(Current == "CreatureClass" || Current == "TrapClass" || Current == "WeaponClass" || Current == "viewer" || Current == "world" || Current == "creature_player") + continue + + if(Current == "light") + continue + + ListArray[ListArrayNum++] = Current + } + + FillFilter(ListArray, ListArrayNum) //naplni filter tej instancii +} + +//----------------------------------------------------------------------------------- +void AfterLoadMap(string LoadedMap) //mapa bola nahrana ale instancia editoru este nebola vytvorena +{ + LoadedMap = ReplaceChars(LoadedMap, "\", "/") + + string level + int pos = strstr(LoadedMap, ".wrl") + + if(pos >= 0) + level = substr(LoadedMap, 0, pos) + + pos = strstr(level, "/") + while(pos >= 0) + { + level = substr(level, pos + 1, strlen(level) - pos - 1) + pos = strstr(level, "/") + } + + World.ThisLevelName = level + + int lng = strlen(level) + 4 //.wrl + int lng2 = strlen(LoadedMap) + + World.ThisLevelDir = substr(LoadedMap, 0, lng2 - lng) +} + +//----------------------------------------------------------------------------------- +WorldClass GetWorldPtr() +{ + return World +} \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/editor_path.h b/Alpha Prime/Mod/scripts/editor_path.h new file mode 100644 index 0000000..f635734 --- /dev/null +++ b/Alpha Prime/Mod/scripts/editor_path.h @@ -0,0 +1,2936 @@ + +//----------------------------------------------------------------- +float Floor(float f) +{ + int i = f + return i +} +//----------------------------------------------------------------- +vector SnapVector(vector v, vector grid) +{ + vector res + + res[0] = Floor(v[0] / grid[0]) * grid[0] + res[1] = Floor(v[1] / grid[1]) * grid[1] + res[2] = Floor(v[2] / grid[2]) * grid[2] + + return res +} + + +/* +F3 - edit mod +SPACE - kamera/editace +INSERT - pridani bodu +DELETE - mazani bodu +BACKSPACE - umazani posledniho bodu +E - Edit/Create mod +Enter/RMB - ulozeni arey. +PgUp/PgDwn - Velikost gridu +G - Show grid +X - defaultni polygon +Q - Point snap +F1 - Help +*/ + +const string PathTitle = "Path editor" + +//----------------------------------------------------------------- +string bool2a(bool in) +{ + if(in) + return "yes" + else + return "no" +} + +//----------------------------------------------------------------- +vector SplitLine(vector start, vector end, vector norm, float d) +{ + vector vec + float d1, d2 + + d1 = start * norm + d1 = d1 - d + + d2 = end * norm + d2 = d2 - d + + if(d1 <= 0 && d2 <= 0) + return ZeroVec + + if(d1 > 0 && d2 > 0) + return ZeroVec + + d = d1 - d2 + + d = d1 / d + + clamp d<0, 1> + + vec = end - start + vec = vec * d + + return vec + start +} + +//----------------------------------------------------------------- +bool PointOnLine(vector p, vector p1, vector p2) +{ + vector v1, v2 + + v1 = p - p1 + v2 = p2 - p + + VectorNormalize(v1) + VectorNormalize(v2) + + float dot = v1 * v2 + + if(dot > 0.9999) + return true + + return false +} + +//----------------------------------------------------------------- +bool PointOnPlane(vector pos, float plane[4]) +{ + float dist = pos[0] * plane[0] + (pos[1] * plane[1]) + (pos[2] * plane[2]) - plane[3] + + if(fabs(dist) < 0.1) + return true + else + return false +} + +//----------------------------------------------------------------- +vector PlaneFromPoints(vector pnt[], int np, float plane[4]) +{ + float z = pnt[1][2] + if(pnt[0][2] == z && pnt[2][2] == z) + { + plane[0] = 0 + plane[1] = 0 + plane[2] = 1 + plane[3] = z + + return UpVec + } + + for(int n = 0; n < np; n++) + { + vector p = pnt[n + 1 % np] + + vector v1, v2 + + v1 = pnt[n] - p + v2 = pnt[n + 2 % np] - p + + VectorNormalize(v1) + VectorNormalize(v2) + + float d = fabs(v1 * v2) + + if(d < 0.9) + { + //have good enough vectors + + //cross - normal + vector norm = v1 * v2 + + //distance + d = norm * p + + plane[0] = norm[0] + plane[1] = norm[1] + plane[2] = norm[2] + plane[3] = d + return norm + } + } + + //Shit! next try! + for(n = 0; n < np; n++) + { + p = pnt[n + 1 % np] + + v1 = pnt[n] - p + v2 = pnt[n + 2 % np] - p + + VectorNormalize(v1) + VectorNormalize(v2) + + d = fabs(v1 * v2) + + if(d < 1.0) + { + //have good enough vectors + + //cross - normal + norm = v1 * v2 + + //distance + d = norm * p + + plane[0] = norm[0] + plane[1] = norm[1] + plane[2] = norm[2] + plane[3] = d + return norm + } + } + + return ZeroVec +} + +//----------------------------------------------------------------- +bool PointInPoly(vector p, vector pts[], int nump) +{ + for(int n = 0; n < nump; n++) + { + vector pt = pts[n] + vector e = pts[n + 1 % nump] - pt + VectorNormalize(e) + vector pl = e * UpVec + VectorNormalize(pl) + float d = pl * pt + + float dist = pl * p + + if(d > dist) + return false + } + + return true +} + + +//----------------------------------------------------------------- +float Winding(vector pnt[], int np) +{ + vector center = pnt[0] + + for(int n = 1; n < np; n++) + center = center + pnt[n] + + float div = 1 / np + + center = center * div + + float sum = 0 + for(n = 0; n < np; n++) + { + vector v1, v2, p + + v1 = pnt[n] - center + v2 = pnt[n + 1] - center + + float a1 = FixAngle(atan2(v1[0], v1[1]) * RAD2DEG) + float a2 = FixAngle(atan2(v2[0], v2[1]) * RAD2DEG) + + sum += DiffAngle(a1, a2) + + } + + return -sum +} + +//================================================================================= +class PathArea +{ + PathArea next + int num + int flags + string name + + vector mins, maxs + vector pos[64] + int indices[64] + + Shape points[64] + int numpoints + Shape lines + Shape fill + Shape arrow + + vector strip[192] + int numv + + float plane[4] + + int actcolor + + bool notconvex + +//----------------------------------------------------------------- + void Fill(bool act) + { + if(fill) + { + fill.Destroy() + fill = NULL + } + int color, n + + if(act) + { + color = 0x3fffff00 //selected color + + for(n = 0; n < numpoints; n++) + { + if(points[n] == NULL) + { + vector p = pos[n] + points[n] = AddDShape(SHAPE_DIAMOND, 0x3fff00ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, p - "1 1 1", p + "1 1 1") + } + } + } + else + { + for(n = 0; n < numpoints; n++) + { + if(points[n]) + { + Shape pt = points[n] + pt.Destroy() + points[n] = NULL + } + } + + if(flags & 2) + color = 0x3f3f3fff + else + color = actcolor + } + + fill = AddDTris(color, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_NOOUTLINE, strip, numv / 3) + } + +//----------------------------------------------------------------- + void Activate(bool act) + { + if(!act) + { + actcolor = 0x3f3f3f7f + } + else + { + if(notconvex) + actcolor = 0x3f7f0000 + else + { + actcolor = 0x3f007f00 + } + } + + Fill(false) + } + +//----------------------------------------------------------------- + void Show(bool show, bool act) + { + if(fill) + { + fill.Destroy() + fill = NULL + } + + if(arrow) + { + arrow.Destroy() + arrow = NULL + } + + if(lines) + { + lines.Destroy() + lines = NULL + } +int n + + if(!show) + { + for(n = 0; n < numpoints; n++) + { + if(points[n]) + { + Shape pt = points[n] + pt.Destroy() + points[n] = NULL + } + } + + return + } + + vector center = ZeroVec + + for(n = 0; n < numpoints; n++) + { + vector p = pos[n] + center += p + //points[n] = AddDShape(SHAPE_BBOX, 0x3fff00ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, p - "1 1 1", p + "1 1 1") + } + + if(flags & 4) + { + vector dir = pos[1] - pos[0] + dir[2] = 0 + + VectorNormalize(dir) + + vector pdir = dir * "0 0 1" + VectorNormalize(pdir) + + float scale = 1.0 / numpoints + center = center * scale + "0 0 8" + + vector pts[6] + pts[0] = center - pdir + pts[1] = center + pdir + pts[2] = dir * 24.0 + center + pts[3] = dir * 18.0 + center + (pdir * 4.0) + pts[4] = dir * 18.0 + center - (pdir * 4.0) + pts[5] = dir * 24.0 + center + + arrow = AddDTris(0x3fffff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pts, 2) + } + lines = AddDLines(0xffff00ff, SS_NOZUPDATE|SS_DOUBLESIDE, pos, numpoints + 1) + Fill(act) + } + +//----------------------------------------------------------------- + void PathArea(vector pts[], int nump) + { + vector p, pnorm = PlaneFromPoints(pts, nump, plane) + int src, inc, n + + if(Winding(pts, nump) > 0) + { + src = 0 + inc = 1 + } + else + { + src = nump - 1 + inc = -1 + + //flip plane + float f + f = plane[0] + plane[0] = -f + f = plane[1] + plane[1] = -f + f = plane[2] + plane[2] = -f + f = plane[3] + plane[3] = -f + } + + numpoints = nump + + mins = "9999 9999 9999" + maxs = -mins + + for(n = 0; n < numpoints; n++) + { + p = pts[src] + src += inc + + pos[n] = p + + if(p[0] < mins[0]) + mins[0] = p[0] + if(p[1] < mins[1]) + mins[1] = p[1] + if(p[2] < mins[2]) + mins[2] = p[2] + + if(p[0] > maxs[0]) + maxs[0] = p[0] + if(p[1] > maxs[1]) + maxs[1] = p[1] + if(p[2] > maxs[2]) + maxs[2] = p[2] + } + + pos[numpoints] = pos[0] + + mins = mins - "1 1 2" + maxs = maxs + "1 1 2" + + numv = PolyToTriangles(pos, numpoints, strip) + + notconvex = false + + //is it convex & planar? + if(nump > 3) + { + int or = 0 + const vector up = "0 0 1" + + p = pos[0] + + float pdist = pnorm * p + + for(n = 0; n < nump; n++) + { + vector edge, plane, norm + float d + + p = pos[n] + + //planar + if(fabs(p * pnorm - pdist) > 0.1) + { + notconvex = true + goto out + } + + edge = p - pos[n + 1] + + VectorNormalize(edge) + + norm = edge * up + VectorNormalize(norm) + + p = pos[n] + d = norm * p + + for(int m = 0; m < nump; m++) + { + //ignore ourself + if(abs(m - n) > 1) + { + p = pos[m] + float dist = norm * p - d + + if(dist < -0.01) + or |= 1 + else + { + if(dist > 0.01) + or |= 2 + } + + if(or == 3) + { + notconvex = true + goto out + } + } + } + } + } +out: + Show(true, true) + } + +//----------------------------------------------------------------- + void ~PathArea() + { + Show(false, false) + } +} + +//================================================================================= +class PathPortal +{ + PathPortal next + + PathArea Area[2] + int pts[2][2] + Shape pline1, pline2 + + vector perp + +//----------------------------------------------------------------- + void Activate(int enable) + { + if(pline1) + { + pline1.Destroy() + pline1 = NULL + } + if(pline2) + { + pline2.Destroy() + pline2 = NULL + } + + if(!enable) + return + + int color + + vector lperp = perp * (float)0.3 + + if(enable == 2) + { + color = 0xffffffff + lperp = perp * (float)0.5 + } + else + { + color = 0xff00efef + } + + PathArea pa1, pa2 + + pa1 = Area[0] + pa2 = Area[1] + + if(!pline1) + pline1 = AddDShape(SHAPE_LINE, color, SS_NOZUPDATE|SS_DOUBLESIDE, pa1.pos[pts[0][0]] + lperp, pa1.pos[pts[0][1]] + lperp) + + if(!pline2) + pline2 = AddDShape(SHAPE_LINE, color, SS_NOZUPDATE|SS_DOUBLESIDE, pa1.pos[pts[0][0]] - lperp, pa1.pos[pts[0][1]] - lperp) + } + +//----------------------------------------------------------------- + void PathPortal(PathArea pa1, int p11, int p12, PathArea pa2, int p21, int p22) + { + Area[0] = pa1 + Area[1] = pa2 + + pts[0][0] = p11 + pts[0][1] = p12 + pts[1][0] = p21 + pts[1][1] = p22 + + perp = pa1.pos[p11] - pa1.pos[p12] + VectorNormalize(perp) + float f = perp[0] + perp[0] = perp[1] + perp[1] = f + + Activate(true) + } + +//----------------------------------------------------------------- + void ~PathPortal() + { + if(pline1) + pline1.Destroy() + + if(pline2) + pline2.Destroy() + } +} + +Shape ClipShapes[4096] +int NumClipShapes + +const int UR_CREATE_AREA = 1 +const int UR_DELETE_AREA = 2 +const int UR_CREATE_GROUP = 3 +const int UR_DELETE_GROUP = 4 + +class UndoRecord +{ + UndoRecord Next + int Type +} + +class PathUndoRecord extends UndoRecord +{ + PathArea Area + void PathUndoRecord(int type) + { + Type = type + } + + void ~PathUndoRecord() + { + PathArea area, next + for(area = Area; area != NULL; area = next) + { + next = area.next + delete area + } +/* + PathGroup group, gnext + for(group = Group; group != NULL; group = gnext) + { + next = group.Next + delete group + }*/ + } +} + +const int EDITMODE_NONE = 0 +const int EDITMODE_PATH = 1 +const int EDITMODE_ENTITY = 2 + +//================================================================================= +class PathEditor extends MinClass +{ + PathUndoRecord UndoBuffer[32] + int UndoTop, UndoBottom + + void AddUndoRecord(PathUndoRecord pr) + { + UndoTop = UndoTop + 1 & 31 + if(UndoTop == UndoBottom) + { + PathUndoRecord ur, urnext + for(ur = UndoBuffer[UndoTop]; ur != NULL; ur = urnext) + { + urnext = ur.Next + delete ur + } + } + UndoBuffer[UndoTop] = pr + } + + int xpos, ypos + int EdMouseDeltaX, EdMouseDeltaY //su nastavavovane z GUI editoru + int EdMouseX, EdMouseY //su nastavavovane z GUI editoru + int EdScreenMouseX, EdScreenMouseY + bool EdLMBdown, EdRMBdown + int EdKeyStates[400] + bool CameraMode //iba hybanie kamerou + float CameraMovementSpeed + + int grid + int TraceEntities + + vector cpos, cang + + bool Active + int ShowGrid + int Floor, SType + + //finalni pozice kurzoru + vector end + int EdMode + bool ClipsVisible + + + + vector CursorDir + + int mode + + bool IsVisible + + vector BakPoints[64] + int NumBakPoints + + Shape AreaPoints[64] + vector CurrentArea[64] + int NumPoints + Shape AreaShape + int AreaFlags + string AreaName + + int EditedPoint + + bool bLMB, bRMB + bool SnapPoints + + string GroupNames[64] + PathArea First[64] + PathPortal FirstPortal[64] + int NumGroups + + int CurrentGroup, LastGroup + + PathArea SelectedArea + PathPortal SelectedPortal + + bool AllowNonplanar + +//--------------------------------------------------------------------------------- + bool IsFileWritable(string file) + { + int a = GetFileAttributesA(GetFilePath(file)) + + if(a != -1 && a & 1) + return false + else + return true + } + + //--------------------------------------------------------------------------------- + bool GUIKeyState(int KeyCode, bool Clear) + { + int state = EdKeyStates[KeyCode] + + if(state == -1) + return false + + if(state == 1 && Clear) + { + EdKeyStates[KeyCode] = -1 + return true + } + + if(state == 1) //moze byt este 0 a -1 + return true + + return false + } + +//----------------------------------------------------------------- + bool Update3DCursor() + { + //virtualni fce. + //timto lze vypnout updatovani pozice kurzoru a gridu + //napriklad v kombinaci s pop-up menu + return true + } + +//----------------------------------------------------------------- + PathArea FindNearestArea(vector p, vector bevel, PathArea pa) + { + float x, y, z + x = p[0] + y = p[1] + z = p[2] + + if(pa == NULL) + pa = First[CurrentGroup] + + PathArea best = NULL + float bestdist = 9999 * 9999 + + for(; pa != NULL; pa = pa.next) + { + vector mins = pa.mins - bevel + vector maxs = pa.maxs + bevel + + if(x >= mins[0] && y >= mins[1] && z >= mins[2] && x <= maxs[0] && y <= maxs[1] && z <= maxs[2]) + { + float d1,d2 + d1 = VectorLengthSq(mins - p) + d2 = VectorLengthSq(maxs - p) + if(d2 < d1) + d1 = d2 + + if(d1 < bestdist) + { + bestdist = d1 + best = pa + } + } + } + + return best + } + +//----------------------------------------------------------------- + vector SnapPoint(vector pos) + { + PathArea pa = NULL + + float gr = grid * 2 + vector bevel + bevel[0] = gr + bevel[1] = gr + bevel[2] = gr + + while(true) + { + pa = FindNearestArea(pos, bevel, pa) + + if(!pa) + return pos + + for(int v = 0; v < pa.numpoints; v++) + { + if(VectorLength(pa.pos[v] - pos) <= gr) + { + if(SType == 2) + { + pos = pa.pos[v] - "0 0 1" + } + else + { + float f = pos[2] + pos = pa.pos[v] + pos[2] = f + } + return pos + } + } + + pa = pa.next + + if(!pa) + return pos + } + + return pos + } + +//----------------------------------------------------------------- + vector UserSnapPoint(vector pos) + { + vector end = pos - "0 0 1024" + float fplane[4] + int TraceFlags = TRACE_WORLD + + if(TraceEntities) + TraceFlags |= TRACE_ENTS + + TraceLineEx(PLAYER, pos, end, ZeroVec, ZeroVec, NULL, fplane, NULL, NULL, TraceFlags, NULL) + + Floor = g_iTraceBrush + SType = g_iTraceSurfaceType + + vector gr + + gr[0] = grid + gr[1] = grid + gr[2] = 1 + + end = SnapVector(end, gr) + + if(SnapPoints) + return SnapPoint(end) + + return end + } + +//----------------------------------------------------------------- +//timto je mozno externe zmenit pozici kamery + void SetCam(vector pos, vector angles) + { + cpos = pos + cang = angles + } + +//----------------------------------------------------------------- + void ActivateEnts(bool enable) + { + ExtClass ec + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(enable) + ec.EditorOpened() + } + } + +//----------------------------------------------------------------- + void SetEditMode(int mode) + { + } + +//----------------------------------------------------------------- + void SetMode(int m) + { + if(m != 2) + { + AreaFlags = 0 + AreaName = "" + } + + mode = m + } + +//----------------------------------------------------------------- + void ActivateGroup(int g, bool act) + { + PathArea pa + + for(pa = First[g]; pa != NULL; pa = pa.next) + pa.Activate(act) + + PathPortal pp + for(pp = FirstPortal[g]; pp != NULL; pp = pp.next) + pp.Activate(act) + } + +//----------------------------------------------------------------- + void SetCurrentGroup(int g) + { + if(g != CurrentGroup) + { + if(CurrentGroup >= 0 && CurrentGroup < NumGroups) + ActivateGroup(CurrentGroup, false) + + CurrentGroup = g + ActivateGroup(CurrentGroup, true) + } + } + +//----------------------------------------------------------------- + vector points[4096] + int nump + + int PointIndex(vector pos) + { + for(int n = 0; n < nump; n++) + { + if(VectorLengthSq(pos - points[n]) < 0.1) + return n + } + + points[nump++] = pos + return n + } + +//----------------------------------------------------------------- + PathArea AreaByNum(int num) + { + for(PathArea pa = First[CurrentGroup]; pa != NULL; pa = pa.next) + { + if(pa.num == num) + return pa + } + + return NULL + } + +//----------------------------------------------------------------- + bool CheckLoadedArea(PathArea pa) + { + vector strip[192] + int numv = PolyToTriangles(pa.pos, pa.numpoints, strip) + + for(int n = 0; n < numv; n += 3) + { + vector p = strip[n] + vector v1, v2, cross + + v1 = strip[n + 1] - p + v2 = strip[n + 2] - p + + cross = v2 * v1 + + float l = VectorLength(cross) * 0.5 + + if(l == 0) + { + return false + } + + if(cross[2] <= 0) + { + return false + } + } + + return true + } + +//----------------------------------------------------------------- + void LoadArea(string tokens[], int npoints, int id, int flags, string name) + { + vector apts[64] + + for(int n = 0; n < npoints; n++) + apts[n] = points[atoi(tokens[n])] + + PathArea pa = new PathArea(apts, npoints) + + pa.flags = flags + pa.name = name + + PathArea prev + + prev = First[CurrentGroup] + + while(true) + { + if(prev == NULL || prev.next == NULL) + break + + prev = prev.next + } + + if(prev) + prev.next = pa + else + First[CurrentGroup] = pa + + pa.num = id + pa.Activate(false) + } + +//----------------------------------------------------------------- + int RemoveFromAreas(PathArea area) + { + PathArea prev = NULL + + for(PathArea pa = First[CurrentGroup]; pa != NULL; pa = pa.next) + { + if(area == pa) + { + if(prev) + prev.next = pa.next + else + First[CurrentGroup] = pa.next + + pa.next = NULL + return CurrentGroup + } + + prev = pa + } + + prev = NULL + //removing from another group + for(int g = 0; g < NumGroups; g++) + { + if(g == CurrentGroup) + continue + + for(pa = First[g]; pa != NULL; pa = pa.next) + { + if(area == pa) + { + if(prev) + prev.next = pa.next + else + First[g] = pa.next + + pa.next = NULL + return g + } + + prev = pa + } + } + DPrint("Can't remove area!!!!") + return -1 + } + +//----------------------------------------------------------------- + void DeleteArea(PathArea pa) + { + OnDataChange() + + int grp = RemoveFromAreas(pa) + + //remove attached portals + PathPortal pp, next, prev = NULL + for(pp = FirstPortal[grp]; pp != NULL; pp = next) + { + next = pp.next + if(pp.Area[0] == pa || pp.Area[1] == pa) + { + if(prev) + prev.next = next + else + FirstPortal[grp] = next + + delete pp + } + else + prev = pp + } + +/* PathUndoRecord ur = new PathUndoRecord(UR_DELETE_AREA) + pa.Show(false, false) + ur.Area = pa + AddUndoRecord(ur)*/ + delete pa + } + +//----------------------------------------------------------------- + bool LoadData(string name) + { + + CurrentGroup = 0 + int f = OpenFile(name, FILEMODE_READ) + + if(!f) + return false + + string line + int narea = 0, areaid, pts = 0, linenum = 0 + int areaflags + string areaname + + FGets(f, line) + + if(line != "NAV1") + { + CloseFile(f) + return false + } + + string tokens[100] + + while(true) + { + if(FGets(f, line) < 0) + break + + linenum++ + + int ntokens = ParseString(line, tokens) + + if(pts) + { + vector pos + pos[0] = atof(tokens[0]) + pos[1] = atof(tokens[1]) + pos[2] = atof(tokens[2]) + + points[nump++] = pos + pts-- + continue + } + + if(narea) + { + if(narea >= 3) + LoadArea(tokens, narea, areaid, areaflags, areaname) + + narea = 0 + continue + } + + if(tokens[0] == "points") + { + pts = atoi(tokens[1]) + nump = 0 + continue + } + + if(tokens[0] == "group") + { + CurrentGroup = NumGroups + GroupNames[NumGroups++] = tokens[1] + continue + } + + if(tokens[0] == "area") + { + areaid = atoi(tokens[1]) + narea = atoi(tokens[2]) + areaflags = 0 + areaname = "" + + if(ntokens > 3) + areaflags = atoi(tokens[3]) + + if(ntokens > 4) + areaname = tokens[4] + + continue + } + + if(tokens[0] == "portal") + { + PathArea p1, p2 + p1 = AreaByNum(atoi(tokens[1])) + p2 = AreaByNum(atoi(tokens[4])) + int p11, p12, p21, p22 + p11 = atoi(tokens[2]) + p12 = atoi(tokens[3]) + p21 = atoi(tokens[5]) + p22 = atoi(tokens[6]) + PathPortal pp = new PathPortal(p1, p11, p12, p2, p21, p22) + pp.next = FirstPortal[CurrentGroup] + FirstPortal[CurrentGroup] = pp +/* + if(ntokens > 7) + pp.Name = tokens[7] +*/ + continue + } + } + + + CloseFile(f) + + if(NumGroups) + { + for(int g = 0; g < NumGroups; g++) + { + PathArea next + for(PathArea pa = First[g]; pa != NULL; pa = next) + { + next = pa.next + if(!CheckLoadedArea(pa)) + { + DPrint("Bad area. Skipped!") + DeleteArea(pa) + } + } + } + return true + } + + + return false + } + +//----------------------------------------------------------------- + void ShowClips(bool show) + { + Shape shp + + if(show) + NumClipShapes = Brushes2Shape(C_DETAIL|C_PLAYERCLIP, 0x80, 0, 0, ClipShapes) + else + { + for(int n = 0; n < NumClipShapes; n++) + { + shp = ClipShapes[n] + + if(shp) + shp.Destroy() + } + NumClipShapes = 0 + } + } + +//----------------------------------------------------------------- + void SaveData(string name) + { + string fname = GetFilePath(name) + CopyFileA(fname, fname + ".bak", false) + + LastGroup = CurrentGroup + int f = OpenFile(name, FILEMODE_WRITE) + + FPrintln(f, "NAV1") + + //prepare + PathArea pa + PathPortal pp + int a, p, np + + nump = 0 + int narea[256], nport[256] + + for(int g = 0; g < NumGroups; g++) + { + a = 0 + np = 0 + for(pa = First[g]; pa != NULL; pa = pa.next) + { + pa.num = a++ + for(p = 0; p < pa.numpoints; p++) + pa.indices[p] = PointIndex(pa.pos[p]) + } + + for(pp = FirstPortal[g]; pp != NULL; pp = pp.next) + np++ + + narea[g] = a + nport[g] = np; + } + + FPrintln(f, String("points " + itoa(nump))) + + for(p = 0; p < nump; p++) + FPrintln(f, vectoa(points[p])) + + for(g = 0; g < NumGroups; g++) + { + FPrintln(f, String("group " + GroupNames[g] + " " + itoa(narea[g]) + " " + itoa(nport[g]))) + + for(pa = First[g]; pa != NULL; pa = pa.next) + { + string arealine = "area " + itoa(pa.num) + " " + itoa(pa.numpoints) + " " + itoa(pa.flags) + + if(pa.name) + arealine += " " + pa.name + + FPrintln(f, arealine) + + for(p = 0; p < pa.numpoints; p++) + FPrint(f, String(itoa(pa.indices[p]) + " ")) + + FPrintln(f, "") + } + + for(pp = FirstPortal[g]; pp != NULL; pp = pp.next) + { + PathArea p1, p2 + p1 = pp.Area[0] + p2 = pp.Area[1] + + string pstr + pstr = "portal " + pstr += itoa(p1.num) + " " + itoa(pp.pts[0][0]) + " " + itoa(pp.pts[0][1]) + " " + pstr += itoa(p2.num) + " " + itoa(pp.pts[1][0]) + " " + itoa(pp.pts[1][1]) + +/* + if(pp.Name) + pstr += " " + pp.Name +*/ + FPrintln(f, pstr) + } + + } + + CloseFile(f) + Print(String("File " + name + " is saved.")) + } + +//----------------------------------------------------------------- + void RemoveGroup(int g) + { + PathArea pa, next + + for(pa = First[g]; pa != NULL; pa = next) + { + next = pa.next + delete pa + } + First[g] = NULL + + PathPortal pp, pnext + for(pp = FirstPortal[g]; pp != NULL; pp = pnext) + { + pnext = pp.next + delete pp + } + FirstPortal[g] = NULL + + for(int n = g; n < NumGroups; n++) + { + FirstPortal[n] = FirstPortal[n + 1] + First[n] = First[n + 1] + GroupNames[n] = GroupNames[n + 1] + } + NumGroups-- + } + +//----------------------------------------------------------------- + void CleanupAll() + { + while(NumGroups > 0) + RemoveGroup(0) + + UpdateAreaGroupList(GroupNames, NumGroups) + SelectedArea = NULL + SelectedPortal = NULL + Floor = NULL + } + +//----------------------------------------------------------------- + int EffVolume + int MusicVol + + void Activate(bool enable) + { + string name = World.ThisLevelDir + World.ThisLevelName + ".nav" + ActivateEnts(enable) + SetEditMode(EdMode) + + SetCurrentAreaAccesibility(false) + + if(enable) + { + EffVolume = g_iEffectsVolume + MusicVol = g_iMusicVolume + + g_iEffectsVolume = 0 + g_iMusicVolume = 0 + + SetMode(1) + + SetEventMask(this, EV_FRAME) + Active = true + World.PlayerControl = 0 + + if(!LoadData(name)) + { + CurrentGroup = 0 + GroupNames[0] = "Default" + NumGroups = 1 + } + else + { + if(LastGroup >= NumGroups) + LastGroup = 0 + CurrentGroup = -1 + SetCurrentGroup(LastGroup) + } + + UpdateAreaGroupList(GroupNames, NumGroups) + UpdateGroupSelection(GroupNames[CurrentGroup]) + ShowClips(ClipsVisible) + } + else + { + g_iEffectsVolume = EffVolume + g_iMusicVolume = MusicVol + ClearEventMask(this, EV_FRAME) + Active = false + World.PlayerControl = 1 + +// SaveData(name) + CleanupAll() +/* + World.LoadNAV(name, true) + EnableEnemies() + ShowClips(false) +*/ + ExtClass ec + for(ec = GetNextEntity(NULL, CExtClass); ec != NULL; ec = GetNextEntity(ec, CExtClass)) + { + if(ec._name && ec.DefPtr) //musime vyhodit pripadne shapes + ec.DestroyEditorVisuals() + } + } + +// SetAreasVis() + } + +//----------------------------------------------------------------- + void DrawGrid(int show, vector end) + { + if(show == 0) + return + + int ncolor, fcolor + + if(show == 1) + { + ncolor = 0x4f000000 + fcolor = 0xff202020 + } + else + { + ncolor = 0x4fffffff + fcolor = 0xffd0d0d0 + } + + const float tsize = 256, tsize2 = 128 + + int lnum = tsize / grid + 1 + + float sx = end[0] - tsize2 + + int mid = lnum / 2 + + vector v1, v2 + + v1[2] = end[2] + 0.5 + v2[2] = v1[2] + + v1[1] = end[1] - tsize2 + v2[1] = end[1] + tsize2 + + vector lines[520] + int nl = 0 + + for(int x = 0; x < lnum; x++) + { + v1[0] = sx + v2[0] = sx + + if(!x & 1) + { + lines[nl++] = v1 + lines[nl++] = v2 + } + else + { + lines[nl++] = v2 + lines[nl++] = v1 + } + + sx = sx + grid + } + + AddDLines(ncolor, SS_NOZBUFFER|SS_ONCE|SS_NOZUPDATE|SS_TRANSP, lines, nl) + + nl = 0 + + float sy = end[1] - tsize2 + + v1[0] = end[0] - tsize2 + v2[0] = end[0] + tsize2 + + for(int y = 0; y < lnum; y++) + { + v1[1] = sy + v2[1] = sy + + if(y & 1) + { + lines[nl++] = v1 + lines[nl++] = v2 + } + else + { + lines[nl++] = v2 + lines[nl++] = v1 + } + + sy = sy + grid + } + AddDLines(ncolor, SS_NOZBUFFER|SS_ONCE|SS_NOZUPDATE|SS_TRANSP, lines, nl) + + v1 = Vector(end[0] - tsize2, end[1], end[2]) + v2 = Vector(end[0] + tsize2, end[1], end[2]) + AddDShape(SHAPE_LINE, fcolor, SS_NOZBUFFER|SS_ONCE|SS_NOZUPDATE|SS_TRANSP, v1, v2) + + v1 = Vector(end[0], end[1] - tsize2, end[2]) + v2 = Vector(end[0], end[1] + tsize2, end[2]) + AddDShape(SHAPE_LINE, fcolor, SS_NOZBUFFER|SS_ONCE|SS_NOZUPDATE|SS_TRANSP, v1, v2) + } + + bool GetAreasVis() + { + return true + } + +//----------------------------------------------------------------- + void ShowAreas(bool show) + { + IsVisible = show + + for(int n = 0; n < NumGroups; n++) + { + for(PathArea pa = First[n]; pa != NULL; pa = pa.next) + pa.Show(show, false) + + for(PathPortal pp = FirstPortal[n]; pp != NULL; pp = pp.next) + pp.Activate(show) + } + } + +//----------------------------------------------------------------- + void SetAreasVis() + { + if(EdMode == EDITMODE_ENTITY) + ShowAreas(GetAreasVis()) + + if(EdMode == EDITMODE_PATH) + ShowAreas(true) + + if(EdMode == EDITMODE_NONE) + ShowAreas(false) + } + +//----------------------------------------------------------------- + void OnSavePathsFromGUI() + { + if(!World.EditorActive) + return + + string NavFile = World.ThisLevelDir + World.ThisLevelName + ".nav" + + if(IsFileWritable(NavFile) == true) + SaveData(NavFile) + else + RequestDialog("Navigation file " + NavFile + " is not writable!", "write error", GUI_DIALOG_OK) + } + +//----------------------------------------------------------------- + PathArea FindArea(vector p, PathArea pa) + { + float x, y, z + x = p[0] + y = p[1] + z = p[2] + + if(pa == NULL) + pa = First[CurrentGroup] + + for(; pa != NULL; pa = pa.next) + { + float d = pa.plane[0] * x + (pa.plane[1] * y) + (pa.plane[2] * z) + + if(fabs(d - pa.plane[3]) > 2) + continue + + if(x < pa.mins[0] && y < pa.mins[1] && x > pa.maxs[0] && y > pa.maxs[1]) + continue + + if(PointInPoly(p, pa.pos, pa.numpoints)) + return pa + } + + return NULL + } + +//----------------------------------------------------------------- + PathArea PickArea(vector from, vector dir, bool allgroups) + { + float bestdist = 99999 + PathArea bestarea = NULL + + int grp + + if(allgroups) + grp = 0 + else + grp = CurrentGroup + + while(grp < NumGroups) + { + for(PathArea pa = First[grp]; pa != NULL; pa = pa.next) + { + vector plane + float planedist + + plane[0] = pa.plane[0] + plane[1] = pa.plane[1] + plane[2] = pa.plane[2] + planedist = pa.plane[3] + + float v0 = plane * from - planedist + + if(v0 >= bestdist) + continue + + float vd = plane * dir + if(vd == 0) //paralel direction + continue + + float scale = v0 / vd + + if(scale > 0) + continue + + vector intersect = from + (dir * -scale) + + if(PointInPoly(intersect, pa.pos, pa.numpoints)) + { + bestarea = pa + bestdist = v0 + } + } + + if(!allgroups) + break + + grp++ + } + + return bestarea + } + +//----------------------------------------------------------------- + void UpdatePoint(int p, vector pos, int color) + { + if(AreaPoints[p]) + { + Shape pt = AreaPoints[p] + pt.Destroy() + AreaPoints[p] = NULL + } + + CurrentArea[p] = pos + + if(color) + color = 0x70ffff4f + else + color = 0x7000ffff + + AreaPoints[p] = AddDShape(SHAPE_DIAMOND, color, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos + "-2 -2 -2", pos + "2 2 2") + } + +//----------------------------------------------------------------- + void EditArea(PathArea pa) + { + for(int n = 0; n < pa.numpoints; n++) + { + UpdatePoint(n, pa.pos[n], false) + BakPoints[n] = pa.pos[n] + } + + AreaFlags = pa.flags + AreaName = pa.name + NumPoints = pa.numpoints + NumBakPoints = NumPoints +//Print(String("NumPoints: " + itoa(NumPoints))) + DeleteArea(pa) + } + +//----------------------------------------------------------------- + void CleanupCurrentArea() + { + if(AreaShape) + { + AreaShape.Destroy() + AreaShape = NULL + } + + for(int n = 0; n < 64; n++) + { + Shape pt = AreaPoints[n] + if(pt) + { + pt.Destroy() + AreaPoints[n] = NULL + } + } + NumPoints = 0 + } + +//----------------------------------------------------------------- + void MergeGroup(int grp1, int grp2) + { + PathArea pa, next + for(pa = First[grp2]; pa != NULL; pa = next) + { + next = pa.next + pa.next = First[grp1] + First[grp1] = pa + } + First[grp2] = NULL + + PathPortal pp, pnext + for(pp = FirstPortal[grp2]; pp != NULL; pp = pnext) + { + pnext = pp.next + pp.next = FirstPortal[grp1] + FirstPortal[grp1] = pp + } + + FirstPortal[grp2] = NULL + + RemoveGroup(grp2) + } + +//----------------------------------------------------------------- + int AddGroup(string name) + { + FirstPortal[NumGroups] = NULL + First[NumGroups] = NULL + GroupNames[NumGroups++] = name + + return NumGroups - 1 + } + +//----------------------------------------------------------------- + bool EntIsWritable() + { + return IsFileWritable(World.ThisLevelDir + World.ThisLevelName + ".ent") + } + +//----------------------------------------------------------------- + bool PrfIsWritable() + { + } + +//----------------------------------------------------------------- + bool IsConnected(PathArea p1, PathArea p2) + { + PathPortal pp + for(pp = FirstPortal[CurrentGroup]; pp != NULL; pp = pp.next) + { + if(pp.Area[0] == p1 && pp.Area[1] == p2) + return true + if(pp.Area[0] == p2 && pp.Area[1] == p1) + return true + } + + return false + } + +//----------------------------------------------------------------- + void DeletePoint(int p) + { + NumPoints-- + + Shape pt = AreaPoints[p] + if(pt) + { + pt.Destroy() + AreaPoints[p] = NULL + } + + for(int n = p; n < NumPoints; n++) + { + AreaPoints[n] = AreaPoints[n + 1] + CurrentArea[n] = CurrentArea[n + 1] + } + AreaPoints[NumPoints] = NULL + } + +//----------------------------------------------------------------- + void AddPoint(vector pos) + { + UpdatePoint(NumPoints, pos, false) + NumPoints++ + } + +//----------------------------------------------------------------- + void UnEditPoint() + { + if(EditedPoint >= 0) + { + UpdatePoint(EditedPoint, CurrentArea[EditedPoint], false) + EditedPoint = -1 + } + } + +//----------------------------------------------------------------- + void EditPoint(int p) + { + UnEditPoint() + EditedPoint = p + UpdatePoint(p, CurrentArea[p], true) + } + +//----------------------------------------------------------------- + void RemovePoint() + { + if(NumPoints) + { + NumPoints-- + Shape pt = AreaPoints[NumPoints] + + if(pt) + { + pt.Destroy() + AreaPoints[NumPoints] = NULL + } + } + } + +//----------------------------------------------------------------- + void InsertPointAtPos(int pos, vector p) + { + UnEditPoint() + + for(int n = NumPoints - 1; n >= pos; n--) + { + AreaPoints[n + 1] = AreaPoints[n] + CurrentArea[n + 1] = CurrentArea[n] + } + + AreaPoints[pos] = NULL + UpdatePoint(pos, p, true) + EditedPoint = pos + NumPoints++ + } + +//----------------------------------------------------------------- + int InsertPoint(vector p) + { + vector p1, p2, v1, v2 + + CurrentArea[NumPoints] = CurrentArea[0] + + int bestpoint = -1 + float bestdot = 0 + + for(int n = 0; n < NumPoints; n++) + { + p1 = CurrentArea[n] + p2 = CurrentArea[n + 1] + + v1 = p - p1 + v2 = p2 - p + + VectorNormalize(v1) + VectorNormalize(v2) + + float dot = v1 * v2 + + if(dot > bestdot) + { + bestpoint = n + 1 + bestdot = dot + } + } + + if(bestpoint >= 0) + InsertPointAtPos(bestpoint, p) + + return bestpoint + } + +//----------------------------------------------------------------- + void MergeArea() + { + bool merge = false +again:; + PathArea ppa + + vector pos, pos2 + + pos2 = CurrentArea[0] + + for(int n = 0; n < NumPoints; n++) + { + pos = pos2 + pos2 = CurrentArea[n + 1] + + for(ppa = First[CurrentGroup]; ppa != NULL; ppa = ppa.next) + { + if(PointOnPlane(pos, ppa.plane) && PointOnPlane(pos2, ppa.plane)) + { + for(int p = 0; p <= ppa.numpoints; p++) + { + if(PointOnLine(ppa.pos[p], pos, pos2)) + { + if(!merge) + { + if(RequestDialog("Connect area?", PathTitle, GUI_DIALOG_YES_NO) == GUI_REQUEST_YES) + merge = true + else + return + } + + InsertPointAtPos(n + 1, ppa.pos[p]) + goto again + } + } + } + } + } + } + +//----------------------------------------------------------------- + void AddArea() + { + OnDataChange() + MergeArea() + + PathArea ppa, pa = new PathArea(CurrentArea, NumPoints) + + pa.flags = AreaFlags + pa.name = AreaName + pa.Activate(true) + + vector pos, pos2 + + pos2 = pa.pos[0] + + for(int n = 0; n < pa.numpoints; n++) + { + pos = pos2 + pos2 = pa.pos[n + 1] + + ppa = NULL + + while(true) + { + ppa = FindArea(pos, ppa) + + if(ppa == NULL) + goto out + + if(ppa != pa && PointOnPlane(pos, ppa.plane)) + { + for(int p = 0; p <= ppa.numpoints; p++) + { + //match points? + if(VectorLengthSq(pos - ppa.pos[p]) < 0.1) + { + int pprev = p - 1 + if(pprev < 0) + pprev = ppa.numpoints - 1 + + if(VectorLengthSq(pos2 - ppa.pos[pprev]) < 0.1) + { + //portal! + int pthis = p + if(pthis == ppa.numpoints) + pthis-- + + PathPortal pp = new PathPortal(pa, n, n + 1, ppa, pthis, pprev) + + pp.next = FirstPortal[CurrentGroup] + FirstPortal[CurrentGroup] = pp + } + } + } + } + ppa = ppa.next + + if(ppa == NULL) + goto out + } + out: + } + + pa.next = First[CurrentGroup] + First[CurrentGroup] = pa + + CleanupCurrentArea() + } + +//----------------------------------------------------------------- +/* + PathUndoRecord Next + void AddUndoRecord(PathUndoRecord pr) + { + UndoTop = UndoTop + 1 & 31 + if(UndoTop == UndoBottom) + { + PathUndoRecord ur, urnext + for(ur = UndoBuffer[UndoTop]; ur != NULL; ur = urnext) + { + urnext = ur.Next + delete ur + } + } + UndoBuffer[UndoTop] = pr + } +*/ +//----------------------------------------------------------------- + int FindPoint(vector pos) + { + for(int n = 0; n < NumPoints; n++) + { + if(VectorLength(CurrentArea[n] - pos) < 8) + return n + } + + return -1 + } + +//----------------------------------------------------------------- + bool CheckArea(int np) + { + if(np <= 2) + return true + + float plane[4] + vector p1, p2, q1, q2 + + vector norm = PlaneFromPoints(CurrentArea, np, plane) + + if(norm == ZeroVec) + return false + + if(np == 3) + return true + + float dist, d = plane[3] + + if(!AllowNonplanar) + { + //check planarity + for(int n = 0; n < np; n++) + { + p1 = CurrentArea[n] + dist = p1 * norm - d + + if(fabs(dist) > 0.1) + return false + } + } + + bool res = true + //check crossing lines + int lp = np// - 1 + for(n = 0; n < lp; n++) + { + //make plane from edge + p1 = CurrentArea[n] + p2 = CurrentArea[n + 1] + vector edge = p2 - p1 + + VectorNormalize(edge) + vector pl = edge * norm + d = p1 * pl + + //split all lines and search for cross + for(int m = 0; m < lp; m++) + { + //skip us and neighbors + if(abs(m - n) <= 1) + continue + + q1 = CurrentArea[m] + q2 = CurrentArea[m + 1] + + vector mid = SplitLine(q1, q2, pl, d) + + if(mid == ZeroVec) + continue + + if(PointOnLine(mid, p1, p2)) + { + AddDShape(SHAPE_DIAMOND, 0xffff0000, SS_ONCE|SS_DOUBLESIDE, mid + "-1 -1 -1", mid + "1 1 1") + res = false + } + } + } + + return res + } + +//----------------------------------------------------------------- + bool NotAxial(vector p1, vector p2) + { + vector v = p2 - p1 + + int n = 0 + + if(v[0]) + n++ + + if(v[1]) + n++ + + if(v[2]) + n++ + + if(n > 1) + return true + else + return false + } + +//----------------------------------------------------------------- + void UpdateArea() + { + if(AreaShape) + { + AreaShape.Destroy() + AreaShape = NULL + } + + if(NumPoints >= 1) + { + int color + + int lastp + if(mode == 1) //new area + lastp = NumPoints + 1 + else + lastp = NumPoints + + AllowNonplanar = false + //na krivce dovol cokoliv + if(NumPoints >= 2 && SType == 2) + AllowNonplanar = true + + if(CheckArea(lastp)) + color = 0xffffffff + else + color = 0xffff0000 + + CurrentArea[lastp] = CurrentArea[0] + AreaShape = AddDLines(color, SS_NOZUPDATE|SS_DOUBLESIDE, CurrentArea, lastp + 1) + + if(color == 0xffff0000) + return + + for(int n = 0; n < lastp; n++) + { + if(NotAxial(CurrentArea[n], CurrentArea[n + 1])) + { + AddDShape(SHAPE_LINE, 0xff00ff00, SS_ONCE|SS_NOZUPDATE|SS_DOUBLESIDE, CurrentArea[n], CurrentArea[n + 1]) + } + } + } + } + +//----------------------------------------------------------------- + void DefaultPoly(vector end) + { + //defaultni polygon + vector pts1[64], pts2[64], pts3[64], pts[] + float planes[16][4] + bool bounds[16] + + int nump = GetBrushFaces(Floor, planes) + + for(int n = 0; n < nump; n++) + { + if(fabs(planes[n][2]) < 0.2) + bounds[n] = true + else + bounds[n] = false + } + + vector to + float plane[4] + +//debug + vector left, right, top, bottom + + end = end + "0 0 1" + + left = end + "-1024 0 0" + TraceLine(NULL, end, left, NULL, plane, NULL, NULL) + right = end + "1024 0 0" + TraceLine(NULL, end, right, NULL, plane, NULL, NULL) + top = end + "0 1024 0" + TraceLine(NULL, end, top, NULL, plane, NULL, NULL) + bottom = end + "0 -1024 0" + TraceLine(NULL, end, bottom, NULL, plane, NULL, NULL) + + to = left + to[1] = top[1] + pts1[0] = to - "0 0 1" + to = right + to[1] = top[1] + pts1[1] = to - "0 0 1" + to = right + to[1] = bottom[1] + pts1[2] = to - "0 0 1" + to = left + to[1] = bottom[1] + pts1[3] = to - "0 0 1" + + int num2, num = 4 + + for(n = 0; n < nump; n++) + { + if(bounds[n]) + { + plane[0] = planes[n][0] + plane[1] = planes[n][1] + plane[2] = planes[n][2] + plane[3] = planes[n][3] + ClipPoly(pts1, num, pts3, num2, pts2, num, plane) + + pts = pts2 + pts2 = pts1 + pts1 = pts + } + } + + for(n = 0; n < num; n++) + AddPoint(pts1[n]) + + SetMode(2) + } + +//----------------------------------------------------------------- + int GetGroupIndex(string group) + { + for(int n = 0; n < NumGroups; n++) + { + if(group == GroupNames[n]) + return n + } + return -1 + } + +//----------------------------------------------------------------- + void OnChangeGroupGromGUI(string group) + { + int GroupIndex = GetGroupIndex(group) + + if(GroupIndex == -1) + return + + SetCurrentGroup(GroupIndex) + PrintAreaEditInfo(5, "Group : " + GroupNames[CurrentGroup]) + + if(CurrentGroup >= 0) + { + PathArea pa = First[CurrentGroup] + if(pa) + { + vector pos = pa.mins + pa.maxs * (float)0.5 + SetCam(pos + "0 0 32", cang) + } + } + } + +//----------------------------------------------------------------- + void OnAddGroupGromGUI() + { + string val = "" + if(TextEntryDialog(val, "New group")) + { + int res = AddGroup(val) + SetCurrentGroup(res) + UpdateAreaGroupList(GroupNames, NumGroups) + UpdateGroupSelection(GroupNames[CurrentGroup]) + } + } + +//----------------------------------------------------------------- + void OnDeleteGroupGromGUI(string group) + { + int GroupIndex = GetGroupIndex(group) + + if(GroupIndex == -1) + return + + if(GroupIndex == CurrentGroup) + CurrentGroup = GroupIndex - 1 + + clamp CurrentGroup<0, CurrentGroup> + + RemoveGroup(GroupIndex) + UpdateAreaGroupList(GroupNames, NumGroups) + UpdateGroupSelection(GroupNames[CurrentGroup]) + } + +//----------------------------------------------------------------- + void OnRenameGroupGromGUI(string group) + { + int GroupIndex = GetGroupIndex(group) + + if(GroupIndex == -1) + return + + string val = "" + if(TextEntryDialog(val, "Rename group") && val) + { + GroupNames[GroupIndex] = val + UpdateAreaGroupList(GroupNames, NumGroups) + UpdateGroupSelection(GroupNames[GroupIndex]) + } + } + +//----------------------------------------------------------------- + void OnMergeGroupGromGUI(string group1, string group2) + { + int GroupIndex1 = GetGroupIndex(group1) + + if(GroupIndex1 == -1) + return + + int GroupIndex2 = GetGroupIndex(group2) + + if(GroupIndex2 == -1) + return + + MergeGroup(GroupIndex1, GroupIndex2) + UpdateAreaGroupList(GroupNames, NumGroups) + + for(int n = 0; n < NumGroups; n++) + { + if(GroupNames[n] == group1) + { + CurrentGroup = -1 + SetCurrentGroup(n) + UpdateGroupSelection(GroupNames[CurrentGroup]) + break + } + } + } + +//----------------------------------------------------------------- +void SplitArea(PathArea pa, int i1, int i2) +{ + vector area1[64] + int narea1 = 0 + + NumPoints = 0 + + for(int n = 0; n < pa.numpoints; n++) + { + //1st half + if(n <= i1 || n >= i2) + { + area1[narea1++] = pa.pos[n] + } + + //2nd half + if(n >= i1 && n <= i2) + { + CurrentArea[NumPoints++] = pa.pos[n] + } + } + + DeleteArea(pa) + + AddArea() + + for(n = 0; n < narea1; n++) + CurrentArea[n] = area1[n] + + NumPoints = narea1 + AddArea() +} + +//----------------------------------------------------------------- +void TrySplitArea(vector p1, vector p2) +{ + for(PathArea pa = First[CurrentGroup]; pa != NULL; pa = pa.next) + { + int i1 = -1, i2 = -1 + + for(int n = 0; n < pa.numpoints; n++) + { + vector p = pa.pos[n] + + if(p == p1) + i1 = n + + if(p == p2) + i2 = n + } + + //that's the one!? + if(i1 >= 0 && i2 >= 0) + { + if(i1 > i2) + { + int tmp = i2 + i2 = i1 + i1 = tmp + } + + tmp = pa.numpoints - 1 + if(i2 == tmp && i1 == 0) + return + + tmp = i2 - i1 + if(tmp < 2) + return + + SplitArea(pa, i1, i2) + SetMode(1) + return + } + } +} + +//----------------------------------------------------------------- +void OnDeleteSelectedAreaFromGUI() +{ + if(!World.EditorActive) + return + + if(EdMode != EDITMODE_PATH) //osetrenie nutnej prasarny. v GUI mame iba jedno delete a tak vola toto ale aj EntityEditoru OnDeleteSelectionFromGUI() + return + + if(SelectedArea) + { + if(RequestDialog("Delete area?", PathTitle, GUI_DIALOG_YES_NO) == GUI_REQUEST_YES) + { + DeleteArea(SelectedArea) + SelectedArea = NULL + } + } +} + + vector CursorPos + +//----------------------------------------------------------------- + void EveryFrame() //virtualna funkcia pre entity editor + { + switch(mode) + { + case 1: + PrintAreaEditInfo(0, "Mode : Create area") + break + case 2: + PrintAreaEditInfo(0, "Mode : Edit area") + break + } + + PrintAreaEditInfo(1, "Points : " + itoa(NumPoints)) + PrintAreaEditInfo(2, "Edit point : " + itoa(EditedPoint)) + PrintAreaEditInfo(3, "Grid size : " + itoa(grid)) + PrintAreaEditInfo(4, "Snap points: " + bool2a(SnapPoints)) + PrintAreaEditInfo(6, "Coords : " + vectoa(end)) + PrintAreaEditInfo(7, "entities as ground : " + bool2a(TraceEntities)) + + if(GUIKeyState(wx_CONTROL, false)) + { + if(GUIKeyState(wx_L, true)) + { + CleanupAll() + if(!LoadData(World.ThisLevelDir + World.ThisLevelName + ".nav")) + { + CurrentGroup = 0 + GroupNames[0] = "Default" + NumGroups = 1 + UpdateAreaGroupList(GroupNames, NumGroups) + UpdateGroupSelection(GroupNames[CurrentGroup]) + } + else + { + if(LastGroup >= NumGroups) + LastGroup = 0 + CurrentGroup = -1 + SetCurrentGroup(LastGroup) + UpdateAreaGroupList(GroupNames, NumGroups) + UpdateGroupSelection(GroupNames[CurrentGroup]) + } + } + } + + vector pos, dir + + if(CameraMode == 0) + { + switch(mode) + { + case 1: + EditedPoint = -1 + CurrentArea[NumPoints] = end + + if(NumPoints == 0) + AllowNonplanar = false + + if(EdLMBdown) + { + if(!bLMB) + { + bLMB = true + + //don't add duplicities + if(FindPoint(end) == -1) + AddPoint(end) + } + } + else + bLMB = false + + if(GUIKeyState(wx_BACK, true)) + RemovePoint() + +/* if(GUIKeyState(wx_DELETE, true)) + { + if(SelectedArea) + { + if(RequestDialog("Delete area?", PathTitle, GUI_DIALOG_YES_NO) == GUI_REQUEST_YES) + { + DeleteArea(SelectedArea) + SelectedArea = NULL + } + } + }*/ + + + if(NumPoints == 0 && GUIKeyState(wx_X, true)) + { + DefaultPoly(end) + OnDataChange() + } + break + + case 2: + if(EdLMBdown) + { + int pnt = FindPoint(end) + + if(pnt >= 0 && pnt != EditedPoint) + { + UnEditPoint() + EditedPoint = pnt + } + + if(EditedPoint >= 0) + UpdatePoint(EditedPoint, end, true) + } + + if(GUIKeyState(wx_1, true)) + { + if(EditedPoint >= 0) + { + int p = EditedPoint + UnEditPoint() + EditedPoint = p + 1 + + if(EditedPoint == NumPoints) + EditedPoint = 0 + } + else + EditedPoint = 0 + + EditPoint(EditedPoint) + } + + if(GUIKeyState(wx_INSERT, true)) + { + InsertPoint(end) + } + + if(GUIKeyState(wx_DELETE, true)) + { + if(EditedPoint >= 0) + { + DeletePoint(EditedPoint) + + //deleted whole area, switch to New mode + if(NumPoints == 0) + SetMode(1) + else + { + //edit next point + if(EditedPoint >= NumPoints) + EditedPoint = 0 + + EditPoint(EditedPoint) + } + } + } + break + } + + if(GUIKeyState(wx_Q, true)) + { + SnapPoints = true - SnapPoints + } + + if(GUIKeyState(wx_T, true)) + TraceEntities = 1 - TraceEntities + + if(NumPoints == 0) + { + PathArea sel + + if(GUIKeyState(wx_SHIFT, false)) + sel = PickArea(CursorPos, CursorDir, true) + else + sel = PickArea(CursorPos, CursorDir, false) + + if(SelectedArea) + SelectedArea.Fill(false) + + SelectedArea = sel + + if(sel) + { + sel.Fill(true) + SetAreaFlagsInGUI(sel.flags) + SetAreaNameInGUI(sel.name) + } + else + { + AreaFlags = 0 + AreaName = "" + SetAreaFlagsInGUI(0) + SetAreaNameInGUI("") + } + } + + if(GUIKeyState(wx_E, true)) + { + if(NumPoints == 0) + { + if(SelectedArea) + { + SetAreaFlagsInGUI(SelectedArea.flags) + SetAreaNameInGUI(SelectedArea.name) + EditArea(SelectedArea) + SelectedArea = NULL + //tady si zkopirovat AreaName, AreaFlags + + SetCurrentAreaAccesibility(true) + EditPoint(0) + SetMode(2) + OnDataChange() + + EdLMBdown = false + } + } + else + { + if(mode != 2) + { + SetMode(2) + EditPoint(0) + } + else + { + SetMode(1) + UnEditPoint() + } + } + } + + if(NumPoints) + { + if(GUIKeyState(wx_RETURN, true)) + { + OnDataChange() + if(NumPoints == 2) + TrySplitArea(CurrentArea[0], CurrentArea[1]) + else + { + if(NumPoints > 2 && CheckArea(NumPoints)) + { + //tady prepsat Areaname, AreaFlags + AreaFlags = GetAreaFlags() + AreaName = GetAreaNameInGUI() + AddArea() + AreaFlags = 0 + AreaName = "" + SetCurrentAreaAccesibility(false) + SetMode(1) + } + } + } + + if(EdRMBdown) + { + OnDataChange() + if(!bRMB) + { + bRMB = true + + if(NumPoints == 2) + TrySplitArea(CurrentArea[0], CurrentArea[1]) + else + { + if(NumPoints > 2 && CheckArea(NumPoints)) + { + AreaFlags = GetAreaFlags() + AreaName = GetAreaNameInGUI() + //tady prepsat Areaname, AreaFlags + AddArea() + AreaFlags = 0 + AreaName = "" + SetCurrentAreaAccesibility(false) + SetMode(1) + } + } + } + } + else + bRMB = false + } + + if(GUIKeyState(wx_ESCAPE, false)) + { + GUIKeyState(wx_ESCAPE, true) + + CleanupCurrentArea() + + if(mode == 2) + { + if(NumBakPoints) + { + for(int n = 0; n < NumBakPoints; n++) + AddPoint(BakPoints[n]) + + AddArea() + } + SetMode(1) + NumBakPoints = 0 + } + SelectedArea = NULL + } + else + { + if(GUIKeyState(wx_N, true) && SelectedArea && SelectedArea.flags & 2) + { + string name = SelectedArea.name + if(TextEntryDialog(name, "Portal name")) + SelectedArea.name = name + } + + if(!EdRMBdown) + bRMB = false + } + } + +// UpdateArea() + + if(GroupNames[CurrentGroup]) + PrintAreaEditInfo(5, "Group : " + GroupNames[CurrentGroup]) + } + +//----------------------------------------------------------------- + void MainNotebookChangedFromGUI(int OldPage, int NewPage) + { + if(NewPage == 0) //entity editor menu + SetEditMode(EDITMODE_ENTITY) + else + { + if(NewPage == 1) //path edit menu + SetEditMode(EDITMODE_PATH) + else + SetEditMode(EDITMODE_NONE) + } + } + +//----------------------------------------------------------------- + void BeforeQuitFromGUI() + { + if(!World.EditorActive) //nemozeme sejvovat v playmode + return + } + + //----------------------------------------------------------------- + void OnGridSizeChangeFromGUI(int size) + { + grid = size + } + +//----------------------------------------------------------------- + void OnGridTypeChange(int type) + { + clamp type<0, 2> + ShowGrid = type + } + +//----------------------------------------------------------------- + void OnCameraSpeedChangeFromGUI(float speed, int dd) + { + CameraMovementSpeed = speed + } + +//----------------------------------------------------------------- + void MainUpdateFromGUI() //volane z GUI editoru iba ked je potreba + { + if(!World.EditorActive) + return + + if(CameraMode == 0) + { + if(Update3DCursor()) + { + CursorPos = UnprojectVector(EdMouseX, EdMouseY, CursorDir) + end = CursorDir * (float)8192 + CursorPos + float plane[4] + int TraceFlags = TRACE_WORLD + + if(TraceEntities) + TraceFlags |= TRACE_ENTS + + float f = TraceLineEx(PLAYER, CursorPos, end, ZeroVec, ZeroVec, NULL, plane, NULL, NULL, TraceFlags, NULL) + + if(EdMode == EDITMODE_PATH) //area editor + { + end = end + "0 0 1" + end = UserSnapPoint(end) + end = end + "0 0 1" + } + } + } + +//--- + + if(EdMode == EDITMODE_PATH) + EveryFrame() + } + +//----------------------------------------------------------------- + void PathEditor() + { + CurrentGroup = 0 + GroupNames[0] = "Default" + SnapPoints = true + + int PageSelected = GetNotebookActivePage() + + if(PageSelected == 0) + { + EdMode = EDITMODE_ENTITY //entity edit + ShowGrid = 1 + } + else + { + if(PageSelected == 1) + { + EdMode = EDITMODE_PATH //entity edit + ShowGrid = 1 + } + else + EdMode = EDITMODE_NONE + } + + IsVisible = false + } + +//----------------------------------------------------------------- + void ~PathEditor() + { + while(UndoTop != UndoBottom) + { + UndoTop = UndoTop - 1 & 31 + + if(UndoBuffer[UndoTop]) + delete UndoBuffer[UndoTop] + } + + ShowClips(false) + g_iEffectsVolume = EffVolume + g_iMusicVolume = MusicVol + CleanupAll() + } +} diff --git a/Alpha Prime/Mod/scripts/func_display.h b/Alpha Prime/Mod/scripts/func_display.h new file mode 100644 index 0000000..1e6c390 --- /dev/null +++ b/Alpha Prime/Mod/scripts/func_display.h @@ -0,0 +1,2151 @@ + +const int DSP_INTERP_NONE = 0 +const int DSP_INTERP_DIRECTLY = 1 +const int DSP_INTERP_LINEAR = 2 +const int DSP_INTERP_SPLINE1 = 3 +const int DSP_INTERP_SPLINE2 = 4 +const int DSP_INTERP_SPLINE3 = 5 + +const int DSP_TYPE_BITMAP = 0 +const int DSP_TYPE_FONT = 1 +const int DSP_TYPE_VIDEO = 2 + +const int DSP_LINESTARTOFF = 1 //flagy +const int DSP_LINEUPDATEALLWAYS = 2 //ked tento flag neni nastaveny, timelajna sa updatuje iba ked je model vidiet + +const string ValFormat[3][8] = {"xpos", "ypos", "width", "height", "angle", "opacity", "", "", //bitmap + "xpos", "ypos", "width", "height", "angle", "opacity", "text", "", //font + "xpos", "ypos", "width", "height", "angle", "opacity", "", ""} //video + +//================================================================================= +class DElmKey extends _serializable +{ + DElmKey NextKey + int interp + float time +} + +class DElmKeyFloat extends DElmKey +{ + float fval +} + +class DElmKeyString extends DElmKey +{ + string sval +} + +//================================================================================= +class DElm extends _serializable +{ + string ID + int type + string path + int font + int Sort + int wflags + DElm NextElement + float OriginX //0 - 1 offset k lavemu hornemu rohu bitmapy + float OriginY + int color + string ParentID +} + +//================================================================== +class DCommand extends _serializable +{ + DCommand NextCommand + string command + float time +} + +//================================================================== +class DSound extends _serializable +{ + DSound NextSound + string ID + hsound shandle +} + +//================================================================== +class UsingInfo extends _serializable +{ + DElm NextUsingInfo + DElm elm + + DElmKeyFloat FirstXposKey //prvy kluc + DElmKeyFloat FirstYposKey + DElmKeyFloat FirstWidthKey + DElmKeyFloat FirstHeightKey + DElmKeyFloat FirstAngleKey + DElmKeyFloat FirstOpacityKey + DElmKeyFloat FirstTextKey + +//------------------------------------------------------------------ + DElmKey AddKey(DElmKey key, string KeyName) + { + DElmKey fkey = NULL + DElmKey LastFkey = NULL + + if(KeyName == "xpos") + { + if(!FirstXposKey) + FirstXposKey = key + + fkey = FirstXposKey + } + + if(KeyName == "ypos") + { + if(!FirstYposKey) + FirstYposKey = key + + fkey = FirstYposKey + } + + if(KeyName == "width") + { + if(!FirstWidthKey) + FirstWidthKey = key + + fkey = FirstWidthKey + } + + if(KeyName == "height") + { + if(!FirstHeightKey) + FirstHeightKey = key + + fkey = FirstHeightKey + } + + if(KeyName == "angle") + { + if(!FirstAngleKey) + FirstAngleKey = key + + fkey = FirstAngleKey + } + + if(KeyName == "opacity") + { + if(!FirstOpacityKey) + FirstOpacityKey = key + + fkey = FirstOpacityKey + } + + if(KeyName == "text") + { + if(!FirstTextKey) + FirstTextKey = key + + fkey = FirstTextKey + } + + if(fkey == key) //iba sme nastavili first + return NULL + + while(true) + { + LastFkey = fkey + fkey = fkey.NextKey + + if(!fkey) + { + LastFkey.NextKey = key + return LastFkey + } + } + } + +//------------------------------------------------------------------ + void DestroyKeyChain(DElmKey FKey) + { + DElmKey key = FKey + DElmKey tmp + + while(key) + { + tmp = key + key = key.NextKey + delete tmp + } + } + +//------------------------------------------------------------------ + void ~UsingInfo() + { + DestroyKeyChain(FirstXposKey) + DestroyKeyChain(FirstYposKey) + DestroyKeyChain(FirstWidthKey) + DestroyKeyChain(FirstHeightKey) + DestroyKeyChain(FirstAngleKey) + DestroyKeyChain(FirstOpacityKey) + DestroyKeyChain(FirstTextKey) + } +} + +//================================================================== +class DTLine extends _serializable +{ + string ID + int flags + DTLine NextTLine + UsingInfo FirstUsingInfo + DCommand FirstCommand + float FullTime + +//------------------------------------------------------------------ + void AddUsingInfo(UsingInfo info) + { + if(!FirstUsingInfo) + FirstUsingInfo = info + + UsingInfo inf = FirstUsingInfo + UsingInfo LastDefined = NULL + + while(inf) + { + if(inf != info) + LastDefined = inf + + inf = inf.NextUsingInfo + } + + inf = info + + if(LastDefined) + LastDefined.NextUsingInfo = info + } + +//------------------------------------------------------------------ + void AddCommand(DCommand cmd) + { + if(!FirstCommand) + FirstCommand = cmd + + DCommand c = FirstCommand + DCommand LastDefined = NULL + + while(c) + { + if(c != cmd) + LastDefined = c + + c = c.NextCommand + } + + c = cmd + + if(LastDefined) + LastDefined.NextCommand = cmd + } + +//------------------------------------------------------------------ + DElm GetUsingInfoPtr(string id) + { + UsingInfo UInfo = FirstUsingInfo + + while(UInfo) + { + if(UInfo.elm.ID == id) + return UInfo + + UInfo = UInfo.NextUsingInfo + } + return NULL + } + +//------------------------------------------------------------------ + void ~DTLine() + { + UsingInfo inf = FirstUsingInfo + UsingInfo tmp + + while(inf) + { + tmp = inf + inf = inf.NextUsingInfo + delete tmp + } + + DCommand cmd = FirstCommand + DElm tmp2 + + while(cmd) + { + tmp2 = cmd + cmd = cmd.NextCommand + delete tmp2 + } + } +} + +//================================================================================= +class DispAction extends _serializable +{ + string ID + DispAction NextAction + DCommand FirstCommand + +//------------------------------------------------------------------ + void AddCommand(DCommand cmd) + { + if(!FirstCommand) + FirstCommand = cmd + + DCommand c = FirstCommand + DCommand LastDefined = NULL + + while(c) + { + if(c != cmd) + LastDefined = c + + c = c.NextCommand + } + + c = cmd + + if(LastDefined) + LastDefined.NextCommand = cmd + } + +//------------------------------------------------------------------ + void ~DispAction() + { + DCommand cmd = FirstCommand + DCommand tmp + + while(cmd) + { + tmp = cmd + cmd = cmd.NextCommand + delete tmp + } + } +} + +//================================================================================= +class DispProgram extends _serializable +{ + string ID + DispProgram NextProgram + DTLine FirstTLine + DElm FirstElement + DispAction FirstAction + DSound FirstSound + int CanvasX, CanvasY + float fps //virtualne fps na ktorom program pobezi + int CanvasFlags + +//------------------------------------------------------------------ + void AddAction(DispAction action) + { + if(!FirstAction) + FirstAction = action + + DispAction st = FirstAction + DispAction LastDefined = NULL + + while(st) + { + if(st != action) + LastDefined = st + + st = st.NextAction + } + + st = action + + if(LastDefined) + LastDefined.NextAction = action + } + +//------------------------------------------------------------------ + void AddSound(DSound snd) + { + if(!FirstSound) + FirstSound = snd + + DSound sn = FirstSound + DSound LastDefined = NULL + + while(sn) + { + if(sn != snd) + LastDefined = sn + + sn = sn.NextSound + } + + sn = snd + + if(LastDefined) + LastDefined.NextSound = snd + } + +//------------------------------------------------------------------ + void AddTimeline(DTLine tline) + { + if(!FirstTLine) + FirstTLine = tline + + DTLine tl = FirstTLine + DTLine LastDefined = NULL + + while(tl) + { + if(tl != tline) + LastDefined = tl + + tl = tl.NextTLine + } + + tl = tline + + if(LastDefined) + LastDefined.NextTLine = tline + } + +//------------------------------------------------------------------ + DElm GetElementPtr(string id) + { + DElm elm = FirstElement + + while(elm) + { + if(elm.ID == id) + return elm + + elm = elm.NextElement + } + return NULL + } + +//------------------------------------------------------------------ + void AddElement(DElm element) + { + if(!FirstElement) + FirstElement = element + + DElm elm = FirstElement + DElm LastDefined = NULL + + while(elm) + { + if(elm != element) + LastDefined = elm + + elm = elm.NextElement + } + + elm = element + + if(LastDefined) + LastDefined.NextElement = element + } + +//------------------------------------------------------------------ + void DispProgram() + { + CanvasX = 800 //default keby niekto nenastavil nic aby bolo nieco vidiet + CanvasY = 600 + } + +//------------------------------------------------------------------ + void ~DispProgram() + { + DTLine tline = FirstTLine + DTLine tmp + + while(tline) + { + tmp = tline + tline = tline.NextTLine + delete tmp + } + + DElm elm = FirstElement + DElm tmp3 + + while(elm) + { + tmp3 = elm + elm = elm.NextElement + delete tmp3 + } + + DispAction st = FirstAction + DispAction tmp4 + + while(st) + { + tmp4 = st + st = st.NextAction + delete tmp4 + } + + DSound sn = FirstSound + DSound tmp5 + + while(sn) + { + tmp5 = sn + sn = sn.NextSound + delete tmp5 + } + } +} + + +//================================================================================= +class DisplayCollection extends _serializable +{ + DispProgram FirstProgram + +//------------------------------------------------------------------ + int ConvertInterpType(string s) + { + if(s == ".") + return DSP_INTERP_DIRECTLY + + if(s == "1") + return DSP_INTERP_LINEAR + + if(s == "2") + return DSP_INTERP_SPLINE1 + + if(s == "3") + return DSP_INTERP_SPLINE2 + + if(s == "4") + return DSP_INTERP_SPLINE3 + + return DSP_INTERP_LINEAR + } + +//------------------------------------------------------------------ + void AddProgram(DispProgram prg) + { + if(!FirstProgram) + FirstProgram = prg + + DispProgram dp = FirstProgram + DispProgram LastDefined = NULL + + while(dp) + { + if(dp != prg) + LastDefined = dp + + dp = dp.NextProgram + } + + dp = prg + + if(LastDefined) + LastDefined.NextProgram = prg + } + +//------------------------------------------------------------------ + DispProgram LoadProgram(string prg) + { + DispProgram prog = FirstProgram + + while(prog) + { + if(prog.ID == prg) + return prog + + prog = prog.NextProgram + } + + tparse tp = BeginParse(prg) + + if(!tp) + return NULL + + prog = new DispProgram + prog.ID = prg + AddProgram(prog) + + string tokens[32] + int n = 0 + int k, r, g, b + int BlendType + int TextureAlpha + int InterpOff + int MaxKeys + string VarName + bool Commands = false + DElm elm = NULL + DTLine tline = NULL + DCommand cmd = NULL + DSound snd = NULL + DispAction action = NULL + DElmKeyFloat Key = NULL + DElmKeyFloat KeyLastDefined = NULL + DElmKeyString KeyString = NULL + UsingInfo uinfo = NULL + int NumTokens = ParseLine(tp, n++, tokens) + + while(NumTokens) + { + if(tokens[0] == "CANVAS") + { + prog.CanvasX = atoi(tokens[1]) + prog.CanvasY = atoi(tokens[2]) + prog.fps = atof(tokens[3]) + + if(tokens[4] != "alpha") + prog.CanvasFlags |= WF_NOALPHA + + if(prog.fps == 0) + prog.fps = 30 + + goto next + } + + if(tokens[0] == "BITMAP" || tokens[0] == "TEXT" || tokens[0] == "VIDEO") + { + elm = new DElm + prog.AddElement(elm) + elm.ID = tokens[1] + elm.ParentID = tokens[2] + + if(tokens[0] == "BITMAP") + elm.type = DSP_TYPE_BITMAP + else + { + if(tokens[0] == "TEXT") + elm.type = DSP_TYPE_FONT + else + elm.type = DSP_TYPE_VIDEO + } + + elm.path = RemoveQuotes(tokens[3]) + elm.Sort = atoi(tokens[4]) + + if(tokens[5] == "stretch") + elm.wflags |= WF_STRETCH + + if(tokens[5] == "rotate") + elm.wflags |= WF_CUSTOMUV | WF_NOWRAP + + if(tokens[6] == "0") + elm.wflags |= WF_NOFILTER + + elm.OriginX = atof(tokens[7]) + elm.OriginY = atof(tokens[8]) + int FlipU = atoi(tokens[9]) + int FlipV = atoi(tokens[10]) + + if(FlipU) + elm.wflags |= WF_FLIPU + + if(FlipV) + elm.wflags |= WF_FLIPV + + BlendType = atoi(tokens[11]) + TextureAlpha = atoi(tokens[12]) + clamp BlendType<0, 2> + + if(BlendType == 1) + elm.wflags |= WF_BLEND + + if(BlendType == 2) + elm.wflags |= WF_ADDITIVE + + if(BlendType && TextureAlpha) + elm.wflags |= WF_SOURCEALPHA + + r = atoi(tokens[13]) + g = atoi(tokens[14]) + b = atoi(tokens[15]) + elm.color = ARGB(0, r, g, b) + + if(tokens[0] == "TEXT") + { + elm.font = atoi(tokens[16]) + + if(tokens[17] == "right") + elm.wflags |= WF_RALIGN + + if(tokens[17] == "center") + elm.wflags |= WF_CENTER + + if(tokens[18] == "center") + elm.wflags |= WF_VCENTER + } + + elm = NULL + goto next + } + + if(tokens[0] == "SOUND") + { + snd = new DSound + prog.AddSound(snd) + snd.ID = tokens[1] + snd.shandle = GetSoundEx(RemoveQuotes(tokens[2]), 1, SF_3D) + snd = NULL + goto next + } + + if(tokens[0] == "USING") + { + uinfo = new UsingInfo + tline.AddUsingInfo(uinfo) + uinfo.elm = prog.GetElementPtr(tokens[1]) + uinfo = NULL + goto next + } + + if(tokens[0] == "TIMELINE") + { + elm = NULL + Commands = false + tline = new DTLine + prog.AddTimeline(tline) + tline.ID = tokens[1] + + if(tokens[2] == "OFF") + tline.flags |= DSP_LINESTARTOFF + + goto next + } + + if(tokens[0] == "COMMANDS") + { + elm = NULL + Commands = true + action = NULL + goto next + } + + if(tokens[0] == "ACTION") + { + elm = NULL + Commands = false + action = new DispAction + prog.AddAction(action) + action.ID = tokens[1] + goto next + } + + if(action) + { + cmd = new DCommand + action.AddCommand(cmd) + cmd.time = -1 //podla toho spozname statecommand + + for(k = 0; k < NumTokens; k++) + cmd.command += tokens[k] + " " + + goto next + } + + if(Commands) + { + cmd = new DCommand + tline.AddCommand(cmd) + cmd.time = atof(tokens[0]) + + if(tokens[1] != "JUMP") + tline.flags |= DSP_LINEUPDATEALLWAYS //iny command nez JUMP znamena ze v displeji musi bezat OnFrame event koli korektnym casom (zvuky a pod) + + for(k = 1; k < NumTokens; k++) + cmd.command += tokens[k] + " " + + goto next + } + + if(tokens[0] == "KEYS") + { + Commands = false + uinfo = tline.GetUsingInfoPtr(tokens[1]) + goto next + } + + if(uinfo) //riadok ktory definuje kluce + { + if(uinfo.elm.type == DSP_TYPE_BITMAP) + { + MaxKeys = 6 //kolko to ma klucov + InterpOff = 7 //token s tymto indexom je inerpolacia pre xpos + } + + if(uinfo.elm.type == DSP_TYPE_FONT) + { + MaxKeys = 7 + InterpOff = 8 + } + + float ActTime = atof(tokens[0]) + + if(ActTime > tline.FullTime) + tline.FullTime = ActTime + + + for(k = 0; k < MaxKeys; k++) + { + if(tokens[k + 1] != ".") //token1. ma sa vytvorit nejaky kluc + { + VarName = ValFormat[uinfo.elm.type][k] + + if(VarName == "text") + Key = new DElmKeyString + else + Key = new DElmKeyFloat + + KeyLastDefined = uinfo.AddKey(Key, VarName) + Key.time = ActTime + Key.interp = ConvertInterpType(tokens[k + InterpOff]) + + if(tokens[k + 1] == "x") //ma to byt kopia posledneho + { + if(KeyLastDefined) + { + if(VarName == "text") + { + KeyString = KeyLastDefined + string sv = KeyString.sval + KeyString = Key + KeyString.sval = sv + } + else + Key.fval = KeyLastDefined.fval + } + } + else + { + if(VarName == "text") + { + KeyString = Key + KeyString.sval = tokens[k + 1] + } + else + Key.fval = atof(tokens[k + 1]) + } + } + } + goto next + } +next: + NumTokens = ParseLine(tp, n++, tokens) + } + + EndParse(tp) + return prog + } + +//------------------------------------------------------------------ + void ~DisplayCollection() + { + DispProgram prg = FirstProgram + DispProgram tmp + + while(prg) + { + tmp = prg + prg = prg.NextProgram + delete tmp + } + } +} + +//================================================================================= +class DWidgetStorage extends _serializable +{ + DWidgetStorage NextWStorage + widget wdg + DElm DefElm + float CurXpos, CurYpos, CurWidth, CurHeight + string CurString + + void ~DWidgetStorage() + { + if(wdg) + { + DestroyWidget(wdg) + wdg = NULL + } + } +} + +//================================================================================= +class DWidgetContainer extends _serializable //pre ucely ked z inej entity pridavame do displeja widgety. aby sa mazali predtym nez sa zmaze hlavny parent widget +{ + DWidgetContainer next + widget wdg + + void ~DWidgetContainer() + { + if(wdg) + { + DestroyWidget(wdg) + wdg = NULL + } + } +} + +//================================================================================= +class DElmHelp extends _serializable +{ + DWidgetStorage storage + UsingInfo DefInfo //pointer na definiciu elementu + DElmHelp NextElmHelp + DElmKeyFloat CurXposKey + DElmKeyFloat CurYposKey + DElmKeyFloat CurWidthKey + DElmKeyFloat CurHeightKey + DElmKeyFloat CurAngleKey + DElmKeyFloat CurOpacityKey + DElmKeyString CurTextKey + bool visible +} + +//================================================================================= +class DTLineHelp extends _serializable +{ + DTLineHelp NextLineHelp + DElmHelp FirstElmHelp + DTLine DefLine //pointer na definiciu + DCommand ActCommand + float CurTime + int status + int flags +} + +const int DSP_STOP = 0 +const int DSP_PLAY = 1 + +float DisplaySkip + +//================================================================== +class func_display extends ExtClass +{ + int flags + string program + DispProgram prg + widget CanvasWdg + bool OnScreen + int status + DTLineHelp FirstTLineHelp + DWidgetStorage FirstWStorage + DWidgetContainer FirstExternWidget //ked mame display a pridavame k nemu z nejakej inej entity widget + int LastUpdateFrame + int LastUpdatedFrame + + float skipcount + float skiptime + +//------------------------------------------------------------------ + void M_Enable(ExtClass other) + { + flags &= -1 ^ 1 + } + +//------------------------------------------------------------------ + void M_Disable(ExtClass other) + { + flags |= 1 + } + +//------------------------------------------------------------------ + void AddWidgetStorage(DWidgetStorage wid) + { + wid.NextWStorage = FirstWStorage + FirstWStorage = wid + } + +//------------------------------------------------------------------ + void AddExternWidget(widget wdg) + { + DWidgetContainer cont = new DWidgetContainer + cont.wdg = wdg + cont.next = FirstExternWidget + FirstExternWidget = cont + } + +//------------------------------------------------------------------ + DWidgetStorage GetWidgetStorage(string ID) + { + for(DWidgetStorage st = FirstWStorage; st != NULL; st = st.NextWStorage) + { + if(st.DefElm.ID == ID) + return st + } + return NULL + } + +//------------------------------------------------------------------ + DElmHelp GetTimeLineHelpPtr(string id) + { + DTLineHelp TlineHlp = FirstTLineHelp + + while(TlineHlp) + { + if(TlineHlp.DefLine.ID == id) + return TlineHlp + + TlineHlp = TlineHlp.NextLineHelp + } + return NULL + } + +//------------------------------------------------------------------ + DElmHelp GetElementHelpPtr(string id) + { + DTLineHelp TlineHlp = FirstTLineHelp + + while(TlineHlp) + { + DElmHelp ElmHelp = TlineHlp.FirstElmHelp + + while(ElmHelp) + { + if(ElmHelp.storage.DefElm.ID == id) + return ElmHelp + + ElmHelp = ElmHelp.NextElmHelp + } + + TlineHlp = TlineHlp.NextLineHelp + } + return NULL + } + +//------------------------------------------------------------------ + void SetTimeLinePos(DTLineHelp TlineHlp, float Time, bool WriteToWigets) + { + TlineHlp.CurTime = Time + TlineHlp.ActCommand = TlineHlp.DefLine.FirstCommand + DCommand cmd = TlineHlp.DefLine.FirstCommand + + while(cmd) //nastavime ActCommand na najblizsi ktory je na rade + { + if(cmd.time >= Time) + { + TlineHlp.ActCommand = cmd + break + } + cmd = cmd.NextCommand + } + + UsingInfo inf + DElmHelp ElmHelp = TlineHlp.FirstElmHelp + DElmKey key + + while(ElmHelp) + { + inf = ElmHelp.DefInfo + + key = inf.FirstXposKey + ElmHelp.CurXposKey = key + while(key && key.time <= Time) + { + ElmHelp.CurXposKey = key + key = key.NextKey + } + + key = inf.FirstYposKey + ElmHelp.CurYposKey = key + while(key && key.time <= Time) + { + ElmHelp.CurYposKey = key + key = key.NextKey + } + + key = inf.FirstWidthKey + ElmHelp.CurWidthKey = key + while(key && key.time <= Time) + { + ElmHelp.CurWidthKey = key + key = key.NextKey + } + + key = inf.FirstHeightKey + ElmHelp.CurHeightKey = key + while(key && key.time <= Time) + { + ElmHelp.CurHeightKey = key + key = key.NextKey + } + + key = inf.FirstAngleKey + ElmHelp.CurAngleKey = key + while(key && key.time <= Time) + { + ElmHelp.CurAngleKey = key + key = key.NextKey + } + + key = inf.FirstOpacityKey + ElmHelp.CurOpacityKey = key + while(key && key.time <= Time) + { + ElmHelp.CurOpacityKey = key + key = key.NextKey + } + + key = inf.FirstTextKey + ElmHelp.CurTextKey = key + while(key && key.time <= Time) + { + ElmHelp.CurTextKey = key + key = key.NextKey + } + +//---------------- nastavime hodnoty klucov do widgetov --------------------- + if(WriteToWigets) + { + ShowWidget(ElmHelp.storage.wdg, ElmHelp.visible) //musime updatovat viditelnost + + if(ElmHelp.CurTextKey) //nemusi mat ani prvy kluc + { + DElmKeyString StrKey = ElmHelp.CurTextKey + ElmHelp.storage.CurString = StrKey.sval + SetWidgetTextEx(ElmHelp.storage.wdg, 0, 1, "#" + StrKey.sval) + } + + if(ElmHelp.CurXposKey && ElmHelp.CurYposKey && ElmHelp.CurWidthKey && ElmHelp.CurHeightKey) //prve kluce pozicii a rozmerov su v postate povinne aby to malo ine rozmery nez nulove + { + float offsetx = fabs(ElmHelp.storage.CurWidth) * inf.elm.OriginX + float offsety = fabs(ElmHelp.storage.CurHeight) * inf.elm.OriginY + ElmHelp.storage.CurXpos = ElmHelp.CurXposKey.fval + ElmHelp.storage.CurYpos = ElmHelp.CurYposKey.fval + ElmHelp.storage.CurWidth = ElmHelp.CurWidthKey.fval + ElmHelp.storage.CurHeight = ElmHelp.CurHeightKey.fval + SetWidgetPos(ElmHelp.storage.wdg, ElmHelp.storage.CurXpos - offsetx, ElmHelp.storage.CurYpos - offsety, ElmHelp.storage.CurWidth, ElmHelp.storage.CurHeight) // a konecne aplikujeme interpolovane hodnoty + } + + if(ElmHelp.CurOpacityKey) + { + int col = inf.elm.color + col |= (int)ElmHelp.CurOpacityKey.fval << 24 + + if(inf.elm.type == DSP_TYPE_FONT) //u textovych widgetov menime farbu textu a u zbytku farbu pozadia + SetWidgetTextColor(ElmHelp.storage.wdg, col) + else + SetWidgetColor(ElmHelp.storage.wdg, col) + } + + if(ElmHelp.CurAngleKey) + { + float UVs[8] + GetRotatedSpriteUVs(UVs, ElmHelp.CurAngleKey.fval) + SetWidgetUV(ElmHelp.storage.wdg, UVs) + } + } + + ElmHelp = ElmHelp.NextElmHelp + } + } + +//------------------------------------------------------------------ + void ResetToStartPos() + { + DTLineHelp TlineHlp = FirstTLineHelp + + while(TlineHlp) + { + bool UpdateWidgetsUsingTimeline = false + + if(!TlineHlp.DefLine.flags & DSP_LINESTARTOFF) //moze byt na zaciatku vypnuta + { + TlineHlp.status = 1 + UpdateWidgetsUsingTimeline = true + } + + SetTimeLinePos(TlineHlp, 0, UpdateWidgetsUsingTimeline) + + DElmHelp ElmHlp = TlineHlp.FirstElmHelp + while(ElmHlp) + { + if(ElmHlp.DefInfo.elm.type == DSP_TYPE_VIDEO) + { + PlayVideo(ElmHlp.storage.wdg, VP_PLAY) + PlayVideo(ElmHlp.storage.wdg, VP_REPEAT) + } + ElmHlp = ElmHlp.NextElmHelp + } + TlineHlp = TlineHlp.NextLineHelp + } + } + +//------------------------------------------------------------------ + void OnStopProgram() + { + DTLineHelp TlineHlp = FirstTLineHelp + + while(TlineHlp) + { + SetTimeLinePos(TlineHlp, 0, false) + + DElmHelp ElmHlp = TlineHlp.FirstElmHelp + while(ElmHlp) + { + if(ElmHlp.DefInfo.elm.type == DSP_TYPE_VIDEO) + PlayVideo(ElmHlp.storage.wdg, VP_STOP) + + ElmHlp = ElmHlp.NextElmHelp + } + TlineHlp = TlineHlp.NextLineHelp + } + } + +//------------------------------------------------------------------ + bool NeedAnyTimelineUpdateAllways() + { + DTLineHelp TlineHlp = FirstTLineHelp + bool NeedUpdateAllways = false + + while(TlineHlp) + { + if(TlineHlp.DefLine.flags & DSP_LINEUPDATEALLWAYS && TlineHlp.status != 0) //ma sa updatovat vzdy pretoze je aktivna a ma nejake commandy okrem jumpu + { + NeedUpdateAllways = true + break + } + + TlineHlp = TlineHlp.NextLineHelp + } + return NeedUpdateAllways + } + +//------------------------------------------------------------------ + void M_Play(ExtClass other) + { + if(!prg) + return + + status = DSP_PLAY + + if(NeedAnyTimelineUpdateAllways() == true) //optimalizujeme. neupdatujeme cas z OnFrame ale iba z OnVisible ked v displeji nebezi nic doleziteho co musi prebiehat v spravnom case + SetEventMask(this, EV_FRAME) + else + ClearEventMask(this, EV_FRAME) + + SetEventMask(this, EV_VISIBLE) + ResetToStartPos() + } + +//------------------------------------------------------------------ + void M_Stop(ExtClass other) + { + if(!prg) + return + + status = DSP_STOP + ClearEventMask(this, EV_FRAME|EV_VISIBLE) + OnStopProgram() + } + +//------------------------------------------------------------------ + void SetProgram() + { + if(!prg) + { + DPrint("Error loading program " + program + " to entity " + _name) + return + } + + skiptime = 1 / prg.fps + int AddFlags = 0 + + if(!CanvasWdg) //hlavny widget + { + int WdgType = WTYPE_RTTEXTURE + int WdgXpos = 0 + int WdgYpos = 0 + + if(OnScreen == true) //na obrazovku + { + WdgType = WTYPE_IMAGE + + if(ClassName(Owner) == "viewer") + { + WdgXpos = g_iWidth - prg.CanvasX / 2 + WdgYpos = g_iHeight - prg.CanvasY / 2 + AddFlags = WF_VISIBLE | WF_EXACTPOS | WF_EXACTSIZE + } + else + AddFlags = WF_VISIBLE + } + else + AddFlags = WF_VISIBLE | WF_EXACTPOS | WF_EXACTSIZE + + CanvasWdg = CreateWidget(WdgType, WdgXpos, WdgYpos, prg.CanvasX, prg.CanvasY, prg.CanvasFlags | AddFlags , 0x00000000, 0) + + if(CanvasWdg && Owner && OnScreen == false) + SetGUIWidget(Owner, 0, CanvasWdg) //!!!!!!!!!!! + } + + DElm elm = prg.FirstElement + DWidgetStorage wid + + while(elm) //vytvorime schranky pre widgety aj s obsahom + { + wid = new DWidgetStorage + wid.DefElm = elm + AddWidgetStorage(wid) + + int wtype + int Font = LargeFont + + if(elm.type == DSP_TYPE_BITMAP) + wtype = WTYPE_IMAGE + + if(elm.type == DSP_TYPE_FONT) + wtype = WTYPE_TEXT + + if(elm.type == DSP_TYPE_VIDEO) + wtype = WTYPE_VIDEO + + widget WParent = NULL + + if(elm.ParentID == "none") + WParent = CanvasWdg + else + { + DWidgetStorage ws = GetWidgetStorage(elm.ParentID) + if(ws) + WParent = ws.wdg + } + + if(!WParent) + WParent = CanvasWdg + + if(OnScreen == false || ClassName(Owner) == "viewer") //je to na entite v surface + AddFlags = WF_EXACTPOS | WF_EXACTSIZE + else //je to na screene + AddFlags = 0 + + wid.wdg = CreateWidgetEx(WParent, wtype, 20, 20, 256, 256, elm.wflags | AddFlags , elm.color | 0xff000000, elm.Sort) + + if(wid.wdg) + { + if(elm.path) + LoadWidgetImage(wid.wdg, 0, elm.path) + + if(elm.type == DSP_TYPE_FONT) + { + if(elm.font == 1) + Font = LargeFont + else + { + if(elm.font == 2) + Font = MainFont + else + Font = SmallFont + } + + SetFont(wid.wdg, Font) + SetWidgetTextEx(wid.wdg, 0, 1, "") + } + +/* if(elm.wflags == WF_CUSTOMUV) + { + float UVs[8] + GetRotatedSpriteUVs(UVs, 0) + SetWidgetUV(wid.wdg, UVs) + }*/ + } + elm = elm.NextElement + } + + DTLine tline = prg.FirstTLine + DTLineHelp tlineHlp = NULL + DTLineHelp TLineH = NULL + + while(tline) //vytvorime pomocne instancie k definovanym timelajnam + { + tlineHlp = new DTLineHelp + tlineHlp.DefLine = tline //hned si ulozime definiciu ktora k tomu patri + + if(TLineH) + TLineH.NextLineHelp = tlineHlp + + if(!FirstTLineHelp) + FirstTLineHelp = tlineHlp + + UsingInfo uinfo = tline.FirstUsingInfo + DElmHelp elmHlp = NULL + DElmHelp ElmH = NULL + DWidgetStorage st + + while(uinfo) //pomocne instancie k elementom + { + elmHlp = new DElmHelp + elmHlp.storage = GetWidgetStorage(uinfo.elm.ID) //hned si ulozime definiciu ktora k tomu patri + elmHlp.DefInfo = uinfo + elmHlp.visible = true + + if(ElmH) + ElmH.NextElmHelp = elmHlp + + if(!tlineHlp.FirstElmHelp) + tlineHlp.FirstElmHelp = elmHlp + + ElmH = elmHlp + uinfo = uinfo.NextUsingInfo + } + + TLineH = tlineHlp + tline = tline.NextTLine + } + } + +//------------------------------------------------------------------ + void RemoveProgram() + { + DTLineHelp tlineHlp = FirstTLineHelp + DTLineHelp tmp + + DElmHelp ElmHlp + DElmHelp etmp + + while(tlineHlp) + { + tmp = tlineHlp + + ElmHlp = tmp.FirstElmHelp + etmp = NULL + + while(ElmHlp) + { + etmp = ElmHlp + ElmHlp = ElmHlp.NextElmHelp + delete etmp + } + + tlineHlp = tlineHlp.NextLineHelp + delete tmp + } + + FirstTLineHelp = NULL + prg = NULL + } + +//------------------------------------------------------------------ + void ShowTimeLine(DTLineHelp TlineHlp, bool vis) + { + DElmHelp ElmHelp = TlineHlp.FirstElmHelp + + while(ElmHelp) + { + ElmHelp.visible = vis + ShowWidget(ElmHelp.storage.wdg, vis) + ElmHelp = ElmHelp.NextElmHelp + } + } + +//------------------------------------------------------------------ + void M_SetProgram(ExtClass other) + { + M_Stop(this) + RemoveProgram() + program = other._value + prg = World.DispColPtr.LoadProgram(program) + SetProgram() + M_Play(this) + } + +//------------------------------------------------------------------ + void RealizeCommand(DTLineHelp TlineHlp, DCommand cmd) + { + string tokens[8] + int nump = ParseString(cmd.command, tokens) + float ftmp = 0 + DTLineHelp TargLine + string first = tokens[0] + + if(first == "JUMP") + { + if(TlineHlp.status == 2) //hack. vynechavame JUMP aby to na konci skoncilo + return + + if(nump == 2) + ftmp = atof(tokens[1]) + + SetTimeLinePos(TlineHlp, ftmp, false) + TlineHlp.status = 1 + return + } + + if(first == "SND") + { + DSound snd = prg.FirstSound + while(snd) + { + if(snd.ID == tokens[1]) + { + MinClass Own = Owner + + if(!Own) + Own = this + + if(snd.shandle) + { +#ifdef EDITOR + if(!World.EditorActive) //ked editujeme tak su zvuky neziaduce. +#endif + PlaySound(Own, snd.shandle, SF_ONCE) + } + return + } + snd = snd.NextSound + } + return + } + + if(first == "STATUS") + { + if(atoi(tokens[1]) > 0) + ActionNum = 1 + else + ActionNum = 0 + + return + } + + if(first == "TLINE") + { + DTLineHelp line = GetTimeLineHelpPtr(tokens[1]) + + if(line) + { + if(tokens[2] == "START") + { + SetTimeLinePos(line, 0, true) + line.status = 1 + } + + if(tokens[2] == "STOP") + { + if(line.status != 0) + SetTimeLinePos(line, line.CurTime, true) //okamzite musime do widget ktore pouziva vrazit aktualny stav pretoze dalsie timelajny uz potom mozu s tymi widgetami nieco robit a neskor by sme neboli schopni rozpoznat ktory widget ma mat jake parametre + + line.status = 0 + } + + if(tokens[2] == "ENDSTOP") + line.status = 2 //tento status je hack na vynechanie posledneho JUMPu + + if(tokens[2] == "JUMP") + SetTimeLinePos(line, atof(tokens[3]), false) + + if(tokens[2] == "HIDE") + ShowTimeLine(line, false) //skryje grafiku ktoru timelajna pouziva + + if(tokens[2] == "SHOW") + ShowTimeLine(line, true) + } + return + } + + if(first == "WIDGET") + { + DElmHelp elm = GetElementHelpPtr(tokens[1]) + + if(elm) + { + if(tokens[2] == "HIDE") + { + ShowWidget(elm.storage.wdg, false) + elm.visible = false + } + + if(tokens[2] == "SHOW") + { + ShowWidget(elm.storage.wdg, true) + elm.visible = true + } + } + return + } + } + +//------------------------------------------------------------------ + void RunAction(string ActionName) + { + if(!prg) + { + string ErrMsg = "Display RunAction error. Missing .dpl file " + program + " ?" + DPrint(ErrMsg) + return + } + + DispAction action = prg.FirstAction + + while(action) + { + if(action.ID == ActionName) + { + DCommand cmd = action.FirstCommand + + while(cmd) + { + RealizeCommand(NULL, cmd) + cmd = cmd.NextCommand + } + break + } + action = action.NextAction + } + + if(NeedAnyTimelineUpdateAllways() == true) //optimalizujeme. neupdatujeme cas z OnFrame ale iba z OnVisible ked v displeji nebezi nic doleziteho co musi prebiehat v spravnom case + SetEventMask(this, EV_FRAME) + else + ClearEventMask(this, EV_FRAME) + + SetEventMask(this, EV_VISIBLE) + } + +//------------------------------------------------------------------ + void M_RunAction(ExtClass other) + { + RunAction(other._value) + } + +//------------------------------------------------------------------ + void RunActionFromIndex(int index) //iba koli vieweru na debug ucely + { + string StateName + int count = 0 + DispAction action = prg.FirstAction + + while(action) + { + if(count == index) + { + DCommand cmd = action.FirstCommand + + while(cmd) + { + RealizeCommand(NULL, cmd) + cmd = cmd.NextCommand + } + return + } + count++ + action = action.NextAction + } + } + +//------------------------------------------------------------------ + float InterpBetwen(DElmKeyFloat CurrentKey, DElmKeyFloat NextKey, float TLineTime) + { + float RateBetwen + float TimeBetwen + float ReativeTime + float ValueOffset + +// if(!NextKey || NextKey.interp <= DSP_INTERP_DIRECTLY) +// return CurrentKey.fval + + float CurrentVal = CurrentKey.fval + float CurrentTime = CurrentKey.time + + TimeBetwen = NextKey.time - CurrentTime + ValueOffset = NextKey.fval - CurrentVal + ReativeTime = TLineTime - CurrentTime //cas ktory prebehol od pozicie na CurrentKey + RateBetwen = ReativeTime / TimeBetwen //percentualna pozicia medzi klucmi + + if(NextKey.interp == DSP_INTERP_SPLINE1) //z pomala do rychla + RateBetwen = RateBetwen * RateBetwen * RateBetwen + else + { + if(NextKey.interp == DSP_INTERP_SPLINE2) //z rychla do pomala + { + float flip = 1 - RateBetwen + RateBetwen = flip * flip * flip + RateBetwen = 1 - RateBetwen + } + else + { + if(NextKey.interp == DSP_INTERP_SPLINE3) //z pomala do rychla, konci pomaly (vysek z sinusovky) + { + RateBetwen = 0.25 + (RateBetwen * 0.5) + RateBetwen = sin(RateBetwen * M_PI2) - 1 + RateBetwen *= -0.5 + } + } + } + + return ValueOffset * RateBetwen + CurrentVal //momentalna hodnota + } + +//------------------------------------------------------------------ + void UpdateElements() + { + if(!r_display) //engine ma zakazany renderovani displays + return + + if(skipcount != 0) + return + + if(g_iViewFrame <= LastUpdateFrame) + return + + LastUpdateFrame = g_iViewFrame + + DTLine tline + DTLineHelp TlineHlp = FirstTLineHelp + float TimeRate + + DElmKeyFloat CurrentKey + DElmKeyFloat NextKey + DElmKeyFloat TempKey + + float angle + float opacity + string text + + while(TlineHlp) //prebehneme vsetky timelajny + { + tline = TlineHlp.DefLine + + if(!TlineHlp.status) //ale iba tie ktore maju bezat + { + TlineHlp = TlineHlp.NextLineHelp + continue + } + + float curtime = TlineHlp.CurTime + + UsingInfo Uinfo + DElmHelp ElmHelp = TlineHlp.FirstElmHelp + DWidgetStorage ElmHelpStorage + + while(ElmHelp) + { + Uinfo = ElmHelp.DefInfo + ElmHelpStorage = ElmHelp.storage +//--- xpos + TempKey = ElmHelp.CurXposKey + while(TempKey && TempKey.time < curtime) //cas mohol ubehnut a medzitym sa elementy neupdatovali takze to musime dobehnut a spravne nastavit current a next + { + ElmHelp.CurXposKey = TempKey + TempKey = TempKey.NextKey + } + + CurrentKey = ElmHelp.CurXposKey //nemusi mat ani prvy kluc! (nema ziadne) + + if(CurrentKey) + { + NextKey = CurrentKey.NextKey //ked nema NextKey tak Current je posledny + ElmHelpStorage.CurXpos = CurrentKey.fval //default z aktualneho + + if(NextKey) + { + if(curtime > NextKey.time) + { + CurrentKey = NextKey + NextKey = CurrentKey.NextKey + ElmHelp.CurXposKey = CurrentKey + ElmHelpStorage.CurXpos = CurrentKey.fval //default z aktualneho + } + if(NextKey && NextKey.interp > DSP_INTERP_DIRECTLY) + ElmHelpStorage.CurXpos = InterpBetwen(CurrentKey, NextKey, curtime) + } + } + +//--- ypos + TempKey = ElmHelp.CurYposKey + while(TempKey && TempKey.time < curtime) + { + ElmHelp.CurYposKey = TempKey + TempKey = TempKey.NextKey + } + + CurrentKey = ElmHelp.CurYposKey //xpos + + if(CurrentKey) + { + NextKey = CurrentKey.NextKey + ElmHelpStorage.CurYpos = CurrentKey.fval //default z aktualneho + + if(NextKey) + { + if(curtime > NextKey.time) + { + CurrentKey = NextKey + NextKey = CurrentKey.NextKey + ElmHelp.CurYposKey = CurrentKey + ElmHelpStorage.CurYpos = CurrentKey.fval //default z aktualneho + } + if(NextKey && NextKey.interp > DSP_INTERP_DIRECTLY) + ElmHelpStorage.CurYpos = InterpBetwen(CurrentKey, NextKey, curtime) + } + } + +//--- width + TempKey = ElmHelp.CurWidthKey + while(TempKey && TempKey.time < curtime) + { + ElmHelp.CurWidthKey = TempKey + TempKey = TempKey.NextKey + } + + CurrentKey = ElmHelp.CurWidthKey //xpos + + if(CurrentKey) + { + NextKey = CurrentKey.NextKey + ElmHelpStorage.CurWidth = CurrentKey.fval //default z aktualneho + + if(NextKey) + { + if(curtime > NextKey.time) + { + CurrentKey = NextKey + NextKey = CurrentKey.NextKey + ElmHelp.CurWidthKey = CurrentKey + ElmHelpStorage.CurWidth = CurrentKey.fval //default z aktualneho + } + if(NextKey && NextKey.interp > DSP_INTERP_DIRECTLY) + ElmHelpStorage.CurWidth = InterpBetwen(CurrentKey, NextKey, curtime) + } + } + +//--- height + TempKey = ElmHelp.CurHeightKey + while(TempKey && TempKey.time < curtime) + { + ElmHelp.CurHeightKey = TempKey + TempKey = TempKey.NextKey + } + + CurrentKey = ElmHelp.CurHeightKey //xpos + + if(CurrentKey) + { + NextKey = CurrentKey.NextKey + ElmHelpStorage.CurHeight = CurrentKey.fval //default z aktualneho + + if(NextKey) + { + if(curtime > NextKey.time) + { + CurrentKey = NextKey + NextKey = CurrentKey.NextKey + ElmHelp.CurHeightKey = CurrentKey + ElmHelpStorage.CurHeight = CurrentKey.fval //default z aktualneho + } + if(NextKey && NextKey.interp > DSP_INTERP_DIRECTLY) + ElmHelpStorage.CurHeight = InterpBetwen(CurrentKey, NextKey, curtime) + } + } + +//--- angle + TempKey = ElmHelp.CurAngleKey + while(TempKey && TempKey.time < curtime) + { + ElmHelp.CurAngleKey = TempKey + TempKey = TempKey.NextKey + } + + CurrentKey = ElmHelp.CurAngleKey + angle = 6666 //defaultne nic nemenime + + if(CurrentKey) + { + angle = CurrentKey.fval + NextKey = CurrentKey.NextKey + + if(NextKey) + { + if(curtime > NextKey.time) + { + CurrentKey = NextKey + NextKey = CurrentKey.NextKey + ElmHelp.CurAngleKey = CurrentKey + angle = CurrentKey.fval //default z aktualneho + } + if(NextKey && NextKey.interp > DSP_INTERP_DIRECTLY) + angle = InterpBetwen(CurrentKey, NextKey, curtime) + } + } + +//--- opacity + TempKey = ElmHelp.CurOpacityKey + while(TempKey && TempKey.time < curtime) + { + ElmHelp.CurOpacityKey = TempKey + TempKey = TempKey.NextKey + } + + CurrentKey = ElmHelp.CurOpacityKey + opacity = 6666 //defaultne nic nemenime + + if(CurrentKey) + { + opacity = CurrentKey.fval + NextKey = CurrentKey.NextKey + + if(NextKey) + { + if(curtime > NextKey.time) + { + CurrentKey = NextKey + NextKey = CurrentKey.NextKey + ElmHelp.CurOpacityKey = CurrentKey + opacity = CurrentKey.fval //default z aktualneho + } + if(NextKey && NextKey.interp > DSP_INTERP_DIRECTLY) + opacity = InterpBetwen(CurrentKey, NextKey, curtime) + } + } + +//--- text + TempKey = ElmHelp.CurTextKey + while(TempKey && TempKey.time < curtime) + { + ElmHelp.CurTextKey = TempKey + TempKey = TempKey.NextKey + } + + CurrentKey = ElmHelp.CurTextKey + + if(CurrentKey) + { + NextKey = CurrentKey.NextKey + + if(NextKey) + { + if(curtime > NextKey.time) + { + CurrentKey = NextKey + NextKey = CurrentKey.NextKey + ElmHelp.CurTextKey = CurrentKey + } + } + DElmKeyString StrKey = CurrentKey + + if(ElmHelpStorage.CurString != StrKey.sval) + { + ElmHelpStorage.CurString = StrKey.sval + SetWidgetTextEx(ElmHelpStorage.wdg, 0, 1, "#" + StrKey.sval) //vzdy z posledneho kluca + } + } + +//--- drawing + float offsetx = fabs(ElmHelpStorage.CurWidth) * Uinfo.elm.OriginX + float offsety = fabs(ElmHelpStorage.CurHeight) * Uinfo.elm.OriginY + + SetWidgetPos(ElmHelpStorage.wdg, ElmHelpStorage.CurXpos - offsetx, ElmHelpStorage.CurYpos - offsety, ElmHelpStorage.CurWidth, ElmHelpStorage.CurHeight) // a konecne aplikujeme interpolovane hodnoty + + if(opacity != 6666) + { +// if(ElmHelp.storage.DefElm.ID == "error") +// Print(opacity) + int col = Uinfo.elm.color + col |= (int)opacity << 24 + + if(Uinfo.elm.type == DSP_TYPE_FONT) //u textovych widgetov menime farbu textu a u zbytku farbu pozadia + SetWidgetTextColor(ElmHelpStorage.wdg, col) + else + SetWidgetColor(ElmHelpStorage.wdg, col) + } + + if(angle != 6666) + { + float UVs[8] + GetRotatedSpriteUVs(UVs, angle) + SetWidgetUV(ElmHelpStorage.wdg, UVs) + } + + ShowWidget(ElmHelpStorage.wdg, ElmHelp.visible) + + ElmHelp = ElmHelp.NextElmHelp + } + + TlineHlp = TlineHlp.NextLineHelp + } + } + +//------------------------------------------------------------------ + void UpdateTime() //updatuje sa kazdy frame aby casy timelajn bezali vzdy + { + if(!r_display) //engine ma zakazany renderovani displays + return + + LastUpdatedFrame = World.ActualFrame + + float VirtFtime + skipcount += ftime + + if(skipcount >= skiptime) + { + VirtFtime = skipcount + skipcount = 0 + } + else + return + + DTLine tline + DTLineHelp TlineHlp = FirstTLineHelp + + while(TlineHlp) //prebehneme vsetky timelajny + { + tline = TlineHlp.DefLine + + if(!TlineHlp.status) //ale iba tie ktore maju bezat + { + TlineHlp = TlineHlp.NextLineHelp + continue + } + + float step = 100 * VirtFtime + TlineHlp.CurTime + float curtime = step + TlineHlp.CurTime = curtime + + UsingInfo Uinfo + DElmHelp ElmHelp = TlineHlp.FirstElmHelp + + if(TlineHlp.CurTime >= tline.FullTime) + { + if(TlineHlp.status != 2) //2 = ignorujeme pripadny jump v RealizeCommand + TlineHlp.status = 0 //deaktivujeme timelajnu. pokial je na konci command repeat tak to moze znova zapnut! + } + + while(TlineHlp.ActCommand && TlineHlp.CurTime >= TlineHlp.ActCommand.time) //ak su vobec pouzite commandy a niesme na konci + { + DCommand CurCmd = TlineHlp.ActCommand + TlineHlp.ActCommand = TlineHlp.ActCommand.NextCommand //prepneme na dalsi. musi to byt pre realize pretoze ten to pravdepodobne zase zmeni + RealizeCommand(TlineHlp, CurCmd) + } + + if(TlineHlp.CurTime >= tline.FullTime) + { + if(TlineHlp.status != 1) //timelajna tu konci takze okamzite musime do widget ktore pouziva vrazit aktualny stav pretoze dalsie timelajny uz potom mozu s tymi widgetami nieco robit a neskor by sme neboli schopni rozpoznat ktory widget ma mat jake parametre + SetTimeLinePos(TlineHlp, tline.FullTime, true) + + if(TlineHlp.status == 2) //koniec hacku na vynechanie JUMPu + TlineHlp.status = 0 + } + + TlineHlp = TlineHlp.NextLineHelp + } + + TlineHlp = FirstTLineHelp + int NumActiveTimeLines = 0 //pokial ziadna timelajna nebezi tak to stopneme + + while(TlineHlp) + { + if(TlineHlp.status > 0) + NumActiveTimeLines++ + + TlineHlp = TlineHlp.NextLineHelp + } + + if(NumActiveTimeLines == 0) + M_Stop(this) + } + +//------------------------------------------------------------------ + int EOnVisible(MinClass other, int extra) //preposielane z entity ktorej displej patri + { + if(status == DSP_PLAY) //ked je displej stopnuty tak cas v ziadnom pripade neupdatujeme + { + if(LastUpdatedFrame < World.ActualFrame) //funguje optimalizacia kedy cas neupdatujeme z OnFrame ale iba odtial + UpdateTime() + } + + UpdateElements() + return 0 + } + +//------------------------------------------------------------------ + void EOnFrame(MinClass other, int extra) + { + if(LastUpdatedFrame < World.ActualFrame) //aby sa to nahodou nevolalo 2x + UpdateTime() + } + +//----------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(ActionNum != 0) + return ACT_DISABLE + + if(flags & 1) //je disablovany + return ACT_DISABLE + + return ACT_ENABLE + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//------------------------------------------------------------------ + void func_display(ExtClass owner, string ProgramFile, bool OnScr) + { + Owner = owner + program = ProgramFile + OnScreen = OnScr + + if(owner && ClassName(Owner) != "viewer") + { + SetName(owner._name + "_disp") + } + + if(!program) + program = "displays/TestProgram.dpl" + + prg = World.DispColPtr.LoadProgram(program) + + if(!prg) + return + + SetProgram() + M_Play(this) + + //aby se na zacatku displeje trochu rozsynchronizovaly a nebezely v ten samy frame, + //jinak se cela optimalizace s frameskipem projevi jako pravidelne zadrhavani. + skipcount = DisplaySkip + DisplaySkip = DisplaySkip + 0.02 + if(DisplaySkip >= 0.2) + DisplaySkip = 0 + } + +//------------------------------------------------------------------ + void ~func_display() + { + RemoveProgram() + + DWidgetStorage st = FirstWStorage + DWidgetStorage cur + + while(st) + { + cur = st + st = st.NextWStorage + delete cur + } + + DWidgetContainer ew = FirstExternWidget //widgety ktore sme do displeja pridali z inej entity musime zrusit uz teraz + DWidgetContainer CurEw + + while(ew) + { + CurEw = ew + ew = ew.next + delete CurEw + } + + if(CanvasWdg) + { + DestroyWidget(CanvasWdg) + CanvasWdg = NULL + } + } +} + diff --git a/Alpha Prime/Mod/scripts/hud.h b/Alpha Prime/Mod/scripts/hud.h new file mode 100644 index 0000000..d029d0c --- /dev/null +++ b/Alpha Prime/Mod/scripts/hud.h @@ -0,0 +1,1480 @@ + +string RandomHexadecimalText(int lng) +{ + const string hexchars[16] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"} + string str = "" + + for(int n = 0; n < lng; n++) + { + str += hexchars[rand(0, 15)] + } + return str +} + +//----------------------------------------------------------------- +void InitWidgets() +{ + WFlash = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_SOURCEALPHA|WF_ADDITIVE, 0x00ffffff, 10) + + WText = CreateWidget(WTYPE_TEXT, 140, 579, 10, 10, WF_VISIBLE | WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 5) + SetFont(WText, MainFont) + + WDialogText = CreateWidget(WTYPE_TEXT, 50, 500, 700, 100, WF_SOURCEALPHA|WF_BLEND|WF_CENTER|WF_VCENTER, ARGB(255,255,255,255), 15) + SetFont(WDialogText, SmallFont) +} + +//----------------------------------------------------------------- +void CleanupWidgets() +{ + if(WFlash) + { + DestroyWidget(WFlash) + WFlash = NULL + } + + if(WText) + { + DestroyWidget(WText) + WText = NULL + } + + if(WView) + { + DestroyWidget(WView) + WView = NULL + } + + if(WMousePointer) + { + DestroyWidget(WMousePointer) + WMousePointer = NULL + } + + if(WDialogText) + { + DestroyWidget(WDialogText) + WDialogText = NULL + } +} + +//----------------------------------------------------------------- +class PlayerHUD extends _serializable +{ + widget WHumanStat + widget WHealthBar, WHealthBarBack, WHealthBarText, WHealthBarFlash + widget WTimeBar + widget WAmmoBar, WAmmoBarBack, WAmmoBarText + widget WOxygenBar, WOxygenBarBack, WOxygenBarText + widget WThrowBar, WThrowBarBack + widget WeaponList[10] + widget WLightBar, WLightBarBack + widget WHitZones[4] + widget WHackingStrip + widget WHackingModeGrid, WHackingModeGrid2 + widget WHackingModeCross[4] + widget WHackingPreviewView, WHackingPreviewNoise, WHackingPreviewFrame, WHackingPreviewTitle + widget WHackingSignal, WHackingSignalBack, WHackingSignalFlash + + void PlayerHUD() + { + int n + WHumanStat = CreateWidget(WTYPE_IMAGE, 550, 12, 256, 91, WF_SOURCEALPHA|WF_BLEND | WF_NOFILTER, 0x00000000, 1) + LoadWidgetImage(WHumanStat, 0, "gfx/hud_healthbar/healthbar_body.tga") + + //width: 1 to 121 (health 1% to 100%) + WHealthBar = CreateWidget(WTYPE_IMAGE, 17, 565, 200, 18, WF_SOURCEALPHA|WF_BLEND | WF_ADDITIVE, 0x8fffffff, 3) //75% transp + LoadWidgetImage(WHealthBar, 0, "gfx/hud/healthbar.tga") + LoadWidgetImage(WHealthBar, 1, "gfx/hud/healthbar_low.tga") + + WHealthBarFlash = CreateWidget(WTYPE_IMAGE, 17, 565, 200, 18, WF_SOURCEALPHA|WF_ADDITIVE | WF_STRETCH, 0xbfffffff, 2) //75% transp + LoadWidgetImage(WHealthBarFlash, 0, "gfx/hud/healthbar_flash.tga") + LoadWidgetImage(WHealthBarFlash, 1, "gfx/hud/healthbar_low_flash.tga") + // LoadWidgetImage(WHealthBarFlash, 0, "textures/debug_UV.tga") + // LoadWidgetImage(WHealthBarFlash, 1, "textures/debug_UV.tga") + + WOxygenBar = CreateWidget(WTYPE_IMAGE, 17, 490, 100, 16, WF_SOURCEALPHA|WF_BLEND | WF_ADDITIVE, 0xbfffffff, 3) //75% transp + WOxygenBarBack = CreateWidget(WTYPE_IMAGE, 17, 495, 100, 16, WF_SOURCEALPHA|WF_BLEND, 0x3fffffff, 2) //25% transp + WOxygenBarText = CreateWidget(WTYPE_TEXT, 17, 480, 100, 32, WF_SOURCEALPHA|WF_BLEND, ARGB(255,130,255,255), 4) //25% transp + LoadWidgetImage(WOxygenBar, 0, "gfx/hud/oxygenbar.tga") + LoadWidgetImage(WOxygenBarBack, 0, "gfx/hud/oxygenbar.tga") + SetWidgetTextEx(WOxygenBarText, 0, 1, "#OXYGEN") + SetFont(WOxygenBarText, MainFont) + // LoadWidgetImage(WOxygenBar, 0, "gfx/hud/oxygenbar_low.tga") + + WHealthBarBack = CreateWidget(WTYPE_IMAGE, 17, 565, 200, 18, WF_SOURCEALPHA|WF_BLEND, 0x3fffffff, 2) //25% transp + LoadWidgetImage(WHealthBarBack, 0, "gfx/hud/healthbar.tga") + + WHealthBarText = CreateWidget(WTYPE_TEXT, 17, 545, 128, 18, WF_SOURCEALPHA|WF_BLEND, ARGB(255,130,255,255), 3) + SetFont(WHealthBarText, MainFont) + + WTimeBar = CreateWidget(WTYPE_IMAGE, 17, 565, 242, 32, WF_SOURCEALPHA|WF_BLEND | WF_ADDITIVE, 0xbfffffff, 3) //75% transp + LoadWidgetImage(WTimeBar, 0, "gfx/hud/timebar.tga") + LoadWidgetImage(WTimeBar, 1, "gfx/hud/timebar_low.tga") + + WAmmoBar = CreateWidget(WTYPE_IMAGE, 662, 570, 128, 18, WF_SOURCEALPHA|WF_BLEND | WF_ADDITIVE, 0xbfffffff, 3) //75% transp + LoadWidgetImage(WAmmoBar, 1, "gfx/hud/ammobar_gun.tga") + LoadWidgetImage(WAmmoBar, 2, "gfx/hud/ammobar_shotgun.tga") //shotgun + LoadWidgetImage(WAmmoBar, 3, "gfx/hud/ammobar_machinegun.tga") + LoadWidgetImage(WAmmoBar, 4, "gfx/hud/ammobar_pulserifle.tga") + LoadWidgetImage(WAmmoBar, 5, "gfx/hud/ammobar_machinegun.tga") //RocketLauncher + LoadWidgetImage(WAmmoBar, 6, "gfx/hud/ammobar_machinegun.tga") //FlameThrower + LoadWidgetImage(WAmmoBar, 7, "gfx/hud/ammobar_grenade.tga") + + WAmmoBarBack = CreateWidget(WTYPE_IMAGE, 662, 570, 128, 18, WF_SOURCEALPHA|WF_BLEND, 0x3f000000, 2) //25% transp + LoadWidgetImage(WAmmoBarBack, 1, "gfx/hud/ammobar_gun.tga") + LoadWidgetImage(WAmmoBarBack, 2, "gfx/hud/ammobar_shotgun.tga") + LoadWidgetImage(WAmmoBarBack, 3, "gfx/hud/ammobar_machinegun.tga") + LoadWidgetImage(WAmmoBarBack, 4, "gfx/hud/ammobar_pulserifle.tga") + LoadWidgetImage(WAmmoBarBack, 5, "gfx/hud/ammobar_machinegun.tga") //RocketLauncher + LoadWidgetImage(WAmmoBarBack, 6, "gfx/hud/ammobar_machinegun.tga") //FlameThrower + LoadWidgetImage(WAmmoBarBack, 7, "gfx/hud/ammobar_grenade.tga") + + WAmmoBarText = CreateWidget(WTYPE_TEXT, 655, 545, 128, 18, WF_SOURCEALPHA|WF_BLEND|WF_RALIGN, ARGB(255,130,255,255), 3) + SetFont(WAmmoBarText, MainFont) + + WThrowBar = CreateWidget(WTYPE_IMAGE, 360, 350, 4, 28, WF_SOURCEALPHA|WF_BLEND|WF_SOURCEALPHA|WF_FLIPV, 0xbfffffff, 3) + WThrowBarBack = CreateWidget(WTYPE_IMAGE, 360, 350, 80, 28, WF_SOURCEALPHA|WF_BLEND|WF_SOURCEALPHA|WF_FLIPV, 0x3f000000, 2) + LoadWidgetImage(WThrowBar, 0, "gfx/hud/throwbar.tga") + LoadWidgetImage(WThrowBarBack, 0, "gfx/hud/throwbar.tga") + + /* WeaponList[0] = CreateWidget(WTYPE_IMAGE, 662, 570, 128, 20, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 2) + WeaponList[1] = CreateWidget(WTYPE_IMAGE, 662, 570, 128, 20, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 2) + LoadWidgetImage(WeaponList[0], 0, "gfx/hud/slot_gun.tga") + LoadWidgetImage(WeaponList[1], 0, "gfx/hud/slot_machinegun.tga")*/ + + for(n = 0; n < MaxAvailableWeapons; n++) + { + WeaponList[n] = CreateWidget(WTYPE_IMAGE, 662, 570, 128, 20, WF_SOURCEALPHA|WF_BLEND | WF_NOWRAP, 0xffffffff, 2) + // LoadWidgetImage(WeaponList[n], 0, "gfx/hud/slot_empty.tga") + } + LoadWidgetImage(WeaponList[0], 0, "gfx/hud/slot_jackhammer.tga") + LoadWidgetImage(WeaponList[1], 0, "gfx/hud/slot_gun.tga") + LoadWidgetImage(WeaponList[2], 0, "gfx/hud/slot_shotgun.tga") + LoadWidgetImage(WeaponList[3], 0, "gfx/hud/slot_machinegun.tga") + LoadWidgetImage(WeaponList[4], 0, "gfx/hud/slot_pulserifle.tga") + LoadWidgetImage(WeaponList[5], 0, "gfx/hud/slot_disruptor.tga") //RocketLauncher + LoadWidgetImage(WeaponList[6], 0, "gfx/hud/slot_flamethrower.tga") //FlameThrower + LoadWidgetImage(WeaponList[7], 0, "gfx/hud/slot_grenade.tga") + + WLightBarBack = CreateWidget(WTYPE_IMAGE, 745, 45, 38, 20, WF_SOURCEALPHA|WF_BLEND, 0x3f000000, 2) + LoadWidgetImage(WLightBarBack, 0, "gfx/hud/lightbar.tga") + WLightBar = CreateWidgetEx(WLightBarBack, WTYPE_IMAGE, 745, 17, 38, 20, WF_SOURCEALPHA|WF_BLEND | WF_ADDITIVE, 0xffffffff, 3) + LoadWidgetImage(WLightBar, 0, "gfx/hud/lightbar.tga") + + WHitZones[0] = CreateWidget(WTYPE_IMAGE, 0, 0, 64, 600, WF_SOURCEALPHA|WF_BLEND|WF_STRETCH|WF_ADDITIVE, 0xffffffff, 2) + LoadWidgetImage(WHitZones[0], 0, "gfx/hud/pain_left.tga") + + WHitZones[1] = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 64, WF_SOURCEALPHA|WF_BLEND|WF_STRETCH|WF_ADDITIVE, 0xffffffff, 2) + LoadWidgetImage(WHitZones[1], 0, "gfx/hud/pain_top.tga") + + WHitZones[2] = CreateWidget(WTYPE_IMAGE, 736, 0, 64, 600, WF_SOURCEALPHA|WF_BLEND|WF_STRETCH|WF_FLIPU|WF_ADDITIVE, 0xffffffff, 2) + LoadWidgetImage(WHitZones[2], 0, "gfx/hud/pain_left.tga") + + WHitZones[3] = CreateWidget(WTYPE_IMAGE, 0, 536, 800, 64, WF_SOURCEALPHA|WF_BLEND|WF_STRETCH|WF_FLIPV|WF_ADDITIVE, 0xffffffff, 2) + LoadWidgetImage(WHitZones[3], 0, "gfx/hud/pain_top.tga") + + WHackingStrip = CreateWidget(WTYPE_IMAGE, 0, 0, 256, 600, WF_SOURCEALPHA|WF_BLEND|WF_STRETCH|WF_ADDITIVE, 0xffffffff, 4) + LoadWidgetImage(WHackingStrip, 0, "gfx/remotecontrol/radar_grad1.tga") + + WHackingModeGrid = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_SOURCEALPHA/*|WF_NOFILTER|WF_EXACTPOS|WF_EXACTSIZE|WF_ADDITIVE*/|WF_BLEND, 0xffffffff/*0x1effffff*/, 1) //12 % transp + LoadWidgetImage(WHackingModeGrid, 0, "gfx/remotecontrol/radar_grid.tga") + + WHackingModeGrid2 = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 15) //12 % transp + LoadWidgetImage(WHackingModeGrid2, 0, "gfx/remotecontrol/radar_grid.tga") + + WHackingModeCross[0] = CreateWidget(WTYPE_IMAGE, 0, 0, 1024, 32, WF_SOURCEALPHA|WF_ADDITIVE, 0x1effffff, 9) + WHackingModeCross[1] = CreateWidget(WTYPE_IMAGE, 0, 0, 1024, 32, WF_SOURCEALPHA|WF_FLIPU|WF_ADDITIVE, 0x1effffff, 9) + WHackingModeCross[2] = CreateWidget(WTYPE_IMAGE, 0, 0, 32, 1024, WF_SOURCEALPHA|WF_ADDITIVE, 0x1effffff, 9) + WHackingModeCross[3] = CreateWidget(WTYPE_IMAGE, 0, 0, 32, 1024, WF_SOURCEALPHA|WF_FLIPV|WF_ADDITIVE, 0x1effffff, 9) + LoadWidgetImage(WHackingModeCross[0], 0, "gfx/remotecontrol/cross_h.tga") + LoadWidgetImage(WHackingModeCross[1], 0, "gfx/remotecontrol/cross_h.tga") + LoadWidgetImage(WHackingModeCross[2], 0, "gfx/remotecontrol/cross_v.tga") + LoadWidgetImage(WHackingModeCross[3], 0, "gfx/remotecontrol/cross_v.tga") + + WHackingPreviewView = CreateWidget(WTYPE_VIEW, 17, 60, 160, 120, 0, 0, 11) + WHackingPreviewNoise = CreateWidget(WTYPE_IMAGE, 0, 0, 320, 240, WF_ADDITIVE|WF_CUSTOMUV, ARGB(255,136,241,254), 12) + LoadWidgetImage(WHackingPreviewNoise, 0, "gfx/remotecontrol/noise.tga") + WHackingPreviewFrame = CreateWidget(WTYPE_IMAGE, 10, 17, 280, 220, WF_SOURCEALPHA|WF_BLEND|WF_STRETCH, 0xffffffff, 10) + LoadWidgetImage(WHackingPreviewFrame, 0, "gfx/remotecontrol/frame1.tga") + WHackingPreviewTitle = CreateWidget(WTYPE_TEXT, 18, 17, 270, 20, WF_SOURCEALPHA|WF_ADDITIVE|WF_NOFILTER, ARGB(255,130,255,255), 16) + LoadWidgetImage(WHackingPreviewTitle, 0, "gfx/remotecontrol/titlegrad.tga") + SetFont(WHackingPreviewTitle, MainFont) + SetWidgetTextOffset(WHackingPreviewTitle, 4, 1) + SetWidgetTextColor(WHackingPreviewTitle, 0xff000000) + SetWidgetColor(WHackingPreviewTitle, 0xffffffff) + + WHackingSignal = CreateWidget(WTYPE_IMAGE, 756, 17, 32, 32, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 10) + WHackingSignalBack = CreateWidget(WTYPE_IMAGE, 756, 17, 32, 32, WF_SOURCEALPHA|WF_BLEND, 0x3fffffff, 9) + LoadWidgetImage(WHackingSignal, 0, "gfx/remotecontrol/signal.tga") + LoadWidgetImage(WHackingSignalBack, 0, "gfx/remotecontrol/signal.tga") + + WHackingSignalFlash = CreateWidget(WTYPE_IMAGE, 710, -28, 120, 120, WF_SOURCEALPHA|WF_BLEND | WF_ADDITIVE | WF_STRETCH, 0x00ffffff, 11) //75% transp + LoadWidgetImage(WHackingSignalFlash, 0, "gfx/remotecontrol/signal_flash.tga") + } + +//----------------------------------------------------------------- + void ~PlayerHUD() + { + if(WHumanStat) + { + DestroyWidget(WHumanStat) + WHumanStat = NULL + } + + if(WHealthBar) + { + DestroyWidget(WHealthBar) + WHealthBar = NULL + } + + if(WHealthBarFlash) + { + DestroyWidget(WHealthBarFlash) + WHealthBarFlash = NULL + } + + if(WHealthBarBack) + { + DestroyWidget(WHealthBarBack) + WHealthBarBack = NULL + } + + if(WHealthBarText) + { + DestroyWidget(WHealthBarText) + WHealthBarText = NULL + } + + if(WTimeBar) + { + DestroyWidget(WTimeBar) + WTimeBar = NULL + } + + if(WLightBar) + { + DestroyWidget(WLightBar) + WLightBar = NULL + } + + if(WLightBarBack) + { + DestroyWidget(WLightBarBack) + WLightBarBack = NULL + } + + if(WAmmoBar) + { + DestroyWidget(WAmmoBar) + WAmmoBar = NULL + } + + if(WAmmoBarBack) + { + DestroyWidget(WAmmoBarBack) + WAmmoBarBack = NULL + } + + if(WAmmoBarText) + { + DestroyWidget(WAmmoBarText) + WAmmoBarText = NULL + } + + if(WThrowBar) + { + DestroyWidget(WThrowBar) + WThrowBar = NULL + } + + if(WThrowBarBack) + { + DestroyWidget(WThrowBarBack) + WThrowBarBack = NULL + } + + if(WHackingModeGrid) + { + DestroyWidget(WHackingModeGrid) + WHackingModeGrid = NULL + } + + if(WHackingModeGrid2) + { + DestroyWidget(WHackingModeGrid2) + WHackingModeGrid2 = NULL + } + + if(WHackingStrip) + { + DestroyWidget(WHackingStrip) + WHackingStrip = NULL + } + + if(WOxygenBar) + { + DestroyWidget(WOxygenBar) + WOxygenBar = NULL + } + + if(WOxygenBarBack) + { + DestroyWidget(WOxygenBarBack) + WOxygenBarBack = NULL + } + + if(WOxygenBarText) + { + DestroyWidget(WOxygenBarText) + WOxygenBarText = NULL + } + + if(WHackingPreviewView) + { + DestroyWidget(WHackingPreviewView) + WHackingPreviewView = NULL + } + + if(WHackingPreviewNoise) + { + DestroyWidget(WHackingPreviewNoise) + WHackingPreviewNoise = NULL + } + + if(WHackingPreviewFrame) + { + DestroyWidget(WHackingPreviewFrame) + WHackingPreviewFrame = NULL + } + + if(WHackingPreviewTitle) + { + DestroyWidget(WHackingPreviewTitle) + WHackingPreviewTitle = NULL + } + + if(WHackingSignal) + { + DestroyWidget(WHackingSignal) + WHackingSignal = NULL + } + + if(WHackingSignalBack) + { + DestroyWidget(WHackingSignalBack) + WHackingSignalBack = NULL + } + + if(WHackingSignalFlash) + { + DestroyWidget(WHackingSignalFlash) + WHackingSignalFlash = NULL + } + + int n + for(n = 0; n < sizeof(WHackingModeCross); n++) + { + if(WHackingModeCross[n]) + { + DestroyWidget(WHackingModeCross[n]) + WHackingModeCross[n] = NULL + } + } + + for(n = 0; n < sizeof(WeaponList); n++) + { + if(WeaponList[n]) + { + DestroyWidget(WeaponList[n]) + WeaponList[n] = NULL + } + } + + for(n = 0; n < sizeof(WHitZones); n++) + { + if(WHitZones[n]) + { + DestroyWidget(WHitZones[n]) + WHitZones[n] = NULL + } + } + } +} + +//----------------------------------------------------------------- +int GetSayCharacterImageIndex(string SayCharacter) +{ + strlower(SayCharacter) + + if(SayCharacter == "livie") + return 0 + + if(SayCharacter == "warren") + return 1 + + if(SayCharacter == "computer") + return 2 + + if(SayCharacter == "arnold") + return 3 + + if(SayCharacter == "faggioli") + return 4 + + if(SayCharacter == "bruce") + return 5 + + if(SayCharacter == "olivier") + return 6 + + if(SayCharacter == "tutorial") //v tutoriali to sice nepotrebujeme ale nech sa nerobia vynimky + return 2 + + return -1 +} + +class SizablePanel extends _serializable +{ + int left, top, width, height + int TopFrameHeight + int TextFrameHeight + int BottomFrameHeight + widget TopFrame + widget TextFrame + widget BottomFrame + +//----------------------------------------------------------------- + void Update() + { + SetWidgetPos(TopFrame, left, top, width, TopFrameHeight) + SetWidgetPos(TextFrame, left, top + TopFrameHeight, width, TextFrameHeight) + SetWidgetPos(BottomFrame, left, top + TopFrameHeight + TextFrameHeight, width, BottomFrameHeight) + } + +//----------------------------------------------------------------- + void SetPos(int Left, int Top) + { + left = Left + top = Top + Update() + } + +//----------------------------------------------------------------- + int GetHeight() + { + return TopFrameHeight + TextFrameHeight + BottomFrameHeight + } + +//----------------------------------------------------------------- + void Show(bool stat) + { + ShowWidget(TopFrame, stat) + ShowWidget(TextFrame, stat) + ShowWidget(BottomFrame, stat) + } + +//----------------------------------------------------------------- + void SetPanelText(string text) + { + for(int n = 0; n < 16; n++) + SetWidgetText(TextFrame, n, "") + + int NumLines = SetWidgetTextEx(TextFrame, 0, 1, text) + + if(NumLines == 0) + NumLines = 1 + + if(text == "") + NumLines = 0 + + TextFrameHeight = 40 * NumLines + int h = TopFrameHeight + TextFrameHeight + BottomFrameHeight + + Update() + } + +//----------------------------------------------------------------- + void ~SizablePanel() + { + if(TopFrame) + { + DestroyWidget(TopFrame) + TopFrame = NULL + } + + if(TextFrame) + { + DestroyWidget(TextFrame) + TextFrame = NULL + } + + if(BottomFrame) + { + DestroyWidget(BottomFrame) + BottomFrame = NULL + } + } +} + + + +class DialogPanel extends SizablePanel +{ + widget FaceIcon + int FaceIconWidth, FaceIconHeight + float DialogScroll + int status + +//----------------------------------------------------------------- + void Update() + { + SetWidgetPos(TopFrame, left, top, width, TopFrameHeight) + SetWidgetPos(TextFrame, left, top + TopFrameHeight, width, TextFrameHeight) + SetWidgetPos(BottomFrame, left, top + TopFrameHeight + TextFrameHeight, width, BottomFrameHeight) + SetWidgetPos(FaceIcon, left - 18, top - 12, FaceIconWidth, FaceIconHeight) + } + +//----------------------------------------------------------------- + void Show(bool stat) + { + ShowWidget(TopFrame, stat) + ShowWidget(TextFrame, stat) + ShowWidget(BottomFrame, stat) + ShowWidget(FaceIcon, stat) + } + +//----------------------------------------------------------------- + void Open() + { + if(status == 2) //waiting + return + + status = 1 + Show(true) + } + +//----------------------------------------------------------------- + void Close() + { + if(status == 0) //is closed + return + + status = 3 + } + +//----------------------------------------------------------------- + void SetDialogText(string text, string SayCharacter) + { + for(int n = 0; n < 16; n++) + SetWidgetText(TextFrame, n, "") + + int NumLines = SetWidgetTextEx(TextFrame, 0, 1, text) + int IconIndex = GetSayCharacterImageIndex(SayCharacter) + + if(IconIndex == -1) + IconIndex = 0 + + SetWidgetImage(FaceIcon, IconIndex) + + if(NumLines == 0) + NumLines = 1 + + if(text == "") + NumLines = 0 + + TextFrameHeight = 40 * NumLines + int h = TopFrameHeight + TextFrameHeight + BottomFrameHeight + + if(FaceIconHeight > h) + TextFrameHeight = FaceIconHeight - TopFrameHeight - BottomFrameHeight + + Update() + } + +//----------------------------------------------------------------- + void OnFrame() + { + if(status == 0 || status == 2) + return + + if(status == 1) //vysuva sa + { + DialogScroll += ftime * 4 + + if(DialogScroll >= 1) + { + DialogScroll = 1 + status = 2 //opened + } + } + + if(status == 3) //zasuva sa + { + DialogScroll -= ftime * 4 + + if(DialogScroll <= 0) + { + DialogScroll = 0 + status = 0 + Show(false) + } + } + + float flip = 1 - DialogScroll + float FinalScroll = flip * flip + FinalScroll = 1 - FinalScroll + + float lng = GetHeight() + float scroll = lng + 17 * FinalScroll - lng + SetPos(17, scroll) + } + +//----------------------------------------------------------------- + void DialogPanel(int Left, int Top) + { + left = Left + top = Top + width = 512 + TopFrameHeight = 10 + TextFrameHeight = 0 + BottomFrameHeight = 4 + FaceIconWidth = 90 + FaceIconHeight = 90 + TopFrame = CreateWidget(WTYPE_IMAGE, 0, 0, 100, 100, WF_SOURCEALPHA|WF_BLEND, 0x00ffffff, 2) //top + TextFrame = CreateWidget(WTYPE_TEXT, 0, 0, width, 100, WF_SOURCEALPHA|WF_BLEND/*|WF_VCENTER*/, ARGB(255,130,255,255), 2) //text + BottomFrame = CreateWidget(WTYPE_IMAGE, 0, 0, 100, 100, WF_SOURCEALPHA|WF_BLEND, 0x00ffffff, 2) //bottom + FaceIcon = CreateWidget(WTYPE_IMAGE, 0, 0, 100, 100, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 3) + LoadWidgetImage(TopFrame, 0, "gfx/hud/dialog_top.tga") + //LoadWidgetImage(TextFrame, 0, "gfx/hud/dialog_middle.tga") + LoadWidgetImage(BottomFrame, 0, "gfx/hud/dialog_bottom.tga") + LoadWidgetImage(FaceIcon, 0, "gfx/hud/dialog_face1.tga") //livie + LoadWidgetImage(FaceIcon, 1, "gfx/hud/dialog_face2.tga") //warren + LoadWidgetImage(FaceIcon, 2, "gfx/hud/dialog_face3.tga") //computer + LoadWidgetImage(FaceIcon, 3, "gfx/hud/dialog_face4.tga") //arnold + LoadWidgetImage(FaceIcon, 4, "gfx/hud/dialog_face5.tga") //faggioli + LoadWidgetImage(FaceIcon, 5, "gfx/hud/dialog_face6.tga") //bruce + LoadWidgetImage(FaceIcon, 6, "gfx/hud/dialog_face7.tga") //olivier + +// SetWidgetTextColor(TextFrame, 0xff000000) +// SetWidgetColor(TextFrame, 0xffffffff) + + SetWidgetTextOffset(TextFrame, FaceIconWidth - 20, 0) + SetWidgetTextSpacing(TextFrame, 0, -5) + SetFont(TextFrame, MainFont) + Update() + } + +//----------------------------------------------------------------- + void ~DialogPanel() + { + if(FaceIcon) DestroyWidget(FaceIcon) + } +} + +//================================================================= +class SubtitlesDialog extends _serializable +{ + widget msg[2] + +//----------------------------------------------------------------- + void SetText(string text) + { + for(int n = 0; n < 8; n++) + { + SetWidgetText(msg[0], n, "") + SetWidgetText(msg[1], n, "") + } + + SetWidgetTextEx(msg[0], 0, 1, text) + SetWidgetTextEx(msg[1], 0, 1, text) + } + +//----------------------------------------------------------------- + void Show(bool show) + { + ShowWidget(msg[0], show) + ShowWidget(msg[1], show) + } + +//----------------------------------------------------------------- + void SubtitlesDialog(int left, int top, int width, int height) + { + int ShadowSize = 1 + msg[0] = CreateWidget(WTYPE_TEXT, left, top, width, height, WF_SOURCEALPHA|WF_BLEND|WF_CENTER|WF_VCENTER, ARGB(255,255,255,255), 2) + msg[1] = CreateWidget(WTYPE_TEXT, left + ShadowSize, top + ShadowSize, width, height, WF_SOURCEALPHA|WF_BLEND|WF_CENTER|WF_VCENTER, ARGB(255,0,0,0), 1) + + SetWidgetTextOffset(msg[0], 10, 0) + SetWidgetTextOffset(msg[1], 10, 0) +// SetWidgetTextSpacing(msg[0], 0, -5) +// SetWidgetTextSpacing(msg[1], 0, -5) + SetFont(msg[0], SmallFont) + SetFont(msg[1], SmallFont) + } + +//----------------------------------------------------------------- + void ~SubtitlesDialog() + { + if(msg[0]) + { + DestroyWidget(msg[0]) + msg[0] = NULL + } + + if(msg[1]) + { + DestroyWidget(msg[1]) + msg[1] = NULL + } + } +} + +class MessageWindow extends _serializable +{ + widget envelope, BackGround + widget msg[8] + float timers[8] + float offset[8] + int position[8] + int ptr + int status + int LineHeight + int AreaHeight + int AreaWidth + int TextColor + float Opacity + float GlobalTransp + bool Automanaged //je mu volane neustale OnFrame takze si sam zobrazuje a skryva widgety + +//----------------------------------------------------------------- + void UpdateColor() + { + int color = TextColor + float fade, alpha + + for(int n = 0; n < sizeof(msg); n++) + { + if(timers[n] > 1) + fade = timers[n] - 2 + else + fade = 0 + + clamp fade<0,1> + fade = 1 - fade + alpha = fade * GlobalTransp * (float)Opacity + color &= 0x0082ffff //0x00ffffff + color |= alpha << 24 + SetWidgetTextColor(msg[n], color) + } + + if(BackGround) + { + alpha = GlobalTransp * (float)Opacity + color &= 0x0082ffff //0x00ffffff + color |= alpha << 24 + SetWidgetColor(BackGround, color) + } + } + +//----------------------------------------------------------------- + void SetGlobalTransp(float val) + { + GlobalTransp = val + UpdateColor() + } + +//----------------------------------------------------------------- + void Show(bool stat) + { +// if(stat == false) //show neni potrebny +// { + for(int n = 0; n < sizeof(msg); n++) + { +// position[n] = 0 + ShowWidget(msg[n], stat) + } + ShowWidget(envelope, stat) + + if(BackGround) + ShowWidget(BackGround, stat) +// status = 0 +// ptr = 0 +// } + } + +//----------------------------------------------------------------- + void ShowMessage(string message) + { + status = 1 + + if(Automanaged) + { + ShowWidget(envelope, true) + ShowWidget(msg[ptr], true) + } + + SetWidgetTextColor(msg[ptr], TextColor) + SetWidgetTextEx(msg[ptr], 0, 1, message) //znak "#" sa nemoze pridavat tu!!! + timers[ptr] = 0 + offset[ptr] = AreaHeight + + int n + for(n = 0; n < sizeof(msg); n++) + { + if(position[n] == 1) + { + offset[ptr] = offset[n] + (float)LineHeight + break + } + } + + for(n = 0; n < sizeof(msg); n++) + { + if(position[n] > 0) + position[n] = position[n] + 1 + } + + position[ptr] = 1 + + ptr++ + + if(ptr >= sizeof(msg)) + ptr = 0 + } + +//----------------------------------------------------------------- + void OnFrame() + { + if(status == 0) + return + + int n + float pos + int NumActive = 0 + float TimeStep = ftime * 0.15 + float TimeStep2 = ftime * 2 + float TimeStep3 = ftime * 200 + + for(n = 0; n < sizeof(msg); n++) + { + if(position[n] > 0) + { + NumActive++ + offset[n] = offset[n] - TimeStep3 + float end = (float)position[n] * (float)LineHeight + end = AreaHeight - end + + if(offset[n] <= end) + offset[n] = end + + SetWidgetPos(msg[n], 0, offset[n], AreaWidth, LineHeight) + + if(timers[n] <= 1) //waiting + { + timers[n] = timers[n] + TimeStep + + if(timers[n] >= 1) + timers[n] = 2 + } + else //fading + { + timers[n] = timers[n] + TimeStep2 + + if(timers[n] >= 3) + { + timers[n] = 3 + + if(Automanaged) + ShowWidget(msg[n], false) + + position[n] = 0 + SetWidgetPos(msg[n], 0, 151, AreaWidth, LineHeight) + } + } + } + } + + UpdateColor() + + if(Automanaged && NumActive == 0) + { + ShowWidget(envelope, false) + status = 0 + } + } + +//----------------------------------------------------------------- + void Init(int Left, int Top, int Width, int Height, int TxtOffset, string background, int Font, int TxtColor, int AddFlags, int SortOffset) + { + GlobalTransp = 1 + TextColor = TxtColor + + AreaHeight = Height - (TxtOffset * 2) + AreaWidth = Width - (TxtOffset * 2) + + if(background) + { + BackGround = CreateWidget(WTYPE_IMAGE, Left, Top, Width, Height, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, SortOffset) + LoadWidgetImage(BackGround, 0, background) + } + + envelope = CreateWidget(WTYPE_IMAGE, Left + TxtOffset, Top + TxtOffset, AreaWidth, AreaHeight, WF_SOURCEALPHA|WF_BLEND|WF_VISIBLE, 0x00ffffff, SortOffset + 1) + + for(int n = 0; n < sizeof(msg); n++) + { + msg[n] = CreateWidgetEx(envelope, WTYPE_TEXT, 0, 151, Width, LineHeight, WF_SOURCEALPHA|WF_BLEND|WF_VCENTER|AddFlags, ARGB(255,130,255,255), SortOffset + 2) + SetWidgetTextColor(msg[n], TextColor) + SetFont(msg[n], Font) + } + } + +//----------------------------------------------------------------- + void ~MessageWindow() + { + for(int n = 0; n < sizeof(msg); n++) + { + if(msg[n]) + { + DestroyWidget(msg[n]) + msg[n] = NULL + } + } + + if(envelope) + { + DestroyWidget(envelope) + envelope = NULL + } + + if(BackGround) + { + DestroyWidget(BackGround) + BackGround = NULL + } + } +} + +//----------------------------------------------------------------- +class InfoDialog extends MessageWindow +{ + void InfoDialog(int Left, int Top) + { + Automanaged = true + LineHeight = 16 + AreaHeight = 150 + AreaWidth = 300 + Opacity = 255 + Init(Left, Top, AreaWidth, AreaHeight, 0, "", MainFont, 0xffffffff, WF_CENTER, 2) + } +} + +//----------------------------------------------------------------- +class HackInfoDialog extends MessageWindow +{ + void HackInfoDialog(int Left, int Top) + { + Automanaged = false + LineHeight = 16 + AreaHeight = 150 + AreaWidth = 280 + Opacity = 255 + Init(Left, Top, AreaWidth, AreaHeight, 15, "gfx/remotecontrol/frame2.tga", MainFont, 0xffffffff/*ARGB(255,136,241,254)*/, WF_ADDITIVE, 4) + } +} + +class TasklistDialog extends SizablePanel +{ + DialogPanel DPanel + InfoDialog InfDialog + widget Checkboxs[8] + widget WTaskTexts[8] + widget Label + string TaskTexts[8] + bool TaskCompleted[8] + int TaskTextLines[8] + int NumTasks + int status + float ScrollRate + int LineHeight //vyska jedneho riadku textu + int TaskSpace //medzera medzi jednotlivymi taskmi + int LabelHeight + bool NeedOpened + float AutoOpened + +//----------------------------------------------------------------- + void Update() + { + SetWidgetPos(TopFrame, left, top, width, TopFrameHeight) + SetWidgetPos(TextFrame, left, top + TopFrameHeight, width, TextFrameHeight) + SetWidgetPos(BottomFrame, left, top + TopFrameHeight + TextFrameHeight, width, BottomFrameHeight) + SetWidgetPos(Label, left + 10, top + 10, width, 32) + + int TaskPosX = left + int TaskPosY = top + 10 + LabelHeight + + for(int n = 0; n < NumTasks; n++) + { + if(n > 0) + { + TaskPosY += TaskTextLines[n - 1] * LineHeight + TaskPosY += TaskSpace //medzera medzi taskmi + } + + SetWidgetPos(WTaskTexts[n], TaskPosX + 32, TaskPosY - 3, width, TaskTextLines[n] * LineHeight) + SetWidgetPos(Checkboxs[n], TaskPosX + 10 , TaskPosY, 16, 16) + } + } + +//----------------------------------------------------------------- + void Show(bool stat) + { + ShowWidget(TopFrame, stat) + ShowWidget(TextFrame, stat) + ShowWidget(BottomFrame, stat) + ShowWidget(Label, stat) + + int n + for(n = 0; n < NumTasks; n++) + { + ShowWidget(Checkboxs[n], stat) + ShowWidget(WTaskTexts[n], stat) + } + + for(n = n; n < sizeof(Checkboxs); n++) + { + ShowWidget(Checkboxs[n], false) + ShowWidget(WTaskTexts[n], false) + } + } + +//----------------------------------------------------------------- + void Open() + { + if(status == 0) + Show(true) + + if(ScrollRate == 0) + PlaySound(NULL, g_sCommonSounds[11], SF_ONCE) + + status = 1 + } + +//----------------------------------------------------------------- + void Close() + { + if(ScrollRate == 1) + PlaySound(NULL, g_sCommonSounds[12], SF_ONCE) + + status = 3 + } + +//----------------------------------------------------------------- + void OnFrame() + { + if(AutoOpened > 0) + { + AutoOpened -= ftime * 0.15 + NeedOpened = true + + if(AutoOpened <= 0) + AutoOpened = 0 + } + + if(NeedOpened) + { + if(status == 0) + Open() + } + else + { + if(status == 2) + Close() + } + + if(status == 0) + return + + if(status == 1) //scroluje do screeny + { + ScrollRate += ftime * 4 + + if(ScrollRate >= 1) + { + ScrollRate = 1 + status = 2 //nic sa nedeje + } + } + + if(status == 3) //scroluje prec + { + ScrollRate -= ftime * 4 + + if(ScrollRate <= 0) + { + ScrollRate = 0 + status = 0 + AutoOpened = 0 + Show(false) + } + } + + int space = 17 + int Top = DPanel.top + DPanel.GetHeight() + space + + float flip = 1 - ScrollRate + float FinalScroll = flip * flip + FinalScroll = 1 - FinalScroll + + float lng = width + float scroll = lng + 17 * FinalScroll - lng + SetPos(scroll, Top) + NeedOpened = false + } + +//----------------------------------------------------------------- + void ForceOpening() + { + NeedOpened = true + } +/* +//----------------------------------------------------------------- + void SwitchPos() + { + if(status == 1 || status == 2) + Close() + else + Open() + } +*/ +//----------------------------------------------------------------- + bool AddTask(string task) + { + if(NumTasks >= sizeof(Checkboxs)) + return false + + int n + for(n = 0; n < NumTasks; n++) + { + if(TaskTexts[n] == task) + return false + } + + TaskTexts[NumTasks] = task + TaskCompleted[NumTasks] = false + task = "#" + task + int NumLines = SetWidgetTextEx(WTaskTexts[NumTasks], 0, 1, task) + SetWidgetImage(Checkboxs[NumTasks], 0) + + NumLines++ + + if(task == "") + NumLines = 0 + + TaskTextLines[NumTasks] = NumLines + NumTasks++ + + if(status > 0) + Show(true) + + TextFrameHeight = LabelHeight + + for(n = 0; n < NumTasks; n++) + { + if(n > 0) + TextFrameHeight += TaskSpace + + TextFrameHeight += TaskTextLines[n] * LineHeight + } + + TextFrameHeight += 4 //spodny okraj + + Update() + InfDialog.ShowMessage("#New_task_available...") + PlaySound(NULL, g_sCommonSounds[13], SF_ONCE) + AutoOpened = 1 + return true + } + +//----------------------------------------------------------------- + bool CheckTask(string task) + { + for(int n = 0; n < NumTasks; n++) + { + if(TaskTexts[n] == task && TaskCompleted[n] == false) + { + TaskCompleted[n] = true + SetWidgetImage(Checkboxs[n], 1) + SetWidgetTextColor(WTaskTexts[n], ARGB(255,30,155,155)) + InfDialog.ShowMessage("#Task_completed...") + PlaySound(NULL, g_sCommonSounds[14], SF_ONCE) + AutoOpened = 1 + return true + } + } + return false + } + +//----------------------------------------------------------------- + void TasklistDialog(DialogPanel panel, InfoDialog dlg, int Left, int Top) + { + DPanel = panel + InfDialog = dlg + LabelHeight = 40 + LineHeight = 20 + TaskSpace = 8 + left = Left + top = Top + width = 512 + TopFrameHeight = 10 + TextFrameHeight = 64 + BottomFrameHeight = 4 + TopFrame = CreateWidget(WTYPE_IMAGE, left, 0, width, 100, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 17) //top + TextFrame = CreateWidget(WTYPE_IMAGE, left, 0, width, 100, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 17) //posluzi iba ako pozadie + BottomFrame = CreateWidget(WTYPE_IMAGE, left, 0, width, 100, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 17) //bottom + Label = CreateWidget(WTYPE_TEXT, left, 0, 100, 30, WF_SOURCEALPHA|WF_BLEND, ARGB(255,130,255,255), 18) + SetFont(Label, MainFont) + SetWidgetTextEx(Label, 0, 1, "#Objectives :") + LoadWidgetImage(TopFrame, 0, "gfx/hud/dialog_top.tga") + LoadWidgetImage(TextFrame, 0, "gfx/hud/dialog_middle.tga") + LoadWidgetImage(BottomFrame, 0, "gfx/hud/dialog_bottom.tga") + + for(int n = 0; n < sizeof(Checkboxs); n++) + { + Checkboxs[n] = CreateWidget(WTYPE_IMAGE, left, 0, 16, 16, WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 18) //top + LoadWidgetImage(Checkboxs[n], 0, "gfx/hud/checkbox_off.tga") + LoadWidgetImage(Checkboxs[n], 1, "gfx/hud/checkbox_on.tga") + WTaskTexts[n] = CreateWidget(WTYPE_TEXT, left, 0, width - 32, 64, WF_SOURCEALPHA|WF_BLEND, ARGB(255,130,255,255), 18) //text +// SetWidgetTextOffset(WTaskTexts[n], 32, 0) + SetWidgetTextSpacing(WTaskTexts[n], 0, -2) + SetFont(WTaskTexts[n], MainFont) + } + Update() + } + +//----------------------------------------------------------------- + void ~TasklistDialog() + { + if(Label) + { + DestroyWidget(Label) + Label = NULL + } + + for(int n = 0; n < sizeof(Checkboxs); n++) + { + if(Checkboxs[n]) + { + DestroyWidget(Checkboxs[n]) + DestroyWidget(WTaskTexts[n]) + Checkboxs[n] = NULL + WTaskTexts[n] = NULL + } + } + } +} + + +//============================================================================ +class CrossHairClass extends _serializable +{ + widget Dot + widget Left, Top, Right, Bottom + float CurScale + float TargetScale + float ScreenCenterX, ScreenCenterY + float MinSize + float MaxSize + int TypeIndex + int SkinIndex + int NumSkins + bool visible + +//----------------------------------------------------------------- + float GetPrecisionScale() + { + float res = MaxSize - MinSize * CurScale + res += MinSize + + if(MaxSize > 0) + res /= MaxSize + + return res + } + +//----------------------------------------------------------------- + void Update() + { + ScreenCenterX = g_iWidth / 2 + ScreenCenterY = g_iHeight / 2 + + SetWidgetPos(Dot, ScreenCenterX - 32, ScreenCenterY - 32, 64, 64) + + if(TypeIndex > 0) + return + + float offset1 = MinSize + offset1 += MaxSize - MinSize * CurScale + float offset2 = offset1 + 32 + float wleft = ScreenCenterX - 16 + float wtop = ScreenCenterY - 16 + + SetWidgetPos(Left, ScreenCenterX - offset2 - 1, wtop, 32, 32) + SetWidgetPos(Right, ScreenCenterX + offset1, wtop, 32, 32) + SetWidgetPos(Top, wleft, ScreenCenterY - offset2 - 1, 32, 32) + SetWidgetPos(Bottom, wleft, ScreenCenterY + offset1, 32, 32) + } + +//----------------------------------------------------------------- + void OnFrame() + { + if(CurScale != TargetScale) + { + float dif = TargetScale - CurScale + CurScale += dif * (0.1 * ftime * 100) + Update() + } + } + +//----------------------------------------------------------------- + void Show(bool stat) + { + visible = stat + + if(TypeIndex != 5) + ShowWidget(Dot, stat) + else //ziadny cross + { + if(stat == false) + ShowWidget(Dot, stat) + } + + if(TypeIndex == 0) + { + ShowWidget(Left, stat) + ShowWidget(Right, stat) + ShowWidget(Top, stat) + ShowWidget(Bottom, stat) + } + } + +//----------------------------------------------------------------- + void SetScale(float scale) + { + TargetScale = scale + clamp TargetScale<0, 1> + } + +//----------------------------------------------------------------- + void SetMinAndMaxSize(float SizeMin, float SizeMax) + { + MinSize = SizeMin + MaxSize = SizeMax + } + +//----------------------------------------------------------------- + void SetSkin(int skin) + { + int MaxSkinIndex = NumSkins - 1 + clamp skin<0, MaxSkinIndex> + SkinIndex = skin + + SetWidgetImage(Left, skin) + SetWidgetImage(Right, skin) + SetWidgetImage(Top, skin) + SetWidgetImage(Bottom, skin) + } + +//----------------------------------------------------------------- + void SetType(int type) + { + TypeIndex = type + + if(type != 5) + { + SetWidgetImage(Dot, type) + ShowWidget(Dot, visible) + } + else + ShowWidget(Dot, false) //absolutne ziadny cross + + if(type > 0) //typ nula su zbrane takze sizovatelny kurzor + { + ShowWidget(Left, false) + ShowWidget(Right, false) + ShowWidget(Top, false) + ShowWidget(Bottom, false) + } + + Update() + } + +//----------------------------------------------------------------- + void CrossHairClass() + { + ScreenCenterX = g_iWidth / 2 + ScreenCenterY = g_iHeight / 2 + CurScale = 0 + TargetScale = 0 + + Dot = CreateWidget(WTYPE_IMAGE, ScreenCenterX - 32, ScreenCenterY - 32, 64, 64, WF_SOURCEALPHA|WF_BLEND|WF_NOFILTER|WF_EXACTPOS|WF_EXACTSIZE, 0xffffffff, 3) + Left = CreateWidget(WTYPE_IMAGE, ScreenCenterX - 32, ScreenCenterY - 16, 32, 32, WF_SOURCEALPHA|WF_BLEND|WF_NOFILTER|WF_EXACTPOS|WF_EXACTSIZE|WF_FLIPU, 0xffffffff, 3) + Right = CreateWidget(WTYPE_IMAGE, ScreenCenterX, ScreenCenterY - 16, 32, 32, WF_SOURCEALPHA|WF_BLEND|WF_NOFILTER|WF_EXACTPOS|WF_EXACTSIZE, 0xffffffff, 3) + Top = CreateWidget(WTYPE_IMAGE, ScreenCenterX - 16, ScreenCenterY - 32, 32, 32, WF_SOURCEALPHA|WF_BLEND|WF_NOFILTER|WF_EXACTPOS|WF_EXACTSIZE|WF_FLIPV, 0xffffffff, 3) + Bottom = CreateWidget(WTYPE_IMAGE, ScreenCenterX - 16, ScreenCenterY, 32, 32, WF_SOURCEALPHA|WF_BLEND|WF_NOFILTER|WF_EXACTPOS|WF_EXACTSIZE, 0xffffffff, 3) + + LoadWidgetImage(Dot, 0, "gfx/gunsight/dot.tga") //zbran "gfx/gunsight/dot.tga" gfx/cross_null.tga + LoadWidgetImage(Dot, 1, "gfx/hud/icon_use.tga") //use icon + LoadWidgetImage(Dot, 2, "gfx/hud/icon_no.tga") //use no + LoadWidgetImage(Dot, 3, "gfx/gunsight/dot.tga") //no weapon + LoadWidgetImage(Dot, 4, "gfx/hud/icon_grab.tga")//grab icon + + string Stype + NumSkins = 2 + + for(int n = 0; n < NumSkins; n++) + { + Stype = itoa(n + 1) + LoadWidgetImage(Left, n, "gfx/gunsight/" + Stype + "r.tga") + LoadWidgetImage(Right, n, "gfx/gunsight/" + Stype + "r.tga") + LoadWidgetImage(Top, n, "gfx/gunsight/" + Stype + "d.tga") + LoadWidgetImage(Bottom, n, "gfx/gunsight/" + Stype + "d.tga") + } + + SetSkin(0) + Update() +// Show(true) + } + +//----------------------------------------------------------------- + void ~CrossHairClass() + { + if(Dot) + { + DestroyWidget(Dot) + Dot = NULL + } + + if(Left) + { + DestroyWidget(Left) + Left = NULL + } + + if(Right) + { + DestroyWidget(Right) + Right = NULL + } + + if(Top) + { + DestroyWidget(Top) + Top = NULL + } + + if(Bottom) + { + DestroyWidget(Bottom) + Bottom = NULL + } + } +} diff --git a/Alpha Prime/Mod/scripts/menu.h b/Alpha Prime/Mod/scripts/menu.h new file mode 100644 index 0000000..8e17aea --- /dev/null +++ b/Alpha Prime/Mod/scripts/menu.h @@ -0,0 +1,3273 @@ + +//----------------------------------------------------------------- +void UpdateMouse() +{ + MouseX = MouseX + MouseDeltaX + float v = 0 + + if(fabs(JoyAxis[0]) > JOY_DEATH_ZONE) + v = JoyAxis[0] * 0.02 + + MouseX = MouseX + v + clamp MouseX<0, 800> + MouseY = MouseY + MouseDeltaY + v = 0 + + if(fabs(JoyAxis[1]) > JOY_DEATH_ZONE) + v = JoyAxis[1] * 0.02 + + MouseY = MouseY + v + clamp MouseY<0, 600> + SetWidgetPos(WMousePointer, MouseX, MouseY, 63, 63) +} + +class ConfirmDialog +{ + widget background + widget ButtonYes + widget ButtonNo + string ResultOnYes + string ResultOnNo + int ButtonYesLeft + int ButtonYesTop + int ButtonYesWidth + int ButtonYesHeight + int ButtonNoLeft + int ButtonNoTop + int ButtonNoWidth + int ButtonNoHeight + int ButtonInactiveColor + int ButtonActiveColor + + int ButtonNoSizes[4] + + string Update() + { + if(KeyState(KC_RETURN)) + { + ClearKey(KC_RETURN) + return ResultOnYes + } + + if(KeyState(KC_ESCAPE)) + { + ClearKey(KC_ESCAPE) + return ResultOnNo + } + + UpdateMouse() + + if(InRectEx(ButtonYesLeft ,ButtonYesTop ,ButtonYesWidth ,ButtonYesHeight, MouseX, MouseY) == true) + { + SetWidgetTextColor(ButtonYes, ButtonActiveColor) + + if(MousePress(0)) + { + ClearMousePress(0) + return ResultOnYes + } + } + else + SetWidgetTextColor(ButtonYes, ButtonInactiveColor) + + if(InRectEx(ButtonNoLeft ,ButtonNoTop ,ButtonNoWidth ,ButtonNoHeight, MouseX, MouseY) == true) + { + SetWidgetTextColor(ButtonNo, ButtonActiveColor) + + if(MousePress(0)) + { + ClearMousePress(0) + return ResultOnNo + } + } + else + SetWidgetTextColor(ButtonNo, ButtonInactiveColor) + + return "" + } + + void ConfirmDialog(string request, string ResultYes, string ResultNo) + { + ResultOnYes = ResultYes + ResultOnNo = ResultNo + + int BackLeft = 272 + int BackTop = 268 + int BackWidth = 256 + int BackHeight = 64 + + ButtonYesLeft = BackLeft + ButtonYesTop = BackTop + 30 + ButtonYesWidth = 96 + ButtonYesHeight = 32 + ButtonNoLeft = BackLeft + 128 + 16 + ButtonNoTop = BackTop + 30 + ButtonNoWidth = 96 + ButtonNoHeight = 32 + + ButtonInactiveColor = 0xff000000 + ButtonActiveColor = 0xffff0000 + + background = CreateWidget(WTYPE_TEXT, BackLeft, BackTop, BackWidth, BackHeight, WF_CENTER, ARGB(255,0,0,0)/*ARGB(255,255,255,255)*/, 400) + ButtonYes = CreateWidget(WTYPE_TEXT, ButtonYesLeft, ButtonYesTop, ButtonYesWidth, ButtonYesHeight, WF_CENTER, ARGB(255,0,0,0), 401) + ButtonNo = CreateWidget(WTYPE_TEXT, ButtonNoLeft, ButtonNoTop, ButtonNoWidth, ButtonNoHeight, WF_CENTER, ARGB(255,0,0,0), 401) + SetWidgetColor(background, 0xff56f7fd) + SetWidgetTextColor(ButtonYes, ButtonInactiveColor) + SetWidgetTextColor(ButtonNo, ButtonInactiveColor) + SetWidgetTextOffset(background, 4, 10) +// LoadWidgetImage(background, 0, "gfx/hud/ConfirmDialogBack.tga") +// LoadWidgetImage(ButtonYes, 0, "gfx/hud/ConfirmDialogButton.tga") +// LoadWidgetImage(ButtonNo, 0, "gfx/hud/ConfirmDialogButton.tga") + SetWidgetTextEx(ButtonYes, 0, true, "#menuitem1_yes") + SetWidgetTextEx(ButtonNo, 0, true, "#menuitem1_no") + SetFont(background, MainFont) + SetFont(ButtonYes, LargeFont) + SetFont(ButtonNo, LargeFont) + SetWidgetTextEx(background, 0, true, request) + ShowWidget(background, true) + ShowWidget(ButtonYes, true) + ShowWidget(ButtonNo, true) + } + + void ~ConfirmDialog() + { + if(ButtonYes) + { + DestroyWidget(ButtonYes) + ButtonYes = NULL + } + + if(ButtonNo) + { + DestroyWidget(ButtonNo) + ButtonNo = NULL + } + + if(background) + { + DestroyWidget(background) + background = NULL + } + } +} +ConfirmDialog ConfDialog + +const int NumCreditsLines = 150 +widget CreditsSegments[NumCreditsLines] +widget CreditsBack +string CreditsTexts[NumCreditsLines] +int NumLines +int CreditsLeftOffsets[NumCreditsLines] +int CreditsTopOffsets[NumCreditsLines] +int CreditsWidths[NumCreditsLines] +int CreditsHeights[NumCreditsLines] +int CreditsWidth +float CreditsFullHeight +float CreditsCurrentPos +const int CreditsSpeed = 90 +float ResolutionScale + +void CreditsSpace(float space) +{ + CreditsFullHeight += space * ResolutionScale +} + +bool CreditsTextLine(string text, int Font, int FontColor, int LeftOffset, int TopOffset, int Width) +{ + float Height + + switch(Font) + { + case SmallFont: + Height = 14 * ResolutionScale + break + + case MainFont: + Height = 20 * ResolutionScale + break + + case LargeFont: + Height = 42 * ResolutionScale + break + } + + int fl = WF_SOURCEALPHA | WF_BLEND | WF_NOFILTER | WF_EXACTSIZE | WF_EXACTPOS + + if(LeftOffset == -1) + { + LeftOffset = 0 + fl |= WF_CENTER + } + + widget w = NULL + w = CreateWidget(WTYPE_TEXT, LeftOffset, g_iHeight + 10, Width, Height, fl, FontColor, 151) + + if(!w) + return false + + SetFont(w, Font) + SetWidgetTextEx(w, 0, 0, text) + ShowWidget(w, false) + CreditsSegments[NumLines] = w + CreditsLeftOffsets[NumLines] = LeftOffset + CreditsWidths[NumLines] = Width + CreditsHeights[NumLines] = Height + CreditsTopOffsets[NumLines++] = CreditsFullHeight + g_iHeight + CreditsFullHeight += TopOffset + Height + return true +} + +bool CreditsBitmap(string BitmapPath, int BitmapColor, float LeftOffset, int TopOffset, int Width, int Height) +{ + LeftOffset = g_iWidth - Width + LeftOffset *= 0.5 + + widget w = NULL + w = CreateWidget(WTYPE_IMAGE, LeftOffset , g_iHeight + 10, Width, Height, WF_SOURCEALPHA | WF_BLEND | WF_NOFILTER | WF_CENTER | WF_CENTER | WF_EXACTSIZE | WF_EXACTPOS, BitmapColor, 150) + + if(!w) + return false + + LoadWidgetImage(w, 0, BitmapPath) + ShowWidget(w, false) + CreditsSegments[NumLines] = w + CreditsLeftOffsets[NumLines] = LeftOffset + CreditsWidths[NumLines] = Width + CreditsHeights[NumLines] = Height + CreditsTopOffsets[NumLines++] = CreditsFullHeight + g_iHeight + CreditsFullHeight += TopOffset + Height + return true +} + +bool CreditsBackgroundColor(int color) +{ + CreditsBack = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_SOURCEALPHA | WF_BLEND | WF_NOFILTER | WF_VISIBLE, color, 149) +} + + +void UpdateCredits() +{ +// CreditsCurrentPos += ftime * 100 + CreditsCurrentPos += ftime * CreditsSpeed + int actpos + + int xx = CreditsFullHeight + g_iHeight + if(CreditsCurrentPos >= xx) + CreditsCurrentPos = 0 + + int yy + float tmp = CreditsCurrentPos + g_iHeight + + for(int n = 0; n < NumLines; n++) + { + yy = CreditsCurrentPos - CreditsHeights[n] + + if(CreditsTopOffsets[n] > yy && CreditsTopOffsets[n] < tmp) + { + actpos = CreditsTopOffsets[n] - CreditsCurrentPos + + SetWidgetPos(CreditsSegments[n], CreditsLeftOffsets[n], actpos, CreditsWidths[n], CreditsHeights[n]) + ShowWidget(CreditsSegments[n], true) + } + else + ShowWidget(CreditsSegments[n], false) + } +} + +void DestroyCredits() +{ + for(int n = 0; n < NumLines; n++) + { + if(CreditsSegments[n]) + DestroyWidget(CreditsSegments[n]) + + CreditsSegments[n] = NULL + } + NumLines = 0 + + if(CreditsBack) + { + DestroyWidget(CreditsBack) + CreditsBack = NULL + } +} + + + +string MenuPath = "gfx/menu/" + +int LMouseX,LMouseY + +string MenuActive + +string MenuStack[16][2] +int MenuStackOff + +int ListKeyInput + +//================================================================================= +hsound HButtonSelect +hsound HButtonEnter +hsound HButtonSwitch +hsound HEscape +int SButtonSelect +int SButtonEnter +int SButtonSwitch +int SEscape + +//----------------------------------------------------------------- +void PlayMenuSound(int type) +{ + switch(type) + { + case 1: + SButtonSelect = PlaySound(NULL, HButtonSelect, SF_ONCE | SF_AMBIENT) + return + + case 2: + SButtonEnter = PlaySound(NULL, HButtonEnter, SF_ONCE | SF_AMBIENT) + return + + case 3: + SButtonSwitch = PlaySound(NULL, HButtonSwitch, SF_ONCE | SF_AMBIENT) + return + + case 4: + SEscape = PlaySound(NULL, HEscape, SF_ONCE | SF_AMBIENT) + return + } +} + +//----------------------------------------------------------------- +const int GUI_TYPE_BUTTON = 1 +const int GUI_TYPE_IMAGE = 2 +const int GUI_TYPE_SLIDER = 3 +const int GUI_TYPE_LIST_VALUE = 4 +const int GUI_TYPE_CUSTOM = 5 + +const int GUI_ACTION_GETOPT = 1 +const int GUI_ACTION_APPLYOPT = 2 +const int GUI_ACTION_BACK = 4 +const int GUI_ACTION_SAVE = 8 +const int GUI_ACTION_MENU = 16 +const int GUI_ACTION_CALL = 32 + +//================================================================================= +const int MAX_MENU_ITEM_VARIANTS = 64 +const int MAX_MENU_ITEMS = 32 + +//current screen +widget GUIWidgets[64] +int GUINumWidgets + +widget GUIHintWidget +widget GUIHintInfoWidget + +int GUIItemTypes[MAX_MENU_ITEMS] +int GUIItemActions[MAX_MENU_ITEMS] +int GUIItemFlags[MAX_MENU_ITEMS] +string GUIItemActionParms[MAX_MENU_ITEMS] +string GUIItemIDs[MAX_MENU_ITEMS] +string GUIItemHints[MAX_MENU_ITEMS] +string GUIItemHintInfos[MAX_MENU_ITEMS] +string GUIItemStrings[MAX_MENU_ITEMS][MAX_MENU_ITEM_VARIANTS] +int GUIItemRect[MAX_MENU_ITEMS][4] +int GUIItemWidgets[MAX_MENU_ITEMS] +int GUIItemValue[MAX_MENU_ITEMS][2] //id, index +int GUINumItems +int GUILastControl + +int GUIFont +int GUIActiveColor = 0xffe5ffff +int GUIInactiveColor = 0xff56fdff +int GUIDisabledColor = 0x6634dbdd +int GUIActiveColorImage = 0xffffffff +int GUIInactiveColorImage = 0xaa78ffff +int GUIDisabledColorImage = 0x6634dbdd + +//----------------------------------------------------------------- +int GUIGetItemIndex(string id) +{ + for(int n = 0; n < GUINumItems; n++) + { + if(GUIItemIDs[n] == id) + return n + } + + return -1 +} + +//----------------------------------------------------------------- +void GUISetFont(int font) +{ + GUIFont = font +} + + +//----------------------------------------------------------------- +void GUISetColors(int acolor, int icolor, int dcolor) +{ + GUIActiveColor = acolor + GUIInactiveColor = icolor + GUIDisabledColor = dcolor +} + +//----------------------------------------------------------------- +int GUIAddWidget(int type, int left, int top, int width, int height, int sort, int wflag, int color = 0xffffffff) +{ + //widget w = CreateWidget(type, left, top, width, height, wflag|WF_VISIBLE, 0xff7f7f7f, sort + 200) + widget w = CreateWidget(type, left, top, width, height, wflag|WF_VISIBLE, color, sort+200) + + if(GUIFont) + SetFont(w, GUIFont) + + GUIWidgets[GUINumWidgets++] = w + return GUINumWidgets - 1 +} + +//----------------------------------------------------------------- +void GUIAction(int action, string parm = "") +{ + GUIItemActions[GUINumItems - 1] = action + GUIItemActionParms[GUINumItems - 1] = parm +} + +//----------------------------------------------------------------- +void GUIInitItem(int item, int type, int left, int top, int width, int height) +{ + GUIItemTypes[item] = type + GUIItemRect[item][0] = left + GUIItemRect[item][1] = top + GUIItemRect[item][2] = left + width + GUIItemRect[item][3] = top + height + GUIItemActions[item] = 0 + GUIItemValue[item][0] = 0 + GUIItemValue[item][1] = 0 + GUIItemIDs[item] = "" + GUIItemFlags[item] = 0 + GUIItemHints[item] = "" + GUIItemHintInfos[item] = "" + GUIItemStrings[item][0] = "" +} + +//----------------------------------------------------------------- +void GUIListValue(int id, string text[], int left, int top, int width, int height, int sort, int wflag, int color = 0xffffffff) +{ + GUIInitItem(GUINumItems, GUI_TYPE_LIST_VALUE, left, top, width, height) + + int max = MAX_MENU_ITEM_VARIANTS - 1 + for(int n = 0; n < sizeof(text); n++) + { + if(n >= max) + break + + GUIItemStrings[GUINumItems][n] = text[n] + } + + GUIItemStrings[GUINumItems][n] = "" //terminator + + GUIItemWidgets[GUINumItems] = GUIAddWidget(WTYPE_TEXT, left, top, width, height, sort, wflag, color) + SetWidgetTextEx(GUIWidgets[GUIItemWidgets[GUINumItems]], 0, true, text[0]) + + //link with control + GUIItemValue[GUINumItems][0] = id + GUIItemValue[GUINumItems][1] = GUILastControl + GUIItemValue[GUILastControl][0] = -1 + GUIItemValue[GUILastControl][1] = GUINumItems + GUINumItems++ +} + +//----------------------------------------------------------------- +void GUIHint(string hint) +{ + GUIItemHints[GUILastControl] = hint +} + +void GUIHintInfo(string hint) +{ + GUIItemHintInfos[GUILastControl] = hint +} + +//----------------------------------------------------------------- +void GUISlider(int id, int len, string image, int left, int top, int width, int height, int sort, int wflag) +{ + GUIInitItem(GUINumItems, GUI_TYPE_SLIDER, left, top, width, height) + GUIItemStrings[GUINumItems][0] = itoa(len) //achjo :-) + GUIItemWidgets[GUINumItems] = GUIAddWidget(WTYPE_IMAGE, left, top, width, height, sort, wflag, 0xffffffff) // hack - fullbright sliders + LoadWidgetImage(GUIWidgets[GUIItemWidgets[GUINumItems]], 0, MenuPath + image) + + //link with control + GUIItemValue[GUINumItems][0] = id + GUIItemValue[GUINumItems][1] = GUILastControl + GUIItemValue[GUILastControl][0] = -1 + GUIItemValue[GUILastControl][1] = GUINumItems + GUINumItems++ +} + +//----------------------------------------------------------------- +void GUICustom(string id, int left, int top, int width, int height) +{ + GUIInitItem(GUINumItems, GUI_TYPE_CUSTOM, left, top, width, height) + GUIItemIDs[GUINumItems] = id + GUINumItems++ +} + +//----------------------------------------------------------------- +void GUIImage(string image, int left, int top, int width, int height, int sort, int wflag, int color = 0xffffffff) +{ + int w = GUIAddWidget(WTYPE_IMAGE, left, top, width, height, sort, wflag, color) + + if(strstr(image, "gfx/") == -1) + image = MenuPath + image + + LoadWidgetImage(GUIWidgets[w], 0, image) + + SetWidgetColor(GUIWidgets[w], color) +} + +//----------------------------------------------------------------- +void GUITitle(string text, int left, int top, int width, int height, int sort, int wflag, int color = 0xffffffff, int font = -1) +{ + int w = GUIAddWidget(WTYPE_TEXT, left, top, width, height, sort, wflag, color) + SetWidgetText(GUIWidgets[w], 1, "") + SetWidgetTextEx(GUIWidgets[w], 0, true, text) + SetWidgetTextColor(GUIWidgets[w], color) + + if(font != -1) + SetFont(GUIWidgets[w], font) +} + +//----------------------------------------------------------------- +void GUIImageButton(string id, string image, int left, int top, int width, int height, int sort, int wflag, int color = 0xffffffff) +{ + GUIInitItem(GUINumItems, GUI_TYPE_IMAGE, left, top, width, height) + GUIItemIDs[GUINumItems] = id + GUIItemWidgets[GUINumItems] = GUIAddWidget(WTYPE_IMAGE, left, top, width, height, sort, wflag, color) + LoadWidgetImage(GUIWidgets[GUIItemWidgets[GUINumItems]], 0, MenuPath + image) + GUILastControl = GUINumItems + GUINumItems++ +} + +//----------------------------------------------------------------- +void GUIButton(string id, string text, int left, int top, int width, int height, int sort, int wflag, int color = 0xffffffff) +{ + GUIInitItem(GUINumItems, GUI_TYPE_BUTTON, left, top, width, height) + GUIItemIDs[GUINumItems] = id + GUIItemStrings[GUINumItems][0] = text + GUIItemWidgets[GUINumItems] = GUIAddWidget(WTYPE_TEXT, left, top, width, height, sort, wflag|WF_SOURCEALPHA | WF_BLEND, color) + SetWidgetTextEx(GUIWidgets[GUIItemWidgets[GUINumItems]], 0, true, text) + GUILastControl = GUINumItems + GUINumItems++ +} + +//----------------------------------------------------------------- +void GUICleanup() +{ + for(int n = 0; n < GUINumWidgets; n++) + DestroyWidget(GUIWidgets[n]) + + GUINumWidgets = 0 + GUINumItems = 0 +} + +//----------------------------------------------------------------- +bool GUIIsControlItem(int index) +{ + if(GUIItemTypes[index] == GUI_TYPE_BUTTON || GUIItemTypes[index] == GUI_TYPE_IMAGE) + return true + + return false +} + +//----------------------------------------------------------------- +void GUIDisableItem(string item) +{ + int index = GUIGetItemIndex(item) + GUIItemFlags[index] = GUIItemFlags[index] | 1 + + if(GUIIsControlItem(index)) + { + int val = GUIItemValue[index][1] + if(val) + { + GUIItemFlags[val] = GUIItemFlags[val] | 1 + if(GUIItemTypes[val] == GUI_TYPE_IMAGE) + SetWidgetColor(GUIWidgets[GUIItemWidgets[val]], GUIDisabledColor) + else + SetWidgetTextColor(GUIWidgets[GUIItemWidgets[val]], GUIDisabledColor) + } + } + + if(GUIItemTypes[index] == GUI_TYPE_IMAGE) + SetWidgetColor(GUIWidgets[GUIItemWidgets[index]], GUIDisabledColor) + else + SetWidgetTextColor(GUIWidgets[GUIItemWidgets[index]], GUIDisabledColor) +} + +//----------------------------------------------------------------- +void GUIEnableItem(string item) +{ + int index = GUIGetItemIndex(item) + GUIItemFlags[index] = GUIItemFlags[index] & 0xfffffffe + + if(GUIIsControlItem(index)) + { + int val = GUIItemValue[index][1] + if(val) + { + GUIItemFlags[val] = GUIItemFlags[val] & 0xfffffffe + if(GUIItemTypes[val] == GUI_TYPE_IMAGE) + SetWidgetColor(GUIWidgets[GUIItemWidgets[val]], GUIInactiveColor) + else + SetWidgetTextColor(GUIWidgets[GUIItemWidgets[val]], GUIInactiveColor) + } + } + + if(GUIItemTypes[index] == GUI_TYPE_IMAGE) + SetWidgetColor(GUIWidgets[GUIItemWidgets[index]], GUIInactiveColor) + else + SetWidgetTextColor(GUIWidgets[GUIItemWidgets[index]], GUIInactiveColor) +} + +//----------------------------------------------------------------- +void GUIActivateItem(string item, int state) +{ + int index = GUIGetItemIndex(item) + + widget w = GUIWidgets[GUIItemWidgets[index]] + + if(GUIItemFlags[index] & 1) + state = -1 + + if(GUIItemTypes[index] == GUI_TYPE_IMAGE) + { + switch(state) + { + case 0: + SetWidgetColor(w, GUIInactiveColorImage) + break + + case 1: + SetWidgetColor(w, GUIActiveColorImage) + break + + case -1: + SetWidgetColor(w, GUIDisabledColorImage) + break + } + } + else + { + switch(state) + { + case 0: + SetWidgetTextColor(w, GUIInactiveColor) + break + + case 1: + SetWidgetTextColor(w, GUIActiveColor) + break + + case -1: + SetWidgetTextColor(w, GUIDisabledColor) + break + } + } + + if(!GUIHintWidget) + { + GUIHintWidget = CreateWidget(WTYPE_TEXT, 430, 140, 340, 32, WF_VISIBLE|WF_SOURCEALPHA|WF_BLEND, 0xff0e2b2d, 202) + SetFont(GUIHintWidget, MainFont) + } + + if(!GUIHintInfoWidget) + { + GUIHintInfoWidget = CreateWidget(WTYPE_TEXT, 430, 160, 350, 50, WF_VISIBLE|WF_SOURCEALPHA|WF_BLEND, GUIInactiveColor, 202) + SetWidgetTextSpacing(GUIHintInfoWidget, 0, -6) + SetFont(GUIHintInfoWidget, MainFont) + } + + if(GUIItemHints[index] && state == 1) + { + ShowWidget(GUIHintWidget, true) + SetWidgetTextEx(GUIHintWidget, 0, true, GUIItemHints[index]) + } + else + { + ShowWidget(GUIHintWidget, false) + } + + if(GUIItemHintInfos[index] && state == 1) + { + ShowWidget(GUIHintInfoWidget, true) + SetWidgetText(GUIHintInfoWidget, 1, "") + SetWidgetText(GUIHintInfoWidget, 2, "") + SetWidgetText(GUIHintInfoWidget, 3, "") + SetWidgetTextEx(GUIHintInfoWidget, 0, true, GUIItemHintInfos[index]) + } + else + { + ShowWidget(GUIHintInfoWidget, false) + } +} + +//----------------------------------------------------------------- +int GUICompareMouse(int item) +{ + if(MouseX < GUIItemRect[item][0] || MouseX > GUIItemRect[item][2] || MouseY < GUIItemRect[item][1] || MouseY > GUIItemRect[item][3]) + return -1 + + return MouseX - GUIItemRect[item][0] +} + +//----------------------------------------------------------------- +int GUICheckMouse() +{ + int btn = GUIGetItemIndex(ActButton) + + for(int n = 0; n < GUINumItems; n++) + { + int nbtn = n + + if(GUIItemFlags[nbtn] & 1) + continue + + int v = GUICompareMouse(nbtn) + + if(v >= 0) + { + if(!GUIIsControlItem(nbtn)) + { + nbtn = GUIItemValue[nbtn][1] + } + + if(btn != nbtn) + { + if(btn >= 0) + GUIActivateItem(GUIItemIDs[btn], 0) + + GUIActivateItem(GUIItemIDs[nbtn], 1) + ActButton = GUIItemIDs[nbtn] + + PlayMenuSound(1) + } + return nbtn + } + } + + return -1 +} + +//----------------------------------------------------------------- +void SetMenuValue(int item) +{ + switch(GUIItemTypes[item]) + { + case GUI_TYPE_SLIDER: + int width = GUIItemRect[item][2] - GUIItemRect[item][0] + int maxv = atoi(GUIItemStrings[item][0]) + int w = ItemValues[GUIItemValue[item][0]] * width / maxv + SetWidgetPos(GUIWidgets[GUIItemWidgets[item]], GUIItemRect[item][0], GUIItemRect[item][1], w, GUIItemRect[item][3] - GUIItemRect[item][1]) + break + + case GUI_TYPE_LIST_VALUE: + string str = GUIItemStrings[item][ItemValues[GUIItemValue[item][0]]] + SetWidgetTextEx(GUIWidgets[GUIItemWidgets[item]], 0, true, str) + break + } +} + +//----------------------------------------------------------------- +void GUISetMenuItems() +{ + for(int n = 0; n < GUINumItems; n++) + { + if(GUIIsControlItem(n)) + continue + + SetMenuValue(n) + } +} + +//----------------------------------------------------------------- +int GUIMenuItemVariants(int item) +{ + for(int c = 0; c < MAX_MENU_ITEM_VARIANTS; c++) + { + if(!GUIItemStrings[item][c]) + return c + } + + return 0 +} + +//----------------------------------------------------------------- +void SwitchMenuItem(string item, int dir) +{ + int n = GUIGetItemIndex(item) + + //custom prvek + if(n == -1) + return + + int maxv, v, val, id + + if(GUIIsControlItem(n)) //search for value item + { + val = GUIItemValue[n][1] + if(val == 0) + return + } + else + { + val = n + } + + id = GUIItemValue[val][0] + + v = ItemValues[id] + + switch(GUIItemTypes[val]) + { + case GUI_TYPE_LIST_VALUE: + if(dir == 0) + dir = 1 + + maxv = GUIMenuItemVariants(val) + v += dir + if(v >= maxv) + v = 0 + if(v < 0) + v = maxv - 1 + + ItemValues[id] = v + SetMenuValue(val) + ClearMousePress(0) + PlayMenuSound(3) + break + + case GUI_TYPE_SLIDER: + maxv = atoi(GUIItemStrings[val][0]) + if(MousePress(0)) + { + v = GUICompareMouse(val) + + if(v >= 0) + { + int width = GUIItemRect[val][2] - GUIItemRect[val][0] + + v = v * maxv / width + clamp v<0, maxv> + + ItemValues[id] = v + SetMenuValue(val) + } + } + else + { + v = ItemValues[id] + v += dir * maxv / 10 + clamp v<0, maxv> + ItemValues[id] = v + SetMenuValue(val) + } + break + } +} + + +//----------------------------------------------------------------- +bool GUINextItem(int hdir = 0, int vdir = 1) +{ + if(ActButton == "") + { + //je to na nejakem custom prvku + return false + } + + string pbutton = ActButton + + int pindex = GUIGetItemIndex(ActButton) + int bestindex = -1 + int bestdist = 800 + + for(int index = 0; index < GUINumItems; index++) + { + if(GUIItemFlags[index] & 1) + continue + + if(!GUIIsControlItem(index)) + continue + + int dist + + if(hdir > 0) + { + dist = GUIItemRect[index][0] - GUIItemRect[pindex][2] + + if(dist < -10) + continue + + dist += abs(GUIItemRect[index][1] - GUIItemRect[pindex][1]) + clamp dist<0, 800> + } + + if(hdir < 0) + { + dist = GUIItemRect[pindex][0] - GUIItemRect[index][2] + + if(dist < -10) + continue + + dist += abs(GUIItemRect[index][1] - GUIItemRect[pindex][1]) + clamp dist<0, 800> + } + + if(vdir > 0) + { + dist = GUIItemRect[index][1] - GUIItemRect[pindex][3] + + if(dist < -10) + continue + + dist += abs(GUIItemRect[index][0] - GUIItemRect[pindex][0]) + clamp dist<0, 800> + } + + if(vdir < 0) + { + dist = GUIItemRect[pindex][1] - GUIItemRect[index][3] + + if(dist < -10) + continue + + dist += abs(GUIItemRect[index][0] - GUIItemRect[pindex][0]) + clamp dist<0, 800> + } + + if(dist < bestdist) + { + bestindex = index + bestdist = dist + } + } + + if(bestindex == -1 || bestindex == pindex) + return false + + ActButton = GUIItemIDs[bestindex] + + GUIActivateItem(pbutton, 0) + GUIActivateItem(ActButton, 1) + PlayMenuSound(1) + return true +} + +//----------------------------------------------------------------- +void InitMenu(bool music) +{ + MenuStackOff = 0 + ShowWidget(WMousePointer,true) + + if(music) + { + MenuMusic = GetSoundEx("MenuMusic", 1, SF_STREAM) + //MenuMusicID = PlaySound(NULL, MenuMusic, SF_AMBIENT|SF_MUSIC) <-- moved to open menu (due music delay on start) + //SetSoundVolume(MenuMusicID, 0) + } + + HButtonSelect = GetSoundEx("MenuSelect", 1, 0) + HButtonEnter = GetSoundEx("MenuEnter", 1, 0) + HButtonSwitch = GetSoundEx("MenuSwitch", 1, 0) + HEscape = GetSoundEx("MenuEscape", 1, 0) +} + +//----------------------------------------------------------------- +void FreeMenu() +{ + GUICleanup() + MenuStackOff = 0 + MenuActive = "" + ActButton = "" + + if(GUIHintWidget) + { + DestroyWidget(GUIHintWidget) + GUIHintWidget = NULL + } + + if(GUIHintInfoWidget) + { + DestroyWidget(GUIHintInfoWidget) + GUIHintInfoWidget = NULL + } + + if(MenuMusicID) + { + EndSound(MenuMusicID) + ReleaseSound(MenuMusic) + } + + ShowWidget(WMousePointer,false) +} + + +widget ListboxItemWidgets[64] + +string ListboxPrimaryValue[64] +string ListboxSecondaryValue[64] +widget ListboxPrimaryWidget[64] +widget ListboxSecondaryWidget[64] +widget ListboxBack[64] +widget WClipArea, WScrollbarArea +widget Scrollbar[1] +widget SelectedLine[1] +widget AreaTop[1] +widget AreaBottom[1] + + +int ScrollbarArea[4] = {630, 280, 650, 401} +int ScrollbarRect[4] = {632, 280, 650, 401} + +int ScrollbarWidth = 16 +int ScrollbarHeight = 64 +int LineHeight = 20 +int TextAlignOffset = 10 +int MouseWheelSpeed = 2 + +int ListboxArea[4] = {85, 280, 610, 400} +int ListboxCol0Pos[2] = {85, 250} +int ListboxCol1Pos[2] = {370, 125} +int ListboxCol2Pos[2] = {500, 125} + +int ItemOffsetV[64] + +//#define XBOX + +#ifdef XBOX +int ListboxItemsNum = 19 +#else +int ListboxItemsNum = 29 +#endif + +//----------------------------------------------------------------- +void SetWidTexts() +{ + int n = 0 + while(n < ListboxItemsNum) + { + int k1 = g_KeyDef1[n] + int k2 = g_KeyDef2[n] + + if(ListboxPrimaryWidget[n] != NULL) + { + if(k1 < 0) + SetWidgetTextEx(ListboxPrimaryWidget[n] , 0, true, OtherNames[-k1]) + else + SetWidgetTextEx(ListboxPrimaryWidget[n] , 0, true, KeyNames[k1]) + + if(k2 < 0) + SetWidgetTextEx(ListboxSecondaryWidget[n] , 0, true, OtherNames[-k2]) + else + SetWidgetTextEx(ListboxSecondaryWidget[n] , 0, true, KeyNames[k2]) + } + n++ + } +} + +//----------------------------------------------------------------- +void LoadListbox(string LItemNames[], widget LItemWidgets[], string LPrimaryValue[], string LSecondaryValue[], widget LPrimaryWidget[], widget LSecondaryWidget[], widget LboxBack[], widget LScrollbar[], widget LSelectedLine[], widget LAreaTop[], widget LAreaBottom[], int LboxPos[], int LboxCol0Pos[], int LboxCol1Pos[], int LboxCol2Pos[], int IOffsetV[], int LboxItemsNum) +{ + int n = 0 + int wnum = ListboxItemsNum + ListKeyInput = 0 + + int temp1 = wnum * LineHeight + int temp2 = ListboxArea[3] - ListboxArea[1] + 1 + int temp3 = ScrollbarArea[3] - ScrollbarArea[1] + float temp4 = temp2 / temp1 + temp4 = temp3 * temp4 + //ScrollbarHeight = temp4 + ScrollbarRect[3] = ScrollbarRect[1] + ScrollbarHeight + + WClipArea = CreateWidget(WTYPE_IMAGE, ListboxArea[0], ListboxArea[1] , 550, 120, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP | WF_NOFILTER, 0x00ffffff, 300) + + LScrollbar[0] = CreateWidget(WTYPE_IMAGE, ScrollbarRect[0], ScrollbarRect[1], ScrollbarWidth, ScrollbarHeight, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP, ARGB(255,130,255,255), 302) +// LoadWidgetImage(LScrollbar[0] , 0, MenuPath + "controls_scrollbar") + + WScrollbarArea = CreateWidget(WTYPE_IMAGE, ScrollbarArea[0] + 2, ScrollbarArea[1], ScrollbarWidth, 120, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP | WF_NOFILTER, ARGB(255,30,155,155), 300) + + LSelectedLine[0] = CreateWidgetEx(WClipArea, WTYPE_IMAGE, ListboxArea[0], ScrollbarRect[1], 550, 24, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP | WF_NOFILTER, 0xffffffff, 300) + LoadWidgetImage(LSelectedLine[0] , 0, MenuPath + "controls_line_1") + ShowWidget(LSelectedLine[0], 0) + + LAreaTop[0] = CreateWidget(WTYPE_IMAGE, ListboxArea[0], ListboxArea[1] - 8, 563, 7, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP | WF_NOFILTER, 0xffffffff, 303) + LoadWidgetImage(LAreaTop[0] , 0, MenuPath + "controls_clip_up") + ShowWidget(LAreaTop[0], 1) + + LAreaBottom[0] = CreateWidget(WTYPE_IMAGE, ListboxArea[0], ListboxArea[1] + 121 , 563, 7, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP | WF_NOFILTER, 0xffffffff, 303) + LoadWidgetImage(LAreaBottom[0] , 0, MenuPath + "controls_clip_down") + ShowWidget(LAreaBottom[0], 1) + +// GUIImage("controls_scrollbararea", 630, 280, 20, 128, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // scrollbar range + + while(n < wnum) + { + string wname + + wname = LItemNames[n] + if(wname == "") + return + + IOffsetV[n] = n * LineHeight + int widposV = LboxCol0Pos[1] + IOffsetV[n] + + LboxBack[n] = CreateWidgetEx(WClipArea, WTYPE_IMAGE, LboxPos[0], widposV, 550, 24, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP | WF_NOFILTER, 0xffffffff, 299) + LoadWidgetImage(LboxBack[n] , 0, MenuPath + "controls_line_0") + + int WWidth = 800 - (LboxCol0Pos[0] + TextAlignOffset) + LItemWidgets[n] = CreateWidgetEx(WClipArea, WTYPE_TEXT, LboxCol0Pos[0] + TextAlignOffset, widposV, WWidth, 10, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP | WF_NOFILTER, GUIInactiveColor, 301) + SetWidgetTextEx(LItemWidgets[n] , 0, true, LItemNames[n]) + SetFont(LItemWidgets[n] , MainFont) + ShowWidget(LItemWidgets[n] , 0) + + LPrimaryWidget[n] = CreateWidgetEx(WClipArea, WTYPE_TEXT, LboxCol1Pos[0] + TextAlignOffset, widposV, 135, 25, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_NOWRAP | WF_NOFILTER, GUIInactiveColor, 301) + ListboxPrimaryWidget[n] = ListboxPrimaryWidget[n] + int tmpkey = g_KeyDef1_temp[n] + if(tmpkey > 0) + SetWidgetTextEx(LPrimaryWidget[n] , 0, true, KeyNames[tmpkey]) + else + SetWidgetTextEx(LPrimaryWidget[n] , 0, true, OtherNames[-tmpkey]) + SetFont(LPrimaryWidget[n] , MainFont) + if(n > ListboxItemsNum) + ShowWidget(LPrimaryWidget[n] , 0) + + LSecondaryWidget[n] = CreateWidgetEx(WClipArea, WTYPE_TEXT, LboxCol2Pos[0] + TextAlignOffset, widposV, 135, 25, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND, GUIInactiveColor, 301) + tmpkey = g_KeyDef2_temp[n] + if(tmpkey > 0) + SetWidgetTextEx(LSecondaryWidget[n] , 0, true, KeyNames[tmpkey]) + else + SetWidgetTextEx(LSecondaryWidget[n] , 0, true, OtherNames[-tmpkey]) + SetFont(LSecondaryWidget[n] , MainFont) + ShowWidget(LSecondaryWidget[n] , 0) + + n++ + LboxItemsNum = n + } + SetWidTexts() +} + +//----------------------------------------------------------------- +void FreeListbox(widget w1[], widget w2[], widget w3[], widget w4[], widget w5[], widget w6[], widget w7[], widget w8[]) +{ + int n + int Wnum + widget w + ListKeyInput = 0 + + n = 0 + Wnum = sizeof(w1) + while(n < Wnum) + { + w = w1[n] + if(w != NULL) + { + DestroyWidget(w) + w1[n] = NULL + } + n++ + } + + n = 0 + Wnum = sizeof(w2) + while(n < Wnum) + { + w = w2[n] + if(w != NULL) + { + DestroyWidget(w) + w2[n] = NULL + } + n++ + } + + n = 0 + Wnum = sizeof(w3) + while(n < Wnum) + { + w = w3[n] + if(w != NULL) + { + DestroyWidget(w) + w3[n] = NULL + } + n++ + } + + n = 0 + Wnum = sizeof(w4) + while(n < Wnum) + { + w = w4[n] + if(w != NULL) + { + DestroyWidget(w) + w4[n] = NULL + } + n++ + } + + n = 0 + Wnum = sizeof(w5) + while(n < Wnum) + { + w = w5[n] + if(w != NULL) + { + DestroyWidget(w) + w5[n] = NULL + } + n++ + } + + n = 0 + Wnum = sizeof(w6) + while(n < Wnum) + { + w = w6[n] + if(w != NULL) + { + DestroyWidget(w) + w6[n] = NULL + } + n++ + } + + n = 0 + Wnum = sizeof(w7) + while(n < Wnum) + { + w7[n] = w7[n] + w = w7[n] + if(w != NULL) + { + DestroyWidget(w) + w7[n] = NULL + } + n++ + } + + n = 0 + Wnum = sizeof(w8) + while(n < Wnum) + { + w = w8[n] + if(w != NULL) + { + DestroyWidget(w) + w8[n] = NULL + } + n++ + } + + if(WScrollbarArea) + { + DestroyWidget(WScrollbarArea) + WScrollbarArea = NULL + } + + if(WClipArea) + { + DestroyWidget(WClipArea) + WClipArea = NULL + } +} + +//events flags +int LB_evLineClick = 1 +int LB_evLineDblClick = 2 +int LB_evCol0Click = 4 +int LB_evCol1Click = 8 +int LB_evCol2Click = 16 +int LB_evCol3Click = 32 + + +int LB_Events +bool g_LB_Update //povoluje Update +int LB_ColNum +int LB_LinesNum +int LB_MaxColNum = 4 +int LB_MaxLinesNum = 64 + +int LB_Left +int LB_Top +int LB_Width +int LB_Height +int LB_Right +int LB_Bottom + +int LB_LineHeight +int LB_UsedHeight + +int LB_SliderWidth +int LB_SliderHeight +int LB_SliderLeft +int LB_SliderTop + +int LB_SelectorWidth +int LB_SelectorHeight +int LB_SelectorLeft +int LB_SelectorTop + +int LB_ColRight[4] +int LB_ColLeft[4] + +int LB_LineVoffsets[64] +string LB_Texts[4][64] +widget LB_WidgetTexts[4][64] //4 stlpce, 64 riadkov +widget LB_WidgetImages[64] +widget LB_Slider +widget LB_Selector +widget LB_Back, LB_ClipArea +widget LB_CustomImages[8] +int LB_CustomImagesNum +string LB_LineBitmap + +int LB_SliderPickOffset +bool LB_SliderPicked +float LB_SliderActPosRate +int LB_SelDblClick +int LB_SelLine +int LB_OldClicked +int LB_LinesYOffset + +//----------------------------------------------------------------- +void LB_Open(int ColNum, int height) +{ + LB_ColNum = ColNum + LB_Height = height + LB_Bottom = LB_Top + LB_Height + LB_OldClicked = -1 + LB_LinesNum = 0 + LB_UsedHeight = 0 + LB_CustomImagesNum = 0 +} + +//----------------------------------------------------------------- +void LB_SetListBoxPos(int left, int top) +{ + LB_Left = left + LB_Top = top + LB_Right = LB_Left + LB_Width + LB_Bottom = LB_Top + LB_Height +} + +//----------------------------------------------------------------- +void LB_AddLineImage(string BitmapPath, int width, int height) +{ + LB_LineBitmap = BitmapPath + LB_Width = width + LB_Right = LB_Left + LB_Width + LB_LineHeight = height +} + +//----------------------------------------------------------------- +void LB_AddCustomImage(string BitmapPath, int left, int top, int width, int height, int color, int SortOff) +{ + LB_CustomImages[LB_CustomImagesNum] = CreateWidget(WTYPE_IMAGE, left, top, width, height, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND/* | WF_NOWRAP*/, color, 310 + SortOff) + + if(BitmapPath) + LoadWidgetImage(LB_CustomImages[LB_CustomImagesNum], 0, BitmapPath) + + ShowWidget(LB_CustomImages[LB_CustomImagesNum], 1) + LB_CustomImagesNum++ +} + +//----------------------------------------------------------------- +void LB_SetColWidth(int Col, int width) +{ + if(Col == 0) + { + LB_ColLeft[Col] = LB_Left + LB_ColRight[Col] = LB_Left + width + return + } + + LB_ColLeft[Col] = LB_ColRight[Col - 1] + 1 + LB_ColRight[Col] = LB_ColLeft[Col] + width +} + +//----------------------------------------------------------------- +void LB_AddSliderImage(string BitmapPath, int width, int height) +{ + LB_SliderWidth = width + LB_SliderHeight = height + + LB_SliderLeft = LB_Right + 1 + + if(LB_SliderTop == 0) //FIXME pri viacerych listboxoch to je neziaduce + LB_SliderTop = LB_Top + + LB_Slider = CreateWidget(WTYPE_IMAGE, LB_SliderLeft, LB_SliderTop, LB_SliderWidth, LB_SliderHeight, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND | WF_STRETCH/* | WF_NOWRAP*/, ARGB(255,130,255,255), 305) +// LoadWidgetImage(LB_Slider , 0, BitmapPath) + ShowWidget(LB_Slider, 1) +} + +//----------------------------------------------------------------- +void LB_AddSelectorImage(string BitmapPath, int width, int height) +{ + LB_SelectorWidth = width + LB_SelectorHeight = height + + LB_SelectorLeft = LB_Left + LB_SelectorTop = LB_Top + + LB_Selector = CreateWidgetEx(LB_ClipArea, WTYPE_IMAGE, LB_SelectorLeft, LB_SelectorTop, LB_SelectorWidth, LB_SelectorHeight, WF_VISIBLE | WF_SOURCEALPHA | WF_ADDITIVE/* | WF_NOWRAP*/, ARGB(255,0,105,105), 302) + + if(BitmapPath) + LoadWidgetImage(LB_Selector , 0, BitmapPath) + + ShowWidget(LB_Selector, 1) +} + +//----------------------------------------------------------------- +void LB_AddBackgroundImage(string BitmapPath) +{ + if(!BitmapPath) + return + + LB_ClipArea = CreateWidget(WTYPE_IMAGE, LB_Left, LB_Top, LB_Width, LB_Height, WF_VISIBLE|WF_SOURCEALPHA|WF_BLEND/* | WF_NOWRAP*/, ARGB(160,28,48,51), 300) + LB_Back = CreateWidget(WTYPE_IMAGE, LB_Left, LB_Top, LB_Width, LB_Height, WF_VISIBLE|WF_SOURCEALPHA|WF_BLEND/* | WF_NOWRAP*/, 0x00ffffff, 301) + LoadWidgetImage(LB_Back , 0, BitmapPath) + ShowWidget(LB_Back, 1) +} + +//----------------------------------------------------------------- +int LB_AddLine() +{ + int Temp = LB_Top + (LB_LinesNum * LB_LineHeight) + LB_LineVoffsets[LB_LinesNum] = Temp - LB_Top + + if(LB_LineBitmap) + { + LB_WidgetImages[LB_LinesNum] = CreateWidgetEx(LB_ClipArea, WTYPE_IMAGE, LB_Left, Temp, LB_Width, LB_LineHeight, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND/* | WF_NOWRAP*/, 0xffffffff, 302) + LoadWidgetImage(LB_WidgetImages[LB_LinesNum] , 0, LB_LineBitmap) + ShowWidget(LB_WidgetImages[LB_LinesNum], 1) + } + + for(int n = 0; n < LB_ColNum; n++) + { + LB_WidgetTexts[n][LB_LinesNum] = CreateWidgetEx(LB_ClipArea, WTYPE_TEXT, LB_ColLeft[n] + 10, LB_Top + (LB_LinesNum * LB_LineHeight), LB_ColRight[n] - LB_ColLeft[n], LB_LineHeight, WF_VISIBLE | WF_SOURCEALPHA | WF_ADDITIVE, 0xffffffff, 304) + SetWidgetText(LB_WidgetTexts[n][LB_LinesNum] , 0, "no text") + LB_Texts[n][LB_LinesNum] = "no text" + SetFont(LB_WidgetTexts[n][LB_LinesNum] , MainFont) + ShowWidget(LB_WidgetTexts[n][LB_LinesNum] , 1) + } + + LB_UsedHeight += LB_LineHeight + return LB_LinesNum++ +} + +//----------------------------------------------------------------- +void LB_SetLineText(int Col, int Line, string text, bool UnicodeMode) +{ + if(UnicodeMode) + SetWidgetTextEx(LB_WidgetTexts[Col][Line], 0, true, text) + else + SetWidgetText(LB_WidgetTexts[Col][Line], 0, text) +} + +//----------------------------------------------------------------- +void LB_SetLineColor(int Col, int Line, int color) +{ + SetWidgetTextColor(LB_WidgetTexts[Col][Line], color) +} + +//----------------------------------------------------------------- +void LB_EnableEvents(bool stat) +{ + g_LB_Update = stat +} + +//----------------------------------------------------------------- +string LB_GetLineText(int Col, int Line) +{ + return LB_Texts[Col][Line] +} + +//----------------------------------------------------------------- +void LB_RemoveLine(int Line) +{ + LB_LinesNum-- +} + +//----------------------------------------------------------------- +void LB_SelectLine(int line) +{ + if(line >= 0 && line < LB_LinesNum) + LB_SelLine = line +} + +//----------------------------------------------------------------- +int LB_GetSelectedLine() +{ + return LB_SelLine +} + +//----------------------------------------------------------------- +int LB_GetEvents() +{ + return LB_Events +} + +//----------------------------------------------------------------- +int LB_Update() +{ + int events = 0 + int ClickedLine = -1 + + float f1 + float f2 + float f3 + int n + int VisibleHeight + + if(LB_UsedHeight < LB_Height) + { + LB_SliderHeight = LB_Height + VisibleHeight = LB_UsedHeight + } + else + { + f1 = LB_Height + f2 = LB_UsedHeight + f3 = f1 / f2 + f3 = f3 * f1 + LB_SliderHeight = f3 + VisibleHeight = LB_Height + } + + float MaxMoveOff = LB_UsedHeight - LB_Height + f1 = LB_Height - LB_SliderHeight //draha po ktorej slider chodi + f2 = LB_SliderTop - LB_Top //ako daleko je od zaciatku + + if(f1 == 0) + LB_SliderActPosRate = 0 + else + LB_SliderActPosRate = f2 / f1 //percentualna cast + + f3 = LB_SliderActPosRate * MaxMoveOff //o tolko sa musia lajny posunut nad LB_Top + LB_LinesYOffset = f3 + + int LineActPosTop + int TopVisEnd + int BottomVisEnd + int Vis + + for(n = 0; n < LB_LinesNum; n++) //posunieme lajny + { + LineActPosTop = LB_Top + LB_LineVoffsets[n] - LB_LinesYOffset + + TopVisEnd = LB_Top - LB_LineHeight + BottomVisEnd = LB_Bottom + + if(LineActPosTop < TopVisEnd || LineActPosTop > BottomVisEnd) + Vis = 0 + else + Vis = 1 + + for(int k = 0; k < LB_ColNum; k++) + { + SetWidgetPos(LB_WidgetTexts[k][n], LB_ColLeft[k] + 10 - LB_Left, LineActPosTop - LB_Top, LB_ColRight[k] - LB_ColLeft[k], LB_LineHeight) + ShowWidget(LB_WidgetTexts[k][n], Vis) + } + + if(LB_WidgetImages[n]) + { + SetWidgetPos(LB_WidgetImages[n], LB_Left - LB_Left, LineActPosTop - LB_Top, LB_Width, LB_LineHeight) + ShowWidget(LB_WidgetImages[n], Vis) + } + + if(n == LB_SelLine) + { + SetWidgetPos(LB_Selector, LB_Left - LB_Left, LB_Top - LB_LinesYOffset + LB_LineVoffsets[LB_SelLine] - LB_Top , LB_Width, LB_SelectorHeight) + ShowWidget(LB_Selector, Vis) + } + } + + if(LB_SliderPicked == 0) //nemame uchyteny slider + { + if(InRect(LB_SliderLeft - 4, LB_SliderLeft + LB_SliderWidth, LB_SliderTop, LB_SliderTop + LB_SliderHeight, MouseX, MouseY)) + { + if(MousePress(0)) //klikli sme na slider + { + LB_SliderPickOffset = MouseY - LB_SliderTop + LB_SliderPicked = true + } + } + + if(InRect(LB_Left, LB_Right, LB_Top, LB_Bottom - 1, MouseX, MouseY)) //sme nad polami listboxu + { + if(MouseWheel && LB_SliderPicked == false) + { + f1 = LB_Height + f2 = LB_SliderHeight + f3 = f2 / f1 + + float ff = MouseWheel + ff = ff * (f3 * (float)10) + int ii = ff + LB_SliderTop -= ii + + if(LB_SliderTop < LB_Top) + LB_SliderTop = LB_Top + + int tmp2 = LB_Bottom - LB_SliderHeight + + if(LB_SliderTop > tmp2) + LB_SliderTop = tmp2 + } + + int kk = LB_Top - f3 //pozicia prvej lajny + int nn = MouseY - kk //vyskovy rozdiel od mysi + nn /= LB_LineHeight //cislo lany na ktorej je mys + int MouseOnLine = nn + if(nn >= LB_LinesNum) + nn = LB_LinesNum - 1 + + nn *= LB_LineHeight + nn += kk + + LB_SelDblClick -= 0.04//ftime + + for(n = 0; n < LB_ColNum; n++) + { + if(!LB_SliderPicked && InRect(LB_ColLeft[n], LB_ColRight[n], LB_Top, LB_Top + VisibleHeight, MouseX, MouseY)) //sme nad stlpcom n + { + if(LB_SelDblClick < 0) + LB_SelDblClick = 0 + + if(MousePress(0)) //klikli sme na niektory stlpec + { + ClearMousePress(0) + LB_SelectLine(MouseOnLine) + + if(LB_SelDblClick > 0 && LB_SelLine == LB_OldClicked) //dvojklick + ClickedLine = LB_SelLine + + LB_SelDblClick = 1 + LB_OldClicked = LB_SelLine + + if(n == 0) + events |= LB_evCol0Click + + if(n == 1) + events |= LB_evCol1Click + + if(n == 2) + events |= LB_evCol2Click + + if(n == 3) + events |= LB_evCol3Click + + events |= LB_evLineClick + } + } + } + } + } + else //pohybujeme sliderom + { + if(MousePress(0) == false) + LB_SliderPicked = false + + LB_SliderTop = MouseY - LB_SliderPickOffset + } + + if(LB_SliderTop < LB_Top) + LB_SliderTop = LB_Top + + int tmp = LB_Bottom - LB_SliderHeight + + if(LB_SliderTop > tmp) + LB_SliderTop = tmp + + // menime vysku slideru + SetWidgetPos(LB_Slider, LB_SliderLeft, LB_SliderTop, LB_SliderWidth, LB_SliderHeight) + + if(LB_LinesNum <= 0) + ShowWidget(LB_Selector, false) + + LB_Events = events + return ClickedLine +} + +//----------------------------------------------------------------- +void CloseLB() +{ + int k + for(k = 0; k < LB_MaxLinesNum; k++) + { + for(int n = 0; n < LB_MaxColNum; n++) + { + if(LB_WidgetTexts[n][k]) + DestroyWidget(LB_WidgetTexts[n][k]) + + LB_WidgetTexts[n][k] = NULL + LB_Texts[n][k] = "" + } + + if(LB_WidgetImages[k]) + DestroyWidget(LB_WidgetImages[k]) + + LB_WidgetImages[k] = NULL + } + + for(k = 0; k < LB_CustomImagesNum; k++) + { + if(LB_CustomImages[k]) + { + DestroyWidget(LB_CustomImages[k]) + LB_CustomImages[k] = NULL + } + } + + if(LB_Slider) + DestroyWidget(LB_Slider) + + LB_Slider = NULL + + if(LB_Selector) + DestroyWidget(LB_Selector) + + LB_Selector = NULL + + if(LB_Back) + DestroyWidget(LB_Back) + + LB_Back = NULL + + if(LB_ClipArea) //pozor. je to parent widgetu LB_Back + DestroyWidget(LB_ClipArea) + + LB_ClipArea = NULL +} + +//-------------------------------------------------------------- +void DeleteKeyDef(int KeyCode, int KeyPS, int TmpKeys[]) +{ + int n + + for(n = 0; n < ListboxItemsNum; n++) + { + if(TmpKeys[n] == KeyCode) + { + TmpKeys[n] = 0 //zmazeme definiciu tejto klavesy + + if(KeyPS == 0) //primary key + SetWidgetText(ListboxPrimaryWidget[n], 0, "") + + if(KeyPS == 1) //secondary key + SetWidgetText(ListboxSecondaryWidget[n], 0, "") + + return + } + } +} + +//-------------------------------------------------------------- +void DupliciteKeyTest(int Key2Test, int OldDefinedKey) +{ + if(Key2Test == OldDefinedKey) + return + + for(int n = 0; n < 256; n++) + { + if(g_KeyDef1_temp[n] == Key2Test) + { + DeleteKeyDef(g_KeyDef1_temp[n], 0, g_KeyDef1_temp) + return + } + + if(g_KeyDef2_temp[n] == Key2Test) + { + DeleteKeyDef(g_KeyDef2_temp[n], 1, g_KeyDef2_temp) + return + } + } +} + +//-------------------------------------------------------------- +void SetItemsPosition(widget LboxItemWidgets[], widget LboxPrimaryWidget[], widget LboxSecondaryWidget[], widget LboxBack[], widget LScrollbar[], widget LSelectedLine[], int LboxCol0Pos[], int LboxCol1Pos[], int LboxCol2Pos[], int IOffsetV[], int LboxItemsNum) +{ + int n = 0 + int movement + int offV + int SelItemH //Horizontaln pozicia selectnuteho itemu + int SelItemOff + int ListPosV + int KeyType + int ms //Mouse state + + if(ListKeyInput != 0) + { + n = 0 + while(n < 255) + { + if(KeyState(n)) + { + ClearKey(n) + int KI = ListKeyInput - 1 + int k1 = g_KeyDef1_temp[KI] + int k2 = g_KeyDef2_temp[KI] + + if(KeyType == 1) //Primary + { + if(n == KC_ESCAPE) + { + if(k1 >= 0) + SetWidgetTextEx(LboxPrimaryWidget[KI], 0, true, KeyNames[k1]) + else + { + k1 = -k1 + SetWidgetTextEx(LboxPrimaryWidget[KI], 0, true, OtherNames[k1]) + } + } + else + { + ClearMousePress(0) + DupliciteKeyTest(n, k1) + g_KeyDef1_temp[KI] = n + SetWidgetTextEx(LboxPrimaryWidget[KI], 0, true, KeyNames[n]) + } + SetWidgetTextColor(LboxPrimaryWidget[KI], GUIInactiveColor) + } + if(KeyType == 2) //Secondary + { + if(n == KC_ESCAPE) + { + if(k2 >= 0) + SetWidgetTextEx(LboxSecondaryWidget[KI], 0, true, KeyNames[k2]) + else + { + k2 = -k2 + SetWidgetTextEx(LboxSecondaryWidget[KI], 0, true, OtherNames[k2]) + } + } + else + { + ClearMousePress(0) + DupliciteKeyTest(n, k2) + g_KeyDef2_temp[KI] = n + SetWidgetTextEx(LboxSecondaryWidget[KI], 0, true, KeyNames[n]) + } + SetWidgetTextColor(LboxSecondaryWidget[KI], GUIInactiveColor) + } + ListKeyInput = 0 + KeyType = 0 + } + n++ + } + + if(KeyType > 0) + { + ms = 0 + if(MousePress(0)) //Zmackli sme levy mouse pri editaci primary key + { + ClearMousePress(0) + ms = g_MouseState[0] + } + if(MousePress(1)) //Zmackli sme stredni mouse pri editaci primary key + { + ClearMousePress(1) + ms = g_MouseState[1] + } + if(MousePress(2)) //Zmackli sme pravy mouse pri editaci primary key + { + ClearMousePress(2) + ms = g_MouseState[2] + } + + if(MouseWheel > 0) //Kolecko UP + ms = g_MouseState[3] + if(MouseWheel < 0) //Kolecko DOWN + ms = g_MouseState[4] + + for(n = 0; n < 8; n++) + { + if(JoyButtons[n] > 0) + ms = g_MouseState[n + 5] + } + + if(ms != 0) + { + int MI = ListKeyInput - 1 + int kk1 = g_KeyDef1_temp[MI] + int kk2 = g_KeyDef2_temp[MI] + + if(KeyType == 1) + { + DupliciteKeyTest(ms, kk1) + g_KeyDef1_temp[MI] = ms + SetWidgetTextEx(LboxPrimaryWidget[MI], 0, true, OtherNames[-ms]) + SetWidgetTextColor(LboxPrimaryWidget[MI], GUIInactiveColor) + } + + if(KeyType == 2) + { + DupliciteKeyTest(ms, kk2) + g_KeyDef2_temp[MI] = ms + SetWidgetTextEx(LboxSecondaryWidget[MI], 0, true, OtherNames[-ms]) + SetWidgetTextColor(LboxSecondaryWidget[MI], GUIInactiveColor) + } + + ListKeyInput = 0 + KeyType = 0 + } + } + + return + } + + if(movement == 0) + { + if(InRect(ScrollbarArea[0], ScrollbarArea[2], ScrollbarArea[1], ScrollbarArea[3], MouseX, MouseY) == true) + { + if(InRect(ScrollbarRect[0], ScrollbarRect[2], ScrollbarRect[1], ScrollbarRect[3], MouseX, MouseY) == true) + { + movement = 1 + offV = MouseY - ScrollbarRect[1] + } + else + { + movement = 1 + offV = ScrollbarRect[3] - ScrollbarRect[1] + offV = offV / 2 + } + } + + if(InRect(ListboxArea[0], ListboxArea[2], ListboxArea[1], ListboxArea[3], MouseX, MouseY) == true) + { + n = 0 + while(n < LboxItemsNum) + { + SelItemH = ListPosV + IOffsetV[n] + if(MouseY >= SelItemH) + { + int tmp = SelItemH + LineHeight + if(MouseY < tmp) + { + SelItemOff = IOffsetV[n] + SetWidgetPos(LSelectedLine[0], ListboxArea[0], SelItemH - ListboxArea[1], 500, 20) + ShowWidget(LSelectedLine[0], 1) + + if(MousePress(0)) //Klikli sme na item n + { + if(InRect(LboxCol1Pos[0], LboxCol2Pos[0], SelItemH, tmp, MouseX, MouseY)) //Klikli sme na pole "primary key" + { + ClearMousePress(0) + ListKeyInput = n + 1 + KeyType = 1 + SetWidgetText(LboxPrimaryWidget[n], 0, "???") + SetWidgetTextColor(LboxPrimaryWidget[n], GUIActiveColor) + break + } + if(InRect(LboxCol2Pos[0], ListboxArea[2], SelItemH, tmp, MouseX, MouseY)) //Klikli sme na pole "secondary key" + { + ClearMousePress(0) + ListKeyInput = n + 1 + KeyType = 2 + SetWidgetText(LboxSecondaryWidget[n], 0, "???") + SetWidgetTextColor(LboxSecondaryWidget[n], GUIActiveColor) + break + } + } + else + { + if(MousePress(2) || KeyState(KC_DELETE)) + { + ClearMousePress(2) + ClearKey(KC_DELETE) + + if(InRect(LboxCol1Pos[0], LboxCol2Pos[0], SelItemH, tmp, MouseX, MouseY)) //Klikli sme na pole "primary key" + { + g_KeyDef1_temp[n] = 0 //mazeme definiciu tejto klavesy + SetWidgetText(ListboxPrimaryWidget[n], 0, "") + } + else + { + if(InRect(LboxCol2Pos[0], ListboxArea[2], SelItemH, tmp, MouseX, MouseY)) //Klikli sme na pole "secondary key" + { + g_KeyDef2_temp[n] = 0 + SetWidgetText(ListboxSecondaryWidget[n], 0, "") + } + } + } + } + } + } + n++ + } + + if(MouseWheel != 0) + { + ScrollbarRect[1] = ScrollbarRect[1] - (MouseWheel * MouseWheelSpeed) + ScrollbarRect[3] = ScrollbarRect[1] + ScrollbarHeight + + if(ScrollbarRect[1] < ScrollbarArea[1]) + ScrollbarRect[1] = ScrollbarArea[1] + + if(ScrollbarRect[3] > ScrollbarArea[3]) + ScrollbarRect[1] = ScrollbarArea[3] - ScrollbarHeight + + SetWidgetPos(LScrollbar[0], ScrollbarRect[0], ScrollbarRect[1], ScrollbarWidth, ScrollbarHeight) + } + } + } + else + { + ScrollbarRect[1] = MouseY - offV + ScrollbarRect[3] = ScrollbarRect[1] + ScrollbarHeight + + if(ScrollbarRect[1] < ScrollbarArea[1]) + ScrollbarRect[1] = ScrollbarArea[1] + + if(ScrollbarRect[3] > ScrollbarArea[3]) + ScrollbarRect[1] = ScrollbarArea[3] - ScrollbarHeight + + ScrollbarRect[3] = ScrollbarRect[1] + ScrollbarHeight + SetWidgetPos(LScrollbar[0], ScrollbarRect[0], ScrollbarRect[1], ScrollbarWidth, ScrollbarHeight) + } + + if(g_LMB == 0) + movement = 0 + + int ListHeight = LineHeight * ListboxItemsNum + ListHeight -= ScrollbarArea[3] - ScrollbarArea[1] + int AreaHeight = ScrollbarArea[3] - ScrollbarArea[1] - ScrollbarHeight + int RectInAreaPos = ScrollbarRect[1] - ScrollbarArea[1] + float AreaRate = RectInAreaPos / AreaHeight + float ListOffV = ListHeight * AreaRate + ListPosV = ListboxArea[1] - ListOffV + + n = 0 + while(n < LboxItemsNum) + { + int pos1 = ListPosV + IOffsetV[n] + int pos2 = ListboxArea[1] - LineHeight + int HideValue = 0 + + if(pos1 > pos2) + { + if(pos1 < ListboxArea[3]) + HideValue = 1 + } + + ShowWidget(LboxItemWidgets[n], HideValue) + ShowWidget(LboxPrimaryWidget[n], HideValue) + ShowWidget(LboxSecondaryWidget[n], HideValue) + ShowWidget(LboxBack[n], HideValue) + + // border fade + float alpha = 255 +/* int tempval = pos2 + (LineHeight * 2) + + // top line + if (pos1 < tempval) + alpha = 255 - (255 / (LineHeight * 2) * (tempval - pos1)) + + // bottom line + tempval = ListboxArea[3] - (LineHeight * 2) + if (pos1 > tempval) + alpha = 255 - (255 / (LineHeight * 2) * (pos1 - tempval)) +*/ + // set the alphas + int color = ARGB(alpha, 255, 255, 255) + int textcolor = ARGB(alpha, 86, 253, 255) + + SetWidgetTextColor(LboxItemWidgets[n], textcolor); + SetWidgetTextColor(LboxPrimaryWidget[n], textcolor); + SetWidgetTextColor(LboxSecondaryWidget[n], textcolor); + SetWidgetColor(LboxBack[n], color); + + int left = TextAlignOffset - ListboxArea[0] + int top = ListPosV + IOffsetV[n] - ListboxArea[1] + int width = 500 + int height = 25 + + SetWidgetPos(LboxItemWidgets[n], LboxCol0Pos[0] + left, top, width, height) + SetWidgetPos(LboxPrimaryWidget[n], LboxCol1Pos[0] + left, top, width, height) + SetWidgetPos(LboxSecondaryWidget[n], LboxCol2Pos[0] + left, top, width, height) + + SetWidgetPos(LboxBack[n], 0, ListPosV + IOffsetV[n] - ListboxArea[1], 550, 24) + n++ + } + + pos1 = ListPosV + SelItemOff + HideValue = 0 + + if(pos1 > pos2) + { + if(pos1 < ListboxArea[3]) + HideValue = 1 + } + ShowWidget(LSelectedLine[0], HideValue) + SetWidgetPos(LSelectedLine[0], 0, ListPosV + SelItemOff - ListboxArea[1], 550, 24) +} + +void ShowSavesListbox(bool stat) +{ + if(stat == false) + { + LB_EnableEvents(false) + CloseLB() + return + } + + LB_Open(4, 209) //pocet stlpcov, aktivna vyska + LB_SetListBoxPos(85, 240) //lavy horny roh aktivnej plochy + LB_AddLineImage("gfx/menu/controls_line_0load.tga", 546, 21) //bitmapa pre jeden riadok + LB_SetColWidth(0, 130) //sirka stlpca + LB_SetColWidth(1, 200) //sirka stlpca + LB_SetColWidth(2, 30) //sirka stlpca + LB_SetColWidth(3, 200) //sirka stlpca + LB_AddSliderImage(""/*"gfx/menu/controls_scrollbar.tga"*/, 16, 64) //bitmapa pre slider. sirka, vyska + LB_AddBackgroundImage("gfx/menu/controls_line_x.tga") //pozadie na aktivnej ploche + LB_AddSelectorImage(""/*"gfx/menu/controls_line_1load.tga"*/, 550, 19) //bitmapa pre kurzor + LB_AddCustomImage("gfx/menu/controls_clip_up.tga", 85, 232, 563 ,7, 0xffffffff, 0) + LB_AddCustomImage("gfx/menu/controls_clip_down.tga", 85, 450, 563 ,7, 0xffffffff, 0) + LB_AddCustomImage(""/*"gfx/menu/save_scroll_area.tga"*/, 632, 240, 16, 208, ARGB(255,30,155,155), -6) + LB_EnableEvents(true) //povolime update + + int SaveColorNormal = ARGB(255,255,255,255) + int SaveColorQuick = ARGB(255,127,127,127) + int SaveColorEmpty = ARGB(255,255,255,255) + + for(int n = 0; n < sizeof(SaveFileNames); n++) + { + if(SaveTypes[n] != SAVETYPE_NONE) + { + bool Localized = false + string MapOffName + string SPointOffName = "" + int LineColor = SaveColorNormal + + if(SaveTypes[n] == SAVETYPE_QUICK) + Localized = true + else + { + if(strlen(SaveFileNames[n]) == 7 && substr(SaveFileNames[n], 0, 1) == "l") + Localized = true + } + + if(Localized) + MapOffName = "#" + SaveMapsNames[n]// substr(SaveFileNames[n], 0, 3) + else + MapOffName = SaveFileNames[n] + + if(SaveTypes[n] == SAVETYPE_AUTO) + SPointOffName = "#save_auto" + + if(SaveTypes[n] == SAVETYPE_QUICK) + { + SPointOffName = "#save_quick" + LineColor = SaveColorQuick + } + + if(SaveTypes[n] == SAVETYPE_NORMAL) + SPointOffName = "#save_normal" + + if(SaveTypes[n] == SAVETYPE_EMPTY) + { + SPointOffName = "#save_empty" + LineColor = SaveColorEmpty + } + + int ln = LB_AddLine() + LB_SetLineText(0, ln, SPointOffName, true) + LB_SetLineText(1, ln, MapOffName, Localized) + LB_SetLineText(2, ln, " ", false) + LB_SetLineText(3, ln, SaveMapsTimes[n], false) + LB_SetLineColor(0, ln, LineColor) + LB_SetLineColor(1, ln, LineColor) + LB_SetLineColor(2, ln, LineColor) + LB_SetLineColor(3, ln, LineColor) + } + } + LB_SelectLine(g_SaveSelected) + LB_Update() +} + +//----------------------------------------------------------------- +void InitCredits() +{ + CreditsWidth = g_iWidth + CreditsCurrentPos = 0 + CreditsFullHeight = 0 + NumLines = 0 + ResolutionScale = (float)g_iHeight / 768 + +// int TitleColor = ARGB(255, 107, 107, 127) + int TitleColor = ARGB(255, 255, 204, 0) + int NameColor = ARGB(255, 255, 255, 255) + + CreditsBitmap("gfx/menu/titlelogo.tga", 0xffffffff, 282, 0, 256, 128) + CreditsTextLine("#credits_text0001", MainFont, TitleColor, -1, 0, g_iWidth) //"by" + CreditsTextLine("#credits_text0002", LargeFont, NameColor, -1, 0, g_iWidth) //"Black Element Software s.r.o." + CreditsSpace(50) + CreditsTextLine("#credits_text0003", MainFont, TitleColor, -1, 0, g_iWidth) //"Published by" + CreditsTextLine("#credits_text0004", LargeFont, NameColor, -1, 0, g_iWidth) //"IDEA Games a.s." + CreditsSpace(300) + + CreditsBitmap("gfx/menu/logo_bes.tga", 0xffffffff, 282, 0, 99, 99) + CreditsTextLine("#credits_text0005", LargeFont, NameColor, -1, 0, g_iWidth) //"Black Element Software" + CreditsTextLine("#credits_text0006", MainFont, NameColor, -1, 0, g_iWidth) //"www.blackelement.net" + CreditsSpace(100) + CreditsTextLine("#credits_text0101", LargeFont, TitleColor, -1, 0, g_iWidth) //"Project Manager" + CreditsTextLine("#credits_text0102", LargeFont, NameColor, -1, 0, g_iWidth) //"Radek Volf" + CreditsSpace(50) + CreditsTextLine("#credits_text0201", LargeFont, TitleColor, -1, 0, g_iWidth) //"Lead Designer" + CreditsTextLine("#credits_text0202", LargeFont, NameColor, -1, 0, g_iWidth) //"Radek Volf" + CreditsSpace(50) + CreditsTextLine("#credits_text0301", LargeFont, TitleColor, -1, 0, g_iWidth) //"Lead Programmer" + CreditsTextLine("#credits_text0302", LargeFont, NameColor, -1, 0, g_iWidth) //"Filip Doksansky" + CreditsSpace(50) + CreditsTextLine("#credits_text0501", LargeFont, TitleColor, -1, 0, g_iWidth) //"Lead 3D Artist" + CreditsTextLine("#credits_text0502", LargeFont, NameColor, -1, 0, g_iWidth) //"Jan Zamecnik" + CreditsSpace(50) + CreditsTextLine("#credits_text0401", LargeFont, TitleColor, -1, 0, g_iWidth) //"Lead 2D Artist" + CreditsTextLine("#credits_text0402", LargeFont, NameColor, -1, 0, g_iWidth) //"Ales Horak" + CreditsSpace(50) + CreditsTextLine("#credits_text0510", LargeFont, TitleColor, -1, 0, g_iWidth) //"Original Concept" + CreditsTextLine("#credits_text0511", LargeFont, NameColor, -1, 0, g_iWidth) //"Ondoej Neff" + CreditsSpace(50) + CreditsTextLine("#credits_text0520", LargeFont, TitleColor, -1, 0, g_iWidth) //"Screenwriter" + CreditsTextLine("#credits_text0521", LargeFont, NameColor, -1, 0, g_iWidth) //"Vilma Klímov? + CreditsSpace(50) + CreditsTextLine("#credits_text0601", LargeFont, TitleColor, -1, 0, g_iWidth) //"Programmers" + CreditsTextLine("#credits_text0302", LargeFont, NameColor, -1, 0, g_iWidth) //"Filip Doksansky" + CreditsTextLine("#credits_text0602", LargeFont, NameColor, -1, 0, g_iWidth) //"Andrej Torok" + CreditsTextLine("#credits_text0603", LargeFont, NameColor, -1, 0, g_iWidth) //"Michal Varnuska" + CreditsSpace(50) + CreditsTextLine("#credits_text1001", LargeFont, TitleColor, -1, 0, g_iWidth) //"Additional Tools Programming" + CreditsTextLine("#credits_text1002", LargeFont, NameColor, -1, 0, g_iWidth) //"Jan Zamecnik" + CreditsTextLine("#credits_text1003", LargeFont, NameColor, -1, 0, g_iWidth) //"Milos Zajic" + CreditsTextLine("#credits_text1004", LargeFont, NameColor, -1, 0, g_iWidth) //"Viktor Bocan" + CreditsSpace(50) + CreditsTextLine("#credits_text1101", LargeFont, TitleColor, -1, 0, g_iWidth) //"Music composer" + CreditsTextLine("#credits_text1102", LargeFont, NameColor, -1, 0, g_iWidth) //"Jaroslav Kasny" + CreditsSpace(50) + CreditsTextLine("#credits_text1201", LargeFont, TitleColor, -1, 0, g_iWidth) //"Level Designers" + CreditsTextLine("#credits_text1202", LargeFont, NameColor, -1, 0, g_iWidth) //"Ales Horak" + CreditsTextLine("#credits_text1203", LargeFont, NameColor, -1, 0, g_iWidth) //"Rudolf Snizek" + CreditsTextLine("#credits_text1204", LargeFont, NameColor, -1, 0, g_iWidth) //"Josef Vlach" + CreditsSpace(50) + CreditsTextLine("#credits_text1206", LargeFont, TitleColor, -1, 0, g_iWidth) //Gameplay scripting + CreditsTextLine("#credits_text1207", LargeFont, NameColor, -1, 0, g_iWidth) //Michal Svìtl? + CreditsSpace(50) + CreditsTextLine("#credits_text1301", LargeFont, TitleColor, -1, 0, g_iWidth) //"Modelers" + CreditsTextLine("#credits_text1303", LargeFont, NameColor, -1, 0, g_iWidth) //"Milos Zajic" + CreditsTextLine("#credits_text1305", LargeFont, NameColor, -1, 0, g_iWidth) //"Jiri Bartonek" + CreditsTextLine("#credits_text1304", LargeFont, NameColor, -1, 0, g_iWidth) //"Kamila Clarova" + CreditsTextLine("#credits_text1306", LargeFont, NameColor, -1, 0, g_iWidth) //"Jan Zamecnik" + CreditsSpace(50) + CreditsTextLine("#credits_text2905", LargeFont, TitleColor, -1, 0, g_iWidth) //"Texture Artists" + CreditsTextLine("#credits_text0402", LargeFont, NameColor, -1, 0, g_iWidth) //"Ales Horak" + CreditsTextLine("#credits_text2906", LargeFont, NameColor, -1, 0, g_iWidth) //"Martin Lisec" + CreditsTextLine("#credits_text1305", LargeFont, NameColor, -1, 0, g_iWidth) //"Jiri Bartonek" + CreditsSpace(50) + CreditsTextLine("#credits_text1401", LargeFont, TitleColor, -1, 0, g_iWidth) //"Character Modeling" + CreditsTextLine("#credits_text1402", LargeFont, NameColor, -1, 0, g_iWidth) //"Jiri Bartonek" + CreditsTextLine("#credits_text1403", LargeFont, NameColor, -1, 0, g_iWidth) //"Kamila Clarova" + CreditsTextLine("#credits_text1404", LargeFont, NameColor, -1, 0, g_iWidth) //"Jan Zamecnik" + CreditsSpace(50) +// CreditsTextLine("#credits_text1501", LargeFont, TitleColor, -1, 0, g_iWidth) //"Heads Modeling" +// CreditsTextLine("#credits_text1502", LargeFont, NameColor, -1, 0, g_iWidth) //"Jiri Bartonek" +// CreditsSpace(50) + CreditsTextLine("#credits_text1601", LargeFont, TitleColor, -1, 0, g_iWidth) //"Animators" + CreditsTextLine("#credits_text1602", LargeFont, NameColor, -1, 0, g_iWidth) //"Jan Zamecnik" + CreditsTextLine("#credits_text1603", LargeFont, NameColor, -1, 0, g_iWidth) //"Jiri Bartonek" + CreditsTextLine("#credits_text1604", LargeFont, NameColor, -1, 0, g_iWidth) //"Kamila Clarova" + CreditsSpace(50) + CreditsTextLine("#credits_text1701", LargeFont, TitleColor, -1, 0, g_iWidth) //"Cutscenes director" + CreditsTextLine("#credits_text1702", LargeFont, NameColor, -1, 0, g_iWidth) //"Radek Volf" + CreditsSpace(50) + CreditsTextLine("#credits_text1801", LargeFont, TitleColor, -1, 0, g_iWidth) //"Cutscenes cameras & edit" + CreditsTextLine("#credits_text1802", LargeFont, NameColor, -1, 0, g_iWidth) //"Jan Zamecnik" + CreditsSpace(50) + CreditsTextLine("#credits_text2001", LargeFont, TitleColor, -1, 0, g_iWidth) //"Cutscene Motion Capture Actors" + CreditsTextLine("#credits_text2002", LargeFont, NameColor, -1, 0, g_iWidth) //"Tomas Kraucher" + CreditsTextLine("#credits_text2003", LargeFont, NameColor, -1, 0, g_iWidth) //"Alexandra Lanska" + CreditsTextLine("#credits_text2004", LargeFont, NameColor, -1, 0, g_iWidth) //"Jan Zamecnik" + CreditsSpace(50) + CreditsTextLine("#credits_text1901", LargeFont, TitleColor, -1, 0, g_iWidth) //"Ingame Motion Capture Actor" + CreditsTextLine("#credits_text1902", LargeFont, NameColor, -1, 0, g_iWidth) //"Jan Zamecnik" + CreditsSpace(50) + CreditsTextLine("#credits_text2101", LargeFont, TitleColor, -1, 0, g_iWidth) //"Sound Effects" + CreditsTextLine("#credits_text2102", LargeFont, NameColor, -1, 0, g_iWidth) //"Jaroslav Kasny" + CreditsSpace(50) + CreditsTextLine("#credits_text2200", LargeFont, TitleColor, -1, 0, g_iWidth) //"Cast" + CreditsTextLine("#credits_text2201", LargeFont, NameColor, -1, 0, g_iWidth) //"Arnold - Daniel Brown" + CreditsTextLine("#credits_text2202", LargeFont, NameColor, -1, 0, g_iWidth) //"Livia - Amy Huck" + CreditsTextLine("#credits_text2203", LargeFont, NameColor, -1, 0, g_iWidth) //"Olivier - Jeff Smith" + CreditsTextLine("#credits_text2204", LargeFont, NameColor, -1, 0, g_iWidth) //"Warren - Ryan James" + CreditsTextLine("#credits_text2205", LargeFont, NameColor, -1, 0, g_iWidth) //"Bruce - DJ Ni" + CreditsTextLine("#credits_text2206", LargeFont, NameColor, -1, 0, g_iWidth) //"Paolo - David" + CreditsSpace(300) + + CreditsBitmap("gfx/menu/logo_idea.tga", 0xffffffff, 282, 0, 96, 86) + CreditsTextLine("#credits_text2301", LargeFont, TitleColor, -1, 0, g_iWidth) //"IDEA Games" + CreditsSpace(100) + CreditsTextLine("#credits_text2401", LargeFont, TitleColor, -1, 0, g_iWidth) //"Producer" + CreditsTextLine("#credits_text2402", LargeFont, NameColor, -1, 0, g_iWidth) //"Martin Klima" + CreditsSpace(50) + CreditsTextLine("#credits_text2501", LargeFont, TitleColor, -1, 0, g_iWidth) //"PR & marketing" + CreditsTextLine("#credits_text2502", LargeFont, NameColor, -1, 0, g_iWidth) //"Jiri Rydl" + CreditsSpace(50) + CreditsTextLine("#credits_text2601", LargeFont, TitleColor, -1, 0, g_iWidth) //"Sales" + CreditsTextLine("#credits_text2602", LargeFont, NameColor, -1, 0, g_iWidth) //"Jiri Jakubec" + CreditsSpace(300) + CreditsTextLine("#credits_text2701", LargeFont, TitleColor, -1, 0, g_iWidth) //"Special thanks to" + CreditsTextLine("#credits_text2702", LargeFont, NameColor, -1, 0, g_iWidth) //"Dennis Gustafsson, Jonas Gustavsson, Tomas Ahlstrom" + CreditsTextLine("#credits_text2703", LargeFont, NameColor, -1, 0, g_iWidth) //"Slavomir Pavlicek" + CreditsTextLine("#credits_text2704", LargeFont, NameColor, -1, 0, g_iWidth) //"Marek Spanel" + CreditsTextLine("#credits_text2705", LargeFont, NameColor, -1, 0, g_iWidth) //"Paul R. Statham" + CreditsSpace(300) + CreditsBitmap("gfx/menu/logo_pathengine.tga", 0xffffffff, 314, 0, 170, 56) + CreditsSpace(10) + CreditsTextLine("#credits_text2800", LargeFont, TitleColor, -1, 0, g_iWidth) //"Agent movement" + CreditsTextLine("#credits_text2801", LargeFont, NameColor, -1, 0, g_iWidth) //"powered by PathEngine ?www.pathengine.com" + CreditsSpace(300) + CreditsTextLine("#credits_text2901", LargeFont, TitleColor, -1, 0, g_iWidth) //"(C) 2006 Black Element Software s.r.o. All rights reserved." + CreditsSpace(15) + CreditsTextLine("#credits_text2902", MainFont, TitleColor, -1, 0, g_iWidth) //"Other products and company names mentioned herein maybe trademarks of their respective owners." + CreditsTextLine("#credits_text2903", MainFont, TitleColor, -1, 0, g_iWidth) //"Developed by Black Element Software. All rights reserved." + CreditsSpace(50) + CreditsTextLine("#credits_text2904", LargeFont, NameColor, -1, 0, g_iWidth) //"www.alpha-prime.com" + CreditsSpace(500) + + if(MenuMap) + CreditsBackgroundColor(0x80000000) +} + +//----------------------------------------------------------------- +void CloseMenu(string menu) +{ + switch(menu) + { + case "main_menu": + UnloadMenuMap() + break + + case "controls_menu": + FreeListbox(ListboxItemWidgets, ListboxPrimaryWidget, ListboxSecondaryWidget, ListboxBack, Scrollbar, SelectedLine, AreaTop, AreaBottom) + break + + case "loadgame_menu": + ShowSavesListbox(false) + AddSaveEmptySlot() //pri odchode z menu musime vratit medzi sloty jeden prazdny (normalny stav) + break + + case "savegame_menu": + ShowSavesListbox(false) + break + + case "ingame_menu": + if(globalmap) + { + int MapHandle = SetCurrentMap(globalmap) + EnableEnemies() + World.PlayerControl = 1 + SetCurrentMap(MapHandle) + } + + if(g_IMBackground) + { + DestroyWidget(g_IMBackground) + g_IMBackground = NULL + } + break + + case "credits_menu": + DestroyCredits() + ShowWidget(WMousePointer, true) + +// ShowWidget(WView, true) +// g_NoUpdateMenuMap = false + break + } +} + +//----------------------------------------------------------------- +int OpenMenu(string menu) +{ + const string noyesq[2] = {"#menuitem1_no", "#menuitem1_yes"} + const string lowhighq[2] = {"#menuitem2_low", "#menuitem2_high"} + + int ButtonPos = 240 + int ButtonLeftPos = 85 + int ButtonLeftPos2 = 300 + int ButtonLeftPos3 = 430 + int ButtonLeftPos4 = 645 + int ButtonOff = 30 + + switch(menu) + { + case "main_menu": + LoadMenuMap() + LoadSaveList() //tu sa natiahne raz a viac uz neni potreba + + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + GUIImage("menufooter", g_iWidth - 512, g_iHeight - 128, 512, 128, 2, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND|WF_NOFILTER|WF_EXACTSIZE|WF_EXACTPOS, 0xffffffff) // menu footer + + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_main", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + + GUISetFont(LargeFont) + + GUIButton("main_new_game", "#main_new_game", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU, "newgame_menu") + ButtonPos += ButtonOff + + GUIButton("main_continue_game", "#main_continue_game", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + ButtonPos += ButtonOff + + if(GetLastSavedSlot() == -1) //neni tam ani jeden sejv + GUIDisableItem("main_continue_game") + + GUIButton("main_load_game", "#main_load_game", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU, "loadgame_menu") + ButtonPos += ButtonOff + + bool LoadEnabled = true + if(SaveTypes[0] == SAVETYPE_NONE) + LoadEnabled = false + + if(SaveTypes[0] == SAVETYPE_EMPTY && SaveTypes[1] == SAVETYPE_NONE) + LoadEnabled = false + + if(!LoadEnabled) + GUIDisableItem("main_load_game") + + // indent + ButtonPos += ButtonOff + + GUIButton("options_controls", "/#options_controls", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU|GUI_ACTION_GETOPT, "controls_menu") + ButtonPos += ButtonOff + + GUIButton("options_audio", "/#options_audio", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU|GUI_ACTION_GETOPT, "audio_menu") + ButtonPos += ButtonOff + + GUIButton("options_video", "/#options_video", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU|GUI_ACTION_GETOPT, "video_menu") + ButtonPos += ButtonOff + + GUIButton("options_advanced", "/#options_advanced", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU|GUI_ACTION_GETOPT, "advanced_menu") + ButtonPos += ButtonOff + +// GUIButton("options_language", "#options_language", 100, 370, 290, 32, 1, WF_RALIGN) +// GUIButton("options_language", "Language", 100, 370, 290, 32, 1, WF_RALIGN) +// string langl[7] = {"English", "Cesky", "Deutsche", "Francaise", "Italiano", "Spanish", "US english"} +// GUIListValue(20, langl, 410, 370, 256, 32, 1, 0) + +// GUIButton("options_back", "#options_back", 200, 500, 400, 32, 1, WF_CENTER) +// GUIAction(GUI_ACTION_BACK|GUI_ACTION_APPLYOPT) + + + +// ButtonPos += ButtonOff // twice indent + + GUIButton("main_credits", "/#main_credits", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU, "credits_menu") + ButtonPos += ButtonOff + + GUIButton("main_exit", "#main_exit", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + + float AspectFormFactor = (float)g_iHeight / (float)600 //pri WF_EXACTSIZE sa font nescaluje + AspectFormFactor *= 15 + GUITitle(AlphaPrimeVersion, g_iWidth - 300, g_iHeight - 21 - AspectFormFactor, 100, 25, 130, WF_RALIGN|WF_NOFILTER|WF_EXACTSIZE|WF_EXACTPOS, 0xffffffff, MainFont) + + if(!MenuMusicID) + //SetSoundVolume(MenuMusicID, 1) + MenuMusicID = PlaySound(NULL, MenuMusic, SF_AMBIENT|SF_MUSIC) + SetSoundVolume(MenuMusicID, 1) + break + + + case "ingame_menu": + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_main", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + + GUISetFont(LargeFont) + + GUIButton("ingame_quit", "#ingame_quit", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + //GUIAction(GUI_ACTION_BACK) + ButtonPos += ButtonOff + + GUIButton("ingame_save_game", "#ingame_save_game", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU, "savegame_menu") + ButtonPos += ButtonOff + +// GUIDisableItem("ingame_save_game") + + + GUIButton("ingame_load_game", "#ingame_load_game", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU, "loadgame_menu") + ButtonPos += ButtonOff + + bool LoadEnabled2 = true + if(SaveTypes[0] == SAVETYPE_NONE) + LoadEnabled2 = false + + if(SaveTypes[0] == SAVETYPE_EMPTY && SaveTypes[1] == SAVETYPE_NONE) + LoadEnabled2 = false + + if(!LoadEnabled2) + GUIDisableItem("ingame_load_game") + + // indent + ButtonPos += ButtonOff + + GUIButton("ingame_options_controls", "/"+"#options_controls", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU|GUI_ACTION_GETOPT, "controls_menu") + ButtonPos += ButtonOff + + GUIButton("ingame_options_audio", "/"+"#options_audio", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU|GUI_ACTION_GETOPT, "audio_menu") + ButtonPos += ButtonOff + + GUIButton("ingame_options_video", "/"+"#options_video", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU|GUI_ACTION_GETOPT, "video_menu") + ButtonPos += ButtonOff + + GUIButton("ingame_options_advanced", "/"+"#options_advanced", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_MENU|GUI_ACTION_GETOPT, "advanced_menu") + ButtonPos += ButtonOff + + + GUIButton("ingame_resume_game", "#ingame_resume_game", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + + break + + + case "audio_menu": + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_audio", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + + GUISetFont(LargeFont) + + GUIButton("audio_msxvolume", "#audio_msxvolume", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUISlider(27, 100, "slider", ButtonLeftPos3, ButtonPos+9, 200, 24, 2, WF_NOFILTER|WF_SOURCEALPHA|WF_BLEND) + GUIImage("sliderbackground", ButtonLeftPos3, ButtonPos+9, 200, 24, 1, WF_NOFILTER|WF_SOURCEALPHA|WF_BLEND) + GUIHint("#audio_msxvolume") + GUIHintInfo("#audio_msxvolumehint") + ButtonPos += ButtonOff + + GUIButton("audio_efxvolume", "#audio_efxvolume", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUISlider(26, 100, "slider", ButtonLeftPos3, ButtonPos+9, 200, 24, 2, WF_NOFILTER|WF_SOURCEALPHA|WF_BLEND) + GUIImage("sliderbackground", ButtonLeftPos3, ButtonPos+9, 200, 24, 1, WF_NOFILTER|WF_SOURCEALPHA|WF_BLEND) + GUIHint("#audio_efxvolume") + GUIHintInfo("#audio_efxvolumehint") + ButtonPos += ButtonOff + + GUIButton("audio_speakers", "#audio_speakers", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + string speakers[8] = {"#menuitem4_direct", "#menuitem4_monoaural", "#menuitem4_stereo", "#menuitem4_quad", "#menuitem4_headphones", "#menuitem4_surround", "#menuitem4_51", "#menuitem4_71"} + GUIListValue(13, speakers, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#audio_speakers") + GUIHintInfo("#audio_speakershint") + ButtonPos += ButtonOff + + GUIButton("audio_rate", "#audio_rate", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + //string rate[3] = {"22050", "32000", "44100"} + string rate[3] = {"#menuitem2_low", "#menuitem2_mid", "#menuitem2_high"} + GUIListValue(12, rate, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#audio_rate") + GUIHintInfo("#audio_ratehint") + ButtonPos += ButtonOff + + GUIButton("audio_occlusion", "#audio_occlusiontest", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(14, noyesq, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#audio_occlusiontest") + GUIHintInfo("#audio_occlusiontesthint") + ButtonPos += ButtonOff + + + GUIButton("audio_quality", "#audio_quality", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + string audioql[3] = {"#menuitem2_low", "#menuitem2_mid", "#menuitem2_high"} + GUIListValue(28, audioql, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#audio_quality") + GUIHintInfo("#audio_qualityhint") + ButtonPos += ButtonOff + + if(ItemValues[11]) + GUIDisableItem("audio_quality") + else + GUIEnableItem("audio_quality") + + + GUIImageButton("audio_eax", "eaxlogo", ButtonLeftPos, ButtonPos, 128, 61, 1, WF_NOWRAP|WF_SOURCEALPHA | WF_BLEND,GUIInactiveColor) + //GUIButton("audio_eax", "#audio_eax", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + string eax[2] = {"#menuitem1_no", "#menuitem1_yes"} + GUIListValue(11, eax, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#audio_eax") + GUIHintInfo("#audio_eaxhint") + ButtonPos += ButtonOff + + GUIButton("audio_back", "#audio_back", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_BACK|GUI_ACTION_APPLYOPT) + + break + + case "video_menu": + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_video", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + + GUISetFont(LargeFont) + + + GUIButton("video_mode", "#video_mode", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(10, g_sVideoModes, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#video_mode") + GUIHintInfo("#video_modehint") + ButtonPos += ButtonOff + +// GUIButton("video_fsaa", "Antialiasing", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIButton("video_fsaa", "#video_fsaa", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(61, g_sFSAAModes, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#video_fsaa") + GUIHintInfo("#video_fsaa_hint") +// GUIHint("Antialiasing") + // GUIHintInfo("Sets full-scene anti-aliasing") + ButtonPos += ButtonOff + if(sizeof(g_sFSAAModes) == 0) + { + GUIDisableItem("video_fsaa") + } + + GUIButton("video_bloom", "#video_bloom", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(60, noyesq, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#video_bloom") + GUIHintInfo("#video_bloomhint") + ButtonPos += ButtonOff + if(r_maxshaderlevel == 0) + { + GUIDisableItem("video_bloom") + } + + GUIButton("video_shaders", "#video_shaderlevel", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(21, lowhighq, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#video_shaderlevel") + GUIHintInfo("#video_shaderlevelhint") + ButtonPos += ButtonOff + if(r_maxshaderlevel == 0) + { + GUIDisableItem("video_shaders") + } + + GUIButton("video_filtering", "#video_filtering", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + const string filter[3] = {"#menuitem3_bilinear", "#menuitem3_trilinear", "#menuitem3_anisotropic"} + GUIListValue(23, filter, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#video_filtering") + GUIHintInfo("#video_filteringhint") + ButtonPos += ButtonOff + + GUIButton("video_aniso", "#video_anisotropiclevel", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUISlider(50, 15, "slider", ButtonLeftPos3, ButtonPos+9, 200, 24, 2, WF_NOFILTER|WF_SOURCEALPHA|WF_BLEND) + GUIImage("sliderbackground", ButtonLeftPos3, ButtonPos+9, 200, 24, 1, WF_NOFILTER|WF_SOURCEALPHA|WF_BLEND) + GUIHint("#video_anisotropiclevel") + GUIHintInfo("#video_anisotropiclevelhint") + ButtonPos += ButtonOff + + GUIButton("video_texture", "#video_texture", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + const string texq[2] = {"#video_uncompressed", "#video_compressed"} + GUIListValue(24, texq, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#video_texture") + GUIHintInfo("#video_texturehint") + ButtonPos += ButtonOff + + GUIButton("video_textureres", "#video_textureresolution", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + const string texrq[3] = {"#menuitem2_high", "#menuitem2_mid", "#menuitem2_low"} + GUIListValue(34, texrq, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#video_textureresolution") + GUIHintInfo("#video_textureresolutionhint") + ButtonPos += ButtonOff + + GUIButton("video_brightness", "#video_brightness", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUISlider(25, 100, "slider", ButtonLeftPos3, ButtonPos+9, 200, 24, 2, WF_NOFILTER|WF_SOURCEALPHA|WF_BLEND) + GUIImage("sliderbackground", ButtonLeftPos3, ButtonPos+9, 200, 24, 1, WF_NOFILTER|WF_SOURCEALPHA|WF_BLEND) + GUIHint("#video_brightness") + GUIHintInfo("#video_brightnesshint") + ButtonPos += ButtonOff + + GUIButton("video_subtitles", "#advanced_subtitles", ButtonLeftPos, ButtonPos, 290, 32, 1, 0, GUIInactiveColor) + GUIListValue(55, noyesq, ButtonLeftPos3, ButtonPos, 100, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_subtitles") + GUIHintInfo("#advanced_subtitleshint") + + GUIButton("video_back", "#video_back", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_BACK|GUI_ACTION_APPLYOPT) + + if(ItemValues[23] != 2) + GUIDisableItem("video_aniso") + else + GUIEnableItem("video_aniso") + break + + case "advanced_menu": + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_advanced", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + + GUISetFont(LargeFont) + + // first column + GUIButton("effect_quality", "#advanced_effquality", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + string ppq[2] = {"#menuitem2_low", "#menuitem2_high"} + GUIListValue(45, ppq, ButtonLeftPos2, ButtonPos, 100, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_effquality") + GUIHintInfo("#advanced_effqualityhint") + ButtonPos += ButtonOff + + GUIButton("advanced_shadows", "#advanced_shadows", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) +// string shadowq[3] = {"#menuitem1_no", "#menuitem2_mid", "#menuitem2_high"} + GUIListValue(30, noyesq, ButtonLeftPos2, ButtonPos, 100, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_shadows") + GUIHintInfo("#advanced_shadowshint") + ButtonPos += ButtonOff + ButtonPos += ButtonOff + + int initbutpos = ButtonPos // for init value restoring + + GUITitle("#advanced_buildings", ButtonLeftPos, ButtonPos, 200, 32, 1, 0, 0xff7f7f7f) + ButtonPos += ButtonOff + + GUIButton("advanced_reflections", "#advanced_reflections", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(31, noyesq, ButtonLeftPos2, ButtonPos, 100, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_reflections") + GUIHintInfo("#advanced_reflectionshint") + ButtonPos += ButtonOff +/* + GUIButton("advanced_bumpmaps", "#advanced_bumpmaps", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(32, noyesq, ButtonLeftPos2, ButtonPos, 100, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_bumpmaps") + GUIHintInfo("#advanced_bumpmapshint") + ButtonPos += ButtonOff +*/ + GUIButton("advanced_speculars", "#advanced_speculars", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(33, noyesq, ButtonLeftPos2, ButtonPos, 100, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_speculars") + GUIHintInfo("#advanced_specularshint") + ButtonPos += ButtonOff + + // second column + ButtonPos = initbutpos + + GUITitle("#advanced_terrain", ButtonLeftPos3, ButtonPos, 200, 32, 1, 0, 0xff7f7f7f) + ButtonPos += ButtonOff + + GUIButton("advanced_terrquality", "#advanced_terrquality", ButtonLeftPos3, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(37, lowhighq, ButtonLeftPos4, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_terrquality") + GUIHintInfo("#advanced_terrqualityhint") + ButtonPos += ButtonOff + + GUIButton("advanced_terrparallax", "#advanced_parallax", ButtonLeftPos3, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(35, noyesq, ButtonLeftPos4, ButtonPos, 100, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_parallax") + GUIHintInfo("#advanced_parallaxhint") + ButtonPos += ButtonOff + + GUIButton("advanced_terrspeculars", "#advanced_speculars", ButtonLeftPos3, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUIListValue(36, noyesq, ButtonLeftPos4, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#advanced_speculars") + GUIHintInfo("#advanced_specularshint") + ButtonPos += ButtonOff + + if(ItemValues[37]) + { + GUIEnableItem("advanced_terrparallax") + } + else + { + GUIDisableItem("advanced_terrparallax") + } + + if(!ItemValues[21] || r_maxshaderlevel == 0) + { + GUIDisableItem("advanced_terrparallax") + GUIDisableItem("advanced_terrspeculars") + GUIDisableItem("advanced_terrquality") + } + + GUIButton("advanced_back", "#advanced_back", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_BACK|GUI_ACTION_APPLYOPT) + + + break + + case "controls_menu": + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_controls", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + + GUISetFont(LargeFont) + + GUITitle("#controls_keyboard", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + + LoadListbox(KeyItems, ListboxItemWidgets, ListboxPrimaryValue, ListboxSecondaryValue, ListboxPrimaryWidget, ListboxSecondaryWidget, ListboxBack, Scrollbar, SelectedLine, AreaTop, AreaBottom, ListboxArea, ListboxCol0Pos, ListboxCol1Pos, ListboxCol2Pos, ItemOffsetV, ListboxItemsNum) + + // indent + ButtonPos += ButtonOff * 6 + + GUIButton("controls_mousex", "#controls_mousex", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUISlider(52, 100, "slider", ButtonLeftPos3, ButtonPos+9, 200, 24, 2, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND) + GUIImage("sliderbackground", ButtonLeftPos3, ButtonPos+9, 200, 24, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND) + GUIHint("#controls_mousex") + GUIHintInfo("#controls_mousexhint") + ButtonPos += ButtonOff + + GUIButton("controls_mousey", "#controls_mousey", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + GUISlider(53, 100, "slider", ButtonLeftPos3, ButtonPos+9, 200, 24, 2, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND) + GUIImage("sliderbackground", ButtonLeftPos3, ButtonPos+9, 200, 24, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND) + GUIHint("#controls_mousey") + GUIHintInfo("#controls_mouseyhint") + ButtonPos += ButtonOff + + GUIButton("controls_invert", "#controls_invert", ButtonLeftPos, ButtonPos, 250, 32, 1, 0, GUIInactiveColor) + const string invert[2] = {"#menuitem1_yes", "#menuitem1_no"} + GUIListValue(51, invert, ButtonLeftPos3, ButtonPos, 256, 32, 1, 0, GUIInactiveColor) + GUIHint("#controls_invert") + GUIHintInfo("#controls_inverthint") + ButtonPos += ButtonOff + + GUIButton("controls_default", "#controls_default", ButtonLeftPos3, 540, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_CALL, "SetDefaultSettings") + GUIHint("#controls_default") + GUIHintInfo("#controls_defaulthint") + + GUIButton("controls_back", "#controls_back", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_BACK|GUI_ACTION_APPLYOPT) + + break + + case "loadgame_menu": + RemoveSaveEmptySlot() //tu nam empty slot vadi tak ho vyhodime + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_loadgame", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + GUISetFont(LargeFont) + + g_SaveSelected = GetLastSavedSlot() //kurzor bude na poslednom sejvnutom slote + + if(g_SaveSelected == -1) //ak tam neni ziadny sejv + g_SaveSelected = GetEmptySaveSlot() + + ShowSavesListbox(true) + + ButtonPos += ButtonOff * 8 + + GUIButton("loadgame_load", "#loadgame_load", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + ButtonPos += ButtonOff + + GUIButton("loadgame_delete", "#loadgame_delete", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + ButtonPos += ButtonOff + + GUIButton("loadgame_back", "#loadgame_back", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_BACK) + + break + + case "savegame_menu": + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + // section title + GUISetFont(MainFont) + GUITitle("#savegame_save"/*"#menutitle_savegame"*/, ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + GUISetFont(LargeFont) + + g_SaveSelected = GetEmptySaveSlot() + ShowSavesListbox(true) + ButtonPos += ButtonOff * 8 + + GUIButton("savegame_save", "#savegame_save", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + ButtonPos += ButtonOff + + GUIButton("savegame_delete", "#savegame_delete", ButtonLeftPos, ButtonPos, 400, 32, 1, 0, GUIInactiveColor) + ButtonPos += ButtonOff + + GUIButton("savegame_back", "#savegame_back", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_BACK) + + break + + #ifdef DEMO + case "newgame_menu2": + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_newgame", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + GUISetFont(LargeFont) + + GUIImageButton("newgame_l01", "levels/l01_demo", 46, 208, 330, 304, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_01") + GUIHintInfo("") + + GUIImageButton("newgame_l03", "levels/l03_demo", 421, 208, 330, 304, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_03") + GUIHintInfo("") + break +#endif + + case "newgame_menu": + GUIImage("menubackground", 0, 0, 800, 600, 1, WF_NOWRAP|WF_SOURCEALPHA|WF_BLEND, 0xffffffff) // menu background + + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_newgame", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + GUISetFont(LargeFont) + + GUIButton("newgame_easy", "#newgame_easy", 275, 220, 250, 32, 1, WF_CENTER, GUIInactiveColor) + GUIButton("newgame_normal", "#newgame_normal", 275, 250, 250, 32, 1, WF_CENTER, GUIInactiveColor) + GUIButton("newgame_hard", "#newgame_hard", 275, 280, 250, 32, 1, WF_CENTER, GUIInactiveColor) + +/* + // section title + GUISetFont(MainFont) + GUITitle("#menutitle_newgame", ButtonLeftPos, 140, 400, 32, 1, 0, 0xff0e2b2d) + + GUISetFont(LargeFont) + + int leftpos = ButtonLeftPos - 35 + GUIImageButton("newgame_l00", "levels/l00", leftpos, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_00") + GUIHintInfo("") + + GUIImageButton("newgame_l01", "levels/l01", leftpos+70, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_01") + GUIHintInfo("") + + GUIImageButton("newgame_l02", "levels/l02", leftpos+140, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_02") + GUIHintInfo("") + + GUIImageButton("newgame_l03", "levels/l03", leftpos+210, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_03") + GUIHintInfo("") + + GUIImageButton("newgame_l04", "levels/l04", leftpos+280, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_04") + GUIHintInfo("") + + GUIImageButton("newgame_l05", "levels/l05", leftpos+350, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_05") + GUIHintInfo("") + + GUIImageButton("newgame_l06", "levels/l06", leftpos+420, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_06") + GUIHintInfo("") + + GUIImageButton("newgame_l07", "levels/l07", leftpos+490, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_07") + GUIHintInfo("") + + GUIImageButton("newgame_l08", "levels/l08", leftpos+560, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_08") + GUIHintInfo("") + + GUIImageButton("newgame_l09", "levels/l09", leftpos+630, 200, 80, 310, 1, WF_SOURCEALPHA | WF_BLEND, GUIInactiveColorImage) + GUIHint("#levelname_09") + GUIHintInfo("") +*/ +/* + GUIDisableItem("newgame_l00") + GUIDisableItem("newgame_l01") + GUIDisableItem("newgame_l02") + GUIDisableItem("newgame_l03") + GUIDisableItem("newgame_l04") + GUIDisableItem("newgame_l05") + GUIDisableItem("newgame_l06") + GUIDisableItem("newgame_l07") + GUIDisableItem("newgame_l08") + GUIDisableItem("newgame_l09") +*/ +/* +if(g_physx) + { + GUIImageButton("newgame_ageia", "levels/ageia", 280, 355, 230, 180, 1, WF_SOURCEALPHA | WF_BLEND) + } +*/ + GUIButton("newgame_back", "#newgame_back", ButtonLeftPos, 540, 400, 32, 1, 0, GUIInactiveColor) + GUIAction(GUI_ACTION_BACK) + + break + + case "credits_menu": + InitCredits() + ShowWidget(WMousePointer, false) + + GUIButton("options_back", "#options_back", 0, -32, 800, 632, 0x00ffffff, WF_CENTER) + GUIAction(GUI_ACTION_BACK) + break + + default: + return false + } + + MenuActive = menu + + GUISetMenuItems() + if(ActButton == "") + ActButton = GUIItemIDs[0] + + GUIActivateItem(ActButton, 1) + + ClearMousePress(0) + return true +} + +//----------------------------------------------------------------- +int PopMenu(bool apply) +{ + CloseMenu(MenuActive) + + if(MenuStackOff >= 1) + { + MenuStackOff-- + ActButton = MenuStack[MenuStackOff][1] + GUICleanup() + + if(MenuStack[MenuStackOff][0]) + OpenMenu(MenuStack[MenuStackOff][0]) + + if(apply == false) + { + for(int n = 0; n < 64; n++) + ItemValues[n] = ItemValuesBak[n] + } + } + + return MenuStackOff +} + +//----------------------------------------------------------------- +void PushMenu(string menu) +{ + MenuStack[MenuStackOff][0] = MenuActive + MenuStack[MenuStackOff][1] = ActButton + MenuStackOff++ + ActButton = "" + +#ifdef _XBOX + ClearJoyButton(JB_A) + ClearJoyButton(JB_B) +#else + ClearKey(KC_RETURN) + ClearKey(KC_ESCAPE) + ClearMousePress(0) +#endif + + GUICleanup() + if(!OpenMenu(menu)) + { + PopMenu(true) + return + } + + for(int n = 0; n < 64; n++) + ItemValuesBak[n] = ItemValues[n] +} + + +//----------------------------------------------------------------- +bool GUIDoAction(string item) +{ + int index = GUIGetItemIndex(item) + //custom prvek + if(index == -1) + return false + + if(GUIItemActions[index] & GUI_ACTION_GETOPT) + { + GetOptions() + } + + if(GUIItemActions[index] & GUI_ACTION_APPLYOPT) + { + ApplyOptions() + SaveConfig() + } + + if(GUIItemActions[index] & GUI_ACTION_BACK) + { + g_MenuFlash = true + PlayMenuSound(2) + PopMenu(true) + return true + } + + if(GUIItemActions[index] & GUI_ACTION_MENU) + { + g_MenuFlash = true + PlayMenuSound(2) + PushMenu(GUIItemActionParms[index]) + return true + } + + if(GUIItemActions[index] & GUI_ACTION_CALL) + { + Call(NULL, GUIItemActionParms[index], "") + return true + } + + return false +} + +//----------------------------------------------------------------- +string GUIUpdateMenu() +{ + if(ListKeyInput != 0) + { + UpdateMouse() + return "" + } + + if(ConfDialog) + return ConfDialog.Update() + +#ifdef _XBOX + if(JoyButtonState(JB_A)) + { + ClearJoyButton(JB_A) +#else + if(KeyState(KC_RETURN)) + { + ClearKey(KC_RETURN) +#endif + if(GUIDoAction(ActButton)) + return "" + + SwitchMenuItem(ActButton, 1) + return ActButton + } + +#ifdef _XBOX + if(JoyButtonState(JB_B)) + { + ClearJoyButton(JB_B) +#else + if(KeyState(KC_ESCAPE)) + { +#endif + ClearKey(KC_ESCAPE) + PlayMenuSound(4) + return "_ESCAPE" + } + + UpdateMouse() + +#ifdef _XBOX + if(JoyButtonState(JB_DPAD_RIGHT)) + { + ClearJoyButton(JB_DPAD_RIGHT) +#else + if( KeyState(KC_RIGHT)) + { +#endif + ClearKey(KC_RIGHT) + + if(!GUINextItem(1, 0)) + SwitchMenuItem(ActButton, 1) + return "" + } + +#ifdef _XBOX + if(JoyButtonState(JB_DPAD_LEFT)) + { + ClearJoyButton(JB_DPAD_LEFT) +#else + if( KeyState(KC_LEFT)) + { +#endif + ClearKey(KC_LEFT) + if(!GUINextItem(-1, 0)) + SwitchMenuItem(ActButton, -1) + return "" + } + +#ifdef _XBOX + if(JoyButtonState(JB_DPAD_UP)) + { + ClearJoyButton(JB_DPAD_UP) +#else + if( KeyState(KC_UP) == true) + { +#endif + ClearKey(KC_UP) + + GUINextItem(0, -1) + return "" + } + +#ifdef _XBOX + if(JoyButtonState(JB_DPAD_DOWN)) + { + ClearJoyButton(JB_DPAD_DOWN) +#else + if( KeyState(KC_DOWN) == true) + { + ClearKey(KC_DOWN) +#endif + GUINextItem(0, 1) + return "" + } + +#ifndef _XBOX + if(MousePress(0)) + { + int n = GUICheckMouse() + ActButton = "" + if(n != -1) + { + ActButton = GUIItemIDs[n] + + if(GUIDoAction(ActButton)) + return "" + + SwitchMenuItem(ActButton, 0) + } + return ActButton + } + + if(MouseX == LMouseX) + { + if(MouseY == LMouseY) + return "" + } + + LMouseX = MouseX + LMouseY = MouseY + + GUICheckMouse() +#endif + + return "" +} + diff --git a/Alpha Prime/Mod/scripts/music_player.h b/Alpha Prime/Mod/scripts/music_player.h new file mode 100644 index 0000000..75aa5cf --- /dev/null +++ b/Alpha Prime/Mod/scripts/music_player.h @@ -0,0 +1,276 @@ +class music_player extends MinClass +{ + hsound ambient[6] + int SoundNum + int NowPlaing + int NextToPlay + float FadeInSpeeds[6] + float FadeOutSpeeds[6] + float SwitchWait + float volume + float fspeed + float MasterVolumes[6] + string SndPaths[6] + float SndVolumes[6] + + void SetMasterVolumes() + { + MasterVolumes[BS_AMBIENT] = SndVolumes[BS_AMBIENT] * 0.01 + MasterVolumes[BS_ATMOSPHERE] = SndVolumes[BS_ATMOSPHERE] * 0.01 + MasterVolumes[BS_FIGHT] = SndVolumes[BS_FIGHT] * 0.01 + MasterVolumes[BS_FIGHT2] = SndVolumes[BS_FIGHT2] * 0.01 + MasterVolumes[BS_DIALOG] = SndVolumes[BS_DIALOG] * 0.01 + MasterVolumes[BS_DIALOG2] = SndVolumes[BS_DIALOG2] * 0.01 + } + + void PlayNextSample() + { + if(ambient[NextToPlay]) + { + if(NowPlaing != -1) + EndSound(SoundNum) + + NowPlaing = NextToPlay + SetMasterVolumes() + SoundNum = PlaySound(this, ambient[NowPlaing], SF_AMBIENT|SF_MUSIC) + SetSoundVolume(SoundNum, 0) + } + } + + void SetFadeTempo() + { + if(NextToPlay == -2) + { + if(NowPlaing >= 0) + fspeed = FadeOutSpeeds[NowPlaing] + else + fspeed = 0.5 + return + } + + if(NowPlaing == -1) + fspeed = FadeOutSpeeds[NextToPlay] + else + fspeed = FadeOutSpeeds[NowPlaing] + + if(NextToPlay == BS_FIGHT || NextToPlay == BS_FIGHT2/* || NextToPlay == BS_ATMOSPHERE*/) + fspeed = 1.5 + + if(World.CutScene && NowPlaing != -1) //pokial nabehne cutscena tak to co hralo predtym musi dohrat rychle + fspeed *= 3 + } + + void PlayBackMusic(ExtClass other, int sample) + { + if(other == World.Player && sample == BS_FIGHT) //play z playera nepouzijeme + return + + if(sample == -1) + sample = BS_AMBIENT + + if(sample >= 0 && !ambient[sample]) + { +// string Err = "No loaded sound file " + SndPaths[sample] +// MessageBoxA(0, Err, "Error", 0) + return + } + + switch(status) + { + case 0: + if(sample == NowPlaing) + return + else + { + NextToPlay = sample + status = 1 + SetFadeTempo() + return + } + break + + case 1: + if(sample == NextToPlay) + return + else + { + NextToPlay = sample + return + } + break + + case 2: + if(sample == NowPlaing) + return + else + { + NextToPlay = sample + status = 1 + SetFadeTempo() + return + } + break + } + } + + void EOnTick(MinClass other, int extra) + { + if(status == 0) + return + + if(status == 1) //fade out + { + volume -= TICK_PERIOD * fspeed + if(volume <= 0.2) + { + if(NextToPlay == BS_NONE) + { + EndSound(SoundNum) + SoundNum = 0 + NowPlaing = -1 + status = 0 + return + } + + volume = 0.2 + PlayNextSample() + + if(NowPlaing < 0) + { + status = 0 + return + } + + status = 2 + if(NextToPlay == BS_FIGHT || NextToPlay == BS_FIGHT2 || NextToPlay == BS_ATMOSPHERE) //vynimka + fspeed = 0.8 + else + { + fspeed = FadeInSpeeds[NextToPlay] + + if(World.CutScene) + fspeed *= 3 + } + } + + SetSoundVolume(SoundNum, LinearVol(volume * MasterVolumes[NowPlaing])) //SetSoundVolume(SoundNum, LinearVol(MasterVolumes[NowPlaing])) + return + } + + if(status == 2) //fade in + { + volume += TICK_PERIOD * fspeed + if(volume >= 1) + { + volume = 1 + status = 0 + } + + SetSoundVolume(SoundNum, LinearVol(volume * MasterVolumes[NowPlaing])) + return + } + } + + void InterruptPlaying() + { + if(SoundNum) + { + EndSound(SoundNum) + SoundNum = 0 + } + + NowPlaing = -1 + status = 0 + } + + void LoadSamples() + { + if(SndPaths[BS_AMBIENT]) + ambient[BS_AMBIENT] = GetSoundEx(SndPaths[BS_AMBIENT], 1, SF_MUSIC|SF_STREAM) + + if(SndPaths[BS_ATMOSPHERE]) + ambient[BS_ATMOSPHERE] = GetSoundEx(SndPaths[BS_ATMOSPHERE], 1, SF_MUSIC|SF_STREAM) + + if(SndPaths[BS_FIGHT]) + ambient[BS_FIGHT] = GetSoundEx(SndPaths[BS_FIGHT], 1, SF_MUSIC|SF_STREAM) + + if(SndPaths[BS_FIGHT2]) + ambient[BS_FIGHT2] = GetSoundEx(SndPaths[BS_FIGHT2], 1, SF_MUSIC|SF_STREAM) + + if(SndPaths[BS_DIALOG]) + ambient[BS_DIALOG] = GetSoundEx(SndPaths[BS_DIALOG], 1, SF_MUSIC|SF_STREAM) + + if(SndPaths[BS_DIALOG2]) + ambient[BS_DIALOG2] = GetSoundEx(SndPaths[BS_DIALOG2], 1, SF_MUSIC|SF_STREAM) + } + + void EOnLoad(MinClass other, int extra) + { + LoadSamples() + status = 0 + volume = 0.2 + if(NowPlaing >= 0) + { + NextToPlay = NowPlaing + NowPlaing = -1 + PlayBackMusic(this, NextToPlay) + } + else + NowPlaing = -1 + } + + void music_player() + { + if(SoundPaths[BS_AMBIENT] == "" || SoundPaths[BS_ATMOSPHERE] == "" || SoundPaths[BS_FIGHT] == "") + { +// Print("No loaded backround music") + ClearEventMask(this, EV_ALL) + return + } + + SetEventMask(this, EV_TICK|EV_ONLOAD) + NowPlaing = -1 + volume = 0.2 + status = 0 + NextToPlay = BS_AMBIENT + + SndPaths[BS_AMBIENT] = SoundPaths[BS_AMBIENT] + SndPaths[BS_ATMOSPHERE] = SoundPaths[BS_ATMOSPHERE] + SndPaths[BS_FIGHT] = SoundPaths[BS_FIGHT] + SndPaths[BS_FIGHT2] = SoundPaths[BS_FIGHT2] + SndPaths[BS_DIALOG] = SoundPaths[BS_DIALOG] + SndPaths[BS_DIALOG2] = SoundPaths[BS_DIALOG2] + + SndVolumes[BS_AMBIENT] = SoundVolumes[BS_AMBIENT] + SndVolumes[BS_ATMOSPHERE] = SoundVolumes[BS_ATMOSPHERE] + SndVolumes[BS_FIGHT] = SoundVolumes[BS_FIGHT] + SndVolumes[BS_FIGHT2] = SoundVolumes[BS_FIGHT2] + SndVolumes[BS_DIALOG] = SoundVolumes[BS_DIALOG] + SndVolumes[BS_DIALOG2] = SoundVolumes[BS_DIALOG2] + + FadeInSpeeds[BS_AMBIENT] = 0.5 + FadeInSpeeds[BS_ATMOSPHERE] = 0.5 + FadeInSpeeds[BS_FIGHT] = 1 + FadeInSpeeds[BS_FIGHT2] = 0.5 + FadeInSpeeds[BS_DIALOG] = 0.5 + FadeInSpeeds[BS_DIALOG2] = 1 + + FadeOutSpeeds[BS_AMBIENT] = 0.2 + FadeOutSpeeds[BS_ATMOSPHERE] = 0.2 + FadeOutSpeeds[BS_FIGHT] = 0.2 + FadeOutSpeeds[BS_FIGHT2] = 0.2 + FadeOutSpeeds[BS_DIALOG] = 0.2 + FadeOutSpeeds[BS_DIALOG2] = 0.2 + + SetMasterVolumes() + LoadSamples() +// PlayBackMusic(this, NextToPlay) +// PlayNextSample() + } + + void ~music_player() + { + if(SoundNum) + EndSound(SoundNum) + } +} diff --git a/Alpha Prime/Mod/scripts/player/interface.h b/Alpha Prime/Mod/scripts/player/interface.h new file mode 100644 index 0000000..3f8b4f8 --- /dev/null +++ b/Alpha Prime/Mod/scripts/player/interface.h @@ -0,0 +1,208 @@ + + +//Movement states +const int ST_NONE = 0 +const int ST_RUN = 1 +const int ST_JUMP = 2 +const int ST_DEATH = 3 +const int ST_NOCONTROL = 4 //nieco ovlada. je v aute, nahackovany do miny a pod. + +class player_interface extends CreatureClass +{ + WeaponClass ChangeWeapon //nova zbran ktoru menime za staru + int WeapSelectStatus //0- zbran sa nemeni 1- prebieha unselect 2- prebieha select + WeaponClass PWeapons[32] //pointery na vlastni entity + int RealWeaponsNum //pocet skutocnych zbrani (nezahrnuto DummyWeapon a DeviceWeapon) + float IdleVarTimer + ExtClass InteractionAdepts[80] + int InteractionAdeptsNum + float ExactAim //0 - 1 medzi presnym mierenim a normalnym + PlayerHUD HUD +// int NextWeaponToChange + +//--------------------------------------------------------------------------------------------------------- + void UpdateHealthBar() + { + float rate = Health / MaxHealth + float BarWidth = rate * (float)200 + + if(rate <= 0.25) + { + SetWidgetImage(HUD.WHealthBar, 1) + SetWidgetImage(HUD.WHealthBarFlash, 1) + SetWidgetTextColor(HUD.WHealthBarText, ARGB(255,253,106,42)) + } + else + { + SetWidgetImage(HUD.WHealthBar, 0) + SetWidgetImage(HUD.WHealthBarFlash, 0) + SetWidgetTextColor(HUD.WHealthBarText, ARGB(255,136,241,254)) + } + +// float add = rate * 40 + SetWidgetPos(HUD.WHealthBar, 17, 565, BarWidth, 18) + SetWidgetPos(HUD.WHealthBarFlash, -8, 534, BarWidth + 50, 80) + + float h = rate * 100 + int Numeric = h + + if(Numeric == 0 && h > 0) //nemoze ukazovat nulu ked ma este trosicku energie! + Numeric = 1 + else + { + if(Numeric == 100 && h < 100) //nemoze ukazovat maximum v skutocnosti tam neni plnych 100% + Numeric = 99 + } + + SetWidgetText(HUD.WHealthBarText, 0, itoa(Numeric)) + } + +//--------------------------------------------------------------------------------------------------------- + void UpdateAmmoBar() + { +/* Print(CurrentWeapon.AmmoPerMagazine) + Print(CurrentWeapon.Ammo) + Print(Ammo[CurrentWeapon.AmmoType])*/ + + int MaxAmmoPerMagazine = CurrentWeapon.AmmoPerMagazine + int AmmoInMagazine = CurrentWeapon.Ammo + int OtherAmmo = Ammo[CurrentWeapon.AmmoType] + int ImageIndex = CurrentWeapon.ClassNum - 1 + +/* if(CurrentWeapon.ClassNum == CGrenade) //trapna vynimka na granaty + { + AmmoInMagazine = AmmoInMagazine + OtherAmmo + MaxAmmoPerMagazine = 5 + OtherAmmo = MaxAmmoPerMagazine + + if(AmmoInMagazine > MaxAmmoPerMagazine) + AmmoInMagazine = MaxAmmoPerMagazine + }*/ + + if(CurrentWeapon.ClassNum == CGrenade) //trapna vynimka na granaty + { + AmmoInMagazine = AmmoInMagazine + OtherAmmo + MaxAmmoPerMagazine = GrenadeMaximumAmmo + OtherAmmo = MaxAmmoPerMagazine + + if(AmmoInMagazine > MaxAmmoPerMagazine) + AmmoInMagazine = MaxAmmoPerMagazine + } + + float BarLeft + float BarTop + float BarWidth + float BarHeight = 18 + + switch(CurrentWeapon.ClassNum) + { + case CPistol: + BarWidth = 70 + BarLeft = 800 - BarWidth - 17 + BarTop = 565 + break + + case CShotgun: + BarWidth = 64 + BarLeft = 800 - BarWidth - 17 + BarTop = 565 + break + + case CMachinegun: + BarWidth = 112 + BarLeft = 800 - BarWidth - 17 + BarTop = 565 + break + + case CSniperRifle: + BarWidth = 80 + BarLeft = 800 - BarWidth - 17 + BarTop = 565 + break + + case CGrenade: + BarWidth = 110 + BarLeft = 800 - BarWidth - 17 + BarTop = 565 + break + default: + + } + + if(MaxAmmoPerMagazine > 0) + { + float rate = AmmoInMagazine / MaxAmmoPerMagazine + float CurWidth = rate * BarWidth + float CurLeft = BarLeft + (BarWidth - CurWidth) + SetWidgetPos(HUD.WAmmoBar, CurLeft, BarTop, CurWidth, BarHeight) + SetWidgetPos(HUD.WAmmoBarBack, BarLeft, BarTop, BarWidth, BarHeight) + SetWidgetImage(HUD.WAmmoBar, ImageIndex) + SetWidgetImage(HUD.WAmmoBarBack, ImageIndex) + ShowWidget(HUD.WAmmoBar, true) + ShowWidget(HUD.WAmmoBarBack, true) + ShowWidget(HUD.WAmmoBarText, true) + + if(CurrentWeapon.ClassNum == CGrenade) + SetWidgetText(HUD.WAmmoBarText, 0, itoa(AmmoInMagazine)) + else + SetWidgetText(HUD.WAmmoBarText, 0, itoa(AmmoInMagazine) + "/" + itoa(OtherAmmo)) + } + else + { + ShowWidget(HUD.WAmmoBar, false) + ShowWidget(HUD.WAmmoBarBack, false) + ShowWidget(HUD.WAmmoBarText, false) + } + } + +//--------------------------------------------------------------------------------------------------------- + bool EnableIdleWarAnims(bool stat) + { + if(stat && status == ST_NONE && CurrentWeapon.Action == 0 && ExactAim == 0) + IdleVarTimer = frand(IdleWarAnimWaitMin, IdleWarAnimWaitMax) + else + { + IdleVarTimer = 0 + SetAnimSlot(Hands, s_walk - 1, VNULL, 15, 15, NULL, 30, 0) + } + } + +//--------------------------------------------------------------------------------------------------------- + bool SelectWeapon(WeaponClass wc) + { + } + +//--------------------------------------------------------------------------------------------------------- + bool UnselectWeapon() + { + } + +//--------------------------------------------------------------------------------------------------------- + void AddItem(ExtClass cc) //Item je pred kamerou + { + if(InteractionAdeptsNum >= 80) + return + +#ifdef EDITOR + if(World.EditorActive == true) + return +#endif + + if(cc == CurrentWeapon) + return + + InteractionAdepts[InteractionAdeptsNum++] = cc + } + +//--------------------------------------------------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + } + +//--------------------------------------------------------------------------------------------------------- + void player_interface() + { + if(World.MusicPlayer == NULL) + World.MusicPlayer = new music_player() + } +} diff --git a/Alpha Prime/Mod/scripts/player/player.h b/Alpha Prime/Mod/scripts/player/player.h new file mode 100644 index 0000000..07a0193 --- /dev/null +++ b/Alpha Prime/Mod/scripts/player/player.h @@ -0,0 +1,7364 @@ +//Model constants +const int BBoxNone = -1 +const int BBoxNormal = 0 +const int BBoxCrouch = 1 + +const float LookLimit = 85 + +//----------------------------------------------------------------- +class player_dummyobject extends CreatureClass +{ +int AnimWeaponOffset + +//----------------------------------------------------------------- + void UpdateAgent(bool set) + { + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + BumpFrame(this, ftime, 0) + } + +//----------------------------------------------------------------- + void SelectWeapon(WeaponClass wc) + { + if(CurrentWeapon) + { + delete CurrentWeapon + CurrentWeapon = NULL + } + + string wclass = ClassName(wc) + + switch(wclass) + { + case "item_weapon_jackhammer": + CurrentWeapon = new item_weapon_jackhammer(this) + break + + case "item_weapon_pistol": + CurrentWeapon = new item_weapon_pistol(this) + break + + case "item_weapon_machinegun": + CurrentWeapon = new item_weapon_machinegun(this) + break + + case "item_weapon_shotgun": + CurrentWeapon = new item_weapon_shotgun(this) + break + + case "item_weapon_sniperrifle": + CurrentWeapon = new item_weapon_sniperrifle(this) + break + + default: + CurrentWeapon = new item_weapon_dummy + break + } + + switch(wclass) + { + case "item_weapon_pistol": + AnimWeaponOffset = 1 + break + default: + AnimWeaponOffset = 0 + break + } + + CurrentWeapon.Pick(this) + AddChild(this, CurrentWeapon, p_rhand) + CurrentWeapon.Select() + CurrentWeapon.Show(true) + SetRenderViewMask(CurrentWeapon, 0xfffe) + } + +//----------------------------------------------------------------- + float adisp +//----------------------------------------------------------------- + void SetOrientation(vector pos, float yaw) + { + SetOrigin(this, pos) + SetAngles(this, Vector(0, yaw - adisp, 0)) + } + +//----------------------------------------------------------------- + void Turn(float dir) + { + float inc = ftime * 400 + const float min = -75 + const float max = 75 + + if(dir < 0) + { + adisp -= inc + clamp adisp + } + else + { + if(dir > 0) + { + adisp += inc + clamp adisp<0, max> + } + else + { + if(adisp < 0) + { + adisp += inc + clamp adisp + } + else + { + adisp -= inc + clamp adisp<0, max> + } + } + } + + SetBone(this, B_Spine, Vector(0, adisp * -0.33, 0), ZeroVec, 1.0) + SetBone(this, B_Spine1, Vector(0, adisp * -0.33, 0), ZeroVec, 1.0) + SetBone(this, B_Spine2, Vector(0, adisp * -0.33, 0), ZeroVec, 1.0) + } + +//----------------------------------------------------------------- + void NoMovement() + { + Turn(0) + PlayAnim(s_walk, a_combat_idle + AnimWeaponOffset, 10.0, g_all, 30, 0) + } + +//----------------------------------------------------------------- + void Transmission() + { + Turn(0) + PlayAnim(s_walk, a_relax_idle, 10.0, g_all, 30, 0) + } + +//----------------------------------------------------------------- + void Movement(bool KeyUp, bool KeyDown, bool KeyLeft, bool KeyRight) + { + if(KeyLeft) + { + Turn(-1) + PlayAnim(s_walk, a_combat_walk + AnimWeaponOffset, 10.0, g_legs, 30, 0) + return + } + + if(KeyRight) + { + Turn(1) + PlayAnim(s_walk, a_combat_walk + AnimWeaponOffset, 10.0, g_legs, 30, 0) + return + } + + Turn(0) + + if(KeyUp) + { + PlayAnim(s_walk, a_combat_walk + AnimWeaponOffset, 10.0, g_legs, 30, 0) + return + } + + if(KeyDown) + { + PlayAnim(s_walk, a_combat_bwalk + AnimWeaponOffset, 10.0, g_legs, 30, 0) + return + } + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + ClearFlags(this, TFL_SOLID|TFL_USER6) + SetFlags(this, TFL_TRANSLUCENT) + } + +//----------------------------------------------------------------- + void player_dummyobject() + { + //ClassNum = ClassNumPlayer + MainObject = GetObject("obj/creatures/arnold/arnold.xob") + SetObject(MainObject) + SetFlags(this, TFL_VISIBLE) + SetEventMask(this, EV_FRAME) + SetRenderViewMask(this, 0xfffe) + astatus = 1 + + GetAnimSet("Player") + + PlayAnim(s_walk + 1, a_combat_idle, 10.0, g_all, 30, 0) + } +} + +//----------------------------------------------------------------- +class player_hands extends Actor +{ + vobject HandsObject + player_interface Owner + +//--------------------------------------------------------------------------------------------------------- + void PlayIdleAnim() + { + WeaponClass wc = Owner.CurrentWeapon + if(wc.IdleAnim) + SetAnimSlot(this, s_walk, wc.IdleAnim, 15, 0, NULL, 30, 0) + + Owner.EnableIdleWarAnims(true) + } + +//--------------------------------------------------------------------------------------------------------- + void PlayWalkAnim() + { + WeaponClass wc = Owner.CurrentWeapon + if(wc.WalkAnim) + SetAnimSlot(this, s_walk, wc.WalkAnim, 15, 1, NULL, 30, 0) + + Owner.EnableIdleWarAnims(false) + } + +//--------------------------------------------------------------------------------------------------------- + bool PlaySelectAnim() + { + WeaponClass wc = Owner.CurrentWeapon + if(wc.SelectAnim) + { + SetAnimSlot(this, s_weapon - 1, wc.SelectAnim, 0, 1, NULL, 30, AF_ONCE) //s_weapon - 1 aby sa v handleri dalo rozoznat ze ide o select + return true + } + else + return false + } + +//--------------------------------------------------------------------------------------------------------- + void PlayUnselectAnim() + { + WeaponClass wc = Owner.CurrentWeapon + if(wc.UnselectAnim) + SetAnimSlot(this, s_weapon - 1, wc.UnselectAnim, 0, 1, NULL, 30, AF_ONCE) //s_weapon - 1 aby sa v handleri dalo rozoznat ze ide o unselect + } + +//--------------------------------------------------------------------------------------------------------- + void PlayIdleVarAnim() + { + WeaponClass wc = Owner.CurrentWeapon + int NumIdleVarAnims = 0 + for(int n = 0; n < sizeof(wc.IdleVarAnims); n++) + { + if(wc.IdleVarAnims[n]) + NumIdleVarAnims++ + } + + if(NumIdleVarAnims <= 0) + return + + int AnmIndex = rand(0, NumIdleVarAnims) + SetAnimSlot(this, s_walk - 1, wc.IdleVarAnims[AnmIndex], 15, 15, NULL, 30, AF_ONCE) + } + +//----------------------------------------------------------------- + void EOnAnimEnd(MinClass other, int extra) + { + SetAnimSlot(this, extra, VNULL, 15.0, 0, NULL, 30, 0) //vsetko co skonci vyhodime. co neskonci uz vyhodene bolo + + if(extra == s_weapon) + Throw(Owner.CurrentWeapon, this, EV_ANIMEND, extra + 100) + + int ChangeWeapSlot = s_weapon - 1 //select a unselect nesmie byt preruseny. animacka skonci vzdy + if(extra == ChangeWeapSlot) //pri prehazdovani inej zbrane sa vola na poslednom frame animhook. keby sa animacka nevyhodila tak ho vola dookola + { + if(Owner.WeapSelectStatus == 1) //zbran mala unselect animacku a ta teraz skoncila + { + Owner.UnselectWeapon() //vyhodime staru zbran. tu sa prepina WeapSelectStatus na 2 + Owner.SelectWeapon(Owner.ChangeWeapon) //selectneme novu (ChangeWeapon) + } + else //musi tu byt else pretoze WeapSelectStatus sa medzitym zmeni + { + if(Owner.WeapSelectStatus == 2) //zbran mala select animacku takze az teraz skoncil select novej zbrane + { + Owner.WeapSelectStatus = 0 + Owner.ChangeWeapon = NULL //tymto dame vediet ze cely proces vymeny zbrane skoncil + + if(Owner.status == ST_NONE) //selektli sme novu zbran takze idle/walk musime nahodit podla novej zbrane! + PlayIdleAnim() + else + PlayWalkAnim() + + Owner.UpdateAmmoBar() + +/* if(Owner.NextWeaponToChange) //tato zbran cakala na dokoncenie vymeny zbrane tak ju hned nahodime + { + Owner.WeaponChange(Owner.NextWeaponToChange, true) + + if(Owner.WeaponChange(Owner.NextWeaponToChange, true) == false) //moze sa stat ze nema naboje + Owner.WeaponChange(CJackHammer, true) + + Owner.NextWeaponToChange = 0 + }*/ + } + } + } + } + +//----------------------------------------------------------------- + void ReloadAction() //animhook na moment vlozenia naboja + { + if(IsInherited(Owner.CurrentWeapon, CFireWeaponClass) + { + FireWeaponClass fw = Owner.CurrentWeapon + fw.ReloadAction() + } + } + +//----------------------------------------------------------------- + void ShootAction() //animhook. pouzito u granatu + { + WeaponClass wc = Owner.CurrentWeapon + wc.ShootAction() + } + +//----------------------------------------------------------------- + void ShootAction2() //animhook. pouzito u granatu + { + WeaponClass wc = Owner.CurrentWeapon + wc.ShootAction2() + } + +//----------------------------------------------------------------- + void player_hands(player_interface owner) + { + Owner = owner + HandsObject = GetObject("obj/weapons/hands.xob") + SelectObject(this, HandsObject) + SetBoundBox(this, "-16 -16 -16", "16 16 16") + SetFlags(this, TFL_VISIBLE | TFL_FULLMATRIX) + SetEventMask(this, EV_ANIMEND) + SetRenderViewMask(this, 0x0001) + } + +//----------------------------------------------------------------- + void ~player_hands() + { + if(HandsObject) + ReleaseObject(HandsObject, 0) + } +} + +const float DefaultCrossScale = 0.33333 //odchylka presnosti strelby za predpokladu ze sa nepohybujeme, nehybeme kamerou a nestrielame. + +const float HackWindowIdleWidth = 254 //rozmery a umiestnenie hack preview okna +const float HackWindowIdleHeight = 192 +const float HackWindowIdleLeft = 23 +const float HackWindowIdleTop = 48 + +const int DEATHMODE_NORMAL = 0 +const int DEATHMODE_IN_VEHICLE = 1 + +class creature_player extends player_interface +{ + dGeom geom //kolizna geometria + vector coords //Start Position +// float angle //Z axis camera angle (on start) + bool Controls //controls are disabled/enabled + player_dummyobject DummyPlayer //dummy objekt pro zrcadla a kamery + + vector WeaponAngles //pomocna premenna na opozdeny pohyb zbrane + float HandsOffset //pri suvislej palbe posuvame ruky so sbranou smerom dozadu + vector CameraAngles //angles of camera vector + vector CameraPos //camera pos (not eqal with player origin) + vector CameraTargetPos //target pos for camera smooting system + vector VirtualBodyCenter//pomyselny stred body (koli naklananiu) + float LeanAngle + int flags //for custom use + int DifficultyLevel //dif level for game + vector MotionVec //motion vector. at most time means CameraLook vector but Z axis is 0 + float MotionSpeed //Current motion speed + float MotionAccel //zrychlenie pouzite pre pohyb + float RelMotionAng //Z axis rotate angle as result from control device. realtive to Camera Look vector + float MovementSpeedRate //jaku mame prave rychlost voci maximalnej ktoru mozeme dosiahnut. percentualne + bool KeyUp, KeyDown, KeyLeft, KeyRight, AnyMoveKey //movement keystates + bool IsOnGround + bool StrongSurfaceBias + bool Crouch //substatus for movements ST_NONE and ST_RUN + float fCrouch //1-je v crouchi 0-neni postupne sa blenduje + float fCrouchPath + bool Sprint //substatus for movement ST_RUN + bool OxygenAtmosphere + bool OxygenAdding + float OxygenDownTimer + int OxygenRespirationSnd + int OxygenRespSndIndex + float OxygenPainCounter //ked sme v nedychatelnej atmosfere a nemame uz oxygen tak raz za cas playerovi uberieme energiu + bool HackingDisabled + int Shooting //ked player stlaci spust = true. ked zbran prestane strielat(pusti spust, dojde zasobnik) = false + int ShootingMode //primary alebo secondary suvislej palby danej cez Shooting + float CameraKickOffset //Celkovy offset ktory sme nazbierali kopanim zbrane. o ten sa kamera vracia + float CameraShotingVertOffset //pocitame o kolko sa pohla mys vertikalne aby sa to dalo potom odcitat zo spatneho pohybu po strelbe + float WeaponKickTimer + MinClass misc + vector WeaponKickOff //pridavne uhly pre kameru ktore odpovedaju celkovemu posunu kamery pri suvislej strelbe. po skonceni strelby klesaju na nulu + vector WeaponKickOffSmall //pridavne uhly pre kameru ktore sluzia na trhnutie kamerou pri vystrele + float ExactAimPath, ExactAimPathPrev + bool PrimaryAttack //stav klavesy + bool SecondaryAttack //stav klavesy + MinClass FlashLightBase //nosic pre svelo baterky + bool FlashLightSwitch + float FlashLight //energia baterky + float FlashLightVisTimer + int FlashLightHandle //handle na samotne svetlo baterky + vector MotionForce //sila ktorou tlacime playera + vector BrakeForce //sila ktorou brzdime playera + float BrakeScale + + float FootstepsTimer + int CurrentFootstep + bool JumpUsingKey + MinClass WeaponSoundPos + + Constraint ContactConstraint + Constraint DampingConstraint1 + bool SimulatePlane + bool MovementDumping + vector WorldContactNormal //zpriemerovana normala zo vsetkych kontaktov okrem kontaktov worldu + int NumWorldContactNormals //ich pocet + vector LegsContactNormal //zpriemerovana normala zo vsetkych kontaktov okrem kontaktov worldu + float LegsContactDot + float SurfaceAngle + int NumLegsContactNormals //ich pocet + float ManipIdealDist + float ManipDist + float ManipMass + vector ManipOffset + int WeaponBeforeManip, WeaponBeforeMiniCutscene + int ManipInterLayer + float ManipTime + float ManipThrowPowerScale + Constraint ManipPointConstraint1, ManipPointConstraint2, ManipPointConstraint3 + Constraint ManipAngConstraint1, ManipAngConstraint2, ManipAngConstraint3 + vector IdealManipPos + vector ManipOffMat[3] + TraceContact TrcContact + MinClass ShapeCast + ExtClass DistActivFavorit + + float cincx, cincy + float MovementSpeedScale + int Noises + float DeathCounter + int DeathMode //normalne zabite/vo vehicli + vector DeathCameraTarget + vector LastStablePos + vector LastStayPos + + ExtClass Hacked //ked sme do niecoho nahackovani + ExtClass Controlled //ked nieco ovladame. ak je nieco v Hacked tak to iste musi byt aj tu + ExtClass HackAdepts[16] + int HackAdeptsNum + bool InsideHackTrigger + int VehicleControlStatus + float VehicleControlTimer + float VehicleQuatExt[4] + float VehicleQuatIn[4] + vector VehicleCameraBlendOff + dBlock VehiclePlayerColBlock + float VehicleCameraLean + bool HackMode + float HackModeFade + int HackStatus + float HackLoginTimer + ExtClass SelectedHackAdept + ExtClass HackCrossSelected + trigger_hack_detector FirstHackTrigger + float HackLastCrossX, HackLastCrossY + float HackCrossInterpSpeed + float HackingStripPos + float HackCrossVisibility + float HackRandomTextTimer + float HackRandomTextPos + int HackLoopSound + float HackNoiseTimer + float HackPreviewWindowExtScale + float LoginTime, MaxLoginTime + float HackNoiseFade + float HackWindowLeft, HackWindowTop, HackWindowWidth, HackWindowHeight //aktualne rozmery hack preview okna + float HackMessageTimer + float HackingProgress + float ReconSignal + float ReconSignalFlash + int HackingLoopSound + + float WeapGUIScroll //hlavny scroll + float WeapGUIActivityTimer + int WeapGUIStatus + int WeapGUISelected + float WeapGUIAddScrolls[10] //pridavne scroly + + float BulletTimeFadeTarget + float BulletTime + int BulletTimeLoopSound + int BulletTimeFadeInSound + int BulletTimeFadeOutSound + float LoopTimeCounter + + int HitZoneStatus[4] + float HitZoneFade[4] + float HealthPumpWait + + bool HearthSoundNeedStop + int HearthSound + int HealthPumpUpLoopSound + int PainSound + int HealthFlashReason + float HealthFlashRate + + float oxygen + float MovementCrossScale + float CameraCrossScale + float ExactAimCrossScale + float ShootingCrossScale + func_train TrainEnt + int MiniCutsceneStatus + float MiniCutsceneCameraScale, MiniCutsceneCameraScaleDyn + int WViewWidgetCamera + +#ifdef EDITOR +// EntityEditor Editor + + void EditorOpened() + { + player_hands hands = Hands + hands.Show(false) + dBodyActive(this, false, false) + + int n + for(n = 0; n < InteractionAdeptsNum; n++) //entity sa v editore reloaduju takze nam tu zostavaju neplatne pointre! + InteractionAdepts[n] = NULL + + InteractionAdeptsNum = 0 + + for(n = 0; n < HackAdeptsNum; n++) + HackAdepts[n] = NULL + + HackAdeptsNum = 0 + Hacked = NULL + Controlled = NULL + SelectedHackAdept = NULL + HackCrossSelected = NULL + + coords = atov(GetKeyValue("coords")) //coords sa mu v OnFrame meni takze musime siahnut po inicializacnej hodnote + + vector mat[4] + vector Angles = Vector(0, angle, 0) + RollPitchYawMatrix2(Angles, mat) + mat[3] = coords + SetMatrix(this, mat) + UpdateEntity(this) + } + + void OnPositionChangingInEditor(vector Pos, vector Angs) //volane kazdy frame sa meni pozicia pomocou editoru + { + coords = Pos + vector mat[4] + RollPitchYawMatrix2(Angs, mat) + mat[3] = Pos + SetMatrix(this, mat) + UpdateEntity(this) + UpdateMainVisualizer() + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } + + void CreateEditorVisuals() + { + if(CategoryHidden || Hidden) + return + + if(!MainVisShape) + { + UpdateEntity(this) + vector mat[4] + GetMatrix4(this, mat) + int ShapeColor = StringToColor(DefPtr.Color) + + float HalfHeight = PlayerCapsuleHalfHeights[0] + float HalfWidth = PlayerCapsuleRadius + vector dsmin,dsmax + dsmin = Vector(-HalfWidth, -HalfWidth, -HalfHeight) + dsmax = Vector(HalfWidth, HalfWidth, HalfHeight) + dsmin = dsmin - "-0.04 -0.04 -0.04" + dsmax = dsmax - "0.04 0.04 0.04" + + MainVisShape = AddDShape(SHAPE_BBOX, ShapeColor, SS_NOZUPDATE|SS_TRANSP, dsmin, dsmax) + + if(MainVisShape) + MainVisShape.SetMatrix(mat) + } + } +#endif + +//----------------------------------------------------------------- + int GetDifficultyLevel() + { + return DifficultyLevel + } + +//----------------------------------------------------------------- + void SetStatus(int s) + { + status = s + } + +//--------------------------------------------------------------------------------------------------------- + void HealthDown(float dmg) + { + Health -= dmg + clamp Health<0, MaxHealth> + HealthPumpWait = PlayerHealthPumpWait + + float rate = Health / MaxHealth + + if(rate <= 0.25) //vypiname tlkot srdca a zapiname zvuk naplnania + { + if(!HearthSound) + HearthSound = PlaySound(this, g_sCommonSounds[9], SF_ONCE) + + HearthSoundNeedStop = false + } + + HealthFlashReason = 1 + if(HealthPumpUpLoopSound) + { + EndSound(HealthPumpUpLoopSound) + HealthPumpUpLoopSound = 0 + } + } + +//----------------------------------------------------------------- + void M_SetHealth(ExtClass other) + { + float rate = atof(other._value) + clamp rate<0, 100> + Health = MaxHealth * rate / 100 + HealthDown(0) + UpdateHealthBar() + } + +//------------------------------------------------------------ + void SetThrowBar(float PosRate, bool show) + { + float BarHeight = 86 + float CurHeight = PosRate * BarHeight + + SetWidgetPos(HUD.WThrowBar, 377, 256 + (BarHeight - CurHeight), 86, CurHeight) + SetWidgetPos(HUD.WThrowBarBack, 377, 256, 86, 86) + + ShowWidget(HUD.WThrowBar, show) + ShowWidget(HUD.WThrowBarBack, show) + } + + void ShowHUD(int DialogWnd, int TaskListWnd, int InfoWnd, int HealthBar, int AmmoBar, int BulletTimeBar, int LightBar, int ThrowBar, int OxygenBar, int ReconSignal) + { + if(DialogWnd >= 0) + { + if(World.Transmitter) + World.Transmitter.Show(DialogWnd) + } + + if(TaskListWnd >= 0) + { + if(World.TaskList) + World.TaskList.Show(TaskListWnd) + } + + if(InfoWnd >= 0) + { + if(World.InfDialog) + World.InfDialog.Show(InfoWnd) + } + + if(HealthBar >= 0) + { + ShowWidget(HUD.WHealthBar, HealthBar) + ShowWidget(HUD.WHealthBarText, HealthBar) + ShowWidget(HUD.WHealthBarBack, HealthBar) + ShowWidget(HUD.WHealthBarFlash, HealthBar) + } + + if(AmmoBar >= 0) + { + if(CurrentWeapon.ClassNum == CJackHammer || CurrentWeapon.ClassNum == CDummyWeapon) + AmmoBar = false + + ShowWidget(HUD.WAmmoBar, AmmoBar) + ShowWidget(HUD.WAmmoBarBack, AmmoBar) + ShowWidget(HUD.WAmmoBarText, AmmoBar) + } + + if(BulletTimeBar >= 0) + { + ShowWidget(HUD.WTimeBar, BulletTimeBar) + } + + if(LightBar >= 0) + { + ShowWidget(HUD.WLightBar, LightBar) + ShowWidget(HUD.WLightBarBack, LightBar) + } + + if(ThrowBar >= 0) + { + ShowWidget(HUD.WThrowBar, ThrowBar) + ShowWidget(HUD.WThrowBarBack, ThrowBar) + } + + if(OxygenBar >= 0) + { + ShowWidget(HUD.WOxygenBar, OxygenBar) + ShowWidget(HUD.WOxygenBarBack, OxygenBar) + ShowWidget(HUD.WOxygenBarText, OxygenBar) + } + + if(ReconSignal >= 0) + { + ShowWidget(HUD.WHackingSignal, ReconSignal) + ShowWidget(HUD.WHackingSignalBack, ReconSignal) + ShowWidget(HUD.WHackingSignalFlash, ReconSignal) + } + } + +//------------------------------------------------------------------------------------------------ + void ShowHackingPreview(ExtClass ent) + { + string TitleText = "" + + if(ent && ent.HackInterf && ent.HackInterf.SetHackPreviewCamera()) + { + int prevworld = SetCurrentMap(NULL) //aby to fungovalo aj v editore + SetCurrentMap(prevworld) + SetWidgetWorld(HUD.WHackingPreviewView, prevworld, 1) + ShowWidget(HUD.WHackingPreviewView, true) + TitleText = ent.HackInterf.name + } + else + { + ShowWidget(HUD.WHackingPreviewView, false) + + if(ent) + { + if(ent.HackInterf) + TitleText = ent.HackInterf.name + } + } + + if(TitleText) + { + TitleText = "#" + TitleText + SetWidgetTextEx(HUD.WHackingPreviewTitle, 0, 1, TitleText) + } + else + SetWidgetText(HUD.WHackingPreviewTitle, 0, "") + } + +//------------------------------------------------------------------------------------------------ + void ShowHackGUI(bool stat) //iba hruba visbilita (renderujeme alebo nie) + { + int n + ExtClass adp + + for(n = 0; n < 4; n++) + ShowWidget(HUD.WHackingModeCross[n], stat) + + ShowWidget(HUD.WHackingModeGrid, stat) + ShowWidget(HUD.WHackingModeGrid2, stat) + ShowWidget(HUD.WHackingStrip, stat) +// ShowWidget(WHackingRandomText, stat) +// ShowWidget(WHackingRandomTextBack, stat) + + if(World.HackInfDialog) + World.HackInfDialog.Show(stat) + + for(n = 0; n < HackAdeptsNum; n++) + { + adp = HackAdepts[n] + + if(adp.HackInterf) + adp.HackInterf.Show(stat) + } + + if(stat) + { + if(SelectedHackAdept) //ak mame nieco selektnute tak renderujeme pohlad z kamery, ak nie tak iba zrnime (iny widget) + ShowHackingPreview(SelectedHackAdept) + else + ShowHackingPreview(NULL) + +// ShowWidget(HUD.WHackingPreviewNoise, true) + } + else + { + ShowWidget(HUD.WHackingPreviewView, false) + } + + ShowWidget(HUD.WHackingPreviewFrame, stat) + ShowWidget(HUD.WHackingPreviewNoise, stat) + ShowWidget(HUD.WHackingPreviewTitle, stat) + } + +//------------------------------------------------------------------------------------------------ + void RemoveHackAdept(ExtClass ent) + { + if(Hacked && Hacked == ent) //napriklad vybuchla mina v ktorej sme boli nahackovani + InterruptHacking(false) + + for(int n = 0; n < HackAdeptsNum; n++) + { + if(HackAdepts[n] == ent) + { + int Last = HackAdeptsNum - 1 + if(n < Last) + { + for(int k = n; k < Last; k++) + HackAdepts[k] = HackAdepts[k + 1] + } + + if(SelectedHackAdept == ent) + { + SelectedHackAdept = NULL + HackCrossSelected = NULL + ShowHackingPreview(NULL) + } + + HackAdeptsNum-- + return + } + } + } + +//------------------------------------------------------------------------------------------------ + void SetHackAdepts(ExtClass adepts[], int NumAdepts) //vola trigger + { + int n + ExtClass adp + + if(NumAdepts == 0) //odisli sme z triggeru + { + InsideHackTrigger = false //selectovat/hackovat uz nebude mozne ale vizualizery musime odfadovat a preto si pointre HackAdepts nechame nadalej + + for(n = 0; n < HackAdeptsNum; n++) + { + adp = HackAdepts[n] + adp.HackInterf.FadeOut() + } + + SelectedHackAdept = NULL + ShowWidget(HUD.WHackingPreviewView, false) +// ShowWidget(HUD.WHackingPreviewNoise, false) + World.HackInfDialog.ShowMessage("// #Connection_lost...") + return + } + + for(n = 0; n < NumAdepts; n++) //mame novych adeptov na hackovanie + { + adp = adepts[n] + HackAdepts[n] = adp + + if(HackModeFade > 0) + adp.HackInterf.FadeIn() + } + + HackAdeptsNum = NumAdepts + InsideHackTrigger = true + + if(HackModeFade != 0) + { + ShowHackGUI(true) + World.HackInfDialog.ShowMessage("// " + itoa(NumAdepts) + " " + "#devices_found...") + } + + PlaySound(this, g_sCommonSounds[34], SF_ONCE) + } + +//------------------------------------------------------------------------------------------------ + void ProcessHackSelecting() //zistujeme ktora entita bude selektnuta + { + ExtClass adp + bool CanLog + ExtClass HAdepts[16] + int HAdeptsNum = 0 + int n + + for(n = 0; n < HackAdeptsNum; n++) + { + adp = HackAdepts[n] + CanLog = adp.HackInterf.CanHacking() + + if(CanLog) + HAdepts[HAdeptsNum++] = adp //spravime zoznam tych do ktroych je mozne sa vobec lognut + else + { + if(adp.HackInterf.IsVisible()) + adp.HackInterf.FadeOut() + } + } + + vector AdeptPos, Dir + float BestDot = -1 + float dot + ExtClass BestAdept = NULL + + for(n = 0; n < HAdeptsNum; n++) //najdeme vhodneho adepta na select + { + adp = HAdepts[n] + AdeptPos = adp.HackInterf.GetVisualPos() + Dir = AdeptPos - World.CameraPos + VectorNormalize(Dir) + dot = Dir * World.CameraNorm + + if(dot > 0.99 && dot > BestDot) + { + BestDot = dot + BestAdept = adp + } + } + + if(BestAdept) //mame adepta na select + { + if(SelectedHackAdept) //nieco uz je selektnute + { + if(SelectedHackAdept != BestAdept) + { + SelectedHackAdept.HackInterf.Select(false) //stary unselektneme + BestAdept.HackInterf.Select(true) //novy selektneme + HackCrossInterpSpeed = 0 + HackingProgress = 0 + PlaySound(this, g_sCommonSounds[38], SF_ONCE) + + if(HackingLoopSound) + { + EndSound(HackingLoopSound) + HackingLoopSound = 0 + } + + World.HackInfDialog.ShowMessage("// #Changing_ID_codes [#" + BestAdept.HackInterf.name + "]") + } + } + else //nebolo selektnute nic + { + BestAdept.HackInterf.Select(true) + HackCrossInterpSpeed = 0 + HackingProgress = 0 + PlaySound(this, g_sCommonSounds[38], SF_ONCE) + + World.HackInfDialog.ShowMessage("// #Generating_ID_codes [#" + BestAdept.HackInterf.name + "]") + } + + SelectedHackAdept = BestAdept + HackCrossSelected = BestAdept //cross musi mat vzdy target + ShowHackingPreview(SelectedHackAdept) + + if(SelectedHackAdept) + { + float CurHackingTime = SelectedHackAdept.HackInterf.CurHackingTime + float FullHackingTime = SelectedHackAdept.HackInterf.HackingTime + CurHackingTime += ftime * 3.03 * sqrt(1 / g_timescale) + clamp CurHackingTime<0, FullHackingTime> + SelectedHackAdept.HackInterf.CurHackingTime = CurHackingTime + + HackMessageTimer += ftime + + if(HackMessageTimer >= 0.2) + { + HackMessageTimer = 0 + float HackingProgressBefore = HackingProgress + HackingProgress = CurHackingTime / FullHackingTime + float FinHackingProgress = HackingProgress * 100 + + if(HackingProgressBefore < 1) + { + World.HackInfDialog.ShowMessage("#decoding " + itoa(FinHackingProgress) + " % #complete") + + if(SelectedHackAdept.HackInterf.CurHackingTime < SelectedHackAdept.HackInterf.HackingTime) + { + if(!HackingLoopSound) + HackingLoopSound = PlaySound(this, g_sCommonSounds[54], SF_AMBIENT) + } + } + else + { + if(HackingLoopSound) + { + EndSound(HackingLoopSound) + HackingLoopSound = 0 + PlaySound(this, g_sCommonSounds[55], SF_ONCE|SF_AMBIENT) + } + } + } + } + } + else //neni uz nic selektnute + { + if(SelectedHackAdept) //ale nieco bolo takze volame unselect + { + SelectedHackAdept.HackInterf.Select(false) + World.HackInfDialog.ShowMessage("// #Flushing_ID_code_cache...") + } + + SelectedHackAdept = NULL + ShowHackingPreview(NULL) + + if(HackingLoopSound) + { + EndSound(HackingLoopSound) + HackingLoopSound = 0 + } + } + } + +//------------------------------------------------------------------------------------------------ + void UpdateHackGUI() + { + if(Hacked) + { +// SetPostEffect(0, 0, 0, 0, 0) + World.HackInfDialog.SetGlobalTransp(0) + } + else + { +// SetPostEffect(3, 255, 0, HackModeFade, 0.0) + World.HackInfDialog.SetGlobalTransp(HackModeFade * (1 - HackPreviewWindowExtScale)) + } + + int n + ExtClass adp + float GridOp = HackModeFade * (float)255 + + SetWidgetColor(HUD.WHackingModeGrid, AWHITE(GridOp)) + + if(SelectedHackAdept && InsideHackTrigger) //zameravac presuvame vzdy na selektnutu entitu + { + HackCrossVisibility = LinearBlend(HackCrossVisibility, 1, 8) //cross chceme viditelny + } + else + { + HackCrossVisibility = LinearBlend(HackCrossVisibility, 0, 2) //skryvame cross + } + + if(HackCrossSelected && HackCrossSelected.HackInterf) + { + float scalex = 800 / g_iWidth + float scaley = 600 / g_iHeight + float VirtX = HackCrossSelected.HackInterf.Xpos * scalex + float VirtY = HackCrossSelected.HackInterf.Ypos * scaley + float CrossOff = 70 * HackCrossSelected.HackInterf.DistanceScale + HackCrossInterpSpeed += ftime * 1.5 + clamp HackCrossInterpSpeed<0, 1> + /* vector vec1 = Vector(VirtX, VirtY, 0) + vector vec2 = Vector(HackLastCrossX, HackLastCrossY, 0) + float PosDiff = VectorLength(vec1 - vec2) + */ + float MaxX = VirtX - HackLastCrossX + float MaxY = VirtY - HackLastCrossY + float StepX = MaxX * HackCrossInterpSpeed + float StepY = MaxY * HackCrossInterpSpeed +// if(StepX > ) + + HackLastCrossX += StepX + HackLastCrossY += StepY + + SetWidgetPos(HUD.WHackingModeCross[0], HackLastCrossX - 1024 - CrossOff, HackLastCrossY - 16, 1024, 32) + SetWidgetPos(HUD.WHackingModeCross[1], HackLastCrossX + CrossOff, HackLastCrossY - 16, 1024, 32) + SetWidgetPos(HUD.WHackingModeCross[2], HackLastCrossX - 16, HackLastCrossY - 1024 - CrossOff, 32, 1024) + SetWidgetPos(HUD.WHackingModeCross[3], HackLastCrossX - 16, HackLastCrossY + CrossOff , 32, 1024) + } + + float CrossOp = HackModeFade * HackCrossVisibility * (float)255 + + for(n = 0; n < 4; n++) + SetWidgetColor(HUD.WHackingModeCross[n], AWHITE(CrossOp)) + + HackingStripPos += ftime * 900 //s radar pruhom scrolujeme stale dookola + + if(HackingStripPos > 1556) // 800+256+delay(500) + HackingStripPos = -256 + + float StripOp = HackModeFade * (float)255 + float RadomTextOp = StripOp * 0.1 + + SetWidgetPos(HUD.WHackingStrip, HackingStripPos, 0, 256, 600 ) + SetWidgetColor(HUD.WHackingStrip, AWHITE(StripOp)) + +/* HackRandomTextTimer += ftime + + if(HackRandomTextTimer >= 0.25) + { + HackRandomTextTimer = 0 + HackRandomTextPos -= 18.7 + + if(HackRandomTextPos < -684) + HackRandomTextPos = 0 + + }*/ + + for(n = 0; n < HackAdeptsNum; n++) //updatujeme hack interfaces entit + { + adp = HackAdepts[n] + adp.HackInterf.SetVisibility(HackModeFade) + adp.HackInterf.UpdateVisualizers(coords) //volame po celu dobu hacking modu + } + + HackNoiseTimer -= ftime * 50 + + if(HackNoiseTimer <= 0) + { + HackNoiseTimer = 1 + float UV[8] = {0,0, 0,3, 3,3, 3,0} + + float UVoffsetX = frand(0, 1) + float UVoffsetY = frand(0, 1) + float UVScale = 1 + (HackWindowWidth / HackWindowIdleWidth) //UVcko nescalujeme s widgetom + + for(int j = 0; j < 8; j += 2) + { + UV[j] = UV[j] * UVScale + UVoffsetX + UV[j + 1] = UV[j + 1] * UVScale + UVoffsetY + } + SetWidgetUV(HUD.WHackingPreviewNoise, UV) + } + + float alpha1 = HackModeFade * HackNoiseFade * (float)192 + 63 //transp 63 je vzdy + float alpha2 = HackPreviewWindowExtScale * (float)255 + SetWidgetColor(HUD.WHackingModeGrid2, ARGB(alpha2, 255, 255, 255)) + SetWidgetColor(HUD.WHackingPreviewNoise, ARGB(alpha1, 255, 255, 255)) //ARGB(64, 136, 241, 254) + } + + //------------------------------------------------------------------------------------------------ + void SetHackPreviewExtendsSize(float ExtSize) + { + clamp ExtSize <0, 1> + HackPreviewWindowExtScale = ExtSize + + HackWindowLeft = -HackWindowIdleLeft * ExtSize + HackWindowTop = -HackWindowIdleTop * ExtSize + float w = 800 - HackWindowIdleWidth + float h = 600 - HackWindowIdleHeight + HackWindowWidth = w * ExtSize + HackWindowHeight = h * ExtSize + SetWidgetPos(HUD.WHackingPreviewView, HackWindowIdleLeft + HackWindowLeft, HackWindowIdleTop + HackWindowTop, HackWindowIdleWidth + HackWindowWidth, HackWindowIdleHeight + HackWindowHeight) + SetWidgetPos(HUD.WHackingPreviewNoise, HackWindowIdleLeft + HackWindowLeft, HackWindowIdleTop + HackWindowTop, HackWindowIdleWidth + HackWindowWidth, HackWindowIdleHeight + HackWindowHeight) + SetWidgetPos(HUD.WHackingModeGrid2, HackWindowIdleLeft + HackWindowLeft, HackWindowIdleTop + HackWindowTop, HackWindowIdleWidth + HackWindowWidth, HackWindowIdleHeight + HackWindowHeight) + + float WidthExt = 32 * ExtSize + float HeightExt = 32 * ExtSize + float LeftExt = WidthExt * 0.5 + float TopExt = HeightExt * 0.5 + + SetWidgetPos(HUD.WHackingPreviewFrame, HackWindowIdleLeft + HackWindowLeft - 13 - LeftExt, HackWindowIdleTop + HackWindowTop - 12 - TopExt, HackWindowIdleWidth + HackWindowWidth + 26 + WidthExt, HackWindowIdleHeight + HackWindowHeight + 30 + HeightExt) +// 10, 17, 280, 220 + } + +//------------------------------------------------------------------------------------------------ + void OnHackingModeStart() //bol zapnuty hack mod + { + ShowHackGUI(true) + ShowWidget(HUD.WHackingPreviewNoise, true) + ProcessHackSelecting() //okamzite nam nieco selektne + HackingStripPos = 600 + HackStatus = 0 + SetHackPreviewExtendsSize(0) + + if(InsideHackTrigger) + { + ExtClass adp + for(int n = 0; n < HackAdeptsNum; n++) //az teraz ked sa uplne skoncil aj update GUI mozeme vynulovat pointre adeptov + { + adp = HackAdepts[n] + adp.HackInterf.FadeIn() + } + } + + if(!HackLoopSound) + HackLoopSound = PlaySound(this, g_sCommonSounds[37], 0) + + PlaySound(this, g_sCommonSounds[35], SF_ONCE) + World.HackInfDialog.ShowMessage("// #Searching_for_connections...") + } + +//------------------------------------------------------------------------------------------------ + void OnHackingModeEnd() //cely proces skoncil. Ovladanie bolo vypnute uz skor ale teraz uz skoncil aj update GUI + { +// SetPostEffect(0, 0, 0, 0, 0) + ShowHackGUI(false) + + HackCrossVisibility = 0 //pri najblizsom zapnuti hackingu musi byt vsetko opacitou na nule + for(int h = 0; h < HackAdeptsNum; h++) //inac je tam neprijemny preblik resp. neziaduci fade + { + ExtClass adp = HackAdepts[h] + + if(adp) + { + adp.HackInterf.FadeScale = 0 + adp.HackInterf.FadeScaleTarget = 0 + } + } + + if(!InsideHackTrigger) + { + for(int n = 0; n < HackAdeptsNum; n++) //az teraz ked sa uplne skoncil aj update GUI mozeme vynulovat pointre adeptov + HackAdepts[n] = NULL + + HackAdeptsNum = 0 + SelectedHackAdept = NULL + } + + if(HackLoopSound) + { + EndSound(HackLoopSound) + HackLoopSound = 0 + } + + if(HackingLoopSound) + { + EndSound(HackingLoopSound) + HackingLoopSound = 0 + } + ShowHUD(-1, -1, -1, 1, 1, 1, 1, -1, -1, 1) + } + +//----------------------------------------------------------------- + void SwitchBulletTimeMode(); + +//------------------------------------------------------------------------------------------------ + void SwitchHackMode() + { + HackMode = 1 - HackMode + + if(HackMode) + { + OnHackingModeStart() + + } + else + { + PlaySound(this, g_sCommonSounds[36], SF_ONCE) + World.HackInfDialog.ShowMessage("// #Disable_connections...") + } + } + +//------------------------------------------------------------------------------------------------ + void InterruptHacking(bool HackModeOff) + { + if(!Hacked) + return + + Hacked.HackInterf.LogOut() + SetListenerCamera(0) + WViewWidgetCamera = 0 + SetWidgetWorld(WView, globalmap, 0) + DummyPlayer.CurrentWeapon.Show(true) + World.HackInfDialog.ShowMessage("// #Logout [#" + Hacked.HackInterf.name + "]") + Hacked = NULL + Controlled = NULL + SetStatus(ST_NONE) + ShowHackGUI(true) + MovementDumping = false + + if(HackModeOff) + { + HackStatus = 0 + SetHackPreviewExtendsSize(0) + SwitchHackMode() + } + else + HackStatus = 3 //odlogujeme sa + } + +//--------------------------------------------------------------------------------------------------------- + void HideWeaponSelectGUI() + { + WeapGUIStatus = 0 + WeapGUIScroll = 0 + WeapGUIActivityTimer = 0 + + for(int n = 0; n < MaxAvailableWeapons; n++) + ShowWidget(HUD.WeaponList[n], false) + } + +//----------------------------------------------------------------- + void BeginCutscene() + { + if(World.ManipEntity) + DropManipEntity(false) + + ClearFlags(Hands, TFL_VISIBLE) + CurrentWeapon.Show(false) + HideWeaponSelectGUI() + + if(HackMode) //vypiname recon ked je zapnuty + SwitchHackMode() + + KEY(MOVE_F,true) + KEY(MOVE_B,true) + KEY(LEFT,true) + KEY(RIGHT,true) + KEY(JUMP,true) + KEY(CROUCH,true) + SetStatus(ST_NONE) + dBodyActive(this, false, false) + + if(HearthSound) + HearthSoundNeedStop = true + } + +//----------------------------------------------------------------- + void EndCutscene() + { + if(CurrentWeapon.ClassNum != CDummyWeapon) + { + SetFlags(Hands, TFL_VISIBLE) + CurrentWeapon.Show(true) + } + dBodyActive(this, true, true) + } + +//----------------------------------------------------------------- + void OnEnterVehicle(int stat) //vola sa 2x + { + if(stat == 0) //zacina nastpovat do auta + { + if(HackMode) //vypiname recon ked je zapnuty + SwitchHackMode() + } + else //nastupovanie do auta skoncilo. ovladanie prebera auto + { + WeaponClass wc = GetWeaponPointer(WeaponBeforeManip) + if(wc) //musi tam byt + { + ClearFlags(Hands, TFL_VISIBLE) + wc.Show(false) + } + + FlashLightSwitch = false //vypneme baterku + FlashLight = FlashLightMaxTime + ShowWidget(HUD.WLightBar, false) + ShowWidget(HUD.WLightBarBack, false) + + if(FlashLightHandle) + { + RemoveLight(FlashLightHandle) + FlashLightHandle = 0 + } + } + } + +//----------------------------------------------------------------- + void OnLeaveVehicle(int stat) //vola sa 2x + { + if(stat == 0) //prva faza. zacina vystupovat z auta. player nemoze robit nic po dobu nez uplne vystupi z auta + { + stat = stat + } + else //druha faza. player vystupil z auta a ocita sa v stave kedy je normalne ovladatelny. zacina animacia selektu zbrane WeaponBeforeManip + { + WeaponClass wc = GetWeaponPointer(WeaponBeforeManip) + if(wc) //musi tam byt + { + SetFlags(Hands, TFL_VISIBLE) + wc.Show(true) + } + } + } + +//--------------------------------------------------------------------------------------------------------- + vector GetCenterOfBody() + { + if(status == ST_NOCONTROL) + return coords + + return VirtualBodyCenter //pomyselny stred akoby nakloneneho body + } + +//--------------------------------------------------------------------------------------------------------- + vector EyesPos() + { + return CameraPos + + if(Crouch) + return GetMatrix(this, 3) + else + return GetMatrix(this, 3) + "0 0 22" + } + + void SetFullOrientation(vector pos, vector Angles) + { + vector CameraOffset = Vector(0, 0, PlayerCapsuleExtends[Crouch] + PlayerCameraOffset) + CameraPos = pos + CameraOffset + CameraAngles = Angles + WeaponAngles = Angles + + World.CameraPos = CameraPos + World.CameraAngs = Angles//CameraAngles + World.CameraNorm = Angles2Vector(World.CameraAngs) + + SetCamera(CameraPos, CameraAngles) + SetOrigin(this, pos) + UpdateEntity(this) + } + + //----------------------------------------------------------------- + void M_SetOrientation(ExtClass other) + { + ExtClass targ = FindClass(other._value) + + if(targ == NULL) + { + Print(String(_name + ".SetOrientation() can't found target" + other._value)) + return + } + + vector org = GetOrigin(targ) + HHVec + "0 0 0.5" + + SetFullOrientation(org, GetAngles(targ)) + } +//----------------------------------------------------------------- + void SetOrientationFromCamera() + { + CameraTargetPos = CameraPos + vector CameraOffset = Vector(0, 0, PlayerCapsuleExtends[Crouch] + PlayerCameraOffset) + coords = CameraPos - CameraOffset +// SetOrigin(this, coords) + + vector mat[4] = {"1 0 0", "0 1 0", "0 0 1"} + mat[3] = coords + SetMatrix(this, mat) + UpdateEntity(this) + +/* if(KeyState(KC_B)) + { + ClearKey(KC_B) + float HalfHeight = PlayerCapsuleHalfHeights[0] + vector mins = Vector(-PlayerCapsuleRadius, -PlayerCapsuleRadius, -HalfHeight) + vector maxs = Vector(PlayerCapsuleRadius, PlayerCapsuleRadius, HalfHeight) + AddDShape(SHAPE_BBOX, 0xffffaaaa, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, coords + mins, coords + maxs) + }*/ + } + +//--------------------------------------------------------------------------------------------------------- + WeaponClass GetWeaponPointer(int WeaponIndex) //budu sa lepsie debugovat podivne veci + { + if(WeaponIndex < 0 || WeaponIndex >= sizeof(PWeapons)) + return NULL + + return PWeapons[WeaponIndex] + } + +//--------------------------------------------------------------------------------------------------------- + bool SetMyWeaponPointer(int WeaponIndex, WeaponClass ptr) //budu sa lepsie debugovat podivne veci + { + if(WeaponIndex < 0 || WeaponIndex >= sizeof(PWeapons)) + return false + + PWeapons[WeaponIndex] = ptr + return true + } + +//--------------------------------------------------------------------------------------------------------- + bool PickWeapon(ItemClass item) //zobrali sme zbran. volane zo samotnej zbrame + { + if(GetWeaponPointer(item.ClassNum) != NULL) //takuto zbran uz mame. v zbrani sa pricitali naboje ale o chvilu bude instancia item zmazana!!! + return false + + SetMyWeaponPointer(item.ClassNum, item) //ulozi pointer do PWeapons + WeaponClass wc + RealWeaponsNum = 0 + + for(int n = 0; n < sizeof(PWeapons); n++) //spocitame si pocet skutocnych zbrani z herneho hladiska + { + wc = PWeapons[n] + + if(wc) + { + if(wc.ClassNum == CDummyWeapon) //tieto zbrane nechceme aby boli dostupne na vyber + continue + +// SetWidgetImage(WeaponList[wc.ClassNum - 1], 1) //ikona + RealWeaponsNum++ + } + } + + if(!ChangeWeapon) //takuto zbran este nemame a mame iba kladivo takze rovno do ruk + { + if(CurrentWeapon.ClassNum == CDummyWeapon || CurrentWeapon.ClassNum == CJackHammer) + { + if(item.ClassNum != CDummyWeapon && item.ClassNum != CJackHammer) + WeaponChange(item.ClassNum, true) + } + } + + return true + } + +//----------------------------------------------------------------- + void UpdateBulletTimeBar() + { + float rate = BulletTime / BulletTimeMax + float BarWidth = rate * 200 + SetWidgetPos(HUD.WTimeBar, 17, 565, BarWidth, 32) + + if(rate <= 0.25) + SetWidgetImage(HUD.WTimeBar, 1) + else + SetWidgetImage(HUD.WTimeBar, 0) + + + } + +//--------------------------------------------------------------------------------------------------------- + void UpdateHackSignalBar() + { + float SignalWidth = ReconSignal * 32 + float ff = SignalWidth / 7 + int ii = ff + ff = ii - 1 + SignalWidth = ff * 7 + SetWidgetPos(HUD.WHackingSignal, 756, 17, SignalWidth, 32) + } + +//--------------------------------------------------------------------------------------------------------- + void AddHealth(float quantity) + { + Health += quantity + clamp Health<0, MaxHealth> + UpdateHealthBar() + } + +//--------------------------------------------------------------------------------------------------------- + void PickAmmo(int type, int quantity) + { + if(type == -1) //vynimka na hubbardium + { + BulletTime += BulletTimeMax / 5 + clamp BulletTime<0, BulletTimeMax> + UpdateBulletTimeBar() + return + } + + Ammo[type] = Ammo[type] + quantity + UpdateAmmoBar() + } + +//--------------------------------------------------------------------------------------------------------- + + + + +//--------------------------------------------------------------------------------------------------------- + bool SelectWeapon(WeaponClass wc) //vrazi mu do ruky zbran. zbrane menime iba cez WeaponChange()! + { + DummyPlayer.SelectWeapon(wc) + + CurrentWeapon = wc + AddChild(Hands, CurrentWeapon, p_rhand) + CurrentWeapon.Select() + CurrentWeapon.Show(true) + player_hands hands = Hands + + if(hands.PlaySelectAnim() == false) //ak sa nepustila animacka selektu novej zbrane (ziadnu nema) + { + WeapSelectStatus = 0 //koncime selektovanie ihned! + ChangeWeapon = NULL //proces vymeny zbrane skoncil + + if(status == ST_NONE) //selektli sme novu zbran takze idle/walk musime nahodit podla novej zbrane! + hands.PlayIdleAnim() + else + hands.PlayWalkAnim() + +/* if(NextWeaponToChange) //tato zbran cakala na dokoncenie vymeny zbrane tak ju hned nahodime + { + if(WeaponChange(NextWeaponToChange, true) == false) //moze sa stat ze nema naboje + WeaponChange(CJackHammer, true) + + NextWeaponToChange = 0 + }*/ + } + else + { + CurrentWeapon.BeginSelect() + +// if(wc.WeapSelectAnim) +// SetAnimSlot(wc, 1, wc.WeapSelectAnim, 8, 0, NULL, 30, 0) + } + + if(IsInherited(wc, CFireWeaponClass)) + { + FireWeaponClass fw = wc + World.Cross.SetMinAndMaxSize(fw.PrecisionFlawMin * 1000, fw.PrecisionFlawMax * 1000) + + if(wc.ClassNum != CDummyWeapon) + World.Cross.Show(true) + } + else + World.Cross.Show(false) + + if(wc && wc.ClassNum == CDummyWeapon) //FIXME skor radsej spravit dummy animaciu aby ruky nebolo vidiet + ClearFlags(Hands, TFL_VISIBLE) + else + SetFlags(Hands, TFL_VISIBLE) + + ExactAimPathPrev = -1 + + return true + } + +//--------------------------------------------------------------------------------------------------------- + bool UnselectWeapon() //zbrane menime iba cez WeaponChange()! volane vzdy ked uz je zbran vizualne unselectnuta + { + RemoveChild(this, CurrentWeapon) + CurrentWeapon.Unselect() + CurrentWeapon.Show(false) + WeapSelectStatus = 2 //zbran je unselectnuta, zacina select novej zbrane + return true + } + +//--------------------------------------------------------------------------------------------------------- + bool WeaponChange(int WeaponIndex, bool RequestToWeapon) //tymto menime zbran + { + if(!ChangeWeapon && WeaponIndex == CurrentWeapon.ClassNum && WeaponIndex != CDummyWeapon) + return false + +// if(CheckItem(WeaponIndex) == false) +// return false + +// if(CurrentWeapon.Action != 0) +// return false + +/* if(ChangeWeapon) //ak uz prebieha vymena tak to nedovolime + { + Print("aaaaa") + return false + }*/ + + player_hands hands = Hands + ChangeWeapon = GetWeaponPointer(WeaponIndex) + + if(ChangeWeapon == NULL) + return false + + if(RequestToWeapon) //na miestach kde sa zbran selektuje cez M_SelectWeapon() to nesmie zlyhat + { + if(ChangeWeapon.CanSelect() == false) + { + ChangeWeapon = NULL + return false + } + } + + if(CurrentWeapon.Action) //ak bezi reload, fire atd. tak to musime zrusit pretoze vymena zbrane je dolezitejsia + CurrentWeapon.InterruptAction() + + EnableIdleWarAnims(false) //nemozeme prehravat IdleVary pocas vymeny zbrane + + if(CurrentWeapon.Action != 0) + CurrentWeapon.InterruptAction() + + WeapSelectStatus = 1 //zaciname unselect + + if(CurrentWeapon.UnselectAnim) //ak mame animacku + { + CurrentWeapon.BeginUnselect() //animhook na konci animacky zavola na Select novu zbran (ChangeWeapon)!!!!!!!! + hands.PlayUnselectAnim() + +// if(CurrentWeapon.WeapUnselectAnim) +// SetAnimSlot(CurrentWeapon, 1, CurrentWeapon.WeapUnselectAnim, 8, 0, NULL, 30, 0) + } + else + { + UnselectWeapon() //pokial nic nezabranilo skrytiu starej zbrane + SelectWeapon(ChangeWeapon) //dame mu novu + } + return true + } + +//----------------------------------------------------------------- + int GetBestAvailableWeapon() + { + int CurWeap = CurrentWeapon.ClassNum + int n, CurChoice, AdeptAmmo + int BestWeap = -1 + + for(n = 0; n < 7; n++) //hladame zbran ktora je definovana ako vyhodna na zaklade co drzime teraz + { + CurChoice = BestWeapChoices[CurWeap][n] + WeaponClass ChangeAdept = PWeapons[CurChoice] + + if(!ChangeAdept) + continue + + AdeptAmmo = ChangeAdept.Ammo + Ammo[ChangeAdept.AmmoType] + + if(AdeptAmmo <= 0 && CurChoice != CJackHammer) + continue + + return CurChoice + } + + return CDummyWeapon //tu by sa to nemalo nikdy dostat + } + +//----------------------------------------------------------------- + void M_AddTask(ExtClass other) + { + World.TaskList.AddTask(other._value) + } + +//----------------------------------------------------------------- + void M_RemoveTask(ExtClass other) + { + World.TaskList.CheckTask(other._value) + } + +//----------------------------------------------------------------- + void M_AddItem(ExtClass other) + { + string parm = other._value + int ClNum = 0 + + GetValue(NULL, parm, 0, ClNum) //ked existuje globalna premenna tak je to zbran + bool IsWeapon + + if(ClNum == 0) //neni to zbran ale item + { + ClNum = World.ItemColPtr.GetItemIndex(parm) + IsWeapon = false + } + else + IsWeapon = true + + World.ItemColPtr.GetObjectFromIndex(ClNum) + + if(IsWeapon) //ked to je weapon + { + if(GetWeaponPointer(ClNum) == NULL) + { + int MagazineAmmo = 0 + + if(other._name == "CheatTempClass") //volane z cheatu a tam chceme aspon jeden naboj + MagazineAmmo = 1 + + WeaponClass wc = CreateWeapon(ClNum, 0, MagazineAmmo) //ked ju nema tak zbran pridame ale bez nabojov. pouziva sa to iba pre ucely cutscen na zaciatku levelu a pod + + if(wc) + wc.Pick(this) + } + } + } + +//----------------------------------------------------------------- + void M_SelectWeapon(ExtClass other) + { + string parm = other._value + int ClNum = 0 + GetValue(NULL, parm, 0, ClNum) //ked existuje globalna premenna tak je to zbran + + if(ClNum > 0) //neni to zbran ale item + WeaponChange(ClNum, false) + } + +//--------------------------------------------------------------------------------------------------------- + bool ProcessWeaponSelect() + { + if(RealWeaponsNum == 0) + return false + + if(ChangeWeapon == NULL && status != ST_NOCONTROL && !World.CutScene && !MiniCutsceneStatus) //pokial uz neprebieha proces vymeny zbrane a nic neovladame + { + int SelectFromKey = 0 + + if(KEY(WEAP_JACKHAMMER, true)) + SelectFromKey = CJackHammer + + if(KEY(WEAP_PISTOL, true)) + SelectFromKey = CPistol + + if(KEY(WEAP_SHOTGUN, true)) + SelectFromKey = CShotgun + + if(KEY(WEAP_MACHINEGUN, true)) + SelectFromKey = CMachinegun + + if(KEY(WEAP_SNIPER_RIFLE, true)) + SelectFromKey = CSniperRifle + + if(KEY(WEAP_ROCKET_LAUNCHER, true)) + SelectFromKey = CRocketLauncher + + if(KEY(WEAP_FLAMETHROWER, true)) + SelectFromKey = CFlameThrower + + if(KEY(WEAP_GRENADE, true)) + SelectFromKey = CGrenade + + if(SelectFromKey && GetWeaponPointer(SelectFromKey)) + { + if(World.ManipEntity) + DropManipEntity(true) + + if(WeaponChange(SelectFromKey, true)) + { + WeapGUISelected = SelectFromKey - 1 + // WeapGUIStatus = 1 + // WeapGUIScroll = 0 + // WeapGUIActivityTimer = 0 + } + } + } + + int n + int WheelUp = g_WHEEL_UP + int WheelDown = g_WHEEL_DOWN + bool ReadyToSelect[10] + + WeaponClass CurToSelect + + if(WeapGUIStatus == 0) //bar je zasunuty + { + if(WheelUp || WheelDown) + { + if(ChangeWeapon == NULL && status != ST_NOCONTROL && !World.CutScene && !MiniCutsceneStatus) + { + WeapGUISelected = CurrentWeapon.ClassNum - 1 + WeapGUIStatus = 1 + WeapGUIScroll = 0 + WeapGUIActivityTimer = 0 +// WheelUp = 0 +// WheelDown = 0 + PlaySound(NULL, g_sCommonSounds[3], SF_ONCE) + } + else + return false + } + else + return false + } + + if(WeapGUIStatus != 0) //bar nieje zasunuty + { + for(n = 0; n < MaxAvailableWeapons; n++) + { + CurToSelect = GetWeaponPointer(n + 1) + + if(CurToSelect && CurToSelect.ClassNum != CDummyWeapon) + ReadyToSelect[n] = CurToSelect.CanSelect() + else + ReadyToSelect[n] = false + } + } + + if(WeapGUIStatus == 1) //bar sa vysuva + { + WeapGUIScroll += ftime * 8 + + if(WeapGUIScroll >= 1) + { + WeapGUIScroll = 1 + WeapGUIActivityTimer = 0 //3 sekundy + WeapGUIStatus = 2 + } + } + + if(WeapGUIStatus == 2) //je vysunuty + { + WeapGUIActivityTimer += ftime * 2 + + if(WeapGUIActivityTimer >= 3) + { + WeapGUIScroll = 1 + WeapGUIActivityTimer = 3 + WeapGUIStatus = 3 + PlaySound(NULL, g_sCommonSounds[4], SF_ONCE) + } + } + + if(WeapGUIStatus == 3) //zasuva sa + { + if(WeapGUIActivityTimer != 3) + { + WeapGUIStatus = 1 + return true + } + + WeapGUIScroll -= ftime * 4 + + if(WeapGUIScroll <= 0) + { + WeapGUIScroll = 0 + WeapGUIStatus = 0 + } + } + + if(WeapGUIStatus > 0) //vzdy ked je vidiet + { + if(ChangeWeapon == NULL && status != ST_NOCONTROL && !World.CutScene && !MiniCutsceneStatus/* && WeapGUIScroll > 0.5*/) //pokial uz neprebieha vymena zbrane. pri vysuvani nedovolime selekting aby sa to bolo na aktualnej zbrani + { + bool FoundReadyWeapon + if(WheelUp) + { + FoundReadyWeapon = false + while(!FoundReadyWeapon) + { + WeapGUISelected-- + WeapGUIActivityTimer = 0 + + if(WeapGUISelected < 0) + WeapGUISelected = MaxAvailableWeapons - 1 + + if(ReadyToSelect[WeapGUISelected]) + FoundReadyWeapon = true + } + PlaySound(NULL, g_sCommonSounds[7], SF_ONCE) + } + + if(WheelDown) + { + FoundReadyWeapon = false + while(!FoundReadyWeapon) + { + WeapGUISelected++ + WeapGUIActivityTimer = 0 + + if(WeapGUISelected >= MaxAvailableWeapons) + WeapGUISelected = 0 + + if(ReadyToSelect[WeapGUISelected]) + FoundReadyWeapon = true + } + PlaySound(NULL, g_sCommonSounds[7], SF_ONCE) + } + + if(MousePress(0) && ReadyToSelect[WeapGUISelected]) + { + ClearMousePress(0) + +//#ifdef DEVELOPER + if(WeapGUISelected < MaxAvailableWeapons) +/*#else + if(WeapGUISelected < RealWeaponsNum) +#endif */ + { + WeapGUIActivityTimer = 3 + WeapGUIStatus = 3 + + if(World.ManipEntity) + DropManipEntity(true) + + if(ChangeWeapon == NULL) //pokial uz neprebieha proces vymeny zbrane + WeaponChange(WeapGUISelected + 1, true) + + PlaySound(NULL, g_sCommonSounds[5], SF_ONCE) + } + else + PlaySound(NULL, g_sCommonSounds[6], SF_ONCE) + } + } + + float flip = 1 - WeapGUIScroll //trochu dynamiky z rychla do pomala + float Scroll = flip * flip + Scroll = 1 - Scroll + + float IconWidth = 128 + float IconHeight = 51 + + float Width + float Left + float Top + float Height = IconHeight + float ScrollLength = IconWidth + 17 //+ okraj z prava + int Color + float Alpha + float Brithness + int PosOffset + + +// WeaponClass wc +// n = 0 + int WeapIndex = 0 + int ColorCascade = 13 //prvy sused 75% transp a kazdy dalsi o 5 % menej. to su tie 5 % + + while(WeapIndex < MaxAvailableWeapons) + { +// wc = PWeapons[n++] + +// if(!wc) +// continue + +// ItemDef def = World.ItemColPtr.GetItemFromIndex(wc.ClassNum) + PosOffset = abs(WeapIndex - WeapGUISelected) + + float FinScroll = Scroll + + for(int r = 0; r < PosOffset; r++) //kazdy item ide naviac opozdene + FinScroll *= FinScroll + + if(WeapIndex == WeapGUISelected) //selektnuty ma alfu aj jas naplno + { + Alpha = 255 + Brithness = 255 + WeapGUIAddScrolls[WeapIndex] = WeapGUIAddScrolls[WeapIndex] + (ftime * 8) + + if(WeapGUIAddScrolls[WeapIndex] >= 1) + WeapGUIAddScrolls[WeapIndex] = 1 + } + else //ostatni to maju inak ;-) + { + Alpha = 153 - (ColorCascade * (PosOffset - 1)) //prvy sused 75% transp a kazdy dalsi o 5 % menej + Brithness = 127 + + WeapGUIAddScrolls[WeapIndex] = WeapGUIAddScrolls[WeapIndex] - (ftime * 8) + + if(WeapGUIAddScrolls[WeapIndex] <= 0) + WeapGUIAddScrolls[WeapIndex] = 0 + } + + Left = 800 - (ScrollLength * FinScroll) + + flip = 1 - WeapGUIAddScrolls[WeapIndex] + float AddScr = flip * flip + AddScr = 1 - AddScr + + Left -= AddScr * FinScroll * 19 + Width = ScrollLength + clamp Width<0, IconWidth> + + Top = 80 + (Height * (float)WeapIndex) + + float FinalBrightness = Brithness + (AddScr * (float)127) //z polovicneho jasu fadujeme do plneho + clamp FinalBrightness<0, 255> + + int R = FinalBrightness + int G = FinalBrightness + int B = FinalBrightness + + if(ReadyToSelect[WeapIndex] == false) + { + G = (float)FinalBrightness * 0.3 + B = G + } + + Color = ARGB(Alpha, R, G, B) + + SetWidgetPos(HUD.WeaponList[WeapIndex], Left, Top, Width, Height) + SetWidgetColor(HUD.WeaponList[WeapIndex], Color) ////75 %transp + + ShowWidget(HUD.WeaponList[WeapIndex], true) + WeapIndex++ + } + } + else + { + for(n = 0; n < MaxAvailableWeapons; n++) + ShowWidget(HUD.WeaponList[n], false) + } + + if(WeapGUIStatus > 0) + return true + + return false + } + +//------------------------------------------------------------------------------------------------ + void UpdateOxygenBar() + { + float rate = oxygen / PlayerMaxOxygen + float BarWidth = rate * 100 + SetWidgetPos(HUD.WOxygenBar, 17, 495, BarWidth, 16) + +/* if(rate <= 0.25) + SetWidgetImage(HUD.WTimeBar, 1) + else + SetWidgetImage(HUD.WTimeBar, 0)*/ + } + +//------------------------------------------------------------------------------------------------ + float GetOxygen() + { + return oxygen + } + +//------------------------------------------------------------------------------------------------ + void AddOxygen(float quantity) + { + oxygen += quantity + clamp oxygen<0, PlayerMaxOxygen> + OxygenAdding = true + OxygenDownTimer = 1 //klesat zacne az po chvili + UpdateOxygenBar() + } + +//----------------------------------------------------------------- + void ProcessWeaponVibrations() + { + if(IsInherited(CurrentWeapon, CFireWeaponClass) == false) + return + + FireWeaponClass wc = CurrentWeapon + + WeaponKickOffSmall[0] = WeaponKickOffSmall[0] - (WeaponKickOffSmall[0] * 5 * ftime) + + if(WeaponKickOffSmall[0] < 0) + WeaponKickOffSmall[0] = 0 + + CameraKickOffset += WeaponKickOffSmall[0] * 50 * ftime + + WeaponKickTimer += ftime * 100 + + if(WeaponKickTimer > 20) + { + CameraKickOffset -= CameraKickOffset * 10 * ftime + } + else + { + if(wc.Action != 1 && wc.Action != 3) + CameraKickOffset -= CameraKickOffset * 10 * ftime + } + + if(CameraKickOffset < 0) + CameraKickOffset = 0 + + WeaponKickOff[0] = CameraKickOffset + } + +//----------------------------------------------------------------- + vector ProcessWeaponLagMotion() + { + vector off = CameraAngles + float g = off[0] + off[0] = off[2] + off[2] = g + float f = off[2] + f = -f + off[2] = f + off = off - WeaponAngles + off = off * 0.15 + vector vc = off * ftime * 50//0.2 + WeaponAngles = WeaponAngles + vc + return off + } + +//----------------------------------------------------------------- + void StartShooting(int mode) //vola SA ZA KAZDYM VYSTRELOM + { + Shooting++ + ShootingMode = mode + WeaponKickTimer = 0 + WeaponKickOffSmall[0] = 0 + EnableIdleWarAnims(false) //Pocas vystrelu IdleVars neprichadzaju do uvahy + FireWeaponClass wc = CurrentWeapon + + float ExactAimFactor = 1 - ExactAimPath + ExactAimFactor = 0.24 + (ExactAimFactor * 0.75) + + WeaponKickOffSmall[0] = WeaponKickOffSmall[0] + (wc.KickUp[mode] * ExactAimFactor) + + if(CurrentWeapon.ClassNum != CGrenade) + Noises = Noises | NOISE_SHOOT + } + +//----------------------------------------------------------------- + void EndShooting() //vola sa az ked skonci suvisla palba + { + if(!Shooting) //volane zbytocne + return + + EnableIdleWarAnims(true) + + if(CameraShotingVertOffset < 0) + CameraKickOffset += CameraShotingVertOffset //pocas strelby sme hybali mysou smerom dolu. o tolko menej sa bude zbran narovnavat + else + CameraKickOffset -= CameraShotingVertOffset + + if(CameraKickOffset < 0) //ak sme hybali mysou viac nez je spatny pohyb ktory by mal nasledovat + { + if(CameraShotingVertOffset < 0) + CameraShotingVertOffset -= CameraKickOffset + else + CameraShotingVertOffset += CameraKickOffset + + CameraKickOffset = 0 + } + + WeaponKickOff[0] = CameraKickOffset //o tolko sa bude zbran vyrovnavat + + if(CameraShotingVertOffset < 0) //zbytok prenesieme do kamery + CameraAngles[0] = CameraAngles[0] - CameraShotingVertOffset + else + CameraAngles[0] = CameraAngles[0] + CameraShotingVertOffset + + CameraShotingVertOffset = 0 + Shooting = 0 //suvisla palba skoncila + } + + float HandsAmimTimer + float HandsAmimTargOffset + float CurHandsAmimOffset + +//----------------------------------------------------------------- + void ProcessWeapons() + { + vector LagOff = ProcessWeaponLagMotion() //opozdeny pohyb zbrane. vracia uhly v coords systeme kamery + float miss + float HandsOffsetTarget = 4 //o kolko sa ma zbran pri suvislej palbe posuvat dozadu + + if(Shooting) + CameraShotingVertOffset += cincy //pocitame o kolko sa pohla mys vertikalne aby sa to dalo potom odcitat zo spatneho pohybu po strelbe + else + CameraShotingVertOffset = 0 + + if(Shooting) + { + ShootingCrossScale += ftime + + if(HandsOffset < HandsOffsetTarget) + { + miss = HandsOffsetTarget - HandsOffset + HandsOffset += miss * 10 * ftime + + if(HandsOffset >= HandsOffsetTarget) + HandsOffset = HandsOffsetTarget + } + } + else + { + ShootingCrossScale -= ftime * 10 + + if(HandsOffset > 0) + { + miss = HandsOffset * 0.9 + miss = HandsOffset - miss + HandsOffset -= miss * 100 * ftime + + if(HandsOffset <= 0) + HandsOffset = 0 + } + } + + clamp ShootingCrossScale<0, 1> + +//exact aim + vector ExactAimOff, ExactAimAngOff + + if(IsInherited(CurrentWeapon, CFireWeaponClass) == true) + { + FireWeaponClass wc = CurrentWeapon + + int SAttack = KEY(S_ATTACK, false) + float afac = 4 + + //1.3 Automaticke zaliceni pri lean (krome sniperky!) + if(wc && ClassName(wc) != "item_weapon_sniperrifle") + { + if(KEY(LEAN_LEFT, false) || KEY(LEAN_RIGHT, false)) + { + SAttack = true + afac = 6 + } + } + + if(SAttack && wc.ExactAimFOV >= 0 && CurrentWeapon.Action != 2) //ExactAimFOV == -1 v pripade ze nechceme ExactAimMode + { + ExactAim += ftime * afac * 1.00004 + + if(ExactAim >= 1) + ExactAim = 1 + + EnableIdleWarAnims(false) + } + else + { + ExactAim -= ftime * afac + + if(ExactAim <= 0) + ExactAim = 0 + } + + ExactAimPath = ExactAim * ExactAim + ExactAimOff = wc.ExactAimOffset * ExactAimPath + ExactAimAngOff = wc.ExactAimAngOffset * ExactAimPath + + if(ExactAimPathPrev != ExactAimPath) + { + ExactAimPathPrev = ExactAimPath + + float AddFov = ExactAimPath * wc.ExactAimFOV + SetCameraVerticalFOV(0, DefaultFOV - AddFov) + wc.OnExactAimInterpolate(ExactAimPath) + + float ff = ExactAim *= 0.769 + ExactAimCrossScale = 1 - ff + } + } + + if(status == ST_RUN) + { + float TimeStep = 8 + TimeStep -= ExactAimPath * 6 + HandsAmimTimer += ftime * TimeStep + HandsAmimTargOffset = sin(HandsAmimTimer) * 2 + } + else + { + if(status == ST_JUMP) + { +/* if(cincy > 5) + HandsAmimTargOffset = 2 + else*/ + HandsAmimTargOffset = 8 + } + else + HandsAmimTargOffset = 0 + } + + float AnimOffDiff = HandsAmimTargOffset - CurHandsAmimOffset + CurHandsAmimOffset += AnimOffDiff * ftime * 5 + + vector HandsFinalOffset = ExactAimOff + HandsFinalOffset[2] = HandsFinalOffset[2] + HandsOffset + HandsFinalOffset[1] = HandsFinalOffset[1] + (CurHandsAmimOffset * -0.1) + + vector HandsFinalAngOffset = ExactAimAngOff + LagOff + HandsFinalAngOffset[2] = HandsFinalAngOffset[2] + CurHandsAmimOffset + +// HandsFinalAngOffset[0] = HandsFinalAngOffset[0] - (LeanAngle * 1.0) //ruky naklaname trochu s kamerou + + SetPosInCamAxis(Hands, HandsFinalOffset, HandsFinalAngOffset, 1) //drzi na kamere zbran ! + + DummyPlayer.SetOrientation(coords, CameraAngles[1] + 90) + + if(WeapGUIStatus > 0) //prebieha vyber zbrane z GUI + return + + bool ClearPrimary + + if(World.ManipEntity) + ClearPrimary = false + else + ClearPrimary = 1 - CurrentWeapon.Automatic[PRIMARY] + + PrimaryAttack = KEY(P_ATTACK, ClearPrimary) + + if(!PrimaryAttack) + SecondaryAttack = KEY(S_ATTACK, false/*1 - CurrentWeapon.Automatic[SECONDARY]*/) + else + SecondaryAttack = false + + if(Shooting) //kontrolujeme ci kopanie zbrane netreba zastavit + { + if(ShootingMode == PRIMARY) + { + if(!PrimaryAttack || ChangeWeapon || CurrentWeapon.Action == 2) + EndShooting() //suvisla palba skoncila + } + + if(ShootingMode == SECONDARY) + { + if(!SecondaryAttack || ChangeWeapon || CurrentWeapon.Action == 2) + EndShooting() //suvisla palba skoncila + } + } + + if(ChangeWeapon) //ak prave menime zbran tak nedovolime nic ine + return + + vector tpos + + if(PrimaryAttack && CurrentWeapon.ClassNum != CDummyWeapon) + { + tpos = g_CamMat[3] + tpos = tpos + (World.CameraNorm * (float)8192) + + if(CurrentWeapon.Action(1, tpos) == false) //vystrel uz prebieha (alebo reload) + { + if(CurrentWeapon.Action == 0) + { + if(CurrentWeapon.Ammo == 0) + { + if(Ammo[CurrentWeapon.AmmoType] == 0) //nemame ziadne naboje tak berieme predchadzajucu zbran + WeaponChange(GetBestAvailableWeapon(), true) + else + { + if(CurrentWeapon.Action(2, tpos) == false) //skusime reload + WeaponChange(GetBestAvailableWeapon(), true) + + UpdateAmmoBar() + } + } + } + } + else + { + StartShooting(PRIMARY) + UpdateAmmoBar() + + if(CurrentWeapon.ClassNum == CFlameThrower) + { + if(!CurrentWeapon.ActionSound) + CurrentWeapon.ActionSound = PlaySound(CurrentWeapon, CurrentWeapon.Sounds[0], 0) + } + else + { + if(CurrentWeapon.ClassNum == CMachinegun) //co vystrel, to zvuk. ale musi byt kratky. je nezmysel zvuk usekavat a pustat znovu + CurrentWeapon.ActionSound = PlaySound(WeaponSoundPos, CurrentWeapon.Sounds[0], SF_ONCE) + else + { + if(CurrentWeapon.ActionSound) + EndSound(CurrentWeapon.ActionSound) + + CurrentWeapon.ActionSound = PlaySound(WeaponSoundPos, CurrentWeapon.Sounds[0], SF_ONCE) + } + } + } + } + +/* if(SecondaryAttack) + { + tpos = g_CamMat[3] + tpos = tpos + (World.CameraNorm * (float)8192) + + if(CurrentWeapon.Action(3, tpos) == false) //sekundarny mod zbrane + { + if(CurrentWeapon.Action == 0) + { + if(CurrentWeapon.Ammo == 0) + { + CurrentWeapon.Action(2, tpos) //skusime reload + UpdateAmmoBar() + } + } + } + else + { + StartShooting(SECONDARY) + UpdateAmmoBar() + } + }*/ + ProcessWeaponVibrations() + + if(KEY(RELOAD, true)) + { +// if(CurrentWeapon.Action == 1) //fire +// CurrentWeapon.InterruptAction() + if(ChangeWeapon == NULL) //select/unselect zbrani nechame na pokoji skoncit za kazdych okolnosti + { + if(CurrentWeapon.Action(2, tpos)) //reload + SetAnimSlot(Hands, s_weapon - 1, VNULL, 0, 1, NULL, 30, AF_ONCE) + } + } + +/* if(KEY(NEXT_WEAPON, true)) //dalsia zbran + { + if(World.ManipEntity) + DropManipEntity(true) + + ChangeNextWeapon() + } + + if(KEY(PREV_WEAPON, true)) //predchadzajuca zbran + { + if(World.ManipEntity) + DropManipEntity(true) + + ChangePreviousWeapon() + }*/ + } + +//----------------------------------------------------------------- + bool ApplyBackForce() + { + if(MotionSpeed == 0) + return false + +// float ke = dBodyGetKineticEnergy(this) + +// if(ke > 1000) //koli vybuchom +// return false + + vector vl = GetVelocity(this) + + if(TrainEnt) + { + vector TrainVel = dBodyGetVelocityAt(TrainEnt, coords) * 1.10 + vl = vl - TrainVel + } + + vl[2] = 0 + float lng = VectorLength(vl) + float rate = lng / MotionSpeed +// clamp rate<0, 1> //normalne + clamp rate<0.5, 1> //s nulovym trenim + + float frate = 1 - rate + vl = -vl + +// float Ftime = ftime * 100 + float b = 20 * frate + b += 20// * Ftime + vl = vl * b + vl = vl * rate + BrakeForce = vl + return true + } + + trigger_hack_detector BestHackTrigger //najblizsi hack trigger + +//------------------------------------------------------------------------------------------------ + float GetDistanceToHackTrigger(trigger_hack_detector trigger) + { + vector MyPos = GetMatrix(this, 3) + vector pos = trigger.CoordToLocal(MyPos) + pos = trigger.GetNearestPosition(pos) + pos = trigger.CoordToParent(pos) //najblizise miesto s triggerom + return VectorLength(MyPos - pos) + } + +//------------------------------------------------------------------------------------------------ + void ProcessHackSignal() + { + float ReconSignalBefore = ReconSignal + float DistToTrigger + ReconSignal = 0 + + if(InsideHackTrigger) //sme v hack triggeri takze neni co riesit. mame plny signal + { + if(BestHackTrigger) //toto by malo byt nastavene vzdy ked sme tu + { + DistToTrigger = GetDistanceToHackTrigger(BestHackTrigger) + + if(DistToTrigger > 0.01) //uz niesme v triggeri + { + BestHackTrigger = NULL + SetHackAdepts(NULL, 0) //zahodime starych adeptov (postupne odfaduju) + } + + if(BestHackTrigger && BestHackTrigger.ContainHackableEntities()) + ReconSignal = 1 + } + } + else + { + trigger_hack_detector trigger = FirstHackTrigger + trigger_hack_detector BestTrigger = NULL + float BestDistToTrigger = ReconSignalDistFromTrigger + + while(trigger) //hladame najblizsi hackovaci trigger + { + if(GetEventMask(trigger) & EV_TOUCH) //vynechame disablovane triggery + { + if(trigger.ContainHackableEntities()) + { + DistToTrigger = GetDistanceToHackTrigger(trigger) + + if(DistToTrigger < BestDistToTrigger) + { + BestDistToTrigger = DistToTrigger + BestTrigger = trigger + } + } + } + trigger = trigger.NextSiblingTrigger + } + + if(BestTrigger) //trigger je v dosahu RECONU takze ukazujeme stav signalu + { + if(BestDistToTrigger <= 0.01) //sme v triggeri + { + if(BestTrigger != BestHackTrigger) //a neni to ten posledny + { + BestHackTrigger = BestTrigger //mapetame si najblizsi trigger + SetHackAdepts(NULL, 0) //zahodime starych adeptov (postupne odfaduju) + + ExtClass NewAdepts[16] + int NewAdeptsNum = BestHackTrigger.GetHackAdepts(NewAdepts) + SetHackAdepts(NewAdepts, NewAdeptsNum) //nahodime novych adeptov + } + } + + ReconSignal = 1 - (BestDistToTrigger / ReconSignalDistFromTrigger) + clamp ReconSignal<0, 1> +// AddDShape(SHAPE_BBOX, 0xffffaaaa, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos - "1 1 1", pos + "1 1 1") + } + else + { + if(BestHackTrigger) + { + BestHackTrigger = NULL + SetHackAdepts(NULL, 0) //zahodime starych adeptov (postupne odfaduju) + } + } + } + + if(ReconSignal != ReconSignalBefore) + UpdateHackSignalBar() + + float FlashTransp + + if(ReconSignal == 1 && !HackMode) //signal je naplno tak flashujeme + { + ReconSignalFlash += ftime * 300 + + if(ReconSignalFlash > 360) + ReconSignalFlash -= 360 + + FlashTransp = fabs(sin(ReconSignalFlash * DEG2RAD)) * 255 + SetWidgetColor(HUD.WHackingSignalFlash, AWHITE(FlashTransp)) + } + else //signal neni naplno tak len doflashujeme + { + if(ReconSignalFlash <= 360) + { + ReconSignalFlash += ftime * 300 + + if(ReconSignalFlash >= 360) + ReconSignalFlash = 360 + + FlashTransp = fabs(sin(ReconSignalFlash * DEG2RAD)) * 255 + SetWidgetColor(HUD.WHackingSignalFlash, AWHITE(FlashTransp)) + } + } + } + +//------------------------------------------------------------------------------------------------ + bool ProcessHacking() + { + if(HackingDisabled) + return false + + ProcessHackSignal() + + if(Hacked) //sme nahackovani do nejakej entity + { +// dBodyActive(this, false, false) + /*ApplyBackForce() //player stoji na mieste, brzime ho aby sa velmi nepohyboval ale uplne tuhy nemoze byt pretoze by mohol branit v pohybe potvoram atd. + BrakeScale = 10.0 + dBodyApplyForce(this, BrakeForce * BrakeScale)*/ + + LastStayPos = GetOrigin(this) + DummyPlayer.SetOrientation(coords, CameraAngles[1] + 90) + + bool HackModeKey = KEY(CONTROLLER, true) + + if(KEY(USE, true) || KeyState(KC_ESCAPE) || HackModeKey || Hacked.HackInterf.NeedLogOut()) //vraciame sa do playera + { + ClearKey(KC_ESCAPE) + InterruptHacking(HackModeKey) + } + else + Hacked.HackInterf.OnFrame() + + LoginTime += ftime * 100 + + if(MaxLoginTime != -1) //pokial to ma obmedzeny cas po ktory je mozne byt lognuti tak ho odpocitame a potom sa odlogujeme + { + if(LoginTime >= MaxLoginTime) + { + LoginTime = MaxLoginTime + InterruptHacking(HackModeKey) + } + + float FinishTime = MaxLoginTime - LoginTime + clamp FinishTime<0, 100> + + if(FinishTime < 100) + { + HackNoiseFade = 1 - (FinishTime / 100) + ShowWidget(HUD.WHackingPreviewNoise, true) + } + else + HackNoiseFade = 0 + } + + if(HackModeFade > 0) //bez ohladu na HackMode musime updatovat GUI koli fadovaniu a pod + UpdateHackGUI() + + return true + } + else //ak sme v hack triggeri tak informujeme o moznosti zapnut hack mode a pripadne ho managujeme + { + if(!World.CutScene && !MiniCutsceneStatus && status != ST_NOCONTROL && KEY(CONTROLLER, true)) + SwitchHackMode() + + if(HackMode) //je zapnuty hacking mod + { + if(HackModeFade < 1) + HackModeFade = LinearBlend(HackModeFade, 1, 6) + + if(InsideHackTrigger) + { + float WindowScale + + if(HackStatus == 0) //selektujeme + { + ProcessHackSelecting() //selektime + + if(SelectedHackAdept && SelectedHackAdept.HackInterf.CanHacking()) + HackNoiseFade = 1 - (SelectedHackAdept.HackInterf.CurHackingTime / SelectedHackAdept.HackInterf.HackingTime) + else + HackNoiseFade = 1 + + if(SelectedHackAdept && KEY(USE, true) && SelectedHackAdept.HackInterf.CanLogin()) //nieco sme selektli a USE + { + HackLoginTimer = 0 + + if(HackingLoopSound) //poistka + { + EndSound(HackingLoopSound) + HackingLoopSound = 0 + } + + if(SelectedHackAdept.HackInterf.GetMaxLoginTime() == 0) //neni potreba do toho prepinat kameru + { + Hacked = SelectedHackAdept + Hacked.HackInterf.LogIn() //logneme sa + World.HackInfDialog.ShowMessage("// #Login [#" + Hacked.HackInterf.name + "]") + InterruptHacking(false) //a hned odlogujeme. Hacked je NULL + } + else //nasizujeme okno na screenu a logneme sa do toho + { + HackStatus = 1 + SetStatus(ST_NOCONTROL) + ShowHUD(-1, -1, -1, 0, 0, 0, 0, 0, -1, 0) + } + return true //sme nahackovani. vraciame true a to znamena ze player nebude ovladatelny + } + } + + if(HackStatus == 1) //logujeme sa do entity + { + if(!SelectedHackAdept || !SelectedHackAdept.HackInterf) //pocas prezoomovania do entity sa moze stat ledacos + { + InterruptHacking(false) + return true + } + + HackLoginTimer += ftime * 5 + + if(HackLoginTimer >= 1) //uz sme nalogovani + { + HackLoginTimer = 1 + HackStatus = 2 + } + + WindowScale = HackLoginTimer * HackLoginTimer + SetHackPreviewExtendsSize(WindowScale) + + if(HackLoginTimer == 1) + { + ShowHackGUI(false) + ShowWidget(HUD.WHackingPreviewNoise, true) + ShowWidget(HUD.WHackingModeGrid2, true) + ShowWidget(HUD.WHackingPreviewTitle, true) +// ShowWidget(HUD.WHackingModeGrid, true) + World.Cross.Show(false) + Hacked = SelectedHackAdept + Controlled = SelectedHackAdept +// SetPostEffect(0, 0, 0, 0, 0) + Hacked.HackInterf.LogIn() + WViewWidgetCamera = 1 + SetWidgetWorld(WView, globalmap, 1) + SetListenerCamera(1) + DummyPlayer.CurrentWeapon.Show(false) + DummyPlayer.Transmission() + LoginTime = 0 + MovementDumping = true + MaxLoginTime = Hacked.HackInterf.GetMaxLoginTime() + World.HackInfDialog.ShowMessage("// #Login [#" + Hacked.HackInterf.name + "]") + + if(HackModeFade > 0) //bez ohladu na HackMode musime updatovat GUI koli fadovaniu a pod + UpdateHackGUI() + + return true + } + } + } + else //sme mimo hack trigger + { + HackNoiseFade = 1 //mimo hack trigger vzdy zrnime naplno + + if(HackStatus == 1) //moze sa stat ze pocas toho co zoomujeme okono do entity opustime trigger takze okno musime zase zmensit do rohu a enablovat pohyb playera + { + HackStatus = 3 + + if(status == ST_NOCONTROL) + SetStatus(ST_NONE) + } + } + + if(HackStatus == 3) //tento satus moze prebiehat aj ked sme uz mimo trigger + { + HackLoginTimer -= ftime * 4 + + if(HackLoginTimer <= 0) + { + HackLoginTimer = 0 + HackStatus = 0 + ShowHUD(-1, -1, -1, 1, 1, 1, 1, -1, -1, 1) + } + + WindowScale = HackLoginTimer * HackLoginTimer + SetHackPreviewExtendsSize(HackLoginTimer) + } + } + else //je vypnuty hacking mod. ovladanie uz neni mozne ale musime dofadovat takze GUI updatujeme stale + { + if(HackModeFade > 0) + { + HackModeFade = LinearBlend(HackModeFade, 0, 6) + + if(HackModeFade == 0) + { + OnHackingModeEnd() + return false + } + } + } + + if(HackModeFade > 0) //bez ohladu na HackMode musime updatovat GUI koli fadovaniu a pod + UpdateHackGUI() + + World.HackInfDialog.OnFrame() + } + + return false + } + +//----------------------------------------------------------------- + vector CheckForPlayerSpaceDown(vector pos) + { + vector DirVec = Vector(0, 0, -100) + dShapeCastSetDir(ShapeCast, DirVec) + vector mat4[4] = {"1 0 0", "0 1 0", "0 0 1"} + mat4[3] = pos + SetMatrix(ShapeCast, mat4) +// AddDShape(SHAPE_LINE, 0xffffaaaa, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos, pos + Vector(0, 0, -lng)) + + MinClass clipent + vector cpos, cnorm + float dist = dShapeCastUpdate(ShapeCast, 0, clipent, cpos, cnorm) + + if(dist < 1) + { + vector off = DirVec * dist + return pos + off + } + return pos + } + +//----------------------------------------------------------------- + bool ProcessVehicleControl() + { + if(!Controlled) + return false + + EnterableVehicle vehicle = Controlled + + if(!IsInherited(vehicle, CEnterableVehicle)) + return false + + if(Hands && CurrentWeapon.CanUpdateOwnerAnim()) //musime updatovat ruky pretoze moze bezat select/unselect + BumpFrame(Hands, ftime, 0) + + float MatQuat[4] + vector CameraMat[4] + float flip + float RotBlend, TransBlend + vector CameraPosEx, CameraPosIn + vector CameraMatExt[3] + vector CameraMatIn[3] + vector Off + + if(VehicleControlStatus == 1) //preblendujeme kameru do auta + { + VehicleControlTimer += ftime * 2 + clamp VehicleControlTimer<0, 1> + + flip = 1 - VehicleControlTimer //ro rychla + RotBlend = flip * flip// * flip + RotBlend = 1 - RotBlend + + vehicle.UpdateCameraSystem() + RollPitchYawMatrix2(EntityAnglesToCameraAngles(vehicle.GetAnglesForCamera()), CameraMatIn) + MatrixQuat(CameraMatIn, VehicleQuatIn) + QuatLerp(MatQuat, VehicleQuatExt, VehicleQuatIn, RotBlend) + + CameraPosEx = vehicle.BodyPart.CoordToParent(VehicleCameraBlendOff) + vehicle.UpdateCameraSystem() + CameraPosIn = vehicle.GetCoordsForCamera() + Off = CameraPosEx - CameraPosIn + + TransBlend = 1 - RotBlend + Off = Off * TransBlend + QuatMatrix(MatQuat, CameraMat) + CameraMat[3] = CameraPosIn + Off + World.CameraPos = CameraMat[3] + World.CameraNorm = CameraMat[0] + SetCameraEx(0, CameraMat) + + CameraPos = CameraMat[3] + SetOrientationFromCamera() + + if(VehicleControlTimer == 1) + { + vehicle.LogIn() + OnEnterVehicle(1) + VehicleControlStatus = 2 + return true + } + } + + if(VehicleControlStatus == 2) //sme v aute + { + CameraPos = vehicle.HeadPosInside + SetOrientationFromCamera() //drzime playera v aute + + if(KEY(USE, true)) + { + vehicle.BeforeLeaving() + VehicleControlStatus = 4 + return true + } + return true + } + + if(VehicleControlStatus == 4) //cakame az vehicle premiestni kameru do interieru a auto nezastavi + { + if(VectorLength(GetVelocity(vehicle.BodyPart)) < 300) + { + vehicle.InExtRateTarget = 0 //nech sa kamera premiestni do first persnu + + if(vehicle.InExtRate == 0) //ked uz je tam + { + int OutSide = vehicle.EnteredSide + vector IdealOutPos = vehicle.GetIdealOutPos(OutSide) + vector CastedOutPos = CheckForPlayerSpaceDown(IdealOutPos) + // AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, IdealOutPos, CastedOutPos) + + // asi 20 unitov od zeme pre nas neni prekazka a plyera hodime nad to + if(VectorLength(IdealOutPos - CastedOutPos) < 30) //ked neni miesto na strane z ktorej sme nastupovali tak skusime este druhu stranu + { + OutSide = 1 - vehicle.EnteredSide + IdealOutPos = vehicle.GetIdealOutPos(OutSide) + CastedOutPos = CheckForPlayerSpaceDown(IdealOutPos) + // AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, IdealOutPos, CastedOutPos) + + if(VectorLength(IdealOutPos - CastedOutPos) < 30) //ak neni miesto ani na druhej strane tak smola. zostavame v aute + return true + } + + vector FreeCameraPos = CastedOutPos + Vector(0, 0, PlayerCapsuleExtends[Crouch] * 2 + PlayerCameraOffset) + vehicle.UpdateCameraSystem() + CameraAngles = EntityAnglesToCameraAngles(vehicle.GetAnglesForCamera()) + CameraAngles = FixAngles(CameraAngles) + CameraPos = FreeCameraPos//vehicle.GetCoordsForCamera() + SetOrientationFromCamera() //drzime playera v aute + + RollPitchYawMatrix2(CameraAngles, CameraMatExt) + RollPitchYawMatrix2(CameraAngles, CameraMatIn) + MatrixQuat(CameraMatExt, VehicleQuatExt) + MatrixQuat(CameraMatIn, VehicleQuatIn) + + VehicleCameraBlendOff = vehicle.BodyPart.CoordToLocal(FreeCameraPos) //na tejto pozicii vystupime (pozicia pre kameru) + VehicleCameraLean = CameraAngles[2] + + VehicleControlStatus = 3 + VehicleControlTimer = 1 + vehicle.LogOut() + OnLeaveVehicle(0) + } + } + return true + } + + if(VehicleControlStatus == 3) //vystupujeme z auta + { + VehicleControlTimer -= ftime * 2 + clamp VehicleControlTimer<0, 1> + + flip = 1 - VehicleControlTimer //ro rychla + RotBlend = flip * flip// * flip + RotBlend = 1 - RotBlend + + float AngOff = GetAngularOffset(0, VehicleCameraLean) + CameraAngles[2] = AngOff * VehicleControlTimer //"uklon" kamery postupne vyrovname + + RollPitchYawMatrix2(CameraAngles, CameraMatExt) + MatrixQuat(CameraMatExt, VehicleQuatExt) + + QuatLerp(MatQuat, VehicleQuatExt, VehicleQuatIn, RotBlend) + + vehicle.UpdateCameraSystem() + CameraPosEx = vehicle.BodyPart.CoordToParent(VehicleCameraBlendOff) + CameraPosIn = vehicle.GetCoordsForCamera() + Off = CameraPosEx - CameraPosIn + + TransBlend = 1 - RotBlend + Off = Off * TransBlend + QuatMatrix(MatQuat, CameraMat) + CameraMat[3] = CameraPosIn + Off + World.CameraPos = CameraMat[3] + World.CameraNorm = CameraMat[0] + SetCameraEx(0, CameraMat) + + CameraPos = vehicle.BodyPart.CoordToParent(VehicleCameraBlendOff) + SetOrientationFromCamera() + + if(VehicleControlTimer == 0) + { + float ang = CameraAngles[0] //v playerovi s uhlami kamery hybeme aj do minusovych hodnot a v HandleCamera() je limit +- LookLimit. preto musime takto + if(ang > LookLimit) + ang = ang - 360 + CameraAngles[0] = ang + + Controlled = NULL + VehicleControlStatus = 0 + SetStatus(ST_NONE) + CameraPos = vehicle.BodyPart.CoordToParent(VehicleCameraBlendOff) + SetOrientationFromCamera() + WeaponChange(WeaponBeforeManip, true) + + if(VehiclePlayerColBlock) + { + dBodyRemoveBlock(VehiclePlayerColBlock) + VehiclePlayerColBlock = 0 + } + OnLeaveVehicle(1) + } + } + return true + } + + //----------------------------------------------------------------- + void Noise(int noises) + { + float radius = 0 + + //zjisti radius + if(noises & NOISE_FOOTSTEP) + { + if(radius < NOISERANGE_FOOTSTEP) + radius = NOISERANGE_FOOTSTEP + } + + if(noises & NOISE_THUD) + { + if(radius < NOISERANGE_THUD) + radius = NOISERANGE_THUD + } + + if(noises & NOISE_SHOOT) + { + if(radius < NOISERANGE_SHOOT) + radius = NOISERANGE_SHOOT + } + + if(noises & NOISE_ATTACK) + { + if(radius < NOISERANGE_ATTACK) + radius = NOISERANGE_ATTACK + } + + ClearFlags(this, TFL_USER6) + NotifyNoises(this, coords, radius, noises) + SetFlags(this, TFL_USER6) + } + +//----------------------------------------------------------------- + bool CanKill() + { +#ifdef EDITOR //v editore nebudeme smrtelni + return false +#endif + + if(g_RunMode == RUNMODE_DEVELOPER) //mapa bola spustena sposobom Loader.exe NazovMapy (develop ucely) + return false + + if(status == ST_DEATH) + return false + + return true + } + +//----------------------------------------------------------------- + void Kill() + { + if(Hacked) + InterruptHacking(true) + + ShowHackGUI(false) + + if(Controlled && IsInherited(Controlled, CEnterableVehicle)) + { + DeathMode = DEATHMODE_IN_VEHICLE + EnterableVehicle vehicle = Controlled + vehicle.LogOut() + vehicle.Explosion() + DeathCameraTarget = World.CameraPos + Vector(0, 0, 2048) + DeathCounter = 3//0.95 + } + else + { + DeathMode = DEATHMODE_NORMAL + DeathCameraTarget = GetMatrix(this, 3) - Vector(0, 0, PlayerCapsuleHalfHeights[Crouch] - 5) + DeathCounter = 1 + Controlled = NULL //vo vehicli ho potrebujeme nadalej + } + + SetListenerCamera(0) + VehicleControlStatus = 0 + ShowHUD(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + SetStatus(ST_DEATH) + PlaySound(this, g_sCommonSounds[16], SF_ONCE) + + HearthSoundNeedStop = true + if(HealthPumpUpLoopSound) + { + EndSound(HealthPumpUpLoopSound) + HealthPumpUpLoopSound = 0 + } + } + +//----------------------------------------------------------------- + void ProcessHitZones() + { + for(int n = 0; n < 4; n++) + { + if(HitZoneStatus[n] == 0) + continue + + if(HitZoneStatus[n] == 1) //zviditelnujeme + { + HitZoneFade[n] = HitZoneFade[n] + ftime * 8 + ShowWidget(HUD.WHitZones[n], true) + + if(HitZoneFade[n] > 1) + { + HitZoneFade[n] = 1 + HitZoneStatus[n] = 2 + } + } + else + { + if(HitZoneStatus[n] == 2) //zhasiname + { + HitZoneFade[n] = HitZoneFade[n] - ftime + + if(HitZoneFade[n] < 0) + { + HitZoneFade[n] = 0 + HitZoneStatus[n] = 0 + ShowWidget(HUD.WHitZones[n], false) + } + } + } + + float aplha = HitZoneFade[n] * (float)255 + SetWidgetColor(HUD.WHitZones[n], ARGB(aplha, 255, 255, 255)) + } + } + +//----------------------------------------------------------------- + void ProcessCrosshair() + { + } + +//----------------------------------------------------------------- + void RunHitzoneEffect(vector HitFrom) + { + HitFrom[2] = coords[2] + vector offset = HitFrom - coords + vector angs = Vector2Angles(offset) + float PlaAng = FixAngle(CameraAngles[1]) + float ang = FixAngle(PlaAng - angs[1]) //uhol entity voci pohladu playera + + if(ang >= 315 && ang < 360) + HitZoneStatus[1] = 1 + else + { + if(ang >= 0 && ang < 45) + HitZoneStatus[1] = 1 + else + { + if(ang >= 45 && ang < 135) + HitZoneStatus[2] = 1 + else + { + if(ang >= 135 && ang < 225) + HitZoneStatus[3] = 1 + else + { + if(ang >= 225 && ang < 315) + HitZoneStatus[0] = 1 + } + } + } + } + } + +//----------------------------------------------------------------- + int Shoot(ShotStorage shot) + { + vector Force + float dmg = shot.damage * ENEMY_DAMAGE_SCALE[DifficultyLevel] + + if(shot.HurtType == HT_SHOT) + { +// if(shot.shooter.ClassType == ClassTypeCreature && shot.shooter.ClassNum != ClassNumPlayer) +// dmg *= World.enemyscale + + if(!Immortality) + HealthDown(dmg) + + if(CheatImmortality) + Health = MaxHealth + + UpdateHealthBar() +//tyhle efekty musi byt videt i po smrti, jinak to vypada +//ze to nefunguje + RunHitzoneEffect(shot.from) + World.Quake(30, shot.CameraHitFactor, 10, 15, 15, 1) + + if(Health == 0) + { + if(CanKill()) + Kill() + + return SR_HIT + } + + Force = shot.dir * 1000 //shot.Power + dBodyApplyImpulseAt(this, Force, shot.to) + + if(Hacked) + InterruptHacking(true) + + if(!PainSound) + PainSound = PlaySound(this, g_sCommonSounds[15], SF_ONCE) + + return SR_HIT + } + + if(shot.HurtType == HT_EXPLOSION) + { +// if(shot.shooter.ClassType == ClassTypeCreature && shot.shooter.ClassNum != ClassNumPlayer) +// dmg *= World.enemyscale + + float ImpactPower = shot.power * ExplosionImpactScale * 0.005 * sqrt(sqrt(sqrt(1 / g_timescale))) + vector Org = GetMatrix(this, 3) + shot.from[2] = Org[2] + vector ForceDir = Org - shot.from + float dist = VectorNormalize(ForceDir) + float scale = dist / shot.radius + clamp scale<0, 1> + scale = 1 -scale + ImpactPower += ImpactPower * scale + ImpactPower *= 0.3333 + + /* if(ImpactPower > 24000) + ImpactPower = 24000*/ + + Force = ForceDir * ImpactPower + Force[2] = 1 + dBodyApplyImpulse(this, Force) + +// Print(shot.damage) + HealthDown(scale * dmg) + UpdateHealthBar() + RunHitzoneEffect(shot.from) + + if(Health == 0) + { + if(CanKill()) + Kill() + return SR_HIT + } + return SR_HIT + } + + if(shot.HurtType == HT_FLAME) + { +// if(shot.shooter.ClassType == ClassTypeCreature && shot.shooter.ClassNum != ClassNumPlayer) +// dmg *= World.enemyscale + + if(!Immortality) + HealthDown(dmg) + + if(CheatImmortality) + Health = MaxHealth + + UpdateHealthBar() + + if(Health == 0) + { + if(CanKill()) + Kill() + + return 1 + } + + RunHitzoneEffect(shot.from) + return SR_HIT + } + + if(shot.HurtType == HT_IMPACT) + { + if(status < STATE_DEAD) + { + if(dmg > 0 && shot.shooter != World.ManipEntity) //nezranujeme sa predmetom ktry drzime + { + if(!Immortality) + HealthDown(dmg * 10) + + if(CheatImmortality) + Health = MaxHealth + + UpdateHealthBar() + + if(Health == 0) + { + if(CanKill()) + Kill() + + return SR_HIT + } + + RunHitzoneEffect(shot.from) + + if(Hacked) + InterruptHacking(true) + + // World.Quake(float TimeMax, float Power, float Speed, float FadeInTime, float FadeOutTime, int Priority) + World.Quake(30, 1, 10, 15, 15, 1) + + if(!PainSound) + PainSound = PlaySound(this, g_sCommonSounds[15], SF_ONCE) + } + } + return 1 + } + + if(shot.HurtType == HT_HURT_TRIGGER) + { + if(status < STATE_DEAD && dmg > 0) + { + if(!Immortality) + HealthDown(dmg) + + if(CheatImmortality) + Health = MaxHealth + + UpdateHealthBar() + + if(Health == 0) + { + if(CanKill()) + Kill() + + return SR_HIT + } + + RunHitzoneEffect(World.CameraPos + World.CameraNorm) + + if(Hacked) + InterruptHacking(true) + + // World.Quake(float TimeMax, float Power, float Speed, float FadeInTime, float FadeOutTime, int Priority) + World.Quake(30, 1, 10, 15, 15, 1) + + if(!PainSound) + PainSound = PlaySound(this, g_sCommonSounds[15], SF_ONCE) + } + } + return SR_HIT + } + +//----------------------------------------------------------------- + void EnableContols(bool stat) + { + Controls = stat + } + +//----------------------------------------------------------------- + void StartJump() + { + IsOnGround = false + SetStatus(ST_JUMP) + JumpUsingKey = true + vector JumpVec = "0 0 1" + + if(SurfaceAngle > PlayerMaxSurfaceAngleForNormalJump) //nech sa neda vyskakat na nedostupne miesta. hlavne teren + { + JumpVec = JumpVec + LegsContactNormal + VectorNormalize(JumpVec) + } + + JumpVec = JumpVec * PlayerJumpPow + dBodyApplyImpulseAt(this, JumpVec, GetMatrix(this, 3)) + PlaySound(this, g_sCommonSounds[0], SF_ONCE) + } + +//--------------------------------------------------------------------------------- + bool CreateRigidBody() + { + UpdateEntity(this) + dBodyCreate(this, ZeroVec, BC_NONE) + + geom = dGeomCreateCapsule(PlayerCapsuleRadius, Vector(0, 0, PlayerCapsuleExtends[Crouch]))// BC_CAPSULE_Z + + dBodyAddGeom(this, geom, g_vIdentMatrix, "material/player") //g_vIdentMatrix + dBodySetMass(this, ZeroVec, 80) + dBodySetInertiaTensor(this, ZeroVec, ZeroVec) + dBodyInteractionLayer(this, ET_PLAYER) + dBodyActive(this, true, true) + SetFlags(this, TFL_FULLMATRIX | TFL_SOLID) + + dBodyCreatePhysXShadow(this, 1, PSF_KINEMATIC|PSF_COLLIDE_CLOTH/*|PSF_COLLIDE_RB*/) + + SetEventMask(this, EV_SIMULATE) + return true + } + +//----------------------------------------------------------------- + void DestroyRigidBody() + { + World.ManipEntity = NULL + + if(DampingConstraint1) + { + DampingConstraint1.destroy() + DampingConstraint1 = NULL + } + + if(ContactConstraint) + { + ContactConstraint.destroy() + ContactConstraint = NULL + } + + if(VehiclePlayerColBlock) + { + dBodyRemoveBlock(VehiclePlayerColBlock) + VehiclePlayerColBlock = 0 + } + + Projectile cur = FirstProjectile // + while(cur) + { + cur.OnShooterBodyRemove() + cur = cur.NextProjectile + } + FirstProjectile = NULL + + if(geom) + { + dBodyDestroy(this) + dGeomDestroy(geom) + geom = 0 + } + } +/* +//----------------------------------------------------------------- + int GetMotionAngle() + { + int Angle = 0 + + if(KeyDown) + { + Angle = 180 + + if(KeyRight) + Angle = 225 + if(KeyLeft) + Angle = 135 + } + else + { + if(KeyUp) + { + Angle = 0 + + if(KeyRight) + Angle = 315 + if(KeyLeft) + Angle = 45 + } + } + + if(!KeyUp && !KeyDown) + { + if(KeyRight) + Angle = 270 + if(KeyLeft) + Angle = 90 + } + return Angle + } +*/ +//----------------------------------------------------------------- + float DoControl() + { + float pow = 0 + float p = 0 + + const float kdirs[16] = { + -1, 270, 0, 315, + 90, -1, 45, -1, + 180, 225, -1, -1, + 135, -1, -1, -1} + + if(g_Joypad) + { + float jx = JoyAxis[0] + float jy = JoyAxis[1] + p = sqrt(jx * jx + (jy * jy)) + + if(p > JOY_DEATH_ZONE) + pow = p / JOY_MAX_POW + + clamp pow<0, 1> + } + + if(pow == 0) + { + int dir = 0 + + if(KEY(RIGHT, false)) + dir = dir + 1 + + if(KEY(MOVE_F, false)) + dir = dir + 2 + + if(KEY(LEFT, false)) + dir = dir + 4 + + if(KEY(MOVE_B, false)) + dir = dir + 8 + + RelMotionAng = kdirs[dir] + + if(dir > 0) + pow = 1 + } + else + RelMotionAng = FixAngle(atan2(-jy, jx) * RAD2DEG - 90) + + float ExactAimFactor = 1 - ExactAimPath + ExactAimFactor = 0.32 + (ExactAimFactor * 0.3) + + cincx = JoyRAxis[2] + if(!g_Joypad || fabs(cincx) < JOY_DEATH_ZONE) + cincx = MouseDeltaX * g_fMouseSpeedH * ExactAimFactor * 1 * 15 + else + cincx = cincx * 0.3 * g_fMouseSpeedH * ExactAimFactor + + cincy = JoySliders[0] + if(!g_Joypad || fabs(cincy) < JOY_DEATH_ZONE) + cincy = MouseDeltaY * g_fMouseSpeedV * ExactAimFactor * 1 * 15 + else + cincy = cincy * 0.26 * g_fMouseSpeedV * ExactAimFactor + + return pow + } + +//----------------------------------------------------------------- +float LastCamZ + vector ZDamping(vector tpos) + { + if(g_iFly || status == ST_JUMP) + { + LastCamZ = tpos[2] + return tpos + } + + float d, f = tpos[2] + + if(LastCamZ == 0) + { + LastCamZ = f + } + else + { + d = ftime * 30 + clamp d<0, 1> + f = f - LastCamZ * d + LastCamZ = LastCamZ + f + } + + tpos[2] = LastCamZ + + return tpos + } + + float LastTrainAngle + bool HeadOnWall + +//----------------------------------------------------------------- + void HandleCamera() + { + MovementSpeedScale = DoControl() + + if(HackStatus == 0) //v pripade hackmodu iba s tymto statusom. inac prebieha process logovania + { +#ifdef _XBOX + CameraAngles[0] = CameraAngles[0] + (JoyRAxis[1] * g_fMouseSpeedV * 1 * -0.2) //uhly pre kameru + CameraAngles[1] = CameraAngles[1] - (JoyRAxis[0] * g_fMouseSpeedH * 1 * 0.2) +#else + float AccelCX = cincx// * 0.2 + float AccelCY = cincy// * 0.2 + + if(CurrentWeapon.ClassNum == CSniperRifle) + { + float fabsx = fabs(cincx) + float fabsy = fabs(cincy) + float rate, rate2 + + clamp fabsx<0, 2> + clamp fabsy<0, 2> + + rate = fabsx / 2 + clamp rate<0.1, 1> + AccelCX *= rate + + rate = fabsy / 2 + clamp rate<0.1, 1> + AccelCY *= rate + + AccelCX *= ExactAim + AccelCY *= ExactAim + + float FlipExactAim = 1 - ExactAim + AccelCX += cincx * FlipExactAim + AccelCY += cincy * FlipExactAim + } + + CameraAngles[0] = CameraAngles[0] + AccelCY//(MouseDeltaY * g_fMouseSpeedV * 1 * 15) //uhly pre kameru + CameraAngles[1] = CameraAngles[1] - AccelCX//(MouseDeltaX * g_fMouseSpeedH * 1 * 15) +#endif + CameraAngles[2] = 0 + } + + float ang = CameraAngles[0] + clamp ang<-LookLimit, LookLimit> + CameraAngles[0] = ang + + if(TrainEnt) + { + vector TrainAngles = Vector2Angles(GetMatrix(TrainEnt, 0)) + float AngOff = GetAngularOffset(TrainAngles[1], LastTrainAngle) + CameraAngles[1] = CameraAngles[1] + AngOff + LastTrainAngle = TrainAngles[1] + } + + float rang = DEG2RAD * (CameraAngles[1] + RelMotionAng) + MotionVec = Vector(cos(rang) , sin(rang), 0) + float LeanAngleBefore = LeanAngle + bool LeanEnabled = true + + if(KEY(LEAN_LEFT, false)) + { + if(!HeadOnWall) + { + LeanAngle -= ftime * 144.162 * sqrt(sqrt(1 / g_timescale)) + + if(LeanAngle < -PlayerMaxLeanAngle) + LeanAngle = -PlayerMaxLeanAngle + } + else + LeanEnabled = false + } + else + { + if(KEY(LEAN_RIGHT, false)) + { + if(!HeadOnWall) + { + LeanAngle += ftime * 144.162 * sqrt(sqrt(1 / g_timescale)) + + if(LeanAngle > PlayerMaxLeanAngle) + LeanAngle = PlayerMaxLeanAngle + } + else + LeanEnabled = false + } + else + LeanEnabled = false + } + + if(!LeanEnabled) + { + float tt = LeanAngle * 0.8851 * ftime * 15 * sqrt(sqrt(1 / g_timescale)) + LeanAngle -= tt + + if(fabs(LeanAngle) <= 0.01) + LeanAngle = 0 + } + + HeadOnWall = false + LeanEnabled = true + + if(LeanAngle == 0) + LeanEnabled = false + + vector LeanAngles = Vector(0, 0, LeanAngle) + vector LeanMat[3] + RollPitchYawMatrix2(LeanAngles + Vector(0, CameraAngles[1], 0), LeanMat) + + float diff = PlayerCapsuleExtends[0] - PlayerCapsuleExtends[1] //rozdiel medzi vyskami obidvoch polovicnych valcov + float CrouchOffset = diff * 2 * (1 - fCrouchPath) + + if(Crouch) + CrouchOffset += diff + + CrouchOffset -= PlayerCapsuleExtends[1] //alebo -= diff * 0.5 ? //CrouchOffset je offset od originu po vrch valca/zaciatok vrchnej pologule + + if(LeanEnabled == true) + { + float LeanVOffset = 30 //ohyb bude tolko pod urovnou originu + float lng = CrouchOffset + PlayerCameraOffset + LeanVOffset + vector LeanRadiusVec = LeanMat[2] * lng + + CameraTargetPos = GetMatrix(this, 3) - Vector(0, 0, LeanVOffset) + LeanRadiusVec + vector CameraNormalPos = GetMatrix(this, 3) + Vector(0, 0, CrouchOffset + PlayerCameraOffset) + + vector vec = CameraTargetPos - CameraNormalPos + VectorNormalize(vec) + vec = vec * 20 + vec = CameraNormalPos + vec + + ClearFlags(this, TFL_SOLID) + + if(!P2PVisibilityEx(CameraNormalPos, vec, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL|TRACE_PATCH)) + { + LeanEnabled = false + HeadOnWall = true + + if(LeanAngleBefore == 0) + LeanAngle = 0 + } + + SetFlags(this, TFL_SOLID) + } + + if(LeanAngle == 0) + { + CameraTargetPos = GetMatrix(this, 3) + Vector(0, 0, CrouchOffset + PlayerCameraOffset) + LeanAngles = ZeroVec + VirtualBodyCenter = GetMatrix(this, 3) + } + else + { + float LeanAngOffRate = fabs(LeanAngle) / PlayerMaxLeanAngle + float MaxOffset = PlayerCapsuleRadius - 1 * LeanAngOffRate //aspon jeden unit musi byt v playerovom body + vector BoffsetB = g_CamMat[0] * -MaxOffset + + if(LeanAngle < 0) + BoffsetB = -BoffsetB + + VirtualBodyCenter = GetMatrix(this, 3) + BoffsetB + } + +// AddDShape(SHAPE_BBOX, 0xffffaaaa, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, VirtualBodyCenter - "1 1 1", VirtualBodyCenter + "1 1 1") + + CameraPos = ZDamping(CameraTargetPos) + + vector WeaponSndPos = CameraPos - Vector(0, 0, PlayerCapsuleExtends[Crouch] + PlayerCameraOffset) + SetOrigin(WeaponSoundPos, WeaponSndPos) + + vector FinalCameraAngles = CameraAngles + EarthquakeAng + WeaponKickOff + WeaponKickOffSmall - LeanAngles + +/* vector LookVec = Angles2Vector(FinalCameraAngles) + vector MiniCutsceneOffset = LookVec * -128 + CameraPos = CameraPos + MiniCutsceneOffset*/ + + + World.CameraPos = CameraPos + EarthquakeOff + World.CameraAngs = FinalCameraAngles + World.CameraNorm = Angles2Vector(World.CameraAngs) + SetCamera(World.CameraPos, World.CameraAngs) + +/* vector CamMat[4] + RollPitchYawMatrix2(CameraAngles, CamMat) + CamMat[3] = World.CameraPos + SetCameraEx(0, CamMat)*/ + + CalcMatrixFromCamera() + + float MouseFactorX = fabs(cincx) + float MouseFactorY = fabs(cincy) + float MouseFactor = MouseFactorX + MouseFactorY + + if(MouseFactor > 0.3) + CameraCrossScale = MouseFactor * 0.5 + else + CameraCrossScale -= ftime * 10 + + clamp CameraCrossScale<0, 1> + } + + bool TraceFilterCallback(ExtClass other) + { + if(other.ClassType == ClassTypeCreature && other.ClassNum == ClassNumPlayer) + return false + + return true + } + +//----------------------------------------------------------------- + bool RBTraceFilter(ExtClass other, vector raypos, vector raydir) + { + if(other == World) + return false + + if(other == this) + return false + + if(other.ClassType == ClassTypeMiscPhysicsGlass) + { + if(other.ClassNum == ClassNumMiscPhysicsGlass2) + return false + } + + if(other.ClassType == ClassTypeMiscPhysicsGlass || other.ClassType == ClassTypeMiscShootDetector || other.ClassType == ClassTypeMiscShootingShield) + return other.IsShot(raypos, raydir) + +/* if(IsInherited(other, CCreatureClass)) + return true + + if(!IsInherited(other, CRigidBodyClass)) + return false + + if(IsInherited(other, CDoorClass)) + return false + + if(ClassName(other) == "misc_physics_glass") + return false*/ + + return true + } + +//----------------------------------------------------------------- + bool RBTraceFilter2(ExtClass other, vector raypos, vector raydir) + { + if(other == this) + return false + + if(other == World.ManipEntity) + return false + + if(other.ClassType == ClassTypeCreature || other.ClassType == ClassTypeRBone || other.ClassType == ClassTypeTrigger) + return false + + if(other.ClassType == ClassTypeMiscPhysicsGlass || other.ClassType == ClassTypeMiscShootDetector || other.ClassType == ClassTypeMiscShootingShield) + return other.IsShot(raypos, raydir) + + return true + } + + float DistToGround +//----------------------------------------------------------------- + bool CheckForGround() + { + vector pos = coords //musi sa tu pouzivat coords a nie GetOrigin() aby sa po nahlej zmene pozicie v crouchi vcas akceptovala nova pozicia + float lng = PlayerCapsuleExtends[Crouch] + 15.5 + vector DirVec = Vector(0, 0, -lng) + dShapeCastSetDir(ShapeCast, DirVec) + vector mat4[4] = {"1 0 0", "0 1 0", "0 0 1"} + mat4[3] = pos + SetMatrix(ShapeCast, mat4) +// AddDShape(SHAPE_LINE, 0xffffaaaa, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos, pos + Vector(0, 0, -lng)) + + MinClass clipent + vector cpos, cnorm + float dist = dShapeCastUpdate(ShapeCast, 0, clipent, cpos, cnorm) + + if(clipent && IsInherited(clipent, CMinClass) && clipent.ClassType == ClassTypeFuncTrain) + { + TrainEnt = clipent + vector TrainAngles = Vector2Angles(GetMatrix(TrainEnt, 0)) + LastTrainAngle = TrainAngles[1] + } + else + TrainEnt = NULL + + DistToGround = dist * lng + DistToGround -= PlayerCapsuleExtends[Crouch] + + if(dist < 1) + { + float Plane[4] + MinClass TracEnt + vector end = pos - Vector(0, 0, PlayerCapsuleHalfHeights[Crouch] + 10) + + int fl = ClearFlags(this, TFL_SOLID) + int fl2 = ClearFlags(DummyPlayer, TFL_SOLID) + + dist = TraceLineEx(PLAYER, coords, end, ZeroVec, ZeroVec, TracEnt, Plane, NULL, NULL, TRACE_DEFAULT, NULL) + + SetFlags(this, fl) + SetFlags(DummyPlayer, fl2) + + if(dist < 1) + { + vector norm = Vector(Plane[0], Plane[1], Plane[2]) + float SurfDot = norm * Vector(0, 0, 1) + SurfDot = fabs(SurfDot) //fabs pretoze obcas vhychadza presne opacna normala. bug? chybne modely s duplicitnymi polygonmi ktore su otocene? + clamp SurfDot<-1, 1> + float SurfAng = acos(SurfDot) * RAD2DEG +// Print(SurfAng) + +/* if(KeyState(KC_K)) + { + AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, end - "1 1 1", end + "1 1 1") + AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, coords - "1 1 1", coords + "1 1 1") +// AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, coords, end) + + + vector to = norm * 5 + to = end + to + AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, end, to) + }*/ + + if(SurfAng > PlayerMaxSurfaceAngle) + StrongSurfaceBias = true + +// if(g_iTraceSurfaceType == 2) +// return 2 + } + else + StrongSurfaceBias = true + + return true + } + return false + } + +//----------------------------------------------------------------- + bool HandleFlyMode() + { + if(KeyState(KC_H) == true) + { + ClearKey(KC_H) + g_iFly = 1 - g_iFly + + if(g_iFly) + { + DestroyRigidBody() + ClearFlags(this, TFL_SOLID|TFL_TOUCHTRIGGERS|TFL_FULLMATRIX) + SetMoveType(this, NOCLIP) + SetWeight(this, 0) + } + else + { + SetFlags(this, TFL_SOLID|TFL_TOUCHTRIGGERS|TFL_FULLMATRIX) + SetVelocity(this, ZeroVec) + SetStatus(ST_JUMP) + CreateRigidBody() + + if(!ContactConstraint) + { + ContactConstraint = dConstraintCreateContact() + ContactConstraint.setBody1(World) + ContactConstraint.setBody2(this) + } + + if(!DampingConstraint1) + { + DampingConstraint1 = dConstraintCreatePoint() + DampingConstraint1.setBody1(World) + DampingConstraint1.setBody2(this) + } + } + } + + if(g_iFly) + { + LastStablePos = coords + LastStayPos = coords + VectorNormalize(MotionVec) + + if(!AnyMoveKey) + SetVelocity(this, ZeroVec) + else + { + float spd = MotionSpeed * 2 + float MovementSpeedFromEditor + +#ifdef EDITOR + if(GetValue(World.Editor, "CameraMovementSpeed", 0, MovementSpeedFromEditor) //ked sme v editore tak sa riadime editorom + spd = MovementSpeedFromEditor * 100 +#else + spd = g_FlySpeed //z developer configu +#endif + if(MousePress(2)) + spd *= 0.1 * sqrt(1 / g_timescale) + + + vector CamStep = ZeroVec + vector mat[3] + vector angs = World.CameraAngs + float flip = angs[0] + angs[0] = -flip + RollPitchYawMatrix2(angs, mat) + + vector LeftVec = mat[1] + LeftVec = -LeftVec + vector ForwardVec = mat[0] + + if(KEY(RIGHT, false)) //vpravo + CamStep += LeftVec + + if(KEY(LEFT, false)) //vlavo + CamStep -= LeftVec + + if(KEY(MOVE_F, false)) //dopredu + CamStep += ForwardVec + + if(KEY(MOVE_B, false)) //dozadu + CamStep -= ForwardVec + + VectorNormalize(CamStep) + CamStep = CamStep * spd + SetVelocity(this, CamStep) + } + return true + } + + return false + } + + +/* +#ifdef EDITOR + void OpenEditor() + { + if(Editor.Active == true) + return + + Editor.Activate(true) + Editor.SetCam(World.CameraPos, World.CameraAngs) + ShowHUD(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + World.Cross.Show(false) + World.EditorActive = true + } + + void CloseEditor() + { + if(Editor.Active == false) + return + + Editor.Activate(false) +// vector vec = Vector(0, 0, PlayerCapsuleExtends[Crouch] + PlayerCameraOffset) + + CameraPos = World.CameraPos + CameraAngles = World.CameraAngs + CameraTargetPos = CameraPos + SetOrientationFromCamera() + ResetInputDevice() + ShowHUD(-1, -1, -1, 1, -1, 1, 1, 0, 0) + + if(World.Cross) + World.Cross.Show(true) + + World.EditorActive = false + } + + void InitEditor() + { + if(!World.Editor) + { + World.Editor = new EntityEditor + Editor = World.Editor + } + } +#endif +*/ + +//----------------------------------------------------------------- + void UpdateLightBar() + { + float BarWidth = 38 +// float BarLeft = 800 - BarWidth - 17 + + float rate = FlashLight / FlashLightMaxTime + float CurWidth = rate * BarWidth + float CurLeft = BarWidth - CurWidth + + SetWidgetPos(HUD.WLightBar, CurLeft, 0, BarWidth, 20) + } + +//----------------------------------------------------------------- + void ProcessFlashLight() + { + if(KEY(FLASHLIGHT, true)) + { + if(!FlashLightSwitch) + { + if(FlashLight > 0) //ak mame energiu + { + if(!FlashLightHandle) + FlashLightHandle = AddLight(FlashLightBase, 0, LFL_DYNAMIC|LFL_SPOT|LFL_FLASHLIGHT, 550, 512, "255 255 255") + + SetLightCone(FlashLightHandle, 52.0) + SetLightTexture(FlashLightHandle, "textures/flashlight2.dds") + ShowWidget(HUD.WLightBar, true) + ShowWidget(HUD.WLightBarBack, true) + SetWidgetColor(HUD.WLightBar, 0xffffffff) + SetWidgetColor(HUD.WLightBarBack, 0x3fffffff) + } + } + else + { + if(FlashLightHandle) + { + RemoveLight(FlashLightHandle) + FlashLightHandle = 0 + } + } + FlashLightSwitch = 1 - FlashLightSwitch + PlaySound(NULL, g_sCommonSounds[31], SF_ONCE) + } + + if(!FlashLightSwitch) //baterka vypnuta + { + if(FlashLight < FlashLightMaxTime) //ked je potreba tak dobijame + { + float speed = FlashLightMaxTime / FlashLightCharging + FlashLight += ftime * speed + + if(FlashLight >= FlashLightMaxTime) + FlashLight = FlashLightMaxTime + + UpdateLightBar() + FlashLightVisTimer = 2 + } + else //mame plno + { + if(FlashLightVisTimer > 0) + { + FlashLightVisTimer -= ftime + + if(FlashLightVisTimer <= 1) + { + if(FlashLightVisTimer <= 0) + { + FlashLightVisTimer = 0 + ShowWidget(HUD.WLightBar, false) + ShowWidget(HUD.WLightBarBack, false) + } + float alp1 = FlashLightVisTimer * 255 + float alp2 = FlashLightVisTimer * 63 + SetWidgetColor(HUD.WLightBar, AWHITE(alp1)) + SetWidgetColor(HUD.WLightBarBack, AWHITE(alp2)) + } + } + } + return + } + else //BATERKA ZAPNUTA + { + FlashLight -= ftime + + if(FlashLight <= 0) + { + FlashLight = 0 + + if(FlashLightHandle) //zhasiname + { + RemoveLight(FlashLightHandle) + FlashLightHandle = 0 + FlashLightSwitch = 0 + } + } + UpdateLightBar() + } + } + +//----------------------------------------------------------------- + void DropManipEntity(bool ChangeWeap) + { + ClearFlags(World.ManipEntity, TFL_TRANSLUCENT) + vector Vel = GetVelocity(World.ManipEntity) + float lng = VectorLength(Vel) + float MaxDropSpeed = 301 + + if(lng > MaxDropSpeed) + { + float lng2 = lng + clamp lng2<0, MaxDropSpeed> + float VelScale = lng / MaxDropSpeed + float VelScale2 = lng2 / MaxDropSpeed + VelScale = VelScale2 / VelScale + SetVelocity(World.ManipEntity, Vel * VelScale) + } + else + SetVelocity(World.ManipEntity, -Vel) //nechapem jak je to mozne ale potrebna opacna velocity + + ClearEventMask(this, EV_SIMULATE) + + if(ManipPointConstraint1) + { + ManipPointConstraint1.destroy() + ManipPointConstraint1 = NULL + } + + if(ManipPointConstraint2) + { + ManipPointConstraint2.destroy() + ManipPointConstraint2 = NULL + } + + if(ManipPointConstraint3) + { + ManipPointConstraint3.destroy() + ManipPointConstraint3 = NULL + } + + if(ManipAngConstraint1) + { + ManipAngConstraint1.destroy() + ManipAngConstraint1 = NULL + } + + if(ManipAngConstraint2) + { + ManipAngConstraint2.destroy() + ManipAngConstraint2 = NULL + } + + if(ManipAngConstraint3) + { + ManipAngConstraint3.destroy() + ManipAngConstraint3 = NULL + } + + if(ChangeWeap) + WeaponChange(WeaponBeforeManip, true) +/* + if(WeaponChange(WeaponBeforeManip) == false) //zbran sa pravdepodobne prave meni takze to nemozeme pustit + NextWeaponToChange = WeaponBeforeManip //weapon mu teda vrazime az select aktualnej zbrane skonci*/ + + if(ManipMass) //ragdolom mass nemenime takze ani nevraciame + dBodySetMass(World.ManipEntity, ZeroVec, ManipMass) + + dBodyInteractionLayer(World.ManipEntity, ManipInterLayer) + + if(IsInherited(World.ManipEntity, CRigidBodyClass)) + { + RigidBodyClass rbc = World.ManipEntity + rbc.OnPickedPhysicaly(true) //dame mu vediet ze ho pustame + } + + World.ManipEntity = NULL + SetThrowBar(0, false) + ManipThrowPowerScale = 0 + ManipTime = 0 + } + +//----------------------------------------------------------------- + void ThrowManipEntity() + { + if(World.ManipEntity == NULL) + return + + MinClass ManEnt = World.ManipEntity + float ThrowScale = ManipThrowPowerScale //v DropManipEntity(true) sa nuluje + DropManipEntity(true) + float EntMass = dBodyGetMass(ManEnt) + EntMass *= 520 + vector Force = World.CameraNorm * EntMass + Force = Force * ThrowScale + vector off = VectorMatrixMultiply3(g_CamMat, ManipOffset) + off = off * -0.1 + dBodyApplyImpulseAt(ManEnt, Force, GetMatrix(ManEnt, 3) + off) + +//odhodeny predmet bude zranovat po urcitu dobu + if(IsInherited(ManEnt, CRigidBodyClass)) + { + RigidBodyClass rbc = ManEnt + rbc.EnableHurting(true, 3.3, ThrowDamage) + } + } + +//--------------------------------------------------------------------------------- + void EOnSimulate(MinClass other, float dt) + { + if(World.ManipEntity && ManipPointConstraint1) + { + vector TargetPoint = IdealManipPos + vector ErrOff = GetOrigin(World.ManipEntity) - TargetPoint + float ErrDot + ErrOff = ErrOff * 0.5 + + // AddDShape(SHAPE_BBOX, 0xffffffff, SS_NOZUPDATE|SS_TRANSP|SS_ONCE, TargetPoint - "1 1 1", TargetPoint + "1 1 1") + + float errscale = 100 + + if(IsInherited(World.ManipEntity, CRigidBodyClass)) + { + RigidBodyClass rbc = World.ManipEntity + + if(rbc.NumContacts) + errscale = 15 + + rbc.NumContacts = 0 + } + + if(ManipPointConstraint1) + { + ManipPointConstraint1.setPoint(TargetPoint) + ManipPointConstraint1.setConstraintError(ErrOff[0]) + + ManipPointConstraint1.setMinimumMagnitude(-errscale) + ManipPointConstraint1.setMaximumMagnitude(errscale) + dConstraintInsert(ManipPointConstraint1) + } + + if(ManipPointConstraint2) + { + ManipPointConstraint2.setPoint(TargetPoint) + ManipPointConstraint2.setConstraintError(ErrOff[1]) + + ManipPointConstraint2.setMinimumMagnitude(-errscale) + ManipPointConstraint2.setMaximumMagnitude(errscale) + dConstraintInsert(ManipPointConstraint2) + } + + if(ManipPointConstraint3) + { + ManipPointConstraint3.setPoint(TargetPoint) + ManipPointConstraint3.setConstraintError(ErrOff[2]) + + ManipPointConstraint3.setMinimumMagnitude(-errscale) + ManipPointConstraint3.setMaximumMagnitude(errscale) + dConstraintInsert(ManipPointConstraint3) + } + //-- + + + + + vector mat[4] + GetMatrix4(World.ManipEntity, mat) + + vector mat2[3] + vector angs = World.CameraAngs + angs[0] = 0 + RollPitchYawMatrix2(angs, mat2) + + vector resmat[3] + resmat[0] = VectorMatrixMultiply3(mat2, ManipOffMat[0]) + resmat[1] = VectorMatrixMultiply3(mat2, ManipOffMat[1]) + resmat[2] = VectorMatrixMultiply3(mat2, ManipOffMat[2]) + + vector rot = RotationVectorTo(resmat, mat) + errscale = 1.0 + + if(ManipAngConstraint1) + { + vector axis = ManipAngConstraint1.getAxis1() + ErrDot = ManipAngConstraint1.getAxis1() * rot + ManipAngConstraint1.setPoint(TargetPoint) + ManipAngConstraint1.setConstraintError(ErrDot) + dConstraintInsert(ManipAngConstraint1) + } + + if(ManipAngConstraint2) + { + ErrDot = ManipAngConstraint2.getAxis1() * rot + ManipAngConstraint2.setPoint(TargetPoint) + ManipAngConstraint2.setConstraintError(ErrDot) + dConstraintInsert(ManipAngConstraint2) + } + + if(ManipAngConstraint3) + { + ErrDot = ManipAngConstraint3.getAxis1() * rot + ManipAngConstraint3.setPoint(TargetPoint) + ManipAngConstraint3.setConstraintError(ErrDot) + dConstraintInsert(ManipAngConstraint3) + } + } + + if(ContactConstraint && SimulatePlane) + { + vector CurrentPos = GetOrigin(this) + ContactConstraint.setAxis("0 0 1") + ContactConstraint.setPoint(GetOrigin(this) - Vector(0, 0, PlayerCapsuleHalfHeights[Crouch] - 0.5)) + ContactConstraint.setRestitution(0) + ContactConstraint.setDynamicFriction(1000) + dConstraintInsert(ContactConstraint) + } +/* + bool damp = false + + if(MovementDumping || TrainEnt) + damp = true + + vector Vel + + if(TrainEnt) + { + DampingConstraint1.setBody1(TrainEnt) +// Vel = GetVelocity(TrainEnt) + Vel = dBodyGetVelocityAt(TrainEnt, GetOrigin(this)) +// Vel = Vel * 0.5 +// Vel = Vel - GetVelocity(this) + Vel = Vel * 1500 + Vel = Vel * dt + dBodyApplyForce(this, Vel) + } + else + { + Vel = GetVelocity(this) + DampingConstraint1.setBody1(World) + } +*/ + if(DampingConstraint1 && MovementDumping) + { + vector Vel = GetVelocity(this) + vector norm = Vel + VectorNormalize(norm) + float vel = Vel * norm + float damping = 2000 + float maxDamp = fabs(damping * vel * dt) + DampingConstraint1.setPoint(GetOrigin(this)) + DampingConstraint1.setAxis(norm) + DampingConstraint1.setMinimumMagnitude(-maxDamp) + DampingConstraint1.setMaximumMagnitude(maxDamp) + dConstraintInsert(DampingConstraint1) + } + } + +//----------------------------------------------------------------- + void PickManipEntity(MinClass ent) + { + World.ManipEntity = ent + + if(World.ManipEntity == NULL) + return + + SetFlags(ent, TFL_TRANSLUCENT) + + vector pos1 = GetMatrix(World.ManipEntity, 3) + vector pos2 = World.CameraPos + vector vec = pos1 - pos2 + ManipOffset = VectorMatrixInvMultiply3(g_CamMat, vec) + ManipDist = VectorNormalize(vec) + IdealManipPos = pos1 + + if(!ManipPointConstraint1) + ManipPointConstraint1 = dConstraintCreatePoint() + + if(!ManipPointConstraint2) + ManipPointConstraint2 = dConstraintCreatePoint() + + if(!ManipPointConstraint3) + ManipPointConstraint3 = dConstraintCreatePoint() + + if(!ManipAngConstraint1) + ManipAngConstraint1 = dConstraintCreateAngular() + + if(!ManipAngConstraint2) + ManipAngConstraint2 = dConstraintCreateAngular() + + if(!ManipAngConstraint3) + ManipAngConstraint3 = dConstraintCreateAngular() + + ManipPointConstraint1.setBody1(World) + ManipPointConstraint1.setBody2(ent) + ManipPointConstraint2.setBody1(World) + ManipPointConstraint2.setBody2(ent) + ManipPointConstraint3.setBody1(World) + ManipPointConstraint3.setBody2(ent) + + ManipPointConstraint1.setPoint(pos1) + ManipPointConstraint2.setPoint(pos1) + ManipPointConstraint3.setPoint(pos1) + + ManipPointConstraint1.setAxis("1 0 0") + ManipPointConstraint2.setAxis("0 1 0") + ManipPointConstraint3.setAxis("0 0 1") + + ManipPointConstraint1.setMinimumMagnitude(-3000) + ManipPointConstraint2.setMinimumMagnitude(-3000) + ManipPointConstraint3.setMinimumMagnitude(-3000) + + ManipPointConstraint1.setMaximumMagnitude(3000) + ManipPointConstraint2.setMaximumMagnitude(3000) + ManipPointConstraint3.setMaximumMagnitude(3000) + +//-- + ManipAngConstraint1.setBody1(World) + ManipAngConstraint1.setBody2(ent) + ManipAngConstraint2.setBody1(World) + ManipAngConstraint2.setBody2(ent) + ManipAngConstraint3.setBody1(World) + ManipAngConstraint3.setBody2(ent) + + ManipAngConstraint1.setAxis1("1 0 0") + ManipAngConstraint2.setAxis1("0 1 0") + ManipAngConstraint3.setAxis1("0 0 1") + + ManipAngConstraint1.setAxis2("1 0 0") + ManipAngConstraint2.setAxis2("0 1 0") + ManipAngConstraint3.setAxis2("0 0 1") + + SetEventMask(this, EV_SIMULATE) + + + + + vector mins, maxs, size + GetBoundBox(ent, mins, maxs) + size = maxs - mins + + vector mat[4] + vector mat2[3] + GetMatrix4(World.ManipEntity, mat) + vector angs = World.CameraAngs + angs[0] = 0 + RollPitchYawMatrix2(angs, mat2) + vector mat3[3] + + if(size[0] > 35.2 || size[1] > 35.2 || size[2] > 35.2) //prilis velky objekt (nad 110 cm) na nosenie takze ho nebudeme zarovnavat na osy kamery a nebudeme ani menit vzdialenost od neho aby sa stym aspon trochu dalo manipulovat + { + GetMatrix4(World.ManipEntity, mat3) + ManipIdealDist = VectorLength(GetMatrix(ent, 3) - World.CameraPos) - 1.0 + } + else //spocitame maticu pre zarovanie na kameru s tym aby sa objekt pretocil najkratsou cestou na a idealny offset od kamery + { + + int BestFront, BestFront2 + int BestRight, BestRight2 + int BestTop, BestTop2 + float SizeToPlayer + + float dot0, dot1, dot2, dot3, dot4, dot5, bestdot + vector axis0 = mat2[0] + vector axis1 = mat2[1] + vector axis2 = mat2[2] + + vector ax0 = mat[0] + vector ax1 = mat[1] + vector ax2 = mat[2] + + dot0 = ax0 * axis0 //front vec proti vsetkym osam + dot1 = ax0 * axis1 + dot2 = ax0 * axis2 + dot3 = ax0 * -axis0 + dot4 = ax0 * -axis1 + dot5 = ax0 * -axis2 + + bestdot = dot0 + BestFront = 0 + BestFront2 = 0 + + if(dot1 > bestdot) + { + bestdot = dot1 + BestFront = 1 + BestFront2 = 0 + } + + if(dot2 > bestdot) + { + bestdot = dot2 + BestFront = 2 + BestFront2 = 0 + } + + if(dot3 > bestdot) + { + bestdot = dot3 + BestFront = 0 + BestFront2 = 1 + } + + if(dot4 > bestdot) + { + bestdot = dot4 + BestFront = 1 + BestFront2 = 1 + } + + if(dot5 > bestdot) + { + bestdot = dot5 + BestFront = 2 + BestFront2 = 1 + } + //-- + dot0 = ax1 * axis0 //front vec proti vsetkym osam + dot1 = ax1 * axis1 + dot2 = ax1 * axis2 + dot3 = ax1 * -axis0 + dot4 = ax1 * -axis1 + dot5 = ax1 * -axis2 + + bestdot = dot0 + BestRight = 0 + BestRight2 = 0 + + if(dot1 > bestdot) + { + bestdot = dot1 + BestRight = 1 + BestRight2 = 0 + } + + if(dot2 > bestdot) + { + bestdot = dot2 + BestRight = 2 + BestRight2 = 0 + } + + if(dot3 > bestdot) + { + bestdot = dot3 + BestRight = 0 + BestRight2 = 1 + } + + if(dot4 > bestdot) + { + bestdot = dot4 + BestRight = 1 + BestRight2 = 1 + } + + if(dot5 > bestdot) + { + bestdot = dot5 + BestRight = 2 + BestRight2 = 1 + } + + dot0 = ax2 * axis0 //front vec proti vsetkym osam + dot1 = ax2 * axis1 + dot2 = ax2 * axis2 + dot3 = ax2 * -axis0 + dot4 = ax2 * -axis1 + dot5 = ax2 * -axis2 + + bestdot = dot0 + BestTop = 0 + BestTop2 = 0 + + if(dot1 > bestdot) + { + bestdot = dot1 + BestTop = 1 + BestTop2 = 0 + } + + if(dot2 > bestdot) + { + bestdot = dot2 + BestTop = 2 + BestTop2 = 0 + } + + if(dot3 > bestdot) + { + bestdot = dot3 + BestTop = 0 + BestTop2 = 1 + } + + if(dot4 > bestdot) + { + bestdot = dot4 + BestTop = 1 + BestTop2 = 1 + } + + if(dot5 > bestdot) + { + bestdot = dot5 + BestTop = 2 + BestTop2 = 1 + } + + vector ResAx0 = mat2[BestFront] + vector ResAx1 = mat2[BestRight] + vector ResAx2 = mat2[BestTop] + + if(BestFront2) + ResAx0 = -ResAx0 + + if(BestRight2) + ResAx1 = -ResAx1 + + if(BestTop2) + ResAx2 = -ResAx2 + + mat3[0] = ResAx0 + mat3[1] = ResAx1 + mat3[2] = ResAx2 + + if(BestFront == 0) + { + if(BestFront2 == 0) + SizeToPlayer = fabs(maxs[0]) + else + SizeToPlayer = fabs(mins[0]) + } + else + { + if(BestRight == 0) + { + if(BestRight2 == 0) + SizeToPlayer = fabs(maxs[1]) + else + SizeToPlayer = fabs(mins[1]) + } + else + { + if(BestTop == 0) + { + if(BestTop2 == 0) + SizeToPlayer = fabs(maxs[2]) + else + SizeToPlayer = fabs(mins[2]) + } + } + } + + ManipIdealDist = 20 + (SizeToPlayer * 2) //cim vacsi objekt beriem do ruk, tym dalej od kamery musi byt aby neprekazal vo vyhlade + } + + ManipOffMat[0] = VectorMatrixInvMultiply3(mat2, mat3[0]) + ManipOffMat[1] = VectorMatrixInvMultiply3(mat2, mat3[1]) + ManipOffMat[2] = VectorMatrixInvMultiply3(mat2, mat3[2]) + + ManipMass = dBodyGetMass(World.ManipEntity) + + ManipInterLayer = dBodyGetInteractionLayer(World.ManipEntity) + dBodyInteractionLayer(World.ManipEntity, ET_MANIPULATING) + + if(IsInherited(World.ManipEntity, CRigidBodyClass)) + { + RigidBodyClass rbc = World.ManipEntity + rbc.OnPickedPhysicaly(false) //dame mu vediet + } + + dBodySetMass(World.ManipEntity, ZeroVec, 0.1) + + dBodyActive(World.ManipEntity, true, true) + WeaponBeforeManip = CurrentWeapon.ClassNum + WeaponChange(CDummyWeapon, true) + ManipTime = 0 + } + + int ManipUseKeyDown + int ManipUseKeyCleared + int ManipUseKeyDownLast + ExtClass ActivatedEntity //entita ktoru sme naposledy aktivovali + bool NeedActivateEndEvent + +//----------------------------------------------------------------- + void ProcessInterations() + { + World.Cross.SetType(CurrentWeapon.CrossHair) //default + + if(World.CutScene) + World.Cross.Show(false) + else + World.Cross.Show(true) + + ManipUseKeyDownLast = ManipUseKeyDown + ManipUseKeyDown = KEY(USE, false) + int UseKey = ManipUseKeyDown + + if(ManipUseKeyDown) + { + if(ManipUseKeyCleared) + UseKey = false + + ManipUseKeyCleared = true + } + else + ManipUseKeyCleared = false + + if(World.ManipEntity == NULL) //bez entity rotujeme natvrdo aby pri picknuti entity bola gula presne natocena podla kamery + { + vector from = World.CameraPos + vector to = from + to += World.CameraNorm * 70//52 + + vector end = to + CreatureClass best = NULL + int sparm + float norm[4], cfrac + cfrac = TraceLineEx(DEFAULT, from, end, ZeroVec, ZeroVec, best, norm, NULL, NULL, TRACE_ENTS, &RBTraceFilter) + + if(cfrac >= 1) + best = NULL + + CreatureClass ManipAdept = best + ExtClass ActivateAdept = best + + if(ActivateAdept && ActivateAdept.ActivateMethod <= ACT_NONE) //zistime ci sa to vobec ma aktivovat. bud user nastavil ACT_NONE alebo je tam ACT_ENTITY_DEFAULT a to znamena ze entita nenastavila nic tak to berieme ako ACT_NONE + ActivateAdept = NULL + + if(ActivateAdept && ActivateAdept.ActivateMethod == ACT_USEKEY_DISP) //ak sa to ma aktivovat displejom tak shader musi mat flag SHF_NEEDGUI + { + if(TraceLineToEntity(ActivateAdept, from, to, TrcContact)) + { + if(!TrcContact.ShaderFlags & SHF_NEEDGUI) + ActivateAdept = NULL + } + else + ActivateAdept = NULL + } + + if(ActivateAdept && ActivateAdept.ActivateMethod == ACT_USEKEY_DISTANCE) //to co sa ma aktivovat na distance netrasujeme. + ActivateAdept = NULL + + if(!ActivateAdept && DistActivFavorit) + ActivateAdept = DistActivFavorit + + if(ActivateAdept && ActivateAdept.ActivateMethod == ACT_DISTANCE_ONLY) + { + ActivateAdept = NULL + ManipAdept = NULL + } + + if(ActivateAdept) //nieco sme zamerali + { + int CanActiv = ActivateAdept.CanActivate(0, this) + + if(CanActiv == ACT_ENABLE) //najprv skusame ci sa to neda aktivovat + { + World.Cross.SetType(1) //use icon + + if(UseKey) + { + EnterableVehicle vehicle = ActivateAdept.Owner + + if(vehicle && IsInherited(vehicle, CEnterableVehicle)) + { + Controlled = vehicle + SetStatus(ST_NOCONTROL) + VehiclePlayerColBlock = dBodyCollisionBlock(vehicle.BodyPart, this) +// AddChild(vehicle.BodyPart, this, 0) + VehicleControlStatus = 1 //blend kamery do auta + VehicleControlTimer = 0 + + vehicle.BeforeEntering() //nech sa na to pripravi + vector CameraMatExt[3] + vector CameraMatIn[3] + RollPitchYawMatrix2(CameraAngles, CameraMatExt) + vehicle.UpdateCameraSystem() + RollPitchYawMatrix2(EntityAnglesToCameraAngles(vehicle.GetAnglesForCamera()), CameraMatIn) + MatrixQuat(CameraMatExt, VehicleQuatExt) + MatrixQuat(CameraMatIn, VehicleQuatIn) + VehicleCameraBlendOff = vehicle.BodyPart.CoordToLocal(World.CameraPos) + WeaponBeforeManip = CurrentWeapon.ClassNum + WeaponChange(CDummyWeapon, true) + OnEnterVehicle(0) + } + + ActivatedEntity = ActivateAdept //musime si zapametat zo sme naposledy aktivovali aby sme tomu vedeli zavolat ActivateProcessEnd() + ActivateAdept.Activate(0, this) + CallMethods(ActivateAdept, ActivateAdept.OnSuccess) + } + + if(ManipUseKeyDown) + { + if(ActivatedEntity && ActivatedEntity == ActivateAdept) + { + ActivateAdept.ActivateProcess(0, this) + World.Cross.Show(false) + } + } + + if(ActivateAdept.ActivateMethod == ACT_USEKEY || ActivateAdept.ActivateMethod == ACT_USEKEY_DISP) + ManipAdept = NULL //to co je mozne aktivovat cez USE sa neda zobrat + } + else + { + if(UseKey) + { + ActivateAdept.ActivateFail(0, this) + CallMethods(ActivateAdept, ActivateAdept.OnFail) + } + + if(CanActiv == ACT_BLOCKED) + { + World.Cross.SetType(2) //blocked icon + } + + if(CanActiv == ACT_DISABLE) //ked sa to neda aktivovat tak to skusime zobrat + { + ManipAdept = ActivateAdept + KEY(USE, true) //mozno bude niecomu vadit. je to tu koli kyslikovemu pristroju + } + } + } + + if(!ManipUseKeyDown && ManipUseKeyDownLast != 0) //keyup + { + if(ActivatedEntity) //ak prebiehal Activacny proces, tak teraz ho musime ukoncit + NeedActivateEndEvent = true + } + + if(ActivatedEntity) + { + if(ActivateAdept != ActivatedEntity) + NeedActivateEndEvent = true + + if(NeedActivateEndEvent) + { + ActivatedEntity.ActivateProcessEnd() + ActivatedEntity = NULL + NeedActivateEndEvent = false + } + } + + if(ManipAdept && !ChangeWeapon) //skusime ci sa to da nosit + { + if(IsInherited(ManipAdept, CRigidBodyClass)) + { + RigidBodyClass rb = ManipAdept + + if(rb.GetPickable() == false) + ManipAdept = NULL + } + else + ManipAdept = NULL + + if(ManipAdept) + { + World.Cross.SetType(4) //grab icon + + if(UseKey) + { + if(!ChangeWeapon) + PickManipEntity(ManipAdept) + } + } + } + } + else //s entitiou rotujeme cez angular velocity + { + ManipTime += ftime * 1.92 * sqrt(1 / g_timescale) + dBodyActive(World.ManipEntity, true, true) + World.Cross.Show(false) + + if(UseKey) + { + DropManipEntity(true) + return + } + + if(PrimaryAttack) + { + ManipThrowPowerScale += ftime * 2.0 * sqrt(sqrt(1 / g_timescale)) + clamp ManipThrowPowerScale<0, 1> +/* float Tscale = 1 - ManipThrowPowerScale + Tscale = Tscale * Tscale * Tscale * Tscale * Tscale + Tscale = 1 - Tscale + + Print(Tscale) + Print(ManipThrowPowerScale)*/ + SetThrowBar(ManipThrowPowerScale, true) + } + else + { + if(ManipThrowPowerScale) + { + ThrowManipEntity() + return + } + } + + vector ManipDir = ManipOffset + ManipDist = VectorNormalize(ManipDir) + + float diff = ManipIdealDist - ManipDist + float off = diff * 10 * ftime + + float ff = fabs(diff) + if(fabs(off) > ff) + off = diff + + ManipDist += off + ManipOffset = ManipDir * ManipDist + + vector TargOffset = VectorMatrixMultiply3(g_CamMat, ManipOffset) + vector CurPos = GetMatrix(World.ManipEntity, 3) + IdealManipPos = World.CameraPos + TargOffset + float DifLng = VectorLength(IdealManipPos - CurPos) + + if(DifLng > 20 && ManipTime > 0.5) //hned po zobrani je DifLng vacsia + { + DropManipEntity(true) + return + } + + MinClass TracEnt = NULL + cfrac = TraceLineEx(DEFAULT, World.CameraPos, CurPos, ZeroVec, ZeroVec, TracEnt, norm, NULL, NULL, TRACE_ENTS, &RBTraceFilter2) + + if(cfrac < 1 && TracEnt.IsRigidBody() && !dBodyIsDynamic(TracEnt)) //staticke veci nesmu byt medzi. dynamicke ano (granaty v bednicke a pod) + { + DropManipEntity(true) + return + } + } + } + +//----------------------------------------------------------------- + vector GetWalkPos(vector CurrentPos) + { + float MaxStairHeight = PlayerMaxStairHeight //do gameplay.h + +// if(Crouch) +// MaxStairHeight *= 0.5 + + float tolerance = 0 + vector From = CurrentPos + vector To = From + From[2] = From[2] + PlayerCapsuleExtends[Crouch] + MaxStairHeight + To[2] = To[2] - PlayerCapsuleExtends[Crouch] + tolerance// - MaxStairHeight + + float CylinderHeight = PlayerCapsuleExtends[Crouch] * 2 + float lng = CylinderHeight + MaxStairHeight - tolerance + vector DirVec = Vector(0, 0, -lng) + dShapeCastSetDir(ShapeCast, DirVec) + vector mat[4] = {"1 0 0", "0 1 0", "0 0 1"} + mat[3] = From + SetMatrix(ShapeCast, mat) + + MinClass clipent + vector cpos, cnorm + float dist = dShapeCastUpdate(ShapeCast, 0, clipent, cpos, cnorm) + float ResLng = dist * lng + float crc = lng - MaxStairHeight - 5 + + if(ResLng < lng && ResLng > crc) //je volne miesto pre playera + { + float Plane[4] + MinClass TracEnt + vector end = CurrentPos - Vector(0, 0, PlayerCapsuleHalfHeights[Crouch] + 10) + + dist = TraceLineEx(DEFAULT, CurrentPos, end, ZeroVec, ZeroVec, TracEnt, Plane, NULL, NULL, TRACE_DEFAULT, NULL) + + if(dist < 1) + { + vector norm = Vector(Plane[0], Plane[1], Plane[2]) + + float SurfDot = fabs(norm * Vector(0,0,1)) //fabs pretoze obcas vhychadza presne opacna normala. bug? chybne modely s duplicitnymi polygonmi ktore su otocene? + if(SurfDot > 0.995) //povrch musi uplne rovny. na sikmych plochach nechceme plyerovi pomahat + { + vector EndPos = From - Vector(0, 0, ResLng) + return EndPos + Vector(0, 0, PlayerCapsuleExtends[Crouch]) //sem mozeme vrazit playera + } + } +// AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZUPDATE|SS_TRANSP, NewPos - "1 1 1", NewPos + "1 1 1") + } +/* else + { + if(ResLng >= lng) + { + float a = ResLng - lng + Print(a) + } + if(ResLng < crc) + { + float b = crc - ResLng + Print(b) + } + }*/ + + return CurrentPos + } + +//----------------------------------------------------------------- + bool CameraClampFilter(ExtClass other/*, vector raypos, vector raydir*/) + { + if(other == this) + return false + +// if(other.ClassType == ClassTypeMiscPhysicsGlass || other.ClassType == ClassTypeMiscShootDetector || other.ClassType == ClassTypeMiscShootingShield) +// return other.IsShot(raypos, raydir) + + return true + } + + bool AfterLoad +//----------------------------------------------------------------- + void HandleMovement() + { + SimulatePlane = false + StrongSurfaceBias = false + dBodyActive(this, true, true) + player_hands hands = Hands + g_vPlayerPos = GetMatrix(this, 3) + g_vPlayerAngs = CameraAngles + +//---- getting facts ----- START ----- + KeyUp = KEY(MOVE_F, false) + KeyDown = KEY(MOVE_B, false) + KeyLeft = KEY(LEFT, false) + KeyRight = KEY(RIGHT, false) + + if(KeyUp || KeyDown || KeyLeft || KeyRight || MovementSpeedScale > 0.2) + { + DummyPlayer.Movement(KeyUp, KeyDown, KeyLeft, KeyRight) + AnyMoveKey = true + } + else + { + DummyPlayer.NoMovement() + AnyMoveKey = false + } + +// RelMotionAng = GetMotionAngle() //uhol pre smer pohybu. relativny ku kamere + + vector OldVel = GetVelocity(this) + vector VelVec = OldVel + float OldVelLng = VectorNormalize(VelVec) + MovementSpeedRate = OldVelLng / 189//PlayerWalkSpeed + clamp MovementSpeedRate<0, 1> + MovementCrossScale = MovementSpeedRate * 0.405 //maximalna rychlost playera znamena polovicny podiel na nepresnosti strelby + +/* if(CurrentWeapon.ClassNum == CFlameThrower) + { + item_weapon_flamethrower FThrower = CurrentWeapon + if(FThrower.Firing) + { + float CameraFactor = fabs(cincx) / 10 + CameraFactor += MovementSpeedRate + clamp CameraFactor<0, 1> + float BRateScale = 1 + (CameraFactor * 5) + FThrower.SetFlameBirthRateScale(BRateScale) + } + }*/ +/* + int sparm + float norm[4], cfrac + float rang = DEG2RAD * (CameraAngles[1] + RelMotionAng) + vector LVec = g_CamMat[1] + vector MyOff = LVec * -200 + vector to = coords + MyOff + MinClass TracEnt + cfrac = TraceLineEx(DEFAULT, coords, to, ZeroVec, ZeroVec, TracEnt, norm, NULL, NULL, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL|TRACE_PATCH, &CameraClampFilter) + + if(cfrac < 1) //skracujeme kameru + { + if(cfrac < 0) + cfrac = 0 + MyOff = MyOff * cfrac + } + + AddDShape(SHAPE_LINE, 0xffffaaaa, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, coords, to) + AddDShape(SHAPE_BBOX, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, to - "1 1 1", to + "1 1 1")*/ + + bool SprintBefore = Sprint + bool CrouchBefore = Crouch + + if(!AfterLoad) + { + if(KEY(WALK_MODE, false)) + Sprint = true + else + Sprint = false + + if(KEY(CROUCH, false) && status != ST_JUMP) + Crouch = true + else + Crouch = false + + if(CrouchBefore == true && Crouch == false) //nesmieme zrusit crouch pokial nad hlavou mame strop + { + dShapeCastSetDir(ShapeCast, Vector(0, 0, PlayerCapsuleExtends[0] + (PlayerCapsuleExtends[0] - PlayerCapsuleExtends[1]))) + vector mat4[4] = {"1 0 0", "0 1 0", "0 0 1"} + mat4[3] = GetMatrix(this, 3) + SetMatrix(ShapeCast, mat4) + + MinClass clipent + vector cpos, cnorm + + float dist = dShapeCastUpdate(ShapeCast, 0, clipent, cpos, cnorm) + if(dist < 1) + { + Crouch = true + } + } + + if(CrouchBefore != Crouch) + { + if(geom) //stava sa ze si niekto zapne FlyMod a potom da crouch a tu to spadne pretoze to nema geom + { + dGeomSetSize(geom, Vector(0, 0, PlayerCapsuleExtends[Crouch]), PlayerCapsuleRadius) + int FlipCrouch = 1 - Crouch + vector Offset = Vector(0, 0, PlayerCapsuleExtends[FlipCrouch] - PlayerCapsuleExtends[Crouch]) + + coords = GetMatrix(this, 3) - Offset + SetOrigin(this, coords) + UpdateEntity(this) + } + } + } + + IsOnGround = CheckForGround() //musime to zistovat az tu po pripadnom Crouchi aby pozicia playera okamzite brala z novej hodnoty coords a nie GetOrigin() + + AfterLoad = false + + if(Crouch) + { + fCrouch += ftime * 5 + + if(fCrouch > 1) + fCrouch = 1 + + float flip = 1 - fCrouch //trochu dynamiky z rychla do pomala + fCrouchPath = flip * flip + fCrouchPath = 1 - fCrouchPath + } + else + { + fCrouch -= ftime * 5 + + if(fCrouch < 0) + fCrouch = 0 + + fCrouchPath = fCrouch * fCrouch + } + + if(status != ST_JUMP && g_iFly == false) //surovo ho zrazame k zemi + { + float zz = DistToGround - 0.7 + + if(zz > 0.5) + FootstepsTimer += 150 * ftime + + if(IsOnGround && zz > 0) + SetOrigin(this, coords - Vector(0, 0, zz * 0.5)) //nutno brat poziciu z coords a nie z GetOriginu koli nahlej zmene pozicie v crouchi + } + + if(ExactAim > 0) + { + float FlipExactAim = 1 - ExactAim + float ExactAimBrake = FlipExactAim * 45 * g_timescale * g_timescale * g_timescale + + MotionSpeed = PlayerExactAimSpeed * sqrt(sqrt(1 / g_timescale)) + MotionAccel = PlayerExactAimAccel * sqrt(1 / g_timescale) + } + else + { + if(Crouch) + { + MotionSpeed = PlayerCrouchSpeed * sqrt(1 / g_timescale)// * MovementSpeedScale + MotionAccel = PlayerCrouchAccel * sqrt(sqrt(1 / g_timescale))// * MovementSpeedScale + + if(TrainEnt) + MotionSpeed = PlayerWalkSpeed * sqrt(sqrt(1 / g_timescale))// + } + else + { + if(Sprint) + { + MotionSpeed = PlayerRunSpeed * sqrt(sqrt(1 / g_timescale))// * MovementSpeedScale + MotionAccel = PlayerRunAccel * sqrt(1 / g_timescale)// * MovementSpeedScale + } + else + { + MotionSpeed = PlayerWalkSpeed * sqrt(sqrt(1 / g_timescale))// * MovementSpeedScale + MotionAccel = PlayerWalkAccel * sqrt(1 / g_timescale)// * MovementSpeedScale + } + } + } + +//---- getting facts ----- END ----- +#ifdef DEVELOPER + if(HandleFlyMode()) + return +#endif + + if(Controls == false) + return + + if(status == ST_NONE) + { +// MovementCrossScale = 0.3333333 //ked sa nepohybujeme, nehybeme kamerou a nestrielame tak presnost zbrane bude presne tretina z weapon.PrecisionFlawMax + + if(KEY(JUMP, true)/* && !Crouch*/) + StartJump() + else + { + if(IsOnGround) + { + if(AnyMoveKey) + { + SetStatus(ST_RUN) + hands.PlayWalkAnim() + } + else + { + if(DistToGround < 0.4 && SurfaceAngle > 5) //ked je na zemi a na sikmej ploche tak simulujeme rovinu pod nim + { + if(!StrongSurfaceBias) //sme na velmi strmej ploche na ktorej sa uz nechceme udrzat. nestaci podmienovat na SurfaceAngle + SimulatePlane = true + } + + if(!TrainEnt) + BrakeScale = 2 + } + } + else + SetStatus(ST_JUMP) + } + + if(status == ST_NONE && ApplyBackForce()) + { +// float ExtraBrake = 1 - LegsContactDot * 100 * sqrt(sqrt(sqrt(sqrt(g_timescale)))) +// BrakeForce = BrakeForce + (GetVelocity(this) * -ExtraBrake) + +/* if(NumLegsContactNormals && OldVelLng < 5) //ked uz skoro stojime a mame kontakt so spodnou pologulou tak ho surovo drzime na mieste. snad jedine co zabera proti miniaturnemu sklzavaniu :( + { + SetVelocity(this, ZeroVec) + SetOrigin(this, LastStayPos) //robi problemy minimalne pri crouchi + } + else + {*/ +// if(!TrainEnt) + if(!StrongSurfaceBias) + dBodyApplyForce(this, BrakeForce * BrakeScale) + + LastStayPos = GetOrigin(this) +// } + } + } + + if(status == ST_RUN) + { +// MovementCrossScale = 0.5 + + ApplyBackForce() + + if(KEY(JUMP, true) && !Crouch) + StartJump() + else + { + if(AnyMoveKey) + { + if(IsOnGround) + { + vector StairTestOff = MotionVec * ftime * 250 + vector StairTestPos = coords + StairTestOff + vector HandledPos = GetWalkPos(StairTestPos) + + if(HandledPos[2] > StairTestPos[2]) + { + FootstepsTimer += 150 * ftime + StairTestOff = StairTestOff * 0.25 + vector ResultPos = HandledPos + vector StairTestPos2 = coords + StairTestOff + vector HandledPos2 = GetWalkPos(StairTestPos2) + +// if(HandledPos2[2] > StairTestPos2[2]) +// { + ResultPos = HandledPos2 + + if(ResultPos[2] > HandledPos[2]) + ResultPos[2] = HandledPos[2] +// Print("teraz") +/* } + else + Print("su rovnake")*/ + +// AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZUPDATE|SS_TRANSP, ResultPos - "4 4 4", ResultPos + "4 4 4") + SetOrigin(this, ResultPos) + } + else + { + vector Poss = GetOrigin(this) +// AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_TRANSP, Poss - "1 1 1", Poss + "1 1 1") + } + + float dot, dot3 + + //dotykame sa nejakeho body a neni to world. spomalime akcelerovanie podla kontaktov aby sa viac prejavila vaha/trenie bodies pri tlaceni + if(NumWorldContactNormals > 0) + { + if(WorldContactNormal[2] < 0.1 && WorldContactNormal[2] > -0.1) //ignorujeme kontakty ktore nemaju vodorovnu normalu. (tie zo spodu tu musime vylucit) + { + vector Vel = GetVelocity(this) + VectorNormalize(Vel) + vector CNorm = WorldContactNormal + + dot = CNorm * Vel + if(dot < 0) + dot = -dot + + dot3 = dot * dot * dot + } + else + dot3 = 0 + } + else + dot3 = 0 + + float a + + if(OldVelLng > MotionSpeed) //ked sme prilis rychli tak nepridavame + a = 0 + else + { + a = MotionAccel * 0.5 //polovica akceleracnej sily bude vzdy fixna + float b = a + b *= 1 - dot3 + a += b //druha polovica je podla uhlu dotyku s povrchom + } + NumWorldContactNormals = 0 + + MotionForce = MotionVec * a + MotionForce = MotionForce + BrakeForce + + vector LegsContNorm2D = LegsContactNormal + LegsContNorm2D[2] = 0 + VectorNormalize(LegsContNorm2D) + float dotx = MotionVec * LegsContNorm2D + clamp dotx<-1, 0> + dotx = 1 + dotx + dotx = acos(dotx) * RAD2DEG + dotx = dotx / 90 + dotx = 1 - dotx //jak strmo do kopca ideme 1 = ideme priamo do kopca 0 = ideme vodorovne po kopci alebo z kopca +// Print(dotx) + + float Sang = SurfaceAngle + clamp Sang<0, PlayerMaxSurfaceAngle> + float SurfDip = Sang / PlayerMaxSurfaceAngle //na jak sikmej ploche stojime. percentualne 0 - kam sa uz neda vyliezt + SurfDip = 1 - SurfDip +// Print(SurfDip) + + if(SurfDip == 0) + MotionForce = MotionForce * dotx + + dBodyApplyForce(this, MotionForce) + } + else + SetStatus(ST_JUMP) + } + else + { + SetStatus(ST_NONE) + hands.PlayIdleAnim() + } + + if(!IsOnGround) + { + if(OldVel[2] < -50) + SetStatus(ST_JUMP) + } + } + } + + if(status == ST_JUMP) + { +// MovementCrossScale = 0.8 + + vector vl = GetVelocity(this) + + if(IsOnGround && DistToGround < 1 && vl[2] <= 0.1) + { + float DifLng = LastStablePos[2] - coords[2] + + if(DifLng > PlayerDropDownHurtHeight) //do 3 metrov sa playerovi nic nestane + { + DifLng -= PlayerDropDownHurtHeight + DifLng /= PlayerDropDownHurtRange //dalsie 3 metre znamenaju smrt aj z plneho zravia + float Hurt = DifLng * (float)MaxHealth + clamp Hurt<0, MaxHealth> + + if(!Immortality) + HealthDown(Hurt) + + UpdateHealthBar() + + if(Health == 0) + { + if(CanKill()) //nemozno vypadnut z funkcie ked sa nezabil + { + Kill() + return + } + } + } + + if(JumpUsingKey) + { + PlaySound(this, g_sCommonSounds[0], SF_ONCE) + FootstepsTimer = 0 + JumpUsingKey = false + Noises = Noises | NOISE_THUD + } + + if(AnyMoveKey) + { + SetStatus(ST_RUN) + hands.PlayWalkAnim() + } + else + { + SetStatus(ST_NONE) + hands.PlayIdleAnim() +// SetZVelocity(0) + } + } + else + { + if(AnyMoveKey) + { + if(OldVelLng < MotionSpeed) + { + MotionForce = MotionVec * PlayerJumpControlAccel + dBodyApplyForce(this, MotionForce) + } + } + +/* if(World.ManipEntity) //aby neslo vypacit playera hore predmetom ktory drzime + { + vector ManVel = GetVelocity(World.ManipEntity) + + if(vl[2] > 10 && ManVel[2] < 1 && ManVel[2] > -1) + DropManipEntity(true) + }*/ + + if(!IsOnGround && vl[2] >= 10) //updatujeme maximalnu vysku koli zraneniu padom + LastStablePos = coords + } + } + else //vsetky statusy mimo jump + { + if(GetFlags(this) & TFL_ONGROUND) + LastStablePos = coords + } + +// ----- motion process ----- END ----- + } +/* +//----------------------------------------------------------------- + void ChangeNextWeapon() + { + if(ChangeWeapon) //pokial uz neprebieha proces vymeny zbrane + return + +// if(CurrentWeapon.Action != 0) +// return + + int n + int Current = CurrentWeapon.ClassNum + WeaponClass wc = NULL + + for(n = Current + 1; n < sizeof(PWeapons); n++) + { + wc = GetWeaponPointer(n) + if(wc && wc.ClassNum != CDummyWeapon) + { + WeaponChange(wc.ClassNum, true) + return + } + } + + for(n = 0; n < sizeof(PWeapons); n++) //boli sme na konci tak zacneme znova + { + wc = GetWeaponPointer(n) + if(wc && wc.ClassNum != CDummyWeapon) //pokial mame iba jednu zbran tam ju nebudeme prehadzovat + { + WeaponChange(wc.ClassNum, true) + return + } + } + } + +//----------------------------------------------------------------- + void ChangePreviousWeapon() + { + if(ChangeWeapon) //pokial uz neprebieha proces vymeny zbrane + return + +// if(CurrentWeapon.Action != 0) +// return + + int n + int Current = CurrentWeapon.ClassNum + WeaponClass wc = NULL + + for(n = Current - 1; n >= 0; n--) + { + wc = GetWeaponPointer(n) + if(wc && wc.ClassNum != CDummyWeapon) + { + WeaponChange(wc.ClassNum, true) + return + } + } + + for(n = sizeof(PWeapons) - 1; n >= 0; n--) //boli sme na konci tak zacneme znova + { + wc = GetWeaponPointer(n) + if(wc && wc.ClassNum != CDummyWeapon) //pokial mame iba jednu zbran tam ju nebudeme prehadzovat + { + WeaponChange(wc.ClassNum, true) + return + } + } + } +*/ + +//----------------------------------------------------------------- + void ProcessIdleVars() + { + if(IdleVarTimer <= 0) + return + + if(status != ST_NONE) + { + EnableIdleWarAnims(false) + return + } + + if(ChangeWeapon) //pocas reloadu to stopneme + return + + IdleVarTimer -= ftime * 100 + + if(IdleVarTimer <= 0) + { + EnableIdleWarAnims(true) + player_hands hands = Hands + hands.PlayIdleVarAnim() + } + } + +//----------------------------------------------------------------- + void ProcessFootsteps() + { + if(status == ST_NONE) + { + FootstepsTimer -= ftime * 100 + float FootstepIdleTime = PlayerFootstepTime * 0.8 + + if(FootstepsTimer < FootstepIdleTime) + FootstepsTimer = FootstepIdleTime + return + } + + bool RealyJump = false + + if(status == ST_JUMP && JumpUsingKey == true) + RealyJump = true + + bool FootstepsEnabled = false + + if(DistToGround < PlayerCapsuleRadius) + { + if(status == ST_RUN || RealyJump == false) + FootstepsEnabled = true + } + + if(FootstepsEnabled) + { +// FootstepsTimer += ftime * 100 + float TimeSpeed = 30 + + float Vel = VectorLength(GetVelocity(this)) + float SpeedFactor = Vel / PlayerWalkSpeed + clamp SpeedFactor<0, 1> +// Print(Vel) + + TimeSpeed += SpeedFactor * 70 + FootstepsTimer += TimeSpeed * ftime + + if(FootstepsTimer >= PlayerFootstepTime) + { + FootstepsTimer = 0 + CurrentFootstep = 1 - CurrentFootstep + int FootStepParm = CurrentFootstep + + if(FootStepParm == 0) + FootStepParm = -1 + + if(!Sprint/* && SpeedFactor > 0.5 && !Crouch*/) + atype = t_run + else + atype = t_walk + + Footstep(FootStepParm) + + if(!Sprint) + Noises = Noises | NOISE_FOOTSTEP + } + return + } + } + +//int lastframe +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + vector Pos = GetOrigin(this) + float MaxContactZ = Pos[2] - PlayerCapsuleExtends[Crouch] - 0.2 + + if(c.Position[2] < MaxContactZ) + { + LegsContactNormal = LegsContactNormal + c.Normal + NumLegsContactNormals++ + } + + if(other == World) + return + + //if(dBodyIsDynamic(other)) +/* if(other.ClassType == ClassTypeFuncTrain) + { + if(c.Normal[2] > 0.7) //to bude podlaha + { + vector vel = dBodyGetVelocityAt(other, c.Position) + vel[2] = 0 + + vector vel2 = GetVelocity(this) + vel2[2] = 0 + + VectorNormalize(vel) + VectorNormalize(vel2) + + BrakeScale = vel * vel2 + BrakeScale = 1 - BrakeScale + + //some treshold + if(fabs(BrakeScale) < 0.01) + BrakeScale = 0 + + clamp BrakeScale + TrainEnt = true + TrainEnt = other + } + } */ + + if(!dBodyIsDynamic(other)) + return + +/* + int diff = g_iViewFrame - lastframe + lastframe = g_iViewFrame + if(diff > 1) + Print(diff) + + vector pos3 = GetMatrix(World.Player, 3) + pos3 += World.CameraNorm * 50 + pos3[2] = c.Position[2] + + vector vv = c.Normal * 100 + vector xx = pos3 + c.Position + + if(c.Normal[2] < 0.7) + AddDShape(SHAPE_LINE, 0xffffffff, 0, pos3, pos3 + vv) + else + AddDShape(SHAPE_LINE, 0xffffffff, SS_ONCE, pos3, pos3 + vv) +*/ + + WorldContactNormal = WorldContactNormal + c.Normal + NumWorldContactNormals++ + } + +//----------------------------------------------------------------- + float GetBulletTime() + { + return BulletTime + } + +//----------------------------------------------------------------- + void ProcessBulletTime() + { + if(!World.CutScene && !MiniCutsceneStatus && KEY(BULLET_TIME, true)) + { + bool HackBlock = false + + if(HackMode && HackStatus != 0) //z hacking modu mozeme zapnut bullet time iba v tomto stave + HackBlock = true + + if(!HackBlock && BulletTime > 0) //ak nejaky vobec mame + SwitchBulletTimeMode() //vypina pripadny hacking + } + + if(World.BulletTimeFade == BulletTimeFadeTarget && BulletTimeFadeTarget == 0) + return + + float revscale = 1 / g_timescale + BulletTime -= ftime * revscale * 1.3 + + + + if(BulletTime <= 0 && BulletTimeFadeTarget == 1) + { + BulletTime = 0 + BulletTimeFadeTarget = 0 //vypiname to + SetWidgetImage(HUD.WTimeBar, 0) + BulletTimeFadeOutSound = PlaySound(this, g_sCommonSounds[19], SF_ONCE) //dobeh + } + + UpdateBulletTimeBar() + + float FadeSpeed + + if(BulletTimeFadeTarget == 1) + FadeSpeed = ftime * revscale// * 0.59 + else + FadeSpeed = -ftime * revscale// * 0.76//0.5 + + LoopTimeCounter += ftime + + if(!BulletTimeLoopSound && LoopTimeCounter > 0.2) + BulletTimeLoopSound = PlaySound(this, g_sCommonSounds[18], 0) //loop + + World.BulletTimeFade += FadeSpeed + clamp World.BulletTimeFade<0, 1> + + float CurBulletTimeScale = 1 - BulletTimeScale * World.BulletTimeFade + g_timescale = 1 - CurBulletTimeScale + +// SetPostEffect(3, 255, 0, World.BulletTimeFade, 0.0) +// SetPostEffect(5, World.BulletTimeFade * 0.005, World.BulletTimeFade * 0.0 + 0.125, World.BulletTimeFade * 0.0 + 0.125, World.BulletTimeFade * 0.2 + 0.125) //modra + SetPostEffect(5, World.BulletTimeFade * 0.005, World.BulletTimeFade * 0.25 + 0.125, World.BulletTimeFade * 0.05 + 0.125, World.BulletTimeFade * 0.0 + 0.125) //cervena + float EaxFade = World.BulletTimeFade * 100 + SetEAXEnvironment("$current", "Bullet", EaxFade) //Drugged + + if(BulletTimeLoopSound) + SetSoundVolume(BulletTimeLoopSound, LinearVol(World.BulletTimeFade)) + + if(BulletTimeFadeTarget == 0 && World.BulletTimeFade == 0) + { + if(BulletTimeLoopSound) + { + EndSound(BulletTimeLoopSound) + BulletTimeLoopSound = 0 + } + SetPostEffect(0, 0, 0, 0, 0) + } + + + + } + + +//----------------------------------------------------------------- + void RemoveInteractionAdept(ExtClass adept) + { + if(adept == DistActivFavorit) + DistActivFavorit = NULL + + for(int n = 0; n < InteractionAdeptsNum; n++) + { + if(InteractionAdepts[n] == adept) + { + int Last = InteractionAdeptsNum - 1 + if(n < Last) + { + for(int k = n; k < Last; k++) + InteractionAdepts[k] = InteractionAdepts[k + 1] + } + InteractionAdeptsNum-- + return + } + } + } + +//----------------------------------------------------------------- + ExtClass IntTraceEnt + + bool InteractionFilter(ExtClass other, vector raypos, vector raydir) + { + if(other == this) + return false + + if(other == IntTraceEnt) + return false + + if(other.ClassType == ClassTypeMiscPhysicsGlass || other.ClassType == ClassTypeMiscShootDetector || other.ClassType == ClassTypeMiscShootingShield) + return other.IsShot(raypos, raydir) + + return true + } + +//----------------------------------------------------------------- + void ProcessDistInteractions() + { + ExtClass adept + float dist, bestdist = 9999999 + vector pos = GetMatrix(this, 3) + vector AddeptPos + DistActivFavorit = NULL + + for(int n = 0; n < InteractionAdeptsNum; n++) + { + adept = InteractionAdepts[n] + AddeptPos = GetMatrix(adept, 3) + dist = VectorLength(pos - AddeptPos) + + if(dist <= adept.ActivateDist) + { + if(adept.ActivateMethod == ACT_DISTANCE_ONLY) //ked sa to ma aktivovat iba ak je vzdialenost mensia nez ActivateDist + { + if(adept.CanActivate(0, this) == ACT_ENABLE) + { + vector to = GetRandPosInAABB(adept) //musime odtrasovat visibilitu ale z jedneho miesta by nezafungovalo vzdy + CreatureClass TracTarg = NULL + int sparm + float norm[4], cfrac + IntTraceEnt = adept + cfrac = TraceLineEx(DEFAULT, coords, to, ZeroVec, ZeroVec, TracTarg, norm, NULL, NULL, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL|TRACE_PATCH|TRACE_BONES, &InteractionFilter) + + if(cfrac == 1) + adept.Activate(0, this) + } + } + else + { + if(adept.ActivateMethod == ACT_USEKEY_DISTANCE) //z tych ktore sa aktivuju pomocou klavesy USE v definovanom ActivateDist vyberieme najblizsieho adepta + { + if(dist < bestdist) + { + DistActivFavorit = adept + bestdist = dist + } + } + } + } + } + InteractionAdeptsNum = 0 + } + +//----------------------------------------------------------------- + void ProcessCheats() + { + if(CheatWeapons) + { + ExtClass tmp = new ExtClass() + tmp._name = "CheatTempClass" + + if(CheatWeapons) + { + tmp._value = "CPistol" + M_AddItem(tmp) + + tmp._value = "CShotgun" + M_AddItem(tmp) + + tmp._value = "CMachinegun" + M_AddItem(tmp) + + tmp._value = "CSniperRifle" + M_AddItem(tmp) + + tmp._value = "CGrenade" + M_AddItem(tmp) + + tmp._value = "CRocketLauncher" + M_AddItem(tmp) + + tmp._value = "CFlameThrower" + M_AddItem(tmp) + } + + delete tmp + CheatWeapons = false + } + + if(CheatAmmo) + { + WeaponClass wc + int n + for(n = 0; n < sizeof(PWeapons); n++) + { + wc = PWeapons[n] + if(wc) + wc.Ammo = wc.AmmoPerMagazine + } + + for(n = 0; n < sizeof(Ammo); n++) + Ammo[n] = 100000 + + UpdateAmmoBar() + CheatAmmo = false + } + + if(CheatImmortality) + { + Health = MaxHealth + UpdateHealthBar() + } + + if(CheatHealth) + { + Health = MaxHealth + UpdateHealthBar() + CheatHealth = false + } + + if(!CheatHubbardium && status == ST_NONE && g_timescale == 1 && status != ST_DEATH) + float BulletTimeNeed = BulletTimeMax / 12.45 + + + { + if(BulletTime < BulletTimeNeed && LeanAngle == 0 ) + { + if(Crouch) + { + BulletTime += ftime * 0.969 + clamp BulletTime<0, BulletTimeNeed> + UpdateBulletTimeBar() + return + } + else + { + BulletTime += ftime * 0.125 + clamp BulletTime<0, BulletTimeNeed> + UpdateBulletTimeBar() + return + } + } + if(BulletTime < BulletTimeNeed && LeanAngle != 0 ) + { + BulletTime += ftime * 0.849 + clamp BulletTime<0, BulletTimeNeed> + UpdateBulletTimeBar() + return + } + else + { + clamp BulletTime<0, BulletTimeMax> + UpdateBulletTimeBar() + return + } + + +} + + } + +//----------------------------------------------------------------- + void ProcessHealth() + { + float rate = Health / MaxHealth + + if(rate <= 0.25) //ked mame malo energie tak blikame vzdy + HealthFlashReason = 2 + else //ak mame dost tak blikame jedine z dovodu ze sme dostali zasah + { + if(HealthFlashReason == 2) + HealthFlashReason = 0 + + HearthSoundNeedStop = true //musime nechat dohrat zvuk a za potom ho vypneme + } + + float FlSpeed = 5 * ftime + + if(HealthFlashRate > 0.5) + FlSpeed = 0.5 * ftime + + HealthFlashRate += FlSpeed + clamp HealthFlashRate<0, 1> + float FinalFlashScale = sin(HealthFlashRate * 180 * DEG2RAD) + float apl = FinalFlashScale * 255 + SetWidgetColor(HUD.WHealthBarFlash, ARGB(apl,255,255,255)) + + if(HealthFlashRate == 1 && HealthFlashReason) + { + HealthFlashRate = 0 + HealthFlashReason = 0 + } + } + +//----------------------------------------------------------------- + void M_OxygenOn(ExtClass other) + { + OxygenAtmosphere = true + UpdateOxygenBar() + } + +//----------------------------------------------------------------- + void M_OxygenOff(ExtClass other) + { + OxygenAtmosphere = false + ShowHUD(-1, -1, -1, -1, -1, -1, -1, -1, 1, -1) + UpdateOxygenBar() + + if(!OxygenRespirationSnd) + OxygenRespirationSnd = PlaySound(this, g_sCommonSounds[40 + OxygenRespSndIndex], SF_ONCE | SF_AMBIENT) + } + +//----------------------------------------------------------------- + void M_HackingOn(ExtClass other) + { + HackingDisabled = false + ShowHUD(-1, -1, -1, -1, -1, -1, -1, -1, -1, 1) + } + +//----------------------------------------------------------------- + void M_HackingOff(ExtClass other) + { + HackingDisabled = true + ShowHUD(-1, -1, -1, -1, -1, -1, -1, -1, -1, 0) + } + +//----------------------------------------------------------------- + void ProcessOxygen() + { + if(OxygenAdding) //ked prave cerpame tak toto je mimo provoz + { + OxygenAdding = false + return + } + + if(OxygenAtmosphere) + { + if(oxygen < PlayerMaxOxygen) + { + oxygen += ftime * 20 + clamp oxygen<0, PlayerMaxOxygen> + OxygenPainCounter = 0 + UpdateOxygenBar() + + if(oxygen == PlayerMaxOxygen) + ShowHUD(-1, -1, -1, -1, -1, -1, -1, -1, 0, -1) + } + } + else + { + if(OxygenDownTimer > 0) //po cerpani klesame az po chvili aby sa pri drzani USE neustale nezapinalo a vypinalo cerpanie + { + OxygenDownTimer -= ftime + + if(OxygenDownTimer <= 0) + OxygenDownTimer = 0 + } + else + { + world wrl = World + oxygen -= ftime * OxygenDownSpeeds[wrl.AtmosphereToxicity] + clamp oxygen<0, PlayerMaxOxygen> + + if(oxygen == 0) + { + OxygenPainCounter += ftime + + if(OxygenPainCounter >= NoOxygenHurtTime) //kazdy sekundu to s nim sekne + { + OxygenPainCounter = OxygenPainCounter - NoOxygenHurtTime + HealthDown(NoOxygenHealthDown) + UpdateHealthBar() + + if(Health == 0) + { + if(CanKill()) + Kill() + } + } + } + UpdateOxygenBar() + } + } + } + +// func_linear_door test4 + + //widget HackView + + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + player_hands hands = Hands + +/* if(KeyState(KC_I)) + { + ClearKey(KC_I) + _value = "1600, 60" + World.M_Flash(this) +// World.FullscreenFlash(1600, 60, "255 255 255", 0, 0.5) + }*/ + + /* + if(KeyState(KC_I)) + { + vector to = World.CameraNorm * 256 + World.CameraPos + float plane[4] + + ExtClass target + if(TraceLineEx(DEFAULT, World.CameraPos, to, ZeroVec, ZeroVec, target, plane, NULL, NULL, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL|TRACE_PATCH|TRACE_BONES, NULL) < 1) + { + vector project + + if(other == World) + project = -Vector(plane[0], plane[1], plane[2]) + else + project = World.CameraNorm + + int shdr + + if(shdr == NULL) + shdr = GetShader("decals/decalflesh") + CreateDecal(target, to, project * 16, 16.0, 0, 8, shdr, 0.1, 61.0) + // CreateDecal(target, to, project * 8, 8.0, 0, 8, BloodDecalShaders[1], 0.1, 61.0) + } + } + */ + +/* float Plane[4] + vector From = World.CameraPos - "0 0 8" + vector end = World.CameraNorm * 100 + end = From + end + +// AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, From, end) + From = end + end = end - Vector(0,0,PlayerCapsuleHalfHeights[Crouch] + 10) + MinClass TracEntX + float dist = TraceLineEx(DEFAULT, From, end, ZeroVec, ZeroVec, TracEntX, Plane, NULL, NULL, TRACE_DEFAULT, NULL) + + AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, From, end) + AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, end - "1 1 1", end + "1 1 1") + + if(dist < 1) + { + vector normx = Vector(Plane[0], Plane[1], Plane[2]) + Print(normx) + + vector vecx = normx * 50 + vecx = end + vecx + AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, end, vecx) + + float SurfDot = fabs(normx * Vector(0,0,1)) //fabs pretoze obcas vhychadza presne opacna normala. bug? chybne modely s duplicitnymi polygonmi ktore su otocene? + clamp SurfDot<-1, 1> + float SurfAng = acos(SurfDot) * RAD2DEG +// Print(SurfDot) +// Print(SurfAng) + }*/ + + VectorNormalize(LegsContactNormal) //priemer contact normal za jeden simulacny krok + LegsContactDot = LegsContactNormal * Vector(0, 0, 1) + SurfaceAngle = acos(LegsContactDot) * RAD2DEG + + //SetWidgetWorld(HUD.HackView, globalmap, 1) + + if(KeyState(KC_SUBTRACT)) + { + r_bumpbias += ftime * -0.02 + clamp r_bumpbias<0, 0.1> + } + + if(KeyState(KC_ADD)) + { + r_bumpbias += ftime * 0.02 + clamp r_bumpbias<0, 0.1> + } + + //kvuli AIcku, at nemusi furt volat GetOrigin() + coords = GetMatrix(this, 3) + + Noises = 0 + VectorNormalize(WorldContactNormal) + + if(status == ST_DEATH) + { + DeathCounter -= ftime + + if(DeathMode == DEATHMODE_IN_VEHICLE) //kamerou pomaly stupame hore a cumime na playera + { + EnterableVehicle vehicle = Controlled + vector TargetAngles = Vector2Angles(GetMatrix(vehicle.BodyPart, 3) - World.CameraPos) + float flip2 = TargetAngles[0] + TargetAngles[0] = -flip2 + TargetAngles[0] = FixAngle(TargetAngles[0]) + + vector ags = World.CameraAngs + ags[0] = FixAngle(ags[0]) + ags[1] = FixAngle(ags[1]) + + float AngOff0 = GetAngularOffset(TargetAngles[0], ags[0]) + float AngOff1 = GetAngularOffset(TargetAngles[1], ags[1]) + World.CameraAngs[0] = ags[0] + (AngOff0 * ftime * 10) //"uklon" kamery postupne vyrovname + World.CameraAngs[1] = ags[1] + (AngOff1 * ftime * 10) + + World.CameraPos[2] = World.CameraPos[2] + (ftime * 50) + } + else //DEATHMODE_NORMAL + { + World.CameraPos[2] = World.CameraPos[2] - (ftime * 100) + + if(World.CameraPos[2] <= DeathCameraTarget[2]) + World.CameraPos[2] = DeathCameraTarget[2] + } + + SetCamera(World.CameraPos, World.CameraAngs) + + if(DeathCounter <= 0) + { + DeathCounter = 0 + ClearEventMask(this, EV_ALL) + World.change_level("Escape=Menu LMB=Restart", false) + return + } + return + } +//Zaciatok OnFrame() + +#ifdef EDITOR + if(World.EditorActive) + return +#endif + + ProcessCheats() + +/* if(KeyState(KC_K)) + { + ClearKey(KC_K) + vector Forward = g_CamMat[1] + Forward = -Forward + vector Left = g_CamMat[0] + vector Right = -Left + vector Center = Forward * 60 + Center = GetMatrix(this, 3) + Center + + vector pos1 = Center + (Left * 30) + vector pos2 = Center + (Right * 30) + + misc_physics_model bedna1 = new misc_physics_model() + bedna1.coords = pos1 + bedna1.angle = 45 * sqrt(g_timescale) + bedna1.mass = 39.8 * sqrt(g_timescale) + bedna1.model = "obj/physics/boxik.xob" + Throw(bedna1, World, EV_INIT, 0) + Throw(bedna1, World, EV_LOADED, 0) + + misc_physics_model bedna2 = new misc_physics_model() + bedna2.coords = pos2 + bedna2.angle = 45 * sqrt(g_timescale) + bedna2.mass = 36.9 * sqrt(g_timescale) + bedna2.model = "obj/physics/boxik.xob" + Throw(bedna2, World, EV_INIT, 0) + Throw(bedna2, World, EV_LOADED, 0) + + misc_anim_object child1 = new misc_anim_object + child1.coords = ZeroVec + child1.model = "obj/physics/cigarettes.xob" + Throw(child1, World, EV_INIT, 0) + Throw(child1, World, EV_LOADED, 0) + SetOrigin(child1, "20 0 25") + SetAngles(child1, "20 20 20") + AddChild(bedna1, child1, 0) + + misc_physics_model child2 = new misc_physics_model + child2.coords = ZeroVec + child2.model = "obj/physics/cigarettes.xob" + Throw(child2, World, EV_INIT, 0) + Throw(child2, World, EV_LOADED, 0) +// child2.SetTransformEx("0 0 0", pos2 + "0 0 20") + AddChild(bedna2, child2, 0) + ClearFlags(child2, TFL_FULLMATRIX) + SetOrigin(child2, "20 0 25") + SetAngles(child2, "20 20 20") + }*/ + +//niektore veci musia bezat bez ohladu na cokolvek! + ProcessWeaponSelect() //prebieha selekcia + ProcessHitZones() + ProcessCrosshair() + ProcessOxygen() + ProcessBulletTime() + + if(MiniCutsceneStatus) + { + DummyPlayer.SetOrientation(coords, CameraAngles[1] + 90) + + if(MiniCutsceneStatus == 1) //cakame az sa player ukludni. mohol by byt prave v skoku a podobne. zaroven cakame az odlozi zbran + { + if(status == ST_DEATH) //pocas toho nas zabili takze uz nic nebude + MiniCutsceneStatus = 0 + else + { + if(Hands && CurrentWeapon.CanUpdateOwnerAnim()) //musime updatovat ruky aby prebehol unselect/select na ktory cakame + BumpFrame(Hands, ftime, 0) + + if(status != ST_JUMP && !ChangeWeapon) //player je v klude tak nastupuje minicutscena + { + SetStatus(ST_NOCONTROL) + DummyPlayer.Transmission() + dBodyActive(this, false, false) + SetVelocity(this, ZeroVec) + SetRenderViewMask(DummyPlayer, 1) + CurrentWeapon.Show(false) + hands.Show(false) + World.Cross.Show(false) + HearthSoundNeedStop = true + + if(HackMode) //vypiname recon ked je zapnuty + SwitchHackMode() + + if(BulletTimeFadeTarget == 1) //vypiname bullettime ked je zapnuty + SwitchBulletTimeMode() + + MiniCutsceneCameraScale = 0 + MiniCutsceneStatus = 2 + } + else + { + if(status == ST_JUMP) //nez player doskoci tak vo vzduchu sa este moze hybat a otacat kamerou + { + dBodyActive(this, true, true) + HandleMovement() + HandleCamera() + } + else //inak uz ziadny pohyb + { + dBodyActive(this, false, false) + SetVelocity(this, ZeroVec) + } + } + } + } + + if(MiniCutsceneStatus == 2) //kamera sa vzdialuje + { + if(KeyState(KC_ESCAPE)/* || KEY(USE, true)*/) //skor nez zacnu hrat dialogy sa to bude dat skipnut + { + ClearKey(KC_ESCAPE) + World.Transmitter.Stop() //musime vymazat buffer s dialogami ktore tam su + MiniCutsceneStatus = 4 + CameraAngles[0] = -20 //kameru vraciame do polohy aby pozeral rovno + } + else + { + MiniCutsceneCameraScale += ftime// * 5 + + if(MiniCutsceneCameraScale > 1) + { + MiniCutsceneCameraScale = 1 + MiniCutsceneStatus = 3 + World.Transmitter.Play(SP_MINICUTSCENE) //az teraz spustime davku ingame hlasok. tento proces zacal prave na zaklade toho ze tam nejake su + } + + float sflip = 1 - MiniCutsceneCameraScale //trochu dynamiky z rychla do pomala + MiniCutsceneCameraScaleDyn = sflip * sflip + MiniCutsceneCameraScaleDyn = 1 - MiniCutsceneCameraScaleDyn + } + } + + if(MiniCutsceneStatus == 3) //pocuvame/sledujeme dialogy + { + if(KeyState(KC_ESCAPE) || /*KEY(USE, true) ||*/ World.Transmitter.PlayMode == SP_NONE) //ak to prerusime alebo dialogy dohrali + { + ClearKey(KC_ESCAPE) + World.Transmitter.Stop() + MiniCutsceneStatus = 4 + CameraAngles[0] = -20 //kameru vraciame do polohy aby pozeral rovno + } + } + + if(MiniCutsceneStatus == 4) //koncime s tym takze stiahneme kameru a playera nechame pokracovat + { + MiniCutsceneCameraScale -= ftime * 3 + + if(MiniCutsceneCameraScale <= 0) + { + MiniCutsceneCameraScale = 0 + MiniCutsceneStatus = 0 + WeaponChange(WeaponBeforeMiniCutscene, true) + WeaponBeforeMiniCutscene = 0 + CurrentWeapon.Show(true) + SetRenderViewMask(DummyPlayer, 0xfffe) + hands.Show(true) + HealthDown(0) //nech sa pusti zvuk srdca ked je potreba lebo predtym bol vypnuty + SetVelocity(this, ZeroVec) + dBodyActive(this, true, true) + SetStatus(ST_NONE) + } + +/* float sflip2 = 1 - MiniCutsceneCameraScale //trochu dynamiky z rychla do pomala + MiniCutsceneCameraScaleDyn = sflip2 * sflip2 + MiniCutsceneCameraScaleDyn = 1 - MiniCutsceneCameraScaleDyn*/ + MiniCutsceneCameraScaleDyn = MiniCutsceneCameraScale * MiniCutsceneCameraScale + + if(MiniCutsceneCameraScaleDyn < 0.1) + SetRenderViewMask(DummyPlayer, 0xfffe) + } + + if(MiniCutsceneStatus >= 2) + { + vector LookVec = World.CameraNorm + LookVec[2] = 0 + VectorNormalize(LookVec) + LookVec[2] = -0.5 + VectorNormalize(LookVec) + + vector ang = Vector2Angles(-LookVec) + if(CameraAngles[0] < 0) + { + ang[0] = 360 - ang[0] + float flip = ang[0] + ang[0] = -flip + } + + float AngOff = GetAngularOffset(CameraAngles[0], ang[0]) + vector MiniCutsceneAngs = CameraAngles + MiniCutsceneAngs[0] = MiniCutsceneAngs[0] - (AngOff * MiniCutsceneCameraScaleDyn) + + float OffsetLng = 64 * -MiniCutsceneCameraScaleDyn + vector CameraOffset = LookVec * OffsetLng + + int sparm + float norm[4], cfrac + vector to = CameraPos + CameraOffset + MinClass TracEnt + cfrac = TraceLineEx(DEFAULT, CameraPos, to, ZeroVec, ZeroVec, TracEnt, norm, NULL, NULL, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL|TRACE_PATCH, &CameraClampFilter) + + if(cfrac < 1) //skracujeme kameru + { + cfrac -= 0.1 + if(cfrac < 0) + cfrac = 0 + CameraOffset = CameraOffset * cfrac + } + + World.CameraPos = CameraPos + CameraOffset + EarthquakeOff + World.CameraAngs = MiniCutsceneAngs + World.CameraNorm = Angles2Vector(World.CameraAngs) + SetCamera(World.CameraPos, MiniCutsceneAngs/*World.CameraAngs*/) + } + } + + if(status != ST_NOCONTROL && World.CutScene == false) //ak nic neovladame + HandleCamera() //musi to byt pred ProcessHacking() + + bool InHackedDevice = ProcessHacking() + bool InVehicle = false + + if(!InHackedDevice && World.CutScene == false && !MiniCutsceneStatus) //ak nic neovladame) + InVehicle = ProcessVehicleControl() + + if(InHackedDevice || InVehicle || World.CutScene || MiniCutsceneStatus > 1) + World.Cross.Show(false) + + if(!InHackedDevice && !World.CutScene && !MiniCutsceneStatus) //true = sme do niecoho nahackovani a funkconsti playera nechceme + { + if(InVehicle) + { + ProcessHealth() + } + else //normalny stav + { + HandleMovement() + ProcessFlashLight() + + if(g_iFly == false) + { + ProcessWeapons() + ProcessIdleVars() + ProcessInterations() + ProcessFootsteps() + ProcessHealth() + ProcessDistInteractions() + } + + if(KEY(TASKLIST, false)) + World.TaskList.ForceOpening() + + if(Hands && CurrentWeapon.CanUpdateOwnerAnim()) + BumpFrame(Hands, ftime, 0) + + World.Cross.SetScale(DefaultCrossScale + MovementCrossScale + CameraCrossScale + ShootingCrossScale * ExactAimCrossScale) + World.Cross.OnFrame() + } + } + + BrakeScale = 1.0 + + if(Noises) + Noise(Noises) + + if(KeyState(KC_U)) + { + ClearKey(KC_U) + +// World.Player.UpdateAgent(true) +// World.ShowCustomMessage("message is here!", TUTORIAL_DIALOG) + } + +int wnum +vector wfrom +vector wto + +CPath pPath + + if(wnum == 1) + { + if(pPath) + { + pPath.Destroy() + pPath = NULL + } + + wto = GetOrigin(this) + + CPosition cfrom = new CPosition + CPosition cto = new CPosition + + if(World.pPathFinder.PositionForPoint(wfrom, cfrom) && World.pPathFinder.PositionForPoint(wto, cto)) + { + if(World.pPathFinder.FindClosestPosition(0, cto, cto, 24)) + { + pPath = World.pPathFinder.FindShortestPath(0, cfrom, cto, 0) + /* + if(pPath) + { + Print(pPath.Length()) + Print(pPath.Size()); + Print(pPath.Position(0)); + }*/ + } + } + } + + vector pos7 +#ifdef DEVELOPER +/* + if(KeyState(KC_J)) + { + ClearKey(KC_J) + + if(wnum == 0) + { + wfrom = GetOrigin(this) + wnum++ + } + else + { + if(wnum == 1) + { + if(pPath) + { + pPath.Destroy() + pPath = NULL + } + wnum = 0 + } + } + } +*/ + + if(KeyState(KC_O)) + { + ClearKey(KC_O) + pos7 = World.CameraPos + pos7 += World.CameraNorm * 50 + vector targ2 = g_CamMat[0] * 25 +// new ShotStreak(pos7 + targ2, pos7 - targ2, 5, 25, 1, "spr/shotstreak") + new ShotStreak(pos7 + targ2, pos7 - targ2, 5, 25, 1, 5) + } + +/* if(KeyState(KC_O)) + { + ClearKey(KC_O) + pos7 = World.CameraPos + pos7 += World.CameraNorm * 250 + rigidbody_rope rope = new rigidbody_rope + rope.coords = pos7 + rope.segnum = 10 + rope.length = 50 + Throw(rope, this, EV_INIT, 0) + }*/ +#endif +#ifdef FIDO +/* + if(KeyState(KC_J)) + { + //ClearKey(KC_J) + + pos7 = World.CameraPos + pos7 += World.CameraNorm * 48 + + ExtClass ec = new ExtClass + SetOrigin(ec, pos7) + //UpdateEntity(ec) + + int btype + + btype++ + if(btype >= 3) + btype = 0 + + switch(btype) + { + case 0: + ec.SetObject(GetObject("obj/physics/boxik.xob")) + NxActorCreate(ec, ZeroVec, BC_MODEL, true, 20, 0, 0) + break + + case 1: + ec.SetObject(GetObject("obj/physics/bmic.xob")) + NxActorCreate(ec, ZeroVec, BC_MODEL, true, 3, 0, 0) + break + + case 2: + ec.SetObject(GetObject("obj/physics/can.xob")) +// ec.SetObject(GetObject("obj/weapons/shell.xob")) +// NxActorCreate(ec, ZeroVec, BC_MODEL) + NxActorCreate(ec, ZeroVec, BC_CAPSULE_Z, true, 5, 0, 0) + break + } + + vector min,max + GetBoundBox(ec, min, max) +// if(NxActorCreate(ec, ZeroVec, BC_NONE, true, 0, 0)) + // { + // NxShapeCreateBox(ec, g_vIdentMatrix, max - min, 0, 10) + //} + + SetFlags(ec, TFL_VISIBLE|TFL_FULLMATRIX|TFL_NOSHADOW) + + NxActorSetCollisionGroup(ec, 1) + SetVelocity(ec, World.CameraNorm * 160) + } + + if(KeyState(KC_K)) + { + ClearKey(KC_K) + + pos7 = World.CameraPos + pos7 += World.CameraNorm * 80 + + ec = new ExtClass + SetOrigin(ec, pos7) + UpdateEntity(ec) + + SetFlags(ec, TFL_VISIBLE|TFL_FULLMATRIX|TFL_NOSHADOW) + ec.SetObject(GetObject("obj/physics/bmic2.xob")) + + ClothDef cdef = new ClothDef + cdef.Thickness = 0.05 + cdef.Density = 1.0 * (1 / g_timescale) + cdef.BendingStiffness = 1.0 * g_timescale + cdef.StretchingStiffness = 1.0 * g_timescale + cdef.DampingCoefficient = 0.5 + cdef.Friction = 0.7 + cdef.Pressure = 2.0 + cdef.CollisionResponseCoefficient = 1.1 + cdef.AttachmentResponseCoefficient = 1.1 + cdef.SolverIterations = 10 + cdef.CollisionGroup = 1 +// cdef.Flags = NX_CLF_PRESSURE|NX_CLF_BENDING|NX_CLF_GRAVITY +// cdef.Flags = NX_CLF_BENDING|NX_CLF_GRAVITY|NX_CLF_BENDING_ORTHO|NX_CLF_PRESSURE +// cdef.Flags = NX_CLF_GRAVITY|NX_CLF_BENDING|NX_CLF_BENDING_ORTHO +// cdef.Flags = NX_CLF_GRAVITY + cdef.Flags = NX_CLF_GRAVITY|NX_CLF_PRESSURE + NxClothCreate(ec, "obj/physics/bmic", cdef, false) + } +*/ + + if(KeyState(KC_J)) + { + ClearKey(KC_J) + pos7 = World.CameraPos + pos7 += World.CameraNorm * 100 + creature_ragdoll ragdoll = new creature_ragdoll() +// ragdoll.model = "obj/creatures/dead/dead01.xob" + // ragdoll.ragdoll = "Dead01" +// ragdoll.model = "obj/creatures/deaddown/deaddown.xob" +// ragdoll.ragdoll = "DeadDown" + ragdoll.model = "obj/creatures/deadupper/deadupper.xob" + ragdoll.ragdoll = "DeadUpper" + ragdoll.weight = 70.1 + ragdoll.coords = pos7 + ragdoll.angle = 230 * sqrt(g_timescale) + Throw(ragdoll, World, EV_INIT, 0) + Throw(ragdoll, World, EV_LOADED, 0) + } +#endif + +//Koniec OnFrame() + if(VehicleControlStatus != 2) //flaru musime updatovat tu inac je frame pozadu. ked sme vo vehicli tak ju updatuje vehicle pretoze by bola zase frame pozadu + { + if(World.flare) + World.flare.Update() + } + + NumWorldContactNormals = 0 + WorldContactNormal = ZeroVec + NumLegsContactNormals = 0 + } + +//--------------------------------------------------------------------------------------------------------- + void UpdateHUD(int id) //virtual + { + switch(id) + { + case 1: + UpdateAmmoBar() + break + } + } + +//----------------------------------------------------------------- + void SetBBoxInfo() //nastavime BBox koli AI a pod. + { + float HalfHeight = PlayerCapsuleHalfHeights[0] + Maxs[0] = PlayerCapsuleRadius + Maxs[1] = PlayerCapsuleRadius + Maxs[2] = HalfHeight + Mins = -Maxs + + vector vec = Maxs - Mins + Height = vec[2] + HHeight = Height * 0.5 + HHVec = Vector(0, 0, HHeight) + Radius = vec[0] * 0.5 + } + +//--------------------------------------------------------------------------------------------------------- + void Activate(int fl, ExtClass other) + { + if(fl == 1) //fyzicky item_misc ktory drzime bol vlozeny do triggeru + { + if(World.ManipEntity) + DropManipEntity(true) + + return + } + + if(fl == 2) //signal pre zacatie minicutsceny pretoze sa zacali pustat ingame dialogy + { + if(status != ST_DEATH) + { + MiniCutsceneStatus = 1 + HideWeaponSelectGUI() + + if(HearthSound) + HearthSoundNeedStop = true + + if(World.ManipEntity) + { + WeaponBeforeMiniCutscene = WeaponBeforeManip + DropManipEntity(false) + } + else + { + WeaponBeforeMiniCutscene = CurrentWeapon.ClassNum + WeaponChange(CDummyWeapon, true) + } + PlaySound(this, g_sCommonSounds[67], SF_ONCE) +// World.FullscreenFlash(600, 100, "255 255 255", 0, 1) + } + } + } + +//----------------------------------------------------------------- + void EOnSoundEnd(ExtClass other, int extra) + { + if(extra == PainSound) + { + PainSound = 0 + return + } + + if(extra == BulletTimeFadeInSound) + { + BulletTimeFadeInSound = 0 + return + } + + if(extra == HearthSound) + { + if(HearthSoundNeedStop) + HearthSound = 0 + else + HearthSound = PlaySound(this, g_sCommonSounds[9], SF_ONCE) + + return + } + + if(extra == OxygenRespirationSnd) + { + if(!OxygenAtmosphere) + { + OxygenRespSndIndex = 1 - OxygenRespSndIndex + OxygenRespirationSnd = PlaySound(this, g_sCommonSounds[40 + OxygenRespSndIndex], SF_ONCE | SF_AMBIENT) + } + else + OxygenRespirationSnd = 0 + } + } +/* + int magazine + CurrentWeapon = new item_weapon_pistol(this) + magazine = PistolAmmoOnStart + clamp magazine + pistol.Ammo = PistolAmmoOnStart //secondary ammo nepouziva + Ammo[AmmoPistol] = + CurrentWeapon.Pick(this) + + CurrentWeapon = new item_weapon_shotgun(this) + CurrentWeapon.Ammo = ShotgunAmmoOnStart + CurrentWeapon.Pick(this) + + CurrentWeapon = new item_weapon_machinegun(this) + CurrentWeapon.Ammo = MachinegunAmmoOnStart + CurrentWeapon.Pick(this) + + CurrentWeapon = new item_weapon_sniperrifle(this) + CurrentWeapon.Ammo = SniperRifleAmmoOnStart + CurrentWeapon.Pick(this) + + CurrentWeapon = new item_weapon_grenade(this) + CurrentWeapon.Ammo = GrenadeAmmoOnStart + CurrentWeapon.Pick(this) + + CurrentWeapon = new item_weapon_jackhammer(this) + CurrentWeapon.Pick(this) +*/ + +//----------------------------------------------------------------- + WeaponClass CreateWeapon(int ClNum, int ammo, int MagazineAmmo) + { + WeaponClass wc = NULL + int PerMagazine + int StartAmmo + int AType + + switch(ClNum) + { + case CDummyWeapon: + wc = new item_weapon_dummy() + PerMagazine = 0 + StartAmmo = 0 + AType = 0 + break + + case CPistol: + wc = new item_weapon_pistol(this) + PerMagazine = PistolAmmoPerMagazine + StartAmmo = PistolAmmoOnStart + AType = AmmoPistol + break + + case CMachinegun: + wc = new item_weapon_machinegun(this) + PerMagazine = MachinegunAmmoPerMagazine + StartAmmo = MachinegunAmmoOnStart + AType = AmmoMachinegun + break + + case CShotgun: + wc = new item_weapon_shotgun(this) + PerMagazine = ShotgunAmmoPerMagazine + StartAmmo = ShotgunAmmoOnStart + AType = AmmoShotgun + break + + case CSniperRifle: + wc = new item_weapon_sniperrifle(this) + PerMagazine = SniperRifleAmmoPerMagazine + StartAmmo = SniperRifleAmmoOnStart + AType = AmmoSniperRifle + break + + case CRocketLauncher: + wc = new item_weapon_rocketlauncher(this) + PerMagazine = RocketLauncherAmmoPerMagazine + StartAmmo = RocketLauncherAmmoOnStart + AType = AmmoRocketLauncher + break + + case CFlameThrower: + wc = new item_weapon_flamethrower(this) + PerMagazine = FlameThrowerAmmoPerMagazine + StartAmmo = FlameThrowerAmmoOnStart + AType = AmmoFlameThrower + break + + case CGrenade: + wc = new item_weapon_grenade(this) + PerMagazine = GrenadeAmmoPerMagazine + StartAmmo = GrenadeAmmoOnStart + AType = AmmoGrenade + break + + case CJackHammer: + wc = new item_weapon_jackhammer(this) + AType = 0 + break + } + + if(!wc) + return NULL + + if(MagazineAmmo > -1) //zadavame zvlast zasobnik a zbytok + { + Ammo[AType] = ammo + wc.Ammo = MagazineAmmo + } + else //naplnime zasobnik a zbytok + { + if(ammo > -1) //ammo rozpocitame do zasobnika a zbytok playerovi. inac startovnu hodnotu vsetkych nabojov rozlozime zasobnik + zbytok + StartAmmo = ammo + + wc.Ammo = StartAmmo + clamp wc.Ammo<0, PerMagazine> + Ammo[AType] = StartAmmo - wc.Ammo + + if(Ammo[AType] < 0) + Ammo[AType] = 0 + } + + return wc + } + +//----------------------------------------------------------------- + void WriteCurrentStorageTo(PlayerStorage storage) + { + if(!storage) + return + + int n + WeaponClass wc + storage.NumWeapons = 0 + + for(n = 0; n < sizeof(PWeapons); n++) + { + wc = PWeapons[n] + if(wc) + { + storage.weapons[storage.NumWeapons] = wc.ClassNum + storage.ammo[storage.NumWeapons] = Ammo[wc.AmmoType] + storage.MagazinesAmmo[storage.NumWeapons] = wc.Ammo + storage.NumWeapons++ + } + } + + storage.CurrentWeapon = CurrentWeapon.ClassNum + storage.BulletTime = BulletTime + storage.health = Health + storage.oxygen = oxygen + storage.flashlight = FlashLight + storage.DifficultyLevel = DifficultyLevel + } + +//----------------------------------------------------------------- + void EOnLoad(ExtClass other, int extra) + { + AfterLoad = true + g_timescale = 1.0 + SetWidgetWorld(WView, globalmap, WViewWidgetCamera) + + if(World.BulletTimeFade == 0) + SetEAXEnvironment("$current", "Bullet", 0) + + if(!g_PlayerStorage) + g_PlayerStorage = new PlayerStorage + + WriteCurrentStorageTo(g_PlayerStorage) + dShapeCastCreate(ShapeCast, false) + dShapeCastAddSphere(ShapeCast, ZeroVec, PlayerCapsuleRadius - 0.1) + dBodyInteractionLayer(ShapeCast, ET_PLAYERCAST) + + ContactConstraint = dConstraintCreateContact() + ContactConstraint.setBody1(World) + ContactConstraint.setBody2(this) + + DampingConstraint1 = dConstraintCreatePoint() + DampingConstraint1.setBody1(World) + DampingConstraint1.setBody2(this) + + //restorujeme vlastnosti widget do stavu pred sejvom +/* ShowHUD(-1, -1, -1, HealthBarVisible, AmmoBarVisible, BulletTimeBarVisible, LightBarVisible, ThrowBarVisible, OxygenBarVisible, ReconSignalVisible) + UpdateHealthBar() + UpdateAmmoBar() + UpdateBulletTimeBar() + UpdateLightBar() + UpdateOxygenBar() + UpdateHackSignalBar() + + if(HackModeFade > 0) + { + ShowHackGUI(true) + float HackWindowScale = HackLoginTimer * HackLoginTimer + SetHackPreviewExtendsSize(HackWindowScale) + }*/ + + if(BulletTimeFadeInSound) //co hralo pred sejvom musi hrat i po sejve + BulletTimeFadeInSound = PlaySound(this, g_sCommonSounds[17], SF_ONCE) //nabeh + + if(HearthSound) + HearthSound = PlaySound(this, g_sCommonSounds[9], SF_ONCE) + + if(OxygenRespirationSnd) + OxygenRespirationSnd = PlaySound(this, g_sCommonSounds[40 + OxygenRespSndIndex], SF_ONCE | SF_AMBIENT) + + if(HackingLoopSound) + HackingLoopSound = PlaySound(this, g_sCommonSounds[54], SF_AMBIENT) + + if(HackLoopSound) + HackLoopSound = PlaySound(this, g_sCommonSounds[37], 0) + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { +#ifdef EDITOR // + vector mat[4] + vector Angles = Vector(0, angle, 0) + RollPitchYawMatrix2(Angles, mat) + mat[3] = coords + SetMatrix(this, mat) + UpdateEntity(this) +#endif + + if(!ContactConstraint) //musi byt az tu pretoze nemusi existovat body worldu + { + ContactConstraint = dConstraintCreateContact() + ContactConstraint.setBody1(World) + ContactConstraint.setBody2(this) + } + + if(!DampingConstraint1) + { + DampingConstraint1 = dConstraintCreatePoint() + DampingConstraint1.setBody1(World) + DampingConstraint1.setBody2(this) + } + + trigger_hack_detector trigger //prepojime triggery aby sme ich pri hachovani nemuseli hladat + trigger_hack_detector LastTrigger = NULL + FirstHackTrigger = GetNextEntity(NULL, CTriggerHackDetector) + + for(trigger = FirstHackTrigger; trigger != NULL; trigger = GetNextEntity(trigger, CTriggerHackDetector)) + { + if(LastTrigger) + LastTrigger.NextSiblingTrigger = trigger + + LastTrigger = trigger + } + } + +//----------------------------------------------------------------- + void creature_player() + { +#ifdef EDITOR + UpdatePlayerPointer(this) //v GUI editoru musi byt pointer na playera stale platny +#endif + + if(!HUD) + HUD = new PlayerHUD() + + g_timescale = 1.0 + flags |= FL_NOTEST + + if(g_bRMap) + { + coords = g_vPlayerPos + CameraAngles = g_vPlayerAngs + g_bRMap = false + } + else + CameraAngles = Vector(0, angle, 0) + + World.Player = this + ClassType = ClassTypeCreature + ClassNum = ClassNumPlayer + SetKind(this, PLAYER) //asi special info pre engine ze ide o playera + + SetFlags(this, TFL_SOLID | TFL_VISIBLE | TFL_TOUCHTRIGGERS | TFL_FULLMATRIX | TFL_OBBCOLLISION | TFL_USER6) + SetEventMask(this, EV_INIT|EV_LOADED|EV_FRAME|EV_ONLOAD|EV_CONTACT|EV_SOUNDEND|EV_ONLOAD) + + flags |= FL_CANOPENDOORS|FL_NODISABLE + SetName("player") + + g_bImmortal = false + + CameraTargetPos = coords + Vector(0, 0, PlayerCapsuleExtends[Crouch] + PlayerCameraOffset) + CameraPos = CameraTargetPos + +#ifndef EDITOR + World.CameraPos = CameraPos + World.CameraAngs = CameraAngles + World.CameraNorm = Angles2Vector(World.CameraAngs) + SetCamera(World.CameraPos, World.CameraAngs) + CalcMatrixFromCamera() +#else + if(World.EditorActive == false) + { + World.CameraPos = CameraPos + World.CameraAngs = CameraAngles + World.CameraNorm = Angles2Vector(World.CameraAngs) + SetCamera(World.CameraPos, World.CameraAngs) + CalcMatrixFromCamera() + } +#endif + + vector mat[4] + mat[0] = "1 0 0" + mat[1] = "0 1 0" + mat[2] = "0 0 1" + mat[3] = coords + SetMatrix(this, mat) + SetBBoxInfo() + UpdateEntity(this) + LastStablePos = coords + LastStayPos = coords + + TrcContact = new TraceContact + WeaponSoundPos = new MinClass + + ShapeCast = new MinClass + SetFlags(ShapeCast, TFL_FULLMATRIX) + dShapeCastCreate(ShapeCast, false) + dShapeCastAddSphere(ShapeCast, ZeroVec, PlayerCapsuleRadius - 0.1) + dBodyInteractionLayer(ShapeCast, ET_PLAYERCAST) + + CreateRigidBody() + EnableContols(true) + + Hands = new player_hands(this) + player_hands hands = Hands + WeaponAngles = CameraAngles //zbran musi byt natocena podla playera + + FlashLightBase = new MinClass + SetOrigin(FlashLightBase, "0 0 0") + SetAngles(FlashLightBase, "0 -90 0") + AddChild(Hands, FlashLightBase, -1) + + DummyPlayer = new player_dummyobject + + if(g_PlayerStorage) //ked mu chceme z akehokolvek dovodu vnutit co ma mat, tak vzdy pred nahanim mapy mu to naplnime + { + for(int n = 0; n < g_PlayerStorage.NumWeapons; n++) + { + if(!GetWeaponPointer(g_PlayerStorage.weapons[n])) + { + CurrentWeapon = CreateWeapon(g_PlayerStorage.weapons[n], g_PlayerStorage.ammo[n], g_PlayerStorage.MagazinesAmmo[n]) //uskladnujeme vsetky naboje vcitane zasobnikov + CurrentWeapon.Pick(this) + } + } + + CurrentWeapon = GetWeaponPointer(g_PlayerStorage.CurrentWeapon) + Health = g_PlayerStorage.health + FlashLight = g_PlayerStorage.flashlight + oxygen = g_PlayerStorage.oxygen + BulletTime = g_PlayerStorage.BulletTime + DifficultyLevel = g_PlayerStorage.DifficultyLevel +// World.playerscale = PLAYER_DAMAGE_SCALE[DifficultyLevel] +// World.enemyscale = ENEMY_DAMAGE_SCALE[DifficultyLevel] + } + else //nikdy sa to nesmie stat !!! + { + DPrint("Unknown error. Missing player storage") + } + + CurrentWeapon.Show(true) + SelectWeapon(CurrentWeapon) + SetStatus(ST_NONE) + hands.PlayIdleAnim() + + MaxHealth = PlayerMaxHealth + HealthDown(0) //zapne zvuk srdca + blikanie baru. potrebe ked prechadzame z levelu do levelu alebo nahravame z autosejvu + OxygenAtmosphere = true + FlashLightVisTimer = 5 //baterka po chvili zhasne + HealthFlashReason = 0 + HealthFlashRate = 1 + ReconSignalFlash = 360 + + ShowHUD(-1, -1, -1, 1, 1, 1, 1, 0, 0, 1 - HackingDisabled) + UpdateHealthBar() + UpdateAmmoBar() + UpdateBulletTimeBar() + UpdateLightBar() + UpdateOxygenBar() + UpdateHackSignalBar() + + FSType = FSPlayer + } + + void ~creature_player() + { + //nemazat playerove zbrane. maze ich mapa! +// ShowHUD(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) +// ShowHackGUI(false) +// HideWeaponSelectGUI() + int n + + for(n = 0; n < sizeof(HUD.WHitZones); n++) + ShowWidget(HUD.WHitZones[n], false) + + g_iFly = 0 + + DestroyRigidBody() + + if(FlashLightBase) + { + delete FlashLightBase + FlashLightBase = NULL + } + + if(Hands) + { + delete Hands + Hands = NULL + } + + if(TrcContact) + { + delete TrcContact + TrcContact = NULL + } + + if(ShapeCast) + { + dShapeCastDestroy(ShapeCast) + delete ShapeCast + } + + if(WeaponSoundPos) + { + delete WeaponSoundPos + WeaponSoundPos = NULL + } + + if(HUD) + { + delete HUD + HUD = NULL + } + } +} + +//----------------------------------------------------------------- + +void creature_player::SwitchBulletTimeMode() +{ + BulletTimeFadeTarget = 1 - BulletTimeFadeTarget + + if(BulletTimeFadeTarget == 1) + { + BulletTimeFadeInSound = PlaySound(this, g_sCommonSounds[17], SF_ONCE) //nabeh + LoopTimeCounter = 0 + + } + else + BulletTimeFadeOutSound = PlaySound(this, g_sCommonSounds[19], SF_ONCE) //dobeh +} \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/player/vssver.scc b/Alpha Prime/Mod/scripts/player/vssver.scc new file mode 100644 index 0000000..14b298a Binary files /dev/null and b/Alpha Prime/Mod/scripts/player/vssver.scc differ diff --git a/Alpha Prime/Mod/scripts/proto.h b/Alpha Prime/Mod/scripts/proto.h new file mode 100644 index 0000000..f9beb71 --- /dev/null +++ b/Alpha Prime/Mod/scripts/proto.h @@ -0,0 +1,2265 @@ +/*===================================================================*/ +/* Enforce script base API */ +/*===================================================================*/ + +typedef int ctype +typedef int bool + +//vraci primo odkaz na interni typ promenne +proto native ctype Type(string var) + +//vytvori neprimo instanci daneho typu (dynamicka varianta k 'new') +proto volatile class Spawn(ctype type) + +//vraci true, pokud ma class mezi predky(nebo on sam) typ 'type' +proto native bool IsInherited(class ent, ctype type); + +//vraci jmeno classu +proto native string ClassName(class ent); +//umoznuje zavolat funkci jejim jmenem. +//pokud ent == NULL, vola se globalni fce, v opacnem pripade fce z classu +//vraci true, pokud fci nalezl a zavolal +//fce se vola jako thread, takze je v ni mozno pouzivat sleep/wait +proto volatile int Call(class ent, string function, void parm) + +//umoznuje nacist obsah promenne podle jejiho jmena. result musi byt stejneho typu! +//ent muze byt == NULL, pokud chceme globalni promennou +//vraci true, pokud byla promenna nalezena a prectena. V opacnem pripade false +proto int GetValue(class ent, string varname,int index,void result); + +//umoznuje zmenit obsah promenne podle jejiho jmena. input musi byt stejneho typu! +proto int SetValue(class ent, string varname,int index,void input); + +//nastavi hodnotu promenne ze stringu. Pokud se povedlo, vraci true +proto int SetVar(void var, string value) + +// strings +//prevede ascii kod na string +proto string tostr(int ascii) +//prevede integer na string +proto string itoa(int number); +//prevede string na integer +proto native int atoi(string str); +//prevede integer na string +proto string ftoa(float number); +//prevede string na float +proto native float atof(string str); +//vyjme ze stringu s len znaku pocinaje znakem from +proto string substr(string s, int from, int len); + +//zmeni vsechny znaky na male. Vraci delku +proto int strlower(string s) +//vraci delku retezce +proto native int strlen(string s); + +//hleda sample v s1. Vraci -1 kdyz nenajde +proto native int strstr(string s1, string sample); + +//hleda sample v s1 + offset. Vraci -1 kdyz nenajde +proto native int strstroff(string s1, int offset, string sample); + +//vraci string s orezanyma uvodnima a vedoucima mezerama +proto string trim(string str) + +//oreze uvodni a vedouci mezery ve stringu str, vraci delku +proto int triminplace(string str) + +//vygeneruje nahodne cislo v rozsahu min - max +proto native int rand(int min, int max); +proto native float frand(float min, float max); + +//znormalizuje uhel (0...360) +proto native float FixAngle(float ang) +proto native float fabs(float a) +proto native int abs(int a) +proto native float sqrt(float val); +proto native float sin(float deg); +proto native float cos(float deg); +proto native float asin(float s); +proto native float acos(float c); +proto native float tan(float deg); +proto native float atan2(float y, float x); +proto native float pow(float v, float power) + +//vraci celociselnou cast (bez zaokrouhlovani) +proto native int floor(float f) + +proto void Sort(void array[], int num) + +//parser +proto int ParseStringEx(string input, string token) +/* + Parses one token fron input string. Result is put into token string, + and type of token is returned. Input string is left-truncated by the + resulting token length. + + types: + 0 - error, no token + 1 - defined token (special characters etc.) + 2 - quoted string. Quotes are removed + 3 - alphabetic string + 4 - number + 5 - end of line +*/ + +proto int ParseString(string input, string tokens[]) + +proto native int KillThread(class owner, string name) +proto volatile void Idle() +proto string ThreadFunction(class owner, string name, int backtrace, int linenumber) //debug + +//vector +string Vector2String(vector v) +{ + string s + + s = "<" + ftoa(v[0]) + "," + s = s + ftoa(v[1]) + "," + s = s + ftoa(v[2]) + ">" + + return s +} + +//jsou i elegantnejsi zpusoby, ale tenhle je nejrychlejsi ;) +string itoal(int num, int len) +{ + const string ZeroPad[8] = {"", "0", "00", "000", "0000", "00000", "000000", "0000000"} + + string str = itoa(num) + + int l = len - strlen(str) + + if(l > 0) + return ZeroPad[l] + str + + return str +} + +//----------------------------------------------------------------- +float DiffAngle(float yaw, float a) +{ + yaw = FixAngle(yaw) + a = FixAngle(a) + + float diff = yaw - a + + if(fabs(diff) > 180) + { + if(yaw < a) + diff = yaw + 360 - a + else + diff = yaw - 360 - a + } + + return diff +} + +/*===================================================================*/ +/* 3D math extension */ +/*===================================================================*/ +proto float VectorNormalize(vector vec); + +proto native float VectorLength(vector vec); +proto native float VectorLengthSq(vector vec); + +proto vector Vector2Angles(vector vec); +proto float Vector2Yaw(vector vec); +proto native vector Yaw2Vector(float yaw) +proto vector VVector2Angles(vector vec); +proto vector Angles2Vector(vector ang); +proto void RollPitchYawMatrix(vector ang, vector mat[3]); +proto void RollPitchYawMatrix2(vector ang, vector mat[3]); +proto void AroundVectorMatrix(vector vec, float degree, vector mat[3]); +proto vector VectorMatrixMultiply4(vector mat[4], vector vec); +proto vector VectorMatrixMultiply3(vector mat[3], vector vec); +proto vector VectorMatrixInvMultiply4(vector mat[4], vector vec); +proto vector VectorMatrixInvMultiply3(vector mat[3], vector vec); +proto void MatrixMultiply4(vector mat0[4], vector mat1[4],vector res[4]); +proto void MatrixMultiply3(vector mat0[3], vector mat1[3],vector res[3]); + +proto native vector RotationVectorTo(vector mat0[3], vector mat1[3]); + +void ScaleMatrix(float scale, vector mat[3]) +{ + vector v0, v1, v2 + v0[0] = scale + v1[1] = scale + v2[2] = scale + mat[0] = v0 + mat[1] = v1 + mat[2] = v2 +} + +proto vector MatrixAngles(vector mat[3]) + +//vytvori jednotkovy quaternion +void QuatIdentity(float q[4]) +{ + q[0] = 0 + q[1] = 0 + q[2] = 0 + q[3] = 1 +} + +//zkopiruje quaternion +void QuatCopy(float s[4], float d[4]) +{ + d[0] = s[0] + d[1] = s[1] + d[2] = s[2] + d[3] = s[3] +} + +proto float QuatToAxisAngle(float q[4], vector axis) + +//prevede matici 3x3 na quaternion +proto void MatrixQuat(vector mat[3], float q[4]) + +//spocita prechod z rotace q1 do rotace q2 podle vahy frac (0...1) +proto void QuatLerp(float out[4], float q1[4], float q2[4], float frac) + +//prevede quaternion na matici 3x3 +proto void QuatMatrix(float q[4], vector mat[3]) + +//vynasobi dva quaterniony. Pozor! neni komutativni! +proto void QuatMultiply(float out[4], float q1[4], float q2[4]) + +//vytvori otoceny quaternion okolo osy axis o uhel angle +proto void QuatRotationAxis(float out[4], vector axis, float angle) + +//vytvori otoceny quaternion o uhly pitch,yaw,roll +proto void QuatRotationRollPitchYaw(float out[4], vector angles) + +proto vector CatmullRom(vector v1, vector v2, vector v3, vector v4, float weight); + +//vraci true, kdyz boundboxy koliduji +int CheckBoundBox(vector mins1, vector maxs1,vector mins2, vector maxs2) +{ + if(mins1[0] > maxs2[0] || mins1[1] > maxs2[1] || mins1[2] > maxs2[2] || maxs1[0] < mins2[0] || maxs1[1] < mins2[1] || maxs1[2] < mins2[2]) + return false + + return true +} + +const vector UpVec = "0 0 1" +const vector ZeroVec = "0 0 0" + +const float M_PI = 3.14159265358979 +const float M_PI2 = 6.28318530717958 + +const float RAD2DEG = 57.2957795130823208768 +const float DEG2RAD = 0.01745329251994329577 + +vector Perpend(vector vec) +{ + return vec * UpVec +} + +float Yaw(vector v) +{ + return v[YAW] +} + +float Roll(vector v) +{ + return v[ROLL] +} + +float Pitch(vector v) +{ + return v[PITCH] +} + +//rychly kontruktor vectoru +proto native vector Vector(float x, float y, float z) + +/*===================================================================*/ +/* Enforce engine API */ +/*===================================================================*/ + +//------------------------------------------ +// ENTITY API +//------------------------------------------ + +class Contact; +class _eclass extends _entity +{ + float TFactor[4] + int Color + + void EOnTouch(class other, int extra) + { + } + void EOnBlock(class other, int extra) + { + } + void EOnGround(class other, int extra) + { + } + void EOnInit(class other, int extra) + { + } + void EOnExtra(class other, int extra) + { + } + + void EOnNotVisible(class other, int extra) + { + } + void EOnFrame(class other, int extra) + { + } + int EOnVisible(class other, int extra) + { + } + void EOnPostFrame(class other, int extra) + { + } + + void EOnWorldProcess(class other, int extra) + { + } + void EOnFlashlight(class other, int extra) + { + } + void EOnLoad(class other, int extra) + { + } + void EOnSave(class other, int extra) + { + } + void EOnTimer(class other, int extra) + { + } + void EOnAnimEnd(class other, int extra) + { + } + void EOnDummy00(class other, int extra) + { + } + void EOnAnimBlend(class other, int extra) + { + } + void EOnDummy01(class other, int extra) + { + } + void EOnDummy02(class other, int extra) + { + } + void EOnSoundEnd(class other, int extra) + { + } + void EOnUser0(class other, int extra) + { + } + void EOnUser1(class other, int extra) + { + } + void EOnUser2(class other, int extra) + { + } + void EOnUser3(class other, int extra) + { + } + void EOnLoaded(class other, int extra) //24 + { + } + void EOnLipsync(class other, int extra) + { + } + void EOnTick(class other, int extra) + { + } + void EOnSimulate(class other, float dt) + { + } + void EOnDummy03(class other, int extra) + { + } + void EOnJointBreak(class other, int extra) + { + } + void EOnPhysicsMove(class other, int extra) + { + } + void EOnContact(class other, Contact extra) + { + } + + proto native vector VectorToParent(vector vec) + proto native vector CoordToParent(vector coord) + proto native vector VectorToLocal(vector vec) + proto native vector CoordToLocal(vector coord) + +//vraci pointer na nadrazenou entitu v hierarchii + proto native class GetParent() +//vraci pointer na prvni child entitu v hierarchii. Dalsi child entity nasledujici jako sibling prvniho childu + proto native class GetChildren() +//vraci pointer na sousedni child entitu v hierarchii + proto native class GetSibling() + + proto native void SetObject(vobject object, string options = "") + proto native vobject GetVObject() + + +//Options jsou konkretni pro jednotlive typy objektu. Zatim jediny to vyuziva XOB pro remapovani +//materialu. +//Syntaxe je nasledovna +//$remap 'puvodni material' 'novy material'; + + proto native bool IsRigidBody() +} + +proto native int UpdateEntity(class ent) +//vraci nastavenou masku, co vse bylo updatovano. +// TFL_UPDATE - byla updatovana hierarchie +// TFL_UPDATE_ORG - byla updatovana pozice +// TFL_UPDATE_MDL - byl updatovan objekt (muze to byt kosteny XOB, na jehoz kostech jsou pivoty a na nich childy) +// TFL_UPDATE_ANG - byla updatovana orientace + +proto native int ClearFlags(class ent, int flag); +proto native vector GetOrigin(class ent); +proto native vector GetAngles(class ent); +proto native int GetFlags(class ent); +proto native int GetGroundFlags(class ent); +proto native class GetNextEntity(class ent, ctype filter); + +proto native void SetWeight(class ent, float weight); +proto native void SetEventMask(class ent, int event); +proto native int ClearEventMask(class ent, int event); +proto native int GetEventMask(class ent); +proto native void SetVelocity(class ent, vector vel); +proto native vector GetVelocity(class ent); + +proto native vector GetAnimLinearMovement(class ent); +proto native vector GetAnimAngularMovement(class ent); + +proto native vector GetMatrix(class ent, int axis); +// precte jeden radek matice. +// index row muze byt v rozsahu 0...3 + +proto void GetMatrix4(class ent, vector mat[]) +// precte aktualni matici entity. Precte jen tolik vektoru, jak velke je pole. +// Je tedy mozne precist jen 3x3 rotacni matici, pokud je vector mat[3] + +//Nastavi flagy (TFL_) entity. Operace je typu OR, tzn. ze flagy neprepisuje, +//ale zapina ty, ktere zapnute nebyly. Vraci puvodni nastaveni +proto native int SetFlags(class ent, int flag); + +//!OBSOLETE! +proto native void SetRenderMode(class ent, int mask); + +//nastavi masku, ve kterych renderview bude entita videt. +proto native int SetRenderViewMask(class ent, int mask); + +proto native void SetAngles(class ent, vector angles); +proto native void SetOrigin(class ent, vector orig); +proto native void SetMatrix(class ent, vector mat[4]); + + +proto native void SetKind(class ent, int kind); +proto native void SetMoveType(class ent, int movetype); +/* OBSOLETE PHYSICS +WALK +FLY +NOCLIP +BOUNCE +MISSILE +PUSH +*/ + +//prida child entitu do hierarchie. Pokud nechceme pouzit definovany pivot, dava se -1 +proto native int AddChild(class parent, class child, int pivot); +proto native void RemoveChild(class ent, class child); +proto native void SetSortBias(class ent, int bias) + +//zjisti rozmery entity. mins/maxs jsou cilove promenne, i kdyz to tak nevypada :-) +proto void GetBoundBox(class ent, vector mins, vector maxs); + +//zjisti skutecny globalni boundbox entity. +proto void GetCBoundBox(class ent, vector mins, vector maxs); + +//zmeni velikost entity. Funguje jen pokud je selectnuty nejaky objekt. +//pri selectnuti jineho objektu se tyto rozmery prepisou a je treba je znovu nastavit. +proto void SetBoundBox(class ent, vector mins, vector maxs); + +//nastavi widget typu WTYPE_RTTEXTURE, na ktery se lze odkazat ze shaderu jako $gui0...$gui3 +//lze pouzit az po selectnuti objektu. Pri selectnuti jineho objektu je treba GUI widget opet nastavit. +proto native void SetGUIWidget(class ent, int index, widget w); + +//nastavi texturu, na kterou se lze odkazat ze shaderu jako $renderview + value +//a propoji ji s kamerou cislo cam_index +//lze pouzit az po selectnuti objektu. Pri selectnuti jineho objektu je treba texturu +//size je velikost textury. Pokud 0, pouzije se 512. Bude taktez +//podlehat nastaveni urovne detailu v settings! +proto native void SetRenderView(class ent, int cam_index, int size); + +//umoznuje vyvolat exception ze skriptu. Parametry jako u EOnXXXX() +proto volatile void Throw(class ent, class actor, int event, int extra); + +/* + Entity flags + +TFL_VISIBLE - bude videt +TFL_SOLID - je nepruchozi +TFL_TRIGGER - je pruchozi, ale vyvolava EV_TOUCH +TFL_DEF - TFL_VISIBLE|TFL_SOLID +TFL_ONGROUND - jen ke cteni, je na zemi +TFL_COLLIDEONLYWORLD - koliduje jen se svetem. Entity ignoruje (jen pro legacy fyziku) + +TFL_TOUCHTRIGGERS - aktivuje triggery + +TFL_AREASPLITTER - pokud je nastaveno, zjistuje se po nahrani mapy, ci jde o oddelovac viditelnosti (dvere apod) +TFL_AREACLOSED - pokud je nastaveno a entita je areasplitterem, rozdeli se visibilita + +TFL_NOBILLBOARD - jen pro sprity - nebude se natacet ke kamere +TFL_NOMPIVOT - jen pro Mesh - je mozno vypnout prenaseni pohybu z animace do fyziky. + +TFL_PARTICLE - mene precizni a velmi rychly link do BSP stromu pro efekty +TFL_FULLMATRIX - sama si nastavuje 4x3 matici. Origin/Angles se ignoruje, nesmi mit fyziku a NESMI byt child jine entity! +TFL_ROTMATRIX - sama si nastavuje 3x3 matici. Angles se ignoruje, muze mit fyziku ale nesmi byt child jine entity + +TFL_USER1 - k volnemu pouziti. Hodi se napriklad pro filtrovani entit pri VisEntities() +TFL_USER2 +TFL_USER6 + +TFL_NOLIGHT - nepocita se svetlo ze sveta +TFL_NOSHADOW - nepocita se stin (stencilovy) + +TFL_DYNAMICBBOX - ma smysl jen v kombinaci s TRACE_BONES. Slouzi k presne detekci kolize pri strileni. +TFL_OBBCOLLISION - nekoliduje AABB boxem, ale orientovanym boxem. Pozor na zmenu uhlu - muze zpusobit zaseknuti entit do sebe! + +TFL_TRANSLUCENT - bude pruchozi pri testovani kolize s TRACE_PASSTRANSLUCENT + +TFL_PATHBLOCK +*/ + +/* + Entity events + + // funkce Exception +// int Exception(int event,MinClass other, int extra) +//event: +//EV_TOUCH - dotkla se entita - other + +//EV_BLOCK - PUSH pohyb byl blokovan (dvere) + +//EV_ONGROUND - dopad na entitu (shora - other na ni stoji) +// extra = surfparms plochy, na ktere stoji + +//EV_VISIBLE - je vybran pro rendering +// other = WorldClass +// extra = cislo snimku +// result = false ma byt renderovan, true nema byt renderovan + +//EV_NOTVISIBLE - nebyl vybran pro rendering +// other = WorldClass +// extra = cislo snimku + +//EV_POSTTHINK - - ||- pote co se s ni pohne +// other = WorldClass + +//EV_BEGINFRAME - jen u entity 'world' +// other = WorldClass +// extra = unikatni cislo snimku + +//EV_ENDFRAME - jen u entity 'world' +// other = WorldClass +// extra = unikatni cislo snimku + +//EV_INIT - zavolana po nahrani celeho levelu +// other = WorldClass + +//EV_ONLOAD - Nahrala se entita ze savemap +// extra = pointer na file + +//EV_ONSAVE - Uklada se entita do savemap +// extra = pointer na file + +//EV_TIMER - volano pro SetTimer kdyz prijde cas... + +//Jen u MeshObject: +//EV_ANIMEND - Konec AF_ONCE animace, extra = cislo slotu 0...11 +//EV_ANIMBLEND - Animace preblendovala z predchozi. extra = cislo slotu 0...11 + +//EV_LOADED - zavolana po nahrani celeho levelu a zavolani EV_INIT na vsech entitach. Jde vpodstate o "druhe kolo" +// other = WorldClass + +//EV_TICK - fixni frekvence 15fps + +//EV_FRAME - kazdy frame, jeste pred fyzikou +// other = WorldClass +// extra = unikatni cislo snimku + +//EV_POSTFRAME - po aplikaci fyziky a update + +//EV_SOUNDEND - skoncilo prehravani SFL_ONCE zvuku +// extra = pointer na sound + +//EV_LIPSYNC + +//EV_USER + +//EV_JOINTBREAK +//EV_PHYSICSMOVE +//EV_CONTACT + +//EV_ALL - vsechny najednou + +*/ + +//------------------------------------------ +// TRIGGERS API +//------------------------------------------ +/* +Trigger musi byt brush entita, neni SOLID, tudiz se skrz nej da prochazet. +(pokud to z nejakeho duvodu nezmenim zavolanim fce SetFlags) +Pokud se do nej dostane entita, je vyvolana udalost EV_TOUCH. Pokud chci +sledovat zda tato entita trigger opustila, zavola se funkce +AddTriggerInsider(this, other), ktera ulozi entitu do interniho seznamu. +Fce vrati false, pokud uz tato entita v seznamu byla. Fce TriggerInsiders +vraci pocet entit uvnitr triggeru. Pokud entita, ktera byla v seznamu +trigger opusti, je vyvolana udalost EV_EXTRA a pointer other ukazuje +na trigger +*/ + +proto native void CreateTrigger(class ent); +proto native void DestroyTrigger(class ent); +proto native int TriggerInsiders(class ent, class insiders[]); +proto native int AddTriggerInsider(class ent,class actor); + +//------------------------------------------ +// TIMER API +//------------------------------------------ + +//umoznuje vyvolat exception 'event' u entity target po uplynuti casu. +//if(once == true) timer se sam vypne. V opacnem pripade jede dokud neni zastaven StopTimer +proto native int SetTimer(class ent, class target, float tim, int event, int extra, int once); +// +proto native int SetTimerFunc(func funct, float tim, int once = true) +//to same, co SetTimer, ale nevyvolava exception, ale funkci. Pokud je pouzit pointer na class metodu, je +//entita majitelem tohoto timeru a po jejim smazani se smaze i timer. Pokud je to pointer na globalni fci, +//je majitelem timeru entita 'world' + +proto native void StopTimer(int timer) +//zrusi timer vytvoreny fci SetTimer/SetTimerFunc + +//------------------------------------------ +// LIGHT API +//------------------------------------------ + +typedef int HLIGHT //handle + +// Light functions +proto HLIGHT AddLight(class owner,int style,int flags,int intens,int radius,vector color); +//flags +//LFL_POINT - bodovy zdroj svetla, siri se vsemi smery +//LFL_SPOT - orientovany zdroj svetla, smer se ridi uhly entity 'owner' +//LFL_DYNAMIC - dynamicky zdroj svetla. Engine je omezen na 512 dynamickych svetel najednou! +// tyto svetla vytvaret jen pro konkretni okamzik a pote okamzite RemoveLight()! +//LFL_CHEAP - hint pro lacinejsi render efektu vybuchu, vystrelu apod +//LFL_TRACE - pro dynamicke svetlo - trasuji se stiny podle prostredi. Pomale, jen pro efekt! +//LFL_SHADOWSOURCE - pro dynamicke svetlo - prednostne se pouziva jako zdroj pro stencil stiny +//LFL_LOOKUP + +proto native bool RemoveLight(HLIGHT light); +proto native bool SetLightEx(HLIGHT light,int intens, int radius, vector color); +proto native bool SetLightTexture(HLIGHT light, string cubemap); + +//nastavi uhel konusu pro LFL_SPOT. Udava se v degrees. Defaultne je nastaveno 90' +proto native bool SetLightCone(HLIGHT light, float cone); + +//------------------------------------------ +// SOUND API +//------------------------------------------ + +//Nahraje zvuk (*.wav, *.ogg) +proto native hsound GetSoundEx(string name, int cache, int flags); +//flags pro GetSound +//SF_3D plne 3D zvuk +//SF_FREQCONTROL umoznuje menit frekvenci +// toto je obzvlaste vhodne pro dialogy a samply v cutscenach obecne: +//SF_STREAM pro velmi dlouhe,melo prehravane zvuky. Zvuk se postupne dotahuje z disku. Idealni pro OGG-Vorbis streamy +// cache - pocet cachovanych sound bufferu. Specialne pro hodne multiplexne prehravane zvuky. Podstatne snizuje zatizeni CPU +// na zvukovem subsystemu. Pocet muze byt 0...nekonecno. Interne je limitovan podle potreby... + +//vyhodi zvuk z pameti +proto native void ReleaseSound(hsound snd) + +proto volatile int PlaySound(class source, hsound sound, int flags); +//flags pro PlaySound +//SF_ONCE - Zvuk se prehraje jen jednou a vyvola EV_SOUNDEND +//SF_AMBIENT - Zvuk neni 3D a nemeni se jeho intenzita podle vzdalenosti (nemel by se kombinovat s SF_3D!!!) +//standardni dosah zvuku - 2048 units +//SF_HALFRANGE Omezeny dosah (1024 units) +//SF_QUARTERRANGE Omezeny dosah (512 units) +//SF_MUSIC Hudba. Plati na nej MusicVolume misto EffectsVolume + +//volume 0...1. Logaritmic scale +proto native int SetSoundVolume(int sound, float volume) +proto native int SetSoundFrequency(int sound, int freq) + + +proto native int GetSoundLength(int sound) +//vraci 0, pokud je soundid nevalidni + +proto native int GetSoundPosition(int sound) +//vraci -1, pokud je soundid nevalidni + +proto volatile void EndSound(int snd); + +//defaultne se pouziva EAX prostredi nadefinovane v mape, ale lze ho prebit touto fci. +// Mohou se michat dve ruzna prostredi v pomeru danem hodnotou fade (fade==0 -> 100% env1, fade==1 -> 100% env2). +//pokud chceme michat aktualni prostredi s nejakym jinym, lze pouzit zastupny nazev "$current". +//Tim lze dosahnout nafadovani vlastniho prostredi, kdyz fci postupne volame napr. takto: +//SetEAXEnvironment("$current", "Drugged", fade) +//pricemz hodnota fade postupne narusta od nuly do jedne +proto native bool SetEAXEnvironment(string env1, string env2, float fade) + + +//------------------------------------------ +// WIDGET API +//------------------------------------------ + +//nahraje UNICODE-XML string table. Na jeji texty se lze odkazovat z widgetu pomoci textu "#id" +proto native int LoadStringTable(string name) + +/* Widgety jsou 2D graficke elementy. Muze to byt: +WTYPE_TEXT - Text +WTYPE_VIEW - Render okno pro mapu +WTYPE_IMAGE - Obrazek +WTYPE_RTTEXTURE +*/ + +proto native widget CreateWidgetEx(widget parent, int type, int left, int top, int width, int height,int flag, int color, int sort); +proto native widget CreateWidget(int type, int left, int top, int width, int height,int flag, int color, int sort); + +//tyto dva flagy se navzajem vylucuji!!! +//WF_BLEND - textura se blenduje s podkladem na zaklade alfy +//WF_ADDITIVE - textura se pricita k podkladu na zaklade alfy + +//WF_SOURCEALPHA - bere alfu z textury * alfu z barvy. Pokud neni nastaveno, povazuje se textura za nepruhlednou +// a pruhlednost urcuje jen barva + +//WF_NOALPHA Plati jen pro WTYPE_RTTEXTURE - rendertarget se nevytvari s alfa-kanalem (50% uspora velikosti!!!) +//WF_VISIBLE Je videt - to same co ShowWidget(w, true) +//WF_NOWRAP Newrapuje texturu kolem dokola +//WF_ZWRITE Zapisuje do Z-Bufferu +//WF_CENTER Centruje WTYPE_TEXT +//WF_VCENTER Vyskove centruje WTYPE_TEXT +//WF_RALIGN Zarovnava zprava WTYPE_TEXT +//WF_EXACTPOS Pouziva fyzicke rozmery obrazu (g_iWidth, h_iHeight) +//WF_EXACTSIZE Pouziva fyzicke rozmery obrazu +//WF_NOFILTER nefiltruje texturu (zadny rozmazavani) +//WF_STRETCH roztahuje texturu na plnou velikost +//WF_FLIPU prevrati texturu v ose U +//WF_FLIPV prevrati texturu v ose V + +//WF_CUSTOMUV ignoruje STRETCH/FLIPU/FLIPV a bere vlastni UV nastavene prez SetWidgetUV() + + +proto native void DestroyWidget(widget w); +proto native void SetWidgetColor(widget w, int argb); +proto native int LoadWidgetImage(widget w, int num, string name); +proto native void ShowWidget(widget w, bool show); + +proto native int PlayVideo(widget w, int cmd) +//VP_PLAY +//VP_STOP +//VP_REWIND +//VP_POSITION +//VP_REPEAT +//VP_ISPLAYING + +proto native void SetWidgetImage(widget w, int num); +proto native void SetWidgetWorld(widget w, int world, int camera); +proto native void SetWidgetPos(widget w, int left, int top, int width, int height) +proto native void SetWidgetUV(widget w, float uv[4][2]) + + +proto native void SetWidgetText(widget w, int line, string text); + +//vlozi text, na pozice #id vlozi stringy ze string-table, a podle fillmode wrapuje text na dalsi radky +//interne pracuje v unicode +proto native int SetWidgetTextEx(widget w, int line, int fillmode, string text) + +proto native void SetWidgetTextColor(widget w, int color) +proto native void SetWidgetTextSpacing(widget w, int horiz, int vert) +proto native void SetWidgetTextOffset(widget w, int left, int top) + +proto native int CreateFont(string name, int nwidth, int nheight) +proto native void SetFont(widget w, int font); + +//------------------------------------------ +// DEBUG SHAPE API +//------------------------------------------ + +class Shape +{ + //don't call destructor directly. Use Destroy() instead + proto private void ~Shape() + + proto native void SetMatrix(vector mat[4]) + proto native void SetColor(int color) + proto native void SetFlags(int flags) + proto native void Destroy() +} + +proto native Shape AddDShape(int type, int color, int flags, vector p1, vector p2) +proto native Shape AddDLines(int color, int flags, vector p[], int num) +proto native Shape AddDTris(int color, int flags, vector p[], int num) +proto native Shape AddDSphere(int color, int flags, vector origin, float radius) +proto native Shape AddDCylinder(int color, int flags, vector origin, float radius, float length) + +//SHAPE_BBOX +//SHAPE_LINE +//SHAPE_DIAMOND + +//Flags: +// SS_NOZBUFFER +// SS_NOZUPDATE +// SS_DOUBLESIDE +// SS_WIREFRAME +// SS_TRANSP +// SS_ONCE +// SS_NOOUTLINE +// SS_NOCULL + +//pro vizualizaci geometrie levelu +proto int Brushes2Shape(int includecont, int includeflags, int excludecont, int excludeflags, Shape array[]) +//vybere ty brushe, ktere maji nastavene flagy 'includecont' a 'includeflags' a nemaji nastavene 'excludecont' a 'excludeflags' +//vyrobene DShape nasype do pole array a vrati jejich pocet. + +//----------------------------------------------------------------- +Shape AddDArrow(vector from, vector to, float size, int color, int flags) +{ + vector dir = to - from + VectorNormalize(dir) + vector dir1 = dir * size + size = size * 0.5 + + vector dir2 = Perpend(dir) * size + + vector pts[5] + pts[0] = from + pts[1] = to + pts[2] = to - dir1 - dir2 + pts[3] = to - dir1 + dir2 + pts[4] = to + + return AddDLines(color, flags, pts, 5) +} + +//----------------------------------------------------------------- +Shape AddDBridgeArrow(vector from, vector to, float size, int color, int flags) +{ + vector dir = to - from + VectorNormalize(dir) + + vector dir1 = Vector(0, 0, -size) + size = size * 0.5 + + vector dir2 = Perpend(dir) * size + + vector pts[7] + pts[0] = from + pts[1] = from + "0 0 32" + pts[2] = to + "0 0 32" + pts[3] = to + pts[4] = to - dir1 - dir2 + pts[5] = to - dir1 + dir2 + pts[6] = to + + return AddDLines(color, flags, pts, 7) +} + +//----------------------------------------------------------------- +void Matrix2Shape(vector mat[4]) +{ + vector org = mat[3] + + AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, org, mat[0] * 16 + org) + AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, org, mat[1] * 16 + org) + AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, org, mat[2] * 16 + org) +} + +//------------------------------------------ +// WORLD API +//------------------------------------------ +proto native float GetWorldTime() + +//LoadMap - nahraje mapu a vraci handle. Mapa musi byt uvolnena fci FreeMap ! +//Fce PlayMap zavolana ve fci update() se proste updatuje o jeden frame a +//vykresli se, pokud je prirazena k nejakemu widgetu typu VIEW +proto volatile int LoadMap(string name, bool physics); +proto volatile int ReloadMap(int map) + +proto int SaveMap(int currentmap, string name); +//kdyz currentmap == NULL, pak nahraje mapu a do nej savegame +//v opacnem pripade vycisti mapu a nahraje do ni ulozena data +proto volatile int LoadSaveMap(int currentmap, string name); +proto volatile void PlayMap(int map); +proto volatile void FreeMap(int map); + +//urcuje ze ktere kamery se bude brat pozice posluchace pro zvukovy engine +proto native void SetListenerCamera(int camera) + +//zmeni pozici kamery pro tuto mapu +proto native void SetCamera(vector origin, vector angle); +//origin - pozice kamery +//angle - uhly kamery + +//zmeni pozici kamery. 0 je hlavni view, 1...7 jsou user view (v shaderu se pak definuji napr. jako 'diffusemap "$renderview1"' apod.) +proto native void SetCameraEx(int cam, vector mat[4]); + +proto native void SetCameraVerticalFOV(int cam, float fovy) +proto native void SetCameraFarPlane(int cam, float farplane) + +//zjisti aktualni pozici/uhly kamery +proto void GetCamera(vector origin, vector angle); +//origin - pozice kamery +//angle - uhly kamery + +proto vector ProjectVector(class ent, vector vec); +proto vector UnprojectVector(float x, float y, vector dir) + +proto native void SetPostEffect(int type, float parm0, float parm1, float parm2, float parm3) +//EFF_NONE +//EFF_UNDERWATER +//EFF_MBLUR + +//name je void proto, ze jde o odkaz na promennou, nikoliv jeji obsah. Vkladane +//jmeno musi byt class member owner._name, aby hashtable mela referenci na spravny string! +proto void AddEntityToHashTable(class ent, void name) +proto native void RemoveEntityFromHashTable(class ent, string name) +proto native class FindEntityInHashTable(string name) + +//------------------------------------------ +// TRACE & VISIBILITY API +//------------------------------------------ + +//nastavi aktualni mapu. Umozni tim pracovat s entitama i mimo obdobi zpracovani mapy (PlayMap, render) +//vraci predchozi aktualni mapu +proto native int SetCurrentMap(int map) + +//kolize a trasovani +class TraceContact extends _serializable +{ + float Fraction; + int Content; + int Surfparm; + + int ShaderFlags; +/* +SHF_CLOTH +SHF_LIQUID +SHF_MIRROR +SHF_NEEDRENDERVIEW +SHF_NEEDGUI +*/ + int Triangle; + int SurfaceID; + string Shader; + float Plane[4]; + vector Point; +} + +proto native bool TraceLineToEntity(class ent, vector start, vector end, TraceContact contact); + +//trasuje primku start->end, vraci 0..1 pokud kolize. do end se uklada posledni pozice +// z ent se zjistuje bbox +//jeste pribydou flagy jako u P2PVisibilityEx +proto float TraceLine(class ent,vector start,vector end, class cent, float plane[4], int content, int surfparm); +//INPUT: +//ent - Entita se kterou se pohybuje po primce +//start - Odkud +//end - Kam +//OUTPUT: +//cent - vraci entitu, se kterou se srazila +//plane - vraci plane polygonu se kterym se srazila (X,Y,Z,D) +//content - obsah prostoru, se kterym se srazila +//surfparm - parametry surfacu, se kterym se srazila +//vysledek - hodnota 0...1, kolik procent drahy urazila + +//bool FilterCallback(class target [, vector rayorigin, vector raydirection]) +proto volatile float TraceLineEx(int kind,vector start,vector end, vector mins, vector maxs, class cent, float plane[4], int content, int surfparm, int flags, func filtercallback); +//navic flagy: +//TRACE_ENTS - testuje i entity +//TRACE_WORLD - testuje world +//TRACE_DETAIL - testuje detailni brushe world geometrie +//TRACE_PATCH - testuje bezier patche world geometrie +//TRACE_WATER - testuje kolize s vodni hladinou +//TRACE_PASSTRANSLUCENT - nebude kolidovat s entitama TFL_TRANSLUCENT +//TRACE_RAGDOLLS - testuje ragdolly +//TRACE_BONES - testuje kolizni obalky kolem kosti animovanych objektu + + +//pomocne globalni fce pri TraceLine(Ex) +// g_iTraceSphere obsahuje zasazenou hitsphere X objektu +// g_iTraceBone obsahuje zasazenou kost X objektu +//g_iTraceBrush +//g_iTraceSurfaceType + + +//zjistuje viditelnost. Vhodnejsi nez P2PVisibility, pokud mame i zdrojovou a cilovou entitu, +//protoze jejich visibility informace test podstatne urychli +proto native int E2EVisibility(class ent1, vector from, class ent2, vector to, int flags) + +//zjistuje viditelnost +proto native int P2PVisibilityEx(vector from, vector to,int flags); +//from - odkud +//to - kam +//flags: +//TRACE_VISTEST - provadi nejprve visibility test. Zbytecne u entit pri EV_VISIBLE -> kamera (zde uz je jistota, ze podle visibility je viditelna) +//TRACE_PATCH - testuje proti krivkam +//TRACE_MESH - testuje proti statickym polygonovym objektum (misc_model) +//TRACE_DETAIL - testuje proti detailnim brushum +//TRACE_ENT - testuje proti brush entitam +//TRACE_NOTRACE - netestuje geometrii (ma smysl ve spojeni s TRACE_VISTEST) +//OUTPUT: +//vysledek - true je videt/false neni videt + +//najde vsechny entity v radiusu. Pomerne dost narocne, jestli to nekdo pouzije na tisice particlu, tak ho zabiju +// update: uz je to 4-5x rychlejsi, ale stejne - pouzivat s rozumem!! +proto int SphereQuery(vector origin, float radius, class visents[], int ents, int fmask) + +//jako TraceLine pro jednu pozici, ale nevyzaduje entitu +// owner je jen pro rozliseni PLAYER-PLAYERCLIP atd... +proto int TestPosition(class owner, vector origin, vector min, vector max, int flags) +//vysledek - true nekoliduje, false koliduje + +proto int TestEntityPos(class ent, int flags) +//vysledek - true nekoliduje, false koliduje + + +//zjisti, jestli je bbox viditelny, podle view-frustum a PVS +proto native bool IsBoxVisible(vector mins, vector maxs, int flags) +//flags & 1 - testuje i PVS + +//vysledek true/false je videt/neni videt + +//najde vsechny viditelne entity (jen nahrubo,podle visibility. Je vhodne po vyberu entit, ktere nas zajima vyzkouset jeste preciznejsi metody viditelnosti) +proto int VisEntities(vector origin, vector look, float angle, float radius, class ents[2], int maxents, int fmask); +//origin - misto ze ktereho se "koukame" +//look - kterym smerem se kouka +//angle - zorny uhel (dava se tak 90). -1 pokud nas zorny uhel nezajima +//ents - pole int, libovolne velikosti +//maxents - velikost pole (zamezeni preteceni pole) +//fmask - maska flagu (SetFlags()). Hledana entita musi mit nastaveny vsechny uvedene flagy +// s vyhodou lze pouzit rezervovane flagy TFL_USER1, TFL_USER2, TFL_USER6 pro rychle +// nalezeni konkretni kategorie entit + +//----------------------------------------------------------------- +vector ClipLine(vector start, vector end, vector norm, float d) +{ + vector vec + float d1, d2 + + d1 = start * norm + d1 = d1 - d + + d2 = end * norm + d2 = d2 - d + + d = d1 - d2 + + if(d1 < 0) + d1 = d1 + 0.1 + else + d1 = d1 - 0.1 + + d = d1 / d + clamp d<0, 1> + + vec = end - start + vec = vec * d + + return vec + start +} + +proto float IntersectRaySphere(vector raybase, vector raycos, vector center, float radius) +proto float IntersectRayBox(vector start, vector end, vector mins, vector maxs) + +//------------------------------------------ +// VISUAL OBJECT API +//------------------------------------------ + +//objects +//flag 0/RF_RELEASE pokud chceme objekt odstranit i z cache +//hodi se pro velike objekty, o kterych se vi, ze uz nebudou potreba - cutsceny apod +proto native vobject GetObject(string name); +proto native void ReleaseObject(vobject object, int flag); +proto native void SelectObject(class ent,vobject object); + +// specialitka, aby se daly delat dynamicky triggery +proto void CreateModel(class ent, vector mins, vector maxs); +proto void RemoveModel(class ent); + +//Dynamic MeshObject +proto vobject CreateXOB(int nsurfaces, int nverts[], int numindices[], string shaders[]) +proto void UpdateVertsEx(class ent, int surf, vector verts[], float uv[]) +proto void UpdateIndices(vobject obj, int surf, int indices[]) + +//Posune animaci (jedno, jestli X, TOB, Sprite...). X+anm ignoruje parametry speed&loop +proto native int BumpFrame(class ent, float speed, int loop); + +proto native void SetBone(class ent, int bone, vector angles, vector trans, float scale); +proto native bool SetBoneMatrix(class ent, int bone, vector mat[4]); +proto native void SetBoneGlobal(class ent, int bone, vector mat[4]); +proto native bool GetBoneMatrix(class ent, int bone, vector mat[4]); + +proto native void SetFrame(class ent, int slot, float frame); + +// pokud je v jakemkoliv API pouzito BoneMask == NULL, bere se, ze jsou nastavene vsechny bity +class BoneMask +{ + int Mask[3] +} + +proto native void SetAnimSlot(class ent, int slot, vobject anim, float blendin, float blendout, BoneMask mask, int fps, int flags) +//Flags +// AF_ONCE: +// animace se prehraje jen jednou, zustane "zamrzla" na poslednim frame a vyvola se EV_ANIMEND +// AF_BLENDOUT: +// defaultne zustava animace pri prehravani a AF_ONCE po skonceni na posledni frame "zamrzla", dokud neni nahrazena jinou, +// nebo neni kanal vynulovan. Pokud se nastavi AF_BLENDOUT, postara se engine o vyhozeni animace sam a pro preblendovani pouzije hodnotu +// blendout. Pokud je odchycen EOnAnimEnd a byla zmenena animace na jinou, nebo byl kanal rucne vynulovan, tak se tato +// funkcnost neprovede. +// AF_USER: +// animace stoji na prvnim frame. Snimek se nastavuje rucne pomoci SetFrame +// AF_RESET: +// vynuti nastaveni animace na zacatek a pripadne blend i v pripade, ze ve slotu uz tato animace bezi. +// AF_FORCEFPS: +// defaultne se bere framerate z anim.def. Pokud tam neni uveden, bere se parametr 'fps'. +// Pomoci tohoto flagu je mozne prednostne pouzit parametr 'fps' i prestoze je framerate uveden v anim.def +// AF_NOANIMEND +// nevyvola se na konci EV_ANIMEND +// AF_NOANIMHOOKS +// nevyvolaji se animhooky + +//jen zmeni masku, a blendne, pokud je nejaky 'blendin' nastaven +proto native void ChangeAnimSlotMask(class ent, int slot, float blendin, BoneMask mask) + +//jen zmeni framerate na hodnotu 'fps' +proto native void ChangeAnimSlotFPS(class ent, int slot, int fps) + +//nastavuje masku prehravanych kanalu. Nastavuji se bity 0..3 (kanalu je 12) +proto native void SetAnimMask(class ent, int mask) + +//clearuje masku prehravanych kanalu. Vraci vyclearovane bity +proto native int ClearAnimMask(class ent, int mask) + +//vrati nastavene bity tech kanalu, ktere maji nastavenou animaci, nejsou na konci +// a pro ktere byla nastavena vstupni maska. +//Je tim mozno se dotazat na stav vice slotu najednou +proto native int IsAnimSlotPlaying(class ent, int mask) +//mask - 16bitu, pro 16 anim slotu. Maximalni hodnota je tedy 0xffff! + +//sets how much this morph affect object +proto native bool SetMorphState(class ent, string morph, float value); +//morph name +//value 0...1 + +//vraci jmeno objektu(animace) +proto string vtoa(vobject vobj); + +//------------------------------------------ +// PARTICLE ENGINE API +//------------------------------------------ +//vraci celkovy pocet aktivnich particles ve vsech emitorech +proto native int GetEffectorParticleCount(class ent) + +//precte jmena nadefinovanych emitoru v particle effectu. +proto int GetEmitors(class ent, string emitors[], int max) +//vraci pocet emitoru, a pole emitors naplni jmeny (do maximalni poctu max) + +//nastavi parametr particle emitoru +//pokud emitor == -1, nastavi tento parametr u vsech emitoru +proto void SetEffectorParm(class ent, int emitor, int parameter, void value) + +//precte parametr particle emitorus +proto void GetEffectorParm(class ent, int emitor, int parameter, void value) + +//zmeni "predchozi pozici effectoru", jinak pri dalsim emitovani particlu dojde +//k linearni interpolaci mezi puvodni a aktualni pozici. Je nutno volat explicitne, +//protoze jinak neni mozno zjistit, jestli je skokova zmena pozice umyslna, nebo jde +//jen o neplynuly pohyb emitoru. +proto native void ResetEffectorPosition(class ent) + +/* +EP_CONEANGLE //(vector R/W) +EP_VELOCITY //(float R/W) +EP_VELOCITY_RND //(float R/W) +EP_AVELOCITY //(float R/W) +EP_SIZE //(float R/W) +EP_STRETCH //(float R/W) +EP_AIR_RESISTANCE //(float R/W) +EP_AIR_RESISTANCE_RND //(float R/W) +EP_GRAVITY_SCALE //(float R/W) +EP_GRAVITY_SCALE_RND //(float R/W) +EP_BIRTH_RATE //(float R/W) +EP_BIRTH_RATE_RND //(float R/W) +EP_LIFETIME //(float R/W) +EP_LIFETIME_RND +EP_EFFECT_TIME //celkovy cas efektoru (float R/W) +EP_CURRENT_TIME //momentalni cas efektoru (float R/W) + +EP_RANDOM_ROT //otacej se nahodnym smerem (bool R/W) +EP_RANDOM_ANGLE //zacinej s nahodnym natocenim (bool R/W) +EP_KILL_OLDEST //po dosazeni max. particles, recykluj nejstarsi (bool R/W) +EP_POINT_SPRITES //pouzivej HW pointsprites (bool R/W) +EP_REPEAT //ma se efektor opakovat po uplynuti casu? (bool R/W) +EP_ACTIVE_PARTICLES //pocet aktivnich particlu (int R) +EP_LIGHTING //nasvetluje se (bool R/W) +EP_KILLBOX //velikost kill shape (vector R/W) +*/ + +//------------------------------------------ +// PHYSICS API +//------------------------------------------ + +//PhysX preliminary API + +typedef int NxShape +typedef int NxJoint + +class ClothDef +{ + float Thickness + float Density + float BendingStiffness + float StretchingStiffness + float DampingCoefficient + float Friction + float Pressure + float CollisionResponseCoefficient + float AttachmentResponseCoefficient + int SolverIterations + int CollisionGroup + int Flags +// NX_CLF_PRESSURE +// NX_CLF_TEARABLE +// NX_CLF_BENDING +// NX_CLF_COLLISION_TWOWAY +// NX_CLF_DAMPING + +} + +proto native bool NxClothCreate(class ent, string surface, ClothDef cdef, bool attach) +proto native void NxClothDestroy(class ent) + +//Actor flags +//NX_AF_DISABLE_COLLISION +//NX_AF_LOCK_COM +//Body flags +//NX_BF_DISABLE_GRAVITY +//NX_BF_KINEMATIC + +proto native void NxApplyExplosion(vector center, float radius, float force) + +proto native bool NxActorCreate(class ent, vector center, int geomtype, bool dynamic, float mass, int actorflags, int bodyflags) + +proto native void NxActorSetFlags(class ent, int flags) +proto native void NxActorClearFlags(class ent, int flags) + +proto native void NxActorSetBodyFlags(class ent, int flags) +proto native void NxActorClearBodyFlags(class ent, int flags) + +//filtering of contact-reports +proto native void NxActorSetGroup(class ent, int group) +proto native int NxActorGetGroup(class ent, int group) +proto native void NxSceneSetActorGroupPairFlags(int group1, int group2, int flags) +//NX_IGNORE_PAIR Disable contact generation for this pair. +//NX_NOTIFY_ON_START_TOUCH Pair callback will be called when the pair starts to be in contact. +//NX_NOTIFY_ON_END_TOUCH + +//filtering of collisions +proto native void NxActorSetCollisionGroup(class ent, int group) +proto native int NxActorGetCollisionGroup(class ent) +proto native void NxSceneSetGroupCollision(int group1, int group2, bool collision) + +proto native void NxActorDestroy(class ent) +proto native NxShape NxShapeCreateBox(class ent, vector mat[], vector sizes, int material, float mass) + +//vytvori mirror object pro PhysX +proto native bool dBodyCreatePhysXShadow(class ent, int group, int flags) +//PSF_KINEMATIC (static otherwise) +//PSF_COLLIDE_CLOTH +//PSF_COLLIDE_RB + +proto native void dBodyDestroyPhysXShadow(class ent) + +//Meqon API +proto float dShapeCastUpdate(class ent, int mode, class clipent, vector point, vector norm) +proto bool dShapeCastCreate(class ent, bool insert) +proto void dShapeCastDestroy(class ent) +proto void dShapeCastSetDir(class ent, vector dir) +proto void dShapeCastAddBox(class ent, vector mat[], vector size) +proto void dShapeCastAddSphere(class ent, vector mat[], float radius) +proto void dShapeCastAddPoint(class ent, vector mat[]) +proto void dShapeCastAddCapsule(class ent, vector mat[], vector axis, float radius) + +proto native void dSetInteractionLayer(int mask1, int mask2, bool enable) + +//TODO: rename to dBodySetInteractionLayer +proto native void dBodyInteractionLayer(class ent, int mask) +proto native int dBodyGetInteractionLayer(class ent) + + +//aktivuje deaktivovany body +proto void dBodyActive(class ent, bool active, bool dynamic) + +proto native bool dBodyIsDynamic(class ent) + +proto native bool dBodyIsActive(class ent) + +//vytvori RigidBody +proto bool dBodyCreate(class ent, vector center, int geom) + +//center je offset z objekt-pivotu do realneho stredu. Bodies musi byt centrovane, jinak maji +// asymetricky teziste + +//Pokud uz ma entita prirazeny objekt, lze pouzit defaultni kontruktor na bodies: +//BC_NONE - zadny +//BC_OBB - Box +//BC_CAPSULE_X - kapsle s delsi X osou +//BC_CAPSULE_Y - kapsle s delsi Y osou +//BC_CAPSULE_Z - kapsle s delsi Z osou +//BC_CONVEX - konvexni tvar - vychazi z brushu, anebo polygonu, anebo proste vyrobi Box +//BC_SPHERE - koule. Polomer vychazi z velikosti objektu v ose X +//BC_MODEL - vychazi z interni geometrie nactene z XML + +//zrusi body +//proto native void dBodyDestroy(class ent) +proto void dBodyDestroy(class ent) + +//priradi rigid body vlastni user-typ +//proto native void dBodyType(class ent, int type) +//proto native void dBodyType(class ent, int type) +proto void dBodyType(class ent, int type) + +typedef int dGeom +typedef int dJoint +typedef int dBlock + +//je mozno vyloucit kolize mezi: +// dBodyCollisionBlock(entity, entity) +proto dBlock dBodyCollisionBlock(class ent1, class ent2) +proto void dBodyRemoveBlock(dBlock block) +proto native void dBodySetInertiaTensor(class body, vector m0, vector m1) +proto native void dBodySetGravity(class ent, vector g) +proto native vector dBodyGetGravity(class ent) + +//vytvori geometricky tvar +proto dGeom dGeomCreateBox(vector size) +proto dGeom dGeomCreateSphere(float radius) +proto dGeom dGeomCreateCapsule(float radius, vector extent) +proto void dGeomDestroy(dGeom geom) +//zmeni velikost geometrie. funguje na: +//sphere: radius +//box: extents +//capsule: extents, radius +proto native void dGeomSetSize(dGeom geom, vector extent, float radius) + +// prida geometrii k body. Libovolny pocet +proto int dBodyAddGeom(class body, dGeom geom, vector trans[4], string mat) + +//nastavi hmotu body +//inertia urcuje setrvacnost angularniho pohybu v osach. Pokud vse osy stejne, chova se jako koule/krychle +proto void dBodySetMass(class ent, vector inertia, float mass) + +proto native float dBodyGetMass(class ent) + +//udeli impuls na bodu ve world souradnicich +proto void dBodyApplyImpulseAt(class body, vector impulse, vector pos) + +//udeli impuls na origin body +proto void dBodyApplyImpulse(class body, vector impulse) + +//pusobi silou na origin +proto void dBodyApplyForce(class body, vector force) + +//pusobi silou na origin +proto void dBodyApplyForceAt(class body, vector pos, vector force) + +//ziska aktualni uhlovou rychlost +proto vector dBodyGetAngularVelocity(class body) +//zmeni uhlovou rychlost +proto void dBodySetAngularVelocity(class body, vector angvel) + +//nastavi cilovou pozici. pokud time == -1, stane se tak behem nasledujiciho snimku. Jinak za cas 'time' +proto native void dBodySetTargetFrame(class body, vector matrix[4], float timeslice, bool dynamics) +proto native float dBodyGetKineticEnergy(class body) + +proto native vector dBodyGetLastVelocity(class body) +proto native float dBodyGetLastKineticEnergy(class body) + +proto native vector dBodyGetVelocityAt(class body, vector globalpos) + +//joint constraints +proto dJoint dJointCreateBall(class body1, class body2, vector point, bool block, float breakthreshold); +proto dJoint dJointCreateFixed(class body1, class body2, vector point, bool block, float breakthreshold); +proto dJoint dJointCreateHinge(class body1, class body2, vector point, vector axis, bool block, float breakthreshold); +proto native dJoint dJointCreateFixedOrientation(class body1, class body2, bool block, float breakthreshold); +proto dJoint dJointCreatePrismatic(class ent1, class ent2, vector point, vector axis, bool block, float breakthreshold); +proto dJoint dJointCreateSliding(class ent1, class ent2, vector point, vector axis, bool block, float breakthreshold); + +//body1 je referencni, nejlepe staticke. body2 je 'animovane' relativne v souradnem systemu body1, 'mat' je lokalni matice +//urcujici pozici body2 +proto dJoint dJointCreateAnim(class body1, class body2, vector mat[4], bool block, float breakthreshold); +proto native void dJointAnimSetMatrix(dJoint joint, vector mat[4]) +proto native void dJointAnimSetLinearMagnitude(dJoint joint, float min, float max) + +//other constraints +proto dJoint dJointCreateAngularLimit(class body1, vector axis1, class body2, vector axis2, float angle, float breakthreshold); +proto dJoint dJointCreateAngularMotor(class body1, class body2, vector axis, float angvel, float torque); +proto native dJoint dJointCreateLinearMotor(class body1, class body2, vector axis, float vel, float force); + +proto dJoint dJointCreateAngularSpringDamper(class body1, vector axis1, class body2, vector axis2, float k, float d, float breakangle); +proto dJoint dJointCreateLinearLimit(class ent1, vector point1, class ent2, vector point2, float maxDist, float breakthreshold); +proto dJoint dJointCreateSpringDamper(class ent1, vector point1, class ent2, vector point2, float k, float d, float len, float breaklength); + +proto native void dJointSetMotor(dJoint motor, float velocity, float force) + +//relevant for +//AngularSpringDamper +//AngularLimit +//Hinge +proto native void dJointSetAxes(dJoint joint, vector axis1, vector axis2) + +//relevant for +//LinearSpringDamper +//LinearLimit +//Fixed +//Ball +proto native void dJointSetPoints(dJoint joint, vector point1, vector point2) + +proto void dJointBreak(dJoint joint) + +//zrusi joint +proto void dJointDestroy(int joint) + +proto native bool dMaterialLoad(string xmlfile) +proto native int dMaterialClone(string target, string source, int material_index) +proto native int dMaterialGetType(string source) +proto native int dMaterialSetType(string source, int material_index) + +proto int dRagdollCreate(class owner, string name, float mass, string material, ctype boneclass, class bones[]) +//vytvori z entity ragdoll. +//owner - entita s X objektem (jine nelze pouzit!) +//name - jmeno ragdoll definice z obj/ragdolls.h +//mass - mass index +//material - definice materialu z obj/materials.xml +//boneclass - class, ktery ma vytvorit pro kazdou kost, pokud je budem chtit +//bones - pole vytvorenych entit pro kazdou kost. Lze s nimi registrovat kolize, pripadne ovladat dynamiku +// prez sadu fci dBodyXXX, pripojovat jointy apod... +// Nesmi se deletovat driv, nez se zrusi ragdoll, nedaji se z nich cist pozice, ani uhly. Od toho je +// GetBoneMatrix pro X objekt +// !!pole musi byt [64], a indexy kosti pro X objekt pak koresponduji s pointery v poli. Nesimulovane +// kosti maji NULL pointer +//fce vraci 0, v pripade neuspechu, nebo pocet kosti + + + +proto void dRagdollDestroy(class owner, bool keepbones = false) +//uklidi i pripadne entity vytvorene pro kosti + +//----------------------------------------------------------------- +class Contact +{ + const int Pointer //internal pointer + + int Flags1 //surfparms lokalniho materialu + int Flags2 //surfparms druheho materialu + vector Normal + vector Position + + proto native float GetFrictionMagnitude() + proto native vector GetFrictionDirection() + + proto native vector GetNormalImpulse() + proto native vector GetFrictionImpulse() + + proto native float GetRelativeVelocityBefore(vector vel) + proto native float GetRelativeVelocityAfter(vector vel) + proto native vector GetRelativeTangentialVelocityBefore() + proto native vector GetRelativeTangentialVelocityAfter() +} + +class Constraint +{ + proto private void ~Constraint() + + proto native void setBody1(class body) + proto native class getBody1() + proto native void setBody2(class body) + proto native class getBody2() + + proto native void setAxis1(vector axis) + proto native vector getAxis1() + proto native void setAxis2(vector axis) + proto native vector getAxis2() + + proto native void setConstraintError(float error) + proto native float getConstraintError() + proto native void setMagnitude(float magnitude) + proto native float getMagnitude() + proto native void setMaximumMagnitude(float magnitude) + proto native float getMaximumMagnitude() + proto native void setMinimumMagnitude(float magnitude) + proto native float getMinimumMagnitude() + proto native void setTarget(float target) + proto native float getTarget() + + //only point&contact constraint + proto native void setAxis(vector axis) + proto native vector getAxis() + proto native void setPoint(vector point) + proto native vector getPoint() + + //only contact constraint + proto native float getStaticFriction() + proto native void setStaticFriction(float staticFriction) + proto native float getDynamicFriction() + proto native void setDynamicFriction(float dynamicFriction) + proto native float getRestitution() + proto native void setRestitution(float restitution) + proto native float getFrictionMagnitude() + proto native vector getFrictionDirection() + proto native void setFrictionDirection(vector frictionDirection) + proto native void setFrictionMagnitude(float frictionMagnitude) + proto native void setRelativeSurfaceVelocity(vector relativeSurfaceVelocity) + proto native vector getRelativeSurfaceVelocity() + + proto native void destroy() +} + +proto native Constraint dConstraintCreatePoint() +proto native Constraint dConstraintCreateLinear() +proto native Constraint dConstraintCreateAngular() +proto native Constraint dConstraintCreateContact() + +proto native bool dConstraintInsert(Constraint c) + +proto void VerletStep(vector npos[], vector opos[], vector force[], float imass[], float tstep, int num) +proto float StickConstraints(int sticks[][2], vector npos[], float length[], float lengthsq[], float imass[], int num) + +//---------------------------------------------- +// PATHENGINE API +//---------------------------------------------- + +class CPosition extends _serializable +{ + int x, y, cell + int group + + bool IsValid() + { + if(cell == -1) + return false + + return true + } + + bool IsEqual(CPosition pos) + { + if(cell != pos.cell) + return false + + return true + } + + CPosition Invalidate() + { + cell = -1 + return this + } + + void CPosition() + { + cell = -1 + } +} + +class CPath +{ + proto private void ~CPath() + proto private void CPath() + + proto native void Destroy() + proto native int Size() + proto native vector Position(int index) + proto native float Length() + proto native class Connection(int index) +} + +class CAgent +{ + proto private void ~CAgent() + proto private void CAgent() + + proto native void Destroy() + + //pokud cost >=0, stane se agent soft-obstacle, a muze byt prekonan. + proto native void SetTraverseCost(float cost) + proto native float GetTraverseCost() + + //muze vratit false, pokud pro jeho rozmer neni predpocitany zadny navigacni mesh + proto native bool CanPathfind() + + proto native class GetOwner() + proto native void SetOwner(class owner) +} + +class PathFinder +{ + proto private void ~PathFinder() + proto private void PathFinder() + + //agent is NULL or agent to update + proto native CAgent AgentFromOBB(CAgent agent, vector matrix[], vector mins, vector maxs, float traversecost = -1) + proto native CAgent AgentFromID(CAgent agent, vector pos, int id, float traversecost = -1) + + //posune agenta na novou pozici. Muze vratit false, pokud by se Agent dostal mimo groupu. + proto native bool MoveAgent(CAgent agent, vector pos) + + //posune agenta na novou pozici. Muze vratit false, pokud by se Agent dostal mimo groupu. + proto native bool UpdateAgent(CAgent agent, vector matrix[], vector mins, vector maxs) + + // + proto native bool FindClosestPosition(int shape, CPosition pos, CPosition cp, float maxdist) + proto native bool PositionForPoint(vector pos, CPosition cp) + + proto native vector PointForPosition(CPosition cp) + + //vyhleda trasu z bodu 'from' do bodu 'to' + //vraci pointer na CPath, nebo NULL, pokud trasu nenasel + //flags: + // 1 - nepouzivej offmesh connections! + // 2 - nelimituj prostor pro hledani trasy + proto native CPath FindShortestPath(int shape, CPosition from, CPosition to, int flags) + + //otestuje primku mezi body na kolize. + //vraci true, pokud ke kolizi nedoslo + proto native bool TestLineCollision(int shape, CPosition from, CPosition to) + + proto native int GetPortalNames(string names[], int size) + proto native void SwitchPortal(string names, int state) + + proto native int AddConnection(class ent, CPosition p0, CPosition p1) + + //Finds waypoints in radius and fill pointers into ents array up to arraysize. + //returns number of waypoints + proto native int FindWaypoints(CPosition from, float radius, class ents[], int arraysize) + + //returns node id of linked waypoint, or 0 if position is wrong + proto native int LinkWaypoint(class ent, CPosition cpos) + + //removing waypoint. Returns true if there exists ent on node id + proto native bool UnlinkWaypoint(class ent, int node) + + proto native void LoadEntities() + + //shapes - bitmask of shapes we want to preprocess for + proto native void Complete(int shapes) + + //prida do seznamu novy tvar. Pro tyto tvary bude proveden preprocessing, takze by jich melo byt + //co nejmene na jednu mapu!!! + proto native bool SetShape(int id, int pnts[], int nump) + + //returns true, if shape is is obstructed on this position + proto native bool TestPointCollision(int id, CPosition pos) + + //vraci posledni chybu pri hledani trasy (FindShortestPath) + proto native int GetLastError() +} + +bool IsConnected(CPosition p0, CPosition p1) +{ + if(p0 == NULL || p1 == NULL || p0.group != p1.group) + return false + + return true +} + +//---------------------------------------------- + +//nahraje novou navigacni mapu do worldu. Pokud uz nejaka byla, tak ji nahradi. +//Mazat se nemusi - odstrani se spolu s worldem +proto native PathFinder NAVLoad(string name) + + +//---------------------------------------------- +// FILES API +//---------------------------------------------- +typedef int tparse + +proto native tparse BeginParse(string filename); +proto int ParseLine(tparse tp, int num, string tokens[]) +proto native void EndParse(tparse file); + +proto int OpenFileName(string path, string file, string filtername, string filter) + +//ziska kompletni systemovou trasu k souboru (pokud to neni ze ZIPu) +proto string GetFilePath(string name) + +//ziska lokalni jmeno souboru. Tj. odrizne trasu k filesystemu +proto string GetRelativeFilePath(string name) + +//otevre soubor +proto int OpenFile(string name, int mode); +//name - jmeno souboru +//mode - FILEMODE_WRITE,FILEMODE_READ +//vysledek - handle souboru + +proto int ReadFile(int file, void array, int length) + +//zavre soubor +proto void CloseFile(int file); +//file - handle souboru + +//vypise do souboru hodnotu promenne +proto void FPrint(int file,void var); +//vypise do souboru hodnotu promenne a odradkuje +proto void FPrintln(int file,void var); +//nacte radek ze souboru. +proto int FGets(int file,string var); +//vysledek - pocet nactenych znaku, nebo -1 kdyz uz neni co cist + +//spusti editor nadefinovany v registrech. +proto native void Edit(string name, int line); +//name - soubor urceny k editaci +//line - na jakou radku ma skocit + + +//---------------------------------------------- +// MISCELANEOUS API +//---------------------------------------------- + +typedef int hshader +typedef int Decal + +//find&load shader +proto hshader GetShader(string name) +proto void ReleaseShader(hshader shader) + +proto int LockTexture(string texture, int ptr[], int x, int y, int pitch) +proto void UnlockTexture(int tex) + +proto native Decal CreateDecal(class ent, vector origin, vector project, float nearclip, float angle, float size, int shader, float lifetime, int flags) + +proto native void DecalParms(Decal decal, float alpha, float fadetime) + +//kdyz lifetime=0, tak vraci fce pointer na decal, ktery muze byt pote odstranen prez RemoveDecal +//lifetime je v sekudach +proto native void RemoveDecal(Decal decal) + +class OcclusionQuery +{ + proto private void ~OcclusionQuery() + + //vraci vysledek Query + proto native int GetResult() + +// -1 vysledek jeste neni k dispozici. Zkus to o frame pozdeji +// >0 bod je videt +// ==0 bod je neviditelny + + proto native void SetPosition(vector pos) + proto native void Destroy() + +} + +//zjisti perpixel visibilitu z GPU. Pozice je ve world souradnicich. +//Size je velikost testovaneho bodu. Testuje se rovnostrannym trojuhelnikem o hrane delky size. +//vraci class, ktery muze byt nasledne dotazovan +proto native OcclusionQuery CreateOcclusionQuery(vector pos, float size) + +//performance counter +proto native int TickCount(int prev) + +proto void CalcTrailVertsPositions(vector BezierPoints[], int NumBezierPoints, int SegNum, float TrailLength, float radius, vector ResultVerts[]) + + +//zjisti stav klavesy (viz. soubor keys.h) +proto int KeyState(int key); +//key - kod klavesy + +//"shodi" klavesu.Zamezi se tim "autorepeatu". Klavesa muze byt Set az pote, co je uvolnena a opet stisknuta +proto void ClearKey(int key); +//key - kod klavesy + +proto int CompileAnims(string name) + +proto native void Repaint() +proto native void ResetRender(int width, int height) + +//Vypise obsah promenne do konzole. +proto void Print(void var); + +//Vypise obsah stacku do konzole +proto void DumpStack(); + +//slouzi k vypisovani kritickych chyb, ktere maji byt +//vice zviditelnene (specialni log, popup okno, listbox apod) +proto void DPrint(string var); + +proto int CreateBezierEx(vector array[], int numpoints); +proto int UpdateBezier(int bezier, vector array[], int numpoints); +proto int RemoveBezier(int bezier); + +//vrati pozici na krivce, rozsah vzdalenosti 0 - 1 +proto vector GetPositionBezier(int bezier, float dist); +//vrati nejblizsi pozici na krivce +proto float GetNearestPositionBezier(int bezier, vector pos); +proto float GetLengthBezier(int bezier); + +#ifdef _XBOX +string GetDateTime() +{ + return "2004/01/01 12:00:00" +} + +#else + +proto void "kernel32.dll" GetLocalTime(int ptr[]) + +string GetDateTime() +{ + int datetime[4] + GetLocalTime(datetime) + + string dtime = itoa(datetime[0] & 0xffff) + "/" //year + dtime += itoal(datetime[0] >> 16 & 0xffff, 2) + "/" //month + dtime += itoal(datetime[1] >> 16 & 0xffff, 2) + " " //day + dtime += itoal(datetime[2] & 0xffff, 2) + ":" //hour + dtime += itoal(datetime[2] >> 16 & 0xffff, 2) + ":" //minute + dtime += itoal(datetime[3] & 0xffff, 2) //second + return dtime +} +#endif + +proto int QueryBrushes(vector origin, vector min, vector max, int brush[], int fmask, int ctmask) +proto int GetBrushFaces(int brush, float face[][4]) + +proto void ReleaseEffect(int effect) +proto int PlayEffect(int effect) +proto int GetEffect(string name) + +proto int ClipPoly(vector in[], int num, vector out1[], int num1, vector out2[], int num2, float plane[4]) +proto int PolyToTriangles(vector in[], int num, vector out1[]) + +string String(string s) +{ + return s +} + +//----------------------------------------------------------------- +float CorrectAngle(float yaw, float a, float speed) +{ + yaw = FixAngle(yaw) + a = FixAngle(a) + + if(fabs(a - yaw) > 180) + { + if(yaw < a) + yaw = yaw + 360 + else + yaw = yaw - 360 + } + + if(yaw < a) + { + yaw = ftime * speed + yaw + if(yaw > a) + yaw = a + } + else + { + yaw = ftime * -speed + yaw + if(yaw < a) + yaw = a + } + + + return FixAngle(yaw) +} + +//----------------------------------------------------------------- +// Fce na podporu ingame skriptu +// preparsuje skript a nahradi parametry. +proto string PrepareScript(string script, string parms, string parmnames[], int parmlengths[], int numparms) +//script - zdrojovy kod +//parms - parametry volani, oddelene carkama +//parmnames - pole se jmeny parametru +//parmlengths - pole s delkami jmen parametru +//numparms - pocet parametru + +//================================================================================= +int VectortoRGBA( vector vec, float h) +{ +float x,y,z +int r,g,b,a,rgba + + x = vec[0] + y = vec[1] + z = vec[2] + + x = x * 127.0 + 128.0 + y = y * 127.0 + 128.0 + z = z * 127.0 + 128.0 + h = h * 255.0 + + a = (int)h << 24 + r = (int)x << 16 + g = (int)y << 8 + b = z + + return r | g | b | a +} + + +//----------------------------------------------------------------- +int ARGB(int a, int r, int g, int b) +{ + a = a << 24 + r = r << 16 + g = g << 8 + return a | r | g | b +} + +//----------------------------------------------------------------- +int ARGBF(float fa, float fr, float fg, float fb) +{ + int a = fa << 24 + int r = fr << 16 + int g = fg << 8 + return a | r | g | fb +} + +//----------------------------------------------------------------- +int AWHITE(int a) +{ + return a << 24 | 0xffffff +} + +//----------------------------------------------------------------- +int LerpARGB(int c1, int c2) +{ + int cb1, cb2 + const int cmask = 0x00ff00ff + + cb1 = c1 >> 8 & cmask + cb2 = c2 >> 8 & cmask + cb1 = cb1 + cb2 >> 1 + + c1 = c1 & cmask + c2 = c2 & cmask + c1 = c1 + c2 >> 1 + + return cb1 << 8 | c1 +} + +void SetMatrixEx(class ent, vector angs, vector pos) +{ + vector mat[4] + + RollPitchYawMatrix2(angs, mat) + mat[3] = pos + SetMatrix(ent, mat) +} + +proto native void Error2(string title, string err) + +void Error(string err) +{ + Error2("", err) +} + +//for editor and console commands only!! +proto native void UpdateCubeMap(class owner, int size, string name) +proto bool "kernel32.dll" DeleteFileA(string s) +proto bool "kernel32.dll" MoveFileA(string source, string target) + +#ifdef DEVELOPER + +proto int "kernel32.dll" GetTickCount() +proto int "user32.dll" ShowCursor(bool show) +proto int "user32.dll" CreatePopupMenu() +proto int "user32.dll" AppendMenuA(int menu, int flags, int item, string text) +proto int "user32.dll" InsertMenuItemA(int menu, int pos, bool bypos, int info[]) +proto int "user32.dll" TrackPopupMenu(int menu, int flags, int x, int y, int res, int wnd, int rect) +proto int "user32.dll" DestroyMenu(int menu) +proto int "user32.dll" GetActiveWindow() +proto int "user32.dll" SetMenuDefaultItem(int menu, int item, bool bypos) +proto int "user32.dll" SetMenuItemInfoA(int menu, int item, bool bypos, int info[]) +proto int "user32.dll" ClientToScreen( int hwnd, int point[2]) +proto int "user32.dll" SetCursorPos(int x, int y) +proto void "kernel32.dll" CopyFileA(string existing, string newfile, bool nooverwrite) +proto int "kernel32.dll" GetFileAttributesA(string file) +proto int "user32.dll" MessageBoxA(int wnd, string text, string caption, int style) +proto int "kernel32.dll" GetComputerNameA(string s, int l[]) +proto int "user32.dll" GetAsyncKeyState(int key) +proto int "kernel32.dll" CreateDirectoryA(string path, int SecurityAttributes) + + +//just for cutscene export +proto native bool OpenVideoStream() +proto native void CloseVideoStream() +proto native void AppendVideoFrame() +proto native void MakeScreenshot(string name) +// + +proto native void ResetCursor() +proto native void ResetInputDevice() + +void SetMousePos(int x, int y) +{ + int point[2] + + point[0] = x + point[1] = y + + ClientToScreen(GetActiveWindow(), point) + SetCursorPos(point[0], point[1]) +} + +proto int ListBox(string values[], int numvals, int def, string title) + +class number +{ + int text +} + +class Str +{ + string text + + int s(string s) + { + text = s + + number n = this + return n.text + } +} + +//----------------------------------------------------------------- +bool Bool(int num) +{ + if(num == 0) + return false + + return true +} + +//----------------------------------------------------------------- +class UIMenu extends _eclass +{ + int Handle + + int info[12] + int ItemID[512] + int NumItems + + Str str2int + +//----------------------------------------------------------------- + void SetCheckItem(int id, bool check) + { + for(int n = 0; n < NumItems; n++) + { + if(ItemID[n] == id) + { + info[1] = 0x00000001 //fMask + info[3] = check << 3//fState + + SetMenuItemInfoA(Handle, n, true, info) + return + } + } + } + +//----------------------------------------------------------------- + int AddTextItem(string text, int id) + { + ItemID[NumItems] = id + info[1] = 0x00000142 //fMask + info[2] = 0 + info[4] = id //wID + info[9] = str2int.s(text) //dwTypeData + info[10] = strlen(text) //cch + + InsertMenuItemA(Handle, NumItems, true, info) + + NumItems++ + + return NumItems - 1 + } + +//----------------------------------------------------------------- + int AddSeparator() + { + info[1] = 0x00000100 //fMask + info[2] = 0x00000800 //fType + + InsertMenuItemA(Handle, NumItems, true, info) + + NumItems++ + + return NumItems - 1 + } + +//----------------------------------------------------------------- + int AddSubMenu(UIMenu child, string text) + { + info[1] = 0x00000046 //fMask + info[2] = 0x00000000 //fType + info[5] = child.Handle + info[9] = str2int.s(text) //dwTypeData + info[10] = strlen(text) //cch + + InsertMenuItemA(Handle, NumItems, true, info) + + NumItems++ + + return NumItems - 1 + } + +//----------------------------------------------------------------- + int AddCheckItem(string text, int id) + { + ItemID[NumItems] = id + info[1] = 0x0000014a //fMask + info[2] = 0 + info[4] = id //wID + info[9] = str2int.s(text) //dwTypeData + info[10] = strlen(text) //cch + + InsertMenuItemA(Handle, NumItems, true, info) + + NumItems++ + + return NumItems - 1 + } + +//----------------------------------------------------------------- + void TPopup(int X, int Y) + { + ShowCursor(true) + Sleep(10) + + TrackPopupMenu(Handle, 0, X, Y, 0, GetActiveWindow(), 0) + } + +//----------------------------------------------------------------- + void Popup(int X, int Y) + { + thread TPopup(X, Y) + } + +//----------------------------------------------------------------- + int IPopup(int X, int Y) + { + ShowCursor(true) + return TrackPopupMenu(Handle, 0x0100, X, Y, 0, GetActiveWindow(), 0) + } + +//----------------------------------------------------------------- + void UIMenu() + { + info[0] = 48 + + Handle = CreatePopupMenu() + str2int = new Str + } + + void ~UIMenu() + { + delete str2int + DestroyMenu(Handle) + } +} + +#endif + + + + + +/* +//globalni promenne, nastavene enginem + +float ftime - --||-- ve vterinach +int MouseDeltaX - relativni X souradnice od posledniho frame +int MouseDeltaY - relativni Y souradnice od posledniho frame +int LMB - Stav leveho tlacitka mysi (true/false) +int MMB - Stav stredniho tlacitka mysi (true/false) +int RMB - Stav praveho tlacitka mysi (true/false) +int MouseWheel - delta kolecka +/- hodnota v krocich +int time - cas od posledniho frame v setinach vteriny + +g_lod +g_bump +g_env + +g_iFullscreen +g_iWidth +g_iHeight +g_iDepth +g_iZBuffDepth +g_iTexDepth +g_iMipBias +g_iTriFilter +g_iTriBuffer +g_iDither +g_iVSync + +g_iCastShadow +g_iDetailMap +g_iGeomDetail +g_iShadow +g_iBrightness +g_iDisablePhysics + +g_iStats (bool) zapina HUD se statistikama +g_iWire (bool) zapina wireframe zobrazeni +g_iDepthComplex (bool) zapina zobrazeni prekresleni + +g_fov horizontalni uhel zobrazeni. Pocita se polovina, takze 30 odpovida FOV 60' +g_fovy vertikalni uhel. Defaultne se bere 4/3 aspekt. Toto je jen pro upravu orezovych planes. +g_fVisDist (units) max. distance orezovy plane. +g_vMainMatrix2 (float[4][4]) transformacni matice pro cube-envmapping +g_iViewFrame (int) unikatni cislo frejmu +g_iIsOutdoor (bool) jsme v otevrenem prostranstvi (je na dohled obloha) +g_vSunDirection +g_vSunColor +g_fSunIntensity + +g_fDecalAlpha +g_iDecalFrame + +JoyAxis +JoyRAxis +JoySliders +JoyButtons +JoyPOV + +g_fDopplerFactor +g_iMusicVolume +g_iEffectsVolume +g_iSoundQuality +g_iSpeakers +g_bEAX +g_iShowPhysics + +g_iShowAABB (int) 0-3 zobrazi bound-boxy entit. 1 jen X, 2 i TOBy, 3 vsechno +g_iShowFilter (int) maskuje renderovane fejsy. Defaultne 7. 1 - ,2 - , 4 - +g_iStatNumTriangles +g_iStatNumVertexes +g_iStatNumParticles +g_iStatFPS + +_depth (float) depth bias pro decals. Defaultne 0.05 +*/ + diff --git a/Alpha Prime/Mod/scripts/pviewer.h b/Alpha Prime/Mod/scripts/pviewer.h new file mode 100644 index 0000000..6070bc3 --- /dev/null +++ b/Alpha Prime/Mod/scripts/pviewer.h @@ -0,0 +1,87 @@ +widget WPStat + //================================================================================= +int LoadStaticObject(string file) //pokus. nahrajeme aj nejaky objekt okolo toho particloveho aby bolo vidiet velkosti +{ + if(World.ViewerClass) + { + viewer ViewerPtr = World.ViewerClass + ViewerPtr.LoadOtherStaticObject(file) + } + return true +} + +//================================================================================= +void PViewerUpdate() +{ + SetWidgetText(WPStat, 0, String("Particles: " + itoal(g_iStatNumParticles, 6))) + UpdateStatKeys() +} + +//================================================================================= +int PViewer(string name) +{ + CMinClass = Type("MinClass") + CExtClass = Type("ExtClass") + + LargeFont = CreateFontEx("font_large") + SmallFont = CreateFontEx("font_small") + MainFont = CreateFontEx("font_main") + +// WView = CreateWidget(WTYPE_VIEW, 0, 0, 1024, 600, WF_VISIBLE, 0, 0) + WPStat = CreateWidget(WTYPE_TEXT, 230, 20, 200, 20, WF_VISIBLE, 0xffffffff, 1) + gOBJType = 2 + return true +} +/* +//================================================================================= +void PViewerRefresh() //je tu uz iba koli prezeraniu z +{ + if(ViewerClass) + { + viewer CommonViewer = ViewerClass + SelectObject(CommonViewer, VNULL) + + if(CommonViewer.PObject) + ReleaseObject(CommonViewer.PObject, true) + + CommonViewer.PObject = GetObject("particle_temp.ptc") + SelectObject(CommonViewer, CommonViewer.PObject) + } +} +*/ +int PViewerInit() +{ + r_texfilter = 2 + r_maxaniso = 16 + g_iGeomDetail = 2 + g_iBrightness = 50 + g_iEffectsVolume = 60 + g_iMusicVolume = 60 + g_iSoundQuality = 1 + r_shadow = 1 + + g_iFullscreen = 0 + g_iDither = 0 + g_iSpeakers = 4 + g_bEAX = 0 + + +// g_iWidth = 640 +// g_iHeight = 480 +// g_iHeight -= 20 + + g_lod = 0.21 + + g_iFly = false + + //Sound + g_fDopplerFactor = 1.5 + + return true +} + + +_eclass GetVieverPtr() //GUI editor z toho ziskava pointer +{ + return World.ViewerClass +} \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/script.c b/Alpha Prime/Mod/scripts/script.c new file mode 100644 index 0000000..1fd06f6 --- /dev/null +++ b/Alpha Prime/Mod/scripts/script.c @@ -0,0 +1,5549 @@ +//prototypes +#include "scripts/proto.h" +#include "scripts/definitions/globals.h" + +bool r_bloom = false +float r_gbias = -0.01 //gamma texture bias +float r_blurscale = 0.614 //bloom image scale +float r_imgscale = 0.814 //original image scale +float r_gauss = 0.404 //gaussian blur scale + +#include "scripts/soundset.h" +#include "scripts/definitions/sounds.h" +#include "scripts/definitions/keys.h" +#include "scripts/definitions/items.h" +#include "scripts/definitions/strings.h" +#include "scripts/definitions/shoteffects.h" + +#include "scripts/shaders.h" + +#include "scripts/animset.h" +#include "scripts/definitions/anim.h" +#include "scripts/definitions/gameplay.h" + +bool g_bShowAI +bool g_bDoShowAI +bool g_bFreezeAI + +float g_FlySpeed + +#ifdef DEVELOPER + bool g_bDebugFSM + string ComputerName +#else + string ComputerName = "fido" +#endif + +float g_FPS + +//superclasses +#include "scripts/hud.h" +#include "scripts/super.h" +#include "scripts/music_player.h" +#include "scripts/definitions/animset.h" +#include "scripts/definitions/speechset.h" +#include "scripts/func_display.h" + +#include "scripts/class_particle.h" // must be here, for footsteps in super_actor +#include "scripts/super_actor.h" +#include "scripts/super2.h" + +int g_iVMode = -1 + +float Flash = 0 + +hsound MenuMusic +int MenuMusicID + +hsound GameOverSnd +int GameOverSound + +int globalmap +int MenuMap +bool g_bEndLevel +bool g_bStartLevel +int g_EndStatus +bool g_EscKey +bool g_RunMode +bool g_FirstRun +bool g_FromSavePos +bool g_bRMap = false +bool g_bImmortal +bool g_Joypad +int g_iMInGame +bool DebugLevel + +widget EndGameMessage +float EndGameMessageLeft +float EndGameMessageTop +float EndGameMessageHeight +float EndGameMessageWidth +bool NeedAutosave +int g_SaveSelected + +const int RUNMODE_DEVELOPER = 0 //mapa bola spustena sposobom Loader.exe NazovMapy (develop ucely) +const int RUNMODE_NORMAL = 1 //normalna hra cez NewGame, ContinueGame alebo po LoadGame +const int RUNMODE_TUTORIAL = 2 //bezi mapa ktora je tutorial + +const int DIFFICULTY_EASY = 0 +const int DIFFICULTY_NORMAL = 1 +const int DIFFICULTY_HARD = 2 +int g_DifficultySelected + + +string g_sNextLevel, g_sThisLevel +int g_iNumLevels = 12 +const string g_sLevelNames[14] = {"l0i", "l00", "l01", "l02", "l03", + "l04", "l05", "l06", "l07", "l08", + "l09", "l10", "finale"} + +widget g_IMBackground +widget g_wBackground, g_wProgress, g_wBlack, g_wLoading, g_wGameOver1, g_wGameOver2 +widget g_StartScreen, g_StartVideo +widget g_DemoEndVideo +hsound g_VideoSnd +int g_VideoSound + +string ActButton + +vector g_vPlayerPos +vector g_vPlayerAngs + +vector EarthquakeOff, EarthquakeAng +float ETime, ETime2, ETimeMax, ESpeed, EPower, EFadeInTime, EFadeOutTime, EPriority +string g_FromConsoleCall + +int NOISE_NOSHOT_MASK + +//=============== FIXME no optional place for this =============================== +bool HealthFlicker +float HealthBarAlpha +float HFSpeed + + +//----------------------------------------------------------------- +#ifdef _XBOX +int GetTickCount() +{ + return 0 +} +#endif + +const int SAVETYPE_NONE = 0 +const int SAVETYPE_EMPTY = 1 +const int SAVETYPE_AUTO = 2 +const int SAVETYPE_NORMAL = 3 +const int SAVETYPE_QUICK = 4 + +string SaveFileNames[64] +string SaveMapsNames[64] +string SaveMapsTimes[64] +int SaveTypes[64] +int SaveIdent + +//----------------------------------------------------------------- +int GetNewtestSaveSlot(int slot1, int slot2) +{ + string tokens1[32] + string tokens2[32] + int NumTok = ParseString(SaveMapsTimes[slot1], tokens1) + ParseString(SaveMapsTimes[slot2], tokens2) + + for(int n = 0; n < NumTok; n++) + { + if(tokens1[n] == "/" || tokens1[n] == ":") + continue + + int num1 = atoi(tokens1[n]) + int num2 = atoi(tokens2[n]) + + if(num1 == num2) + continue + + if(num1 > num2) + return slot1 + + return slot2 + } + return slot2 +} + +//----------------------------------------------------------------- +int GetLastSavedSlot() //podla datumu +{ + int BestTimeSlot = -1 + for(int n = 0; n < sizeof(SaveTypes); n++) + { + if(SaveTypes[n] > SAVETYPE_EMPTY) + { + if(BestTimeSlot == -1) + BestTimeSlot = n + else + BestTimeSlot = GetNewtestSaveSlot(n, BestTimeSlot) + } + } + return BestTimeSlot +} + +//----------------------------------------------------------------- +int GetLastAutoSavedSlotOfLevel(string level) //podla datumu +{ + int BestTimeSlot = -1 + for(int n = 0; n < sizeof(SaveTypes); n++) + { + if(SaveTypes[n] == SAVETYPE_AUTO && SaveMapsNames[n] == level) + { + if(BestTimeSlot == -1) + BestTimeSlot = n + else + BestTimeSlot = GetNewtestSaveSlot(n, BestTimeSlot) + } + } + return BestTimeSlot +} + +//----------------------------------------------------------------- +int GetEmptySaveSlot() +{ + int EmptySlot = -1 + int n + for(n = 0; n < sizeof(SaveTypes); n++) + { + if(SaveTypes[n] == SAVETYPE_EMPTY) + { + EmptySlot = n + break + } + } + return EmptySlot +} + +//----------------------------------------------------------------- +void RemoveSaveEmptySlot() +{ + int EmptySlot = GetEmptySaveSlot() + + if(EmptySlot == -1) + return + + int LastIndex = sizeof(SaveTypes) - 1 + for(int n = EmptySlot; n < LastIndex; n++) + { + int next = n + 1 + SaveFileNames[n] = SaveFileNames[next] + SaveMapsNames[n] = SaveMapsNames[next] + SaveMapsTimes[n] = SaveMapsTimes[next] + SaveTypes[n] = SaveTypes[next] + } +} + +//----------------------------------------------------------------- +void AddSaveEmptySlot() +{ + int EmptySlot = GetEmptySaveSlot() + + if(EmptySlot != -1) + return + + EmptySlot = 0 + int n + + for(n = 0; n < sizeof(SaveTypes); n++) + { + if(SaveTypes[n] != SAVETYPE_QUICK) + { + EmptySlot = n + break + } + } + + int LastIndex = sizeof(SaveTypes) - 1 + for(n = LastIndex; n > EmptySlot; n--) + { + int prev = n - 1 + SaveFileNames[n] = SaveFileNames[prev] + SaveMapsNames[n] = SaveMapsNames[prev] + SaveMapsTimes[n] = SaveMapsTimes[prev] + SaveTypes[n] = SaveTypes[prev] + } + + SaveFileNames[EmptySlot] = "" + SaveMapsNames[EmptySlot] = "" + SaveMapsTimes[EmptySlot] = "" + SaveTypes[EmptySlot] = SAVETYPE_EMPTY +} + +//----------------------------------------------------------------- +void LoadSaveList() //vracia empty slot do ktoreho je mozno ukladat +{ + string tokens[10] + int n = 0 + tparse tp = BeginParse("save/save.lst") + int line = 0 + int num = sizeof(SaveFileNames) + SaveIdent = 1 + + if(tp) + { + while(ParseLine(tp, n++, tokens) && line < num) + { + if(tokens[0] == "SAVE" || tokens[0] == "SOFTSAVE" || tokens[0] == "QUICKSAVE") + { + SaveFileNames[line] = tokens[1] + SaveMapsNames[line] = tokens[2] + SaveMapsTimes[line] = tokens[3] + + if(tokens[0] == "SOFTSAVE") //poznamenename si ktore sejvy su iba soft + SaveTypes[line] = SAVETYPE_AUTO + + if(tokens[0] == "SAVE") + SaveTypes[line] = SAVETYPE_NORMAL + + if(tokens[0] == "QUICKSAVE") + SaveTypes[line] = SAVETYPE_QUICK + + if(tokens[0] != "QUICKSAVE") + { + string id = substr(tokens[1], 3, 4) + int ident = atoi(id) + if(ident > SaveIdent) //hladame navacsie unikatne ID + SaveIdent = ident + } + line++ + } + } + EndParse(tp) + } + + if(g_SaveSelected > line) + g_SaveSelected = line + + for(n = line; n < num; n++) + { + SaveFileNames[n] = "" + SaveMapsNames[n] = "" + SaveMapsTimes[n] = "" + SaveTypes[n] = SAVETYPE_NONE + } + + AddSaveEmptySlot() //ked je vsetko natiahnute tak tam vlozime empty slot na zaklade toho ake sejvy uz mame v slotoch +} + +//----------------------------------------------------------------- +// Level transition storage +//----------------------------------------------------------------- +class PlayerStorage +{ + int weapons[10] + int NumWeapons + int ammo[10] //ammo mimo zasobniky + int MagazinesAmmo[10] + int CurrentWeapon + float BulletTime + float health + float oxygen + float flashlight + int DifficultyLevel +} +PlayerStorage g_PlayerStorage //na prenos z levelu do levelu a pod + +//------------------------------------------------------------------ +void BeforeNewGame(int DifficultyLevel) //pred nahravanim levelu ked zacina uplne nova hra +{ + if(!g_PlayerStorage) + g_PlayerStorage = new PlayerStorage + + PlayerStorage st = g_PlayerStorage + st.NumWeapons = 0 + + st.weapons[st.NumWeapons] = CDummyWeapon //ziadna zbran (default) + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + +/* st.weapons[st.NumWeapons] = CJackHammer + st.ammo[st.NumWeapons] = -1 //player dostane startovne ammo nadefinovane v gameplay.h + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CPistol + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CShotgun + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CMachinegun + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CSniperRifle + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CRocketLauncher + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CFlameThrower + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CGrenade + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ +*/ + st.CurrentWeapon = CDummyWeapon + st.BulletTime = 0 + st.health = PlayerMaxHealth + st.flashlight = FlashLightMaxTime + st.oxygen = PlayerMaxOxygen + st.DifficultyLevel = DifficultyLevel +} + +//------------------------------------------------------------------ +void BeforeRunFromCommandLine(int DifficultyLevel) //pred nahravanim levelu z command lajny +{ + LoadSaveList() + + if(!g_PlayerStorage) + g_PlayerStorage = new PlayerStorage + + PlayerStorage st = g_PlayerStorage + st.NumWeapons = 0 + + st.weapons[st.NumWeapons] = CDummyWeapon //ziadna zbran (default) + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CJackHammer + st.ammo[st.NumWeapons] = -1 //player dostane startovne ammo nadefinovane v gameplay.h + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ +/* + st.weapons[st.NumWeapons] = CPistol + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CShotgun + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CMachinegun + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CSniperRifle + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CRocketLauncher + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CFlameThrower + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CGrenade + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ +*/ + st.CurrentWeapon = CJackHammer + st.BulletTime = 0 + st.health = PlayerMaxHealth + st.flashlight = FlashLightMaxTime + st.oxygen = PlayerMaxOxygen + st.DifficultyLevel = DifficultyLevel +} + +#ifdef DEMO +//------------------------------------------------------------------ +void BeforeCustomLevel(int DifficultyLevel, string level) +{ + if(!g_PlayerStorage) + g_PlayerStorage = new PlayerStorage + + PlayerStorage st = g_PlayerStorage + st.NumWeapons = 0 + + if(level == "l03") + { + st.weapons[st.NumWeapons] = CDummyWeapon //ziadna zbran (default) + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CJackHammer + st.ammo[st.NumWeapons] = -1 //player dostane startovne ammo nadefinovane v gameplay.h + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CPistol + st.ammo[st.NumWeapons] = 17 + st.MagazinesAmmo[st.NumWeapons] = 8 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CShotgun + st.ammo[st.NumWeapons] = 15 + st.MagazinesAmmo[st.NumWeapons] = 8 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CMachinegun + st.ammo[st.NumWeapons] = 32 + st.MagazinesAmmo[st.NumWeapons] = 28 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CSniperRifle + st.ammo[st.NumWeapons] = 0 + st.MagazinesAmmo[st.NumWeapons] = 5 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CRocketLauncher + st.ammo[st.NumWeapons] = 1 + st.MagazinesAmmo[st.NumWeapons] = 1 + st.NumWeapons++ +/* + st.weapons[st.NumWeapons] = CFlameThrower + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ +*/ + st.weapons[st.NumWeapons] = CGrenade + st.ammo[st.NumWeapons] = 4 + st.MagazinesAmmo[st.NumWeapons] = 1 + st.NumWeapons++ + + st.CurrentWeapon = CDummyWeapon + st.BulletTime = 0 + st.health = PlayerMaxHealth + st.flashlight = FlashLightMaxTime + st.oxygen = PlayerMaxOxygen + st.DifficultyLevel = DifficultyLevel + } + else + { + st.weapons[st.NumWeapons] = CDummyWeapon //ziadna zbran (default) + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.weapons[st.NumWeapons] = CJackHammer + st.ammo[st.NumWeapons] = -1 + st.MagazinesAmmo[st.NumWeapons] = -1 + st.NumWeapons++ + + st.CurrentWeapon = CJackHammer + st.BulletTime = 0 + st.health = PlayerMaxHealth + st.flashlight = FlashLightMaxTime + st.oxygen = PlayerMaxOxygen + st.DifficultyLevel = DifficultyLevel + } +} +#endif + +//----------------------------------------------------------------- +float g_FadeCounter +bool g_WFadeStat +float DelayCounter + +bool Delay(float WaitTime) //odfaduje/nafaduje globalny widget +{ + float ftm = ftime + if(ftm == 0) + ftm = 0.01 + + DelayCounter += ftm * 100 + + if(DelayCounter >= WaitTime) + { + DelayCounter = 0 + return true + } + + return false +} + +const int FADE_TEXT = 1 +const int FADE_BACK = 2 + +bool FadeWidget(widget w, float speed, int flags) //odfaduje/nafaduje globalny widget +{ + if(!g_WFadeStat) + { + g_WFadeStat = true + if(w) + ShowWidget(w, true) + + if(speed < 0) + g_FadeCounter = 255 + else + g_FadeCounter = 0 + } + + float ftm = ftime + if(ftm == 0) + ftm = 0.01 + + g_FadeCounter += ftm * speed + + if(g_FadeCounter >= 255) + g_FadeCounter = 255 + + if(g_FadeCounter <= 0) + g_FadeCounter = 0 + + if(w) + { + if(flags & FADE_BACK) + SetWidgetColor(w, ARGB(g_FadeCounter, g_FadeCounter, g_FadeCounter, g_FadeCounter)) + + if(flags & FADE_TEXT) + SetWidgetTextColor(w, ARGB(g_FadeCounter, g_FadeCounter, g_FadeCounter, g_FadeCounter)) + } + + if(g_FadeCounter == 255 || g_FadeCounter == 0) + { + g_WFadeStat = false + return true + } + + return false +} +//----------------------------------------------------------------- +void LoadBlackWidget() +{ + if(!g_wBlack) + { + g_wBlack = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_SOURCEALPHA|WF_BLEND, 0, 125) + LoadWidgetImage(g_wBlack, 0, "gfx/black.tga") + } + ShowWidget(g_wBlack, true) + SetWidgetColor(g_wBlack, 0xffffffff) +} + +//----------------------------------------------------------------- +void change_level(string targ, bool NoFade) +{ + g_bEndLevel = true + +#ifdef DEMO + if(targ != "Escape=Menu LMB=Restart") + targ = "demoend" +#endif + + g_sNextLevel = targ + + if(NoFade == false) + { + LoadBlackWidget() + SetWidgetColor(g_wBlack, 0x00ffffff) + g_EndStatus = 1 + } + else + g_EndStatus = 10 //vynechame fade +} + +//================================================================================= +bool AnyKey() +{ +#ifdef _XBOX + if(JoyButtonState(JB_A) || JoyButtonState(JB_START)) + { + ClearJoyButton(JB_A) + ClearJoyButton(JB_START) + return true + } + +#else + int n + for(n = 0; n < 256; n++) + { + if(KeyState(n)) + { + ClearKey(n) + return true + } + } + + for(n = 0; n < 3; n++) + { + if(MousePress(n)) + { + ClearMousePress(n) + return true + } + } + +#endif + + return false +} + +//================================================================================= +int CreateFontEx(string name) +{ + return CreateFont("gfx/fonts/1024x768/" + name, 1024, 768) +} + +//entity classes +#include "scripts/class_info_cutscene.h" +#include "scripts/class_trigger.h" +#include "scripts/class_light.h" + +#include "scripts/class_info.h" +#include "scripts/class_item_weapon.h" +#include "scripts/class_shot.h" +#include "scripts/class_item.h" +#include "scripts/class_func.h" +#include "scripts/class_misc_physics_model.h" +#include "scripts/class_misc_physics_pack.h" + +#include "scripts/class_misc_model.h" + +#include "scripts/class_creature/ai2.h" +#include "scripts/class_creature/robots.h" +#include "scripts/class_creature/npc.h" +#include "scripts/class_creature/boss.h" + +bool IsTrue(int n) +{ + if(n == 0) + return false + + return true +} + +//----------------------------------------------------------------- +void ExtClass::EOnLoaded(MinClass other, int extra) +{ + if(parent) + { + ExtClass MyParent = FindClass(parent) + + if(MyParent) + { + UpdateEntity(this) + UpdateEntity(MyParent) + vector ChildPos = GetMatrix(this, 3) + vector mat[3] + GetMatrix4(MyParent, mat) + vector ParentOff = ChildPos - GetMatrix(MyParent, 3) + ParentOff = VectorMatrixInvMultiply3(mat, ParentOff) + + if(AddChild(MyParent, this, 5)) + { + SetOrigin(this, ParentOff) + UpdateEntity(MyParent) + OnParent(MyParent) +#ifdef EDITOR + bool ChildFound = false + for(int c = 0; c < MyParent.ChildsNamesNum; c++) + { + if(MyParent.ChildsNames[c] == _name) + ChildFound = true + } + + if(!ChildFound) + MyParent.ChildsNames[MyParent.ChildsNamesNum++] = _name + + ParentName = MyParent._name +#endif + } + else + DPrint("Cannot parent " + _name + " on " + parent + ". Unknown error") + } + else + DPrint("Cannot parent " + _name + " on " + parent + ". " + parent + " not found!") + } +} + +//----------------------------------------------------------------- +void ExtClass::M_SetCamera(ExtClass other) +{ + misc_physics_camera cam = FindClass(other._value) + + if(cam == NULL || !IsInherited(cam, Type("misc_physics_camera"))) + { + DPrint(other._value + " is not camera") + return + } + + SetRenderView(this, cam.CameraIndex, 0) + cam.IsConnected = _name +} + +#ifdef DEVELOPER +void showfilter() +{ + if(globalmap) + { + int prevmap = SetCurrentMap(globalmap) + + UIMenu FilterMenu = new UIMenu + + FilterMenu.AddCheckItem("Planar", 0x6000) + FilterMenu.SetCheckItem(0x6000, IsTrue(g_iShowFilter & 1)) + + FilterMenu.AddCheckItem("Patch", 0x6002) + FilterMenu.SetCheckItem(0x6002, IsTrue(g_iShowFilter & 4)) + + FilterMenu.AddCheckItem("Sorted faces", 0x6004) + FilterMenu.SetCheckItem(0x6004, IsTrue(g_iShowFilter & 16)) + + FilterMenu.AddCheckItem("All entities", 0x6005) + FilterMenu.SetCheckItem(0x6005, IsTrue(g_iShowFilter & 32)) + + FilterMenu.AddCheckItem("Sprites", 0x6006) + FilterMenu.SetCheckItem(0x6006, IsTrue(g_iShowFilter & 64)) + + FilterMenu.AddCheckItem("Meshes", 0x6008) + FilterMenu.SetCheckItem(0x6008, IsTrue(g_iShowFilter & 256)) + + FilterMenu.AddCheckItem("Brush models", 0x6009) + FilterMenu.SetCheckItem(0x6009, IsTrue(g_iShowFilter & 512)) + + FilterMenu.AddCheckItem("Particles", 0x600a) + FilterMenu.SetCheckItem(0x600a, IsTrue(g_iShowFilter & 1024)) + + FilterMenu.AddSeparator() + + FilterMenu.AddTextItem("Show all", 0x8000) + FilterMenu.AddTextItem("Hide all", 0x8001) + + ShowCursor(true) + SetMousePos(40, 40) + + int res = FilterMenu.IPopup(20, 20) + + switch(res) + { + case 0x8000: + g_iShowFilter = 0 + break + + case 0x8001: + g_iShowFilter = 0xffffffff + break + + default: + if(res & 0x6000) + { + res = res & 0xff + + int bit = 1 << res + + if(g_iShowFilter & bit) + g_iShowFilter &= -1 - bit + else + g_iShowFilter |= bit + } + } + + delete FilterMenu + + SetCurrentMap(prevmap) + ShowCursor(false) + ResetCursor() + } + +} +#endif + +#ifdef EDITOR +int g_EditorRuns +#endif + +int AddToCheckSum(int chksm, int val, int shift) +{ + int mask = val << shift + chksm = chksm ^ mask + return chksm +} + +//================================================================================= +class ExplosionManager extends MinClass +{ + ShotStorage shot + ExtClass Bodies[64] + float Dists[64] + ExtClass rb + int BodiesNum + int ToApply + float ExploRange + +//--------------------------------------------------------------------------------- + void Update() + { + bool RigidBody + bool Creature + vector ForceOrigin + float extime + + ExploRange += ftime * 700 + + clamp ExploRange<0, shot.radius> + + for(int n = 0; n < BodiesNum; n++) + { + rb = Bodies[n] + + if(rb) + { + if(ExploRange > Dists[n]) + { + rb.Shoot(shot) + rb.Dependencies-- //davame vediet ze entitu uz nepotrebujeme takze sa moze mazat ked ma Dependencies == 0 + Bodies[n] = NULL + ToApply-- + } + } + } + + if(ToApply <= 0) + delete this + } + +//--------------------------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + Update() + } + +//--------------------------------------------------------------------------------- + void ExplosionManager() + { + SetEventMask(this, EV_FRAME) + shot = new ShotStorage + shot.HurtType = HT_EXPLOSION + } + +//--------------------------------------------------------------------------------- + void ~ExplosionManager() + { + if(shot) + { + delete shot + shot = NULL + } + } +} + +//================================================================================= +const float FADE_DEBRIS_TIME = 2 + +class DebrisHeap extends MinClass +{ + ExtClass Debrises[128] + int NumDebrises + float Lifetime + vobject Objects[16] + int NumObjects + + void AddObject(string name) + { + Objects[NumObjects++] = GetObject(name) + } + + void EOnTick(ExtClass other, int extra) + { + Lifetime -= TICK_PERIOD * 0.6 + + if(Lifetime > FADE_DEBRIS_TIME) + return + + if(Lifetime <= 0) + { + for(int n = 0; n < NumDebrises; n++) + { + ExtClass ec = Debrises[n] + NxActorDestroy(ec) + delete ec + } + + delete this + } + + float scale = Lifetime * 255 / FADE_DEBRIS_TIME + + clamp scale<0, 255> + + int c = AWHITE(scale) + + for(n = 0; n < NumDebrises; n++) + { + ec = Debrises[n] + ec.Color = c + } + } + + void ~DebrisHeap() + { + for(int n = 0; n < NumObjects; n++) + { + ReleaseObject(Objects[n], 0) + } + } + + void DebrisHeap(float lifetime) + { + SetEventMask(this, EV_TICK) + Lifetime = lifetime + FADE_DEBRIS_TIME + } +} + +//----------------------------------------------------------------- +void WorldClass::M_ShowScreenDisplay(ExtClass other) +{ + string display = other._value +// display = "displays/camera00_overlay.dpl" + if(!ScreenDisplay) + { + ScreenDisplay = new func_display(this, display, true) + ClearEventMask(ScreenDisplay, EV_FRAME) //zastavime cas displeja + } +} + +//----------------------------------------------------------------- +void WorldClass::M_HideScreenDisplay() +{ + if(ScreenDisplay) + { + delete ScreenDisplay + ScreenDisplay = NULL + } +} + +//================================================================================= +class world extends WorldClass +{ + int _noshadersun + vector _color + int _minlight + int _minvertexlight + float _skyspecular + vector gridsize + int AtmosphereToxicity + + string MusicAmbient //cesty k hudbam + string MusicAtmosphere + string MusicFight + string MusicFight2 + string MusicDialog + string MusicDialog2 + + string MAmbientVol //volumes k hudbam + string MAtmosphereVol + string MFightVol + string MFight2Vol + string MDialogVol + string MDialog2Vol + + bool bDoRestingTest + +//----------------------------------------------------------------- + void M_SetEffect(ExtClass other) + { + string tokens[16] + int nump = ParseString(other._value, tokens) + + int eff = atoi(tokens[0]) + float parms[4] + + //defaultni parametry + switch(eff) + { + case 1: + parms[0] = 255.0 + parms[1] = 0.0 + parms[2] = 0.07 + parms[3] = 0.02 + break + case 2: + parms[0] = 31.0 + parms[1] = 2000.0 + parms[2] = 0.0 + parms[3] = 0.0 + break + case 3: + eff = 1 + parms[0] = 31.0 + parms[1] = 2000.0 + parms[2] = 0.07 + parms[3] = 0.02 + break + case 4: + eff = 3 + parms[0] = 255.0 + parms[1] = 0.0 + parms[2] = 1.0 + parms[3] = 0.0 + break + } + + int p = 0 + for(int n = 1; n < nump && p < 4; n++) + { + if(tokens[n] == ",") + continue + + parms[p++] = atof(tokens[n]) + } + + SetPostEffect(eff, parms[0], parms[1], parms[2], parms[3]) + } + +//----------------------------------------------------------------- + void M_ChangeLevel(ExtClass other); + +//----------------------------------------------------------------- + void M_PlayMusic(ExtClass other) + { + string parm = other._value + int MusicIndex = -1 + + if(parm == "0" || parm == "") + MusicIndex = BS_NONE + + if(parm == "1" || parm == "") + MusicIndex = BS_AMBIENT + + if(parm == "2") + MusicIndex = BS_ATMOSPHERE + + if(parm == "3") + MusicIndex = BS_FIGHT + + if(parm == "4") + MusicIndex = BS_FIGHT2 + + if(parm == "5") + MusicIndex = BS_DIALOG + + if(parm == "6") + MusicIndex = BS_DIALOG2 + +// if(MusicIndex < 0) +// return + + if(MusicPlayer) + MusicPlayer.PlayBackMusic(this, MusicIndex) + } + +//----------------------------------------------------------------- + void Quake(float TimeMax, float Power, float Speed, float FadeInTime, float FadeOutTime, int Priority) + { + if(ETime > 0) //ak to uz bezi + { + if(Priority < EPriority) + return + } + + ETimeMax = TimeMax + EPower = Power + ESpeed = 1800 * Speed + EFadeInTime = FadeInTime + EFadeOutTime = FadeOutTime + EPriority = Priority + + ETime = 0 + ETime2 = 0 + } + +//----------------------------------------------------------------- + void M_Quake(ExtClass other) + { + string Parms[10] + int NumParms = ParseString(other._value, Parms) + + if(NumParms != 9) + { + string Err = "wrong num of parameters " + _name + ".Quake" + Print(Err) + return + } + + float p0 = atof(Parms[0]) + float p1 = atof(Parms[2]) + float p2 = atof(Parms[4]) + float p3 = atof(Parms[6]) + float p4 = atof(Parms[8]) + + Quake(p0, p1, p2, p3, p4, 100) + } + +//----------------------------------------------------------------- + void ApplyExplosion(MinClass actor, vector pos, float radius, float power, float damage, int type ) + { + ExtClass Bodies[64] + ExtClass rb + int BodiesNum + vector RBpos + + ExplosionManager manager = new ExplosionManager() + manager.shot.shooter = actor + manager.shot.from = pos + manager.shot.radius = radius + manager.shot.power = power + manager.shot.damage = damage + + BodiesNum = SphereQuery(pos, radius, Bodies, 64, TFL_VISIBLE) + + for(int n = 0; n < BodiesNum; n++) + { + rb = Bodies[n] + + if(rb == this) + continue + + if(rb == actor && rb != World.Player) //nezranujeme ownera vybuchu ale playera ano + continue + + //TODO: tohle je humus. Predelat na flag identifikujici + //entity, ktere se daji odbouchnout! + if(!IsInherited(rb, CMiscPhysicsModel)) + { + if(!IsInherited(rb, CPhysicsPart)) + { + if(rb.ClassType != ClassTypeCreature) + { + if(!IsInherited(rb, CItemClass)) + { + if(!IsInherited(rb, CItemWeaponMine)) + { + if(rb.ClassType != ClassTypeMiscPhysicsGlass) + { + if(!IsInherited(rb, CGlassDebris)) + continue + } + } + } + } + } + } + + if(IsInherited(rb, CMiscPhysicsGlass)) + RBpos = GetCenterOfEntity(rb) + else + { + if(rb.ClassType == ClassTypeCreature) //pre ragdoly potrebujeme stred ziskat takto lebo jeho origin stoji na mieste zabitia + { + vector mins, maxs + GetCBoundBox(rb, mins, maxs) + RBpos = mins + maxs * 0.5 + } + else + RBpos = GetMatrix(rb, 3) + } + if(P2PVisibilityEx(pos, RBpos, TRACE_VISTEST|TRACE_NOTRACE) == false) + continue + + if(manager.BodiesNum >= 64) + break + + manager.Bodies[manager.BodiesNum] = rb + manager.Dists[manager.BodiesNum++] = VectorLength(pos - RBpos/*GetMatrix(rb, 3)*/) + rb.Dependencies++ //davame vediet ze tieto entity nesmu byt zmazane + } + + manager.ToApply = manager.BodiesNum + + string PartEff + bool quake = true + + switch(type) + { + case 0: + PartEff = "" + quake = false + break + case 1: + PartEff = "particle/explosion1.ptc" + break + case 2: + PartEff = "particle/explosion2.ptc" + break + case 3: + PartEff = "particle/explosion3.ptc" + break + case 4: + PartEff = "particle/explosion4.ptc" + break + case 5: + PartEff = "particle/explosion5.ptc" + break + case 6: //granat + PartEff = "particle/tachyonfire.ptc" + break + } + + if(PartEff) + { + misc_particle_effector eff = new misc_particle_effector + eff.SetParms(PartEff, pos, true, 2) + } + + //pridame trochu bordelu +if(g_physx) + { + float c, angle, elev, scale + + NxApplyExplosion(pos, 512, 500) + DebrisHeap heap = new DebrisHeap(15) + heap.AddObject("obj/physics/debris1.xob") + heap.AddObject("obj/physics/debris2.xob") + heap.AddObject("obj/physics/debris3.xob") + for(n = 0; n < 120; n++) + { + angle = frand(0, M_PI2) + elev = frand(0, M_PI * 0.5) + c = cos(elev); + + vector v = Vector(c * cos(angle), c * sin(angle), sin(elev)) + + vector zp = v * 16 + pos + "0 0 8" + + if(!TestPosition(World, zp, ZeroVec, ZeroVec, TRACE_DETAIL|TRACE_WORLD)) + { + continue + } + ExtClass ec = new ExtClass + ec.Color = 0xffffffff + + SetOrigin(ec, zp) + vector ang + ang[0] = frand(0, 359.0) + ang[1] = frand(0, 359.0) + ang[2] = frand(0, 359.0) + + SetAngles(ec, ang) + UpdateEntity(ec) + + SetFlags(ec, TFL_VISIBLE|TFL_FULLMATRIX|TFL_NOSHADOW) + ec.SetObject(heap.Objects[n / 40]) + NxActorCreate(ec, ZeroVec, BC_MODEL, true, 1.5, 0, 0) + NxActorSetCollisionGroup(ec, 1) + SetVelocity(ec, v * 120) + + heap.Debrises[heap.NumDebrises++] = ec + } + } + + float PlaDist = VectorLength(pos - GetMatrix(Player, 3)) + float DistRate + + if(PlaDist > 512) + DistRate = 0.1 + else + { + DistRate = PlaDist / 512 + DistRate = 1 - DistRate + } + + if(quake) + { + float ExpPow = 5 * DistRate + Quake(20,ExpPow,20,3,17,50) + } + +// misc_particle_effector testeff = new misc_particle_effector +// testeff.SetParms("particle/animfire_test_smoke.ptc", pos, true, 2) + } + +//Explosion(entita, radius, power) +//----------------------------------------------------------------- + void M_Explosion(ExtClass other) + { + string ErrMsg + string tokens[16] + int nump = ParseString(other._value, tokens) + + if(nump != 9) + { + ErrMsg = "Wrong num of parameters. ApplyExplosion(" + other._value + ")" + DPrint(ErrMsg) + return + } + + MinClass cl = FindClass(tokens[0]) + + if(!cl) + { + ErrMsg = "Error in parameter. ApplyExplosion(" + other._value + ")" + DPrint(ErrMsg) + return + } + + float radius = atof(tokens[2]) + float power = atof(tokens[4]) + float damage = atof(tokens[6]) + int type = atoi(tokens[8]) + + ApplyExplosion(cl, GetMatrix(cl, 3), radius, power, damage, type) + } + +//--------------------------------------------------------------------------------- + void LoadNAV(string name, bool free) + { + AICreatureClass cc + info_waypoint wp + + if(free) + { + for(cc = GetNextEntity(NULL, CExtClass); cc != NULL; cc = GetNextEntity(cc, CExtClass)) + { + if(cc.WPosition) + { + delete cc.WPosition + cc.WPosition = NULL + } + cc.WAFrame = -1 + + if(ClassName(cc) == "info_portal") + { + //TODO: limit this only to dynamicaly created ones! + delete cc + continue + } + + if(cc.ClassType == CTypeInfoWaypoint) + { + wp = cc + wp.Init() + continue + } + + if(IsInherited(cc, CAICreatureClass)) + { + if(cc.WPath) + cc.WPath.Destroy() + + cc.WPath = NULL + cc.WPosition2.Invalidate() + } + } + } + + World.pPathFinder = NAVLoad(name) + + if(World.pPathFinder) + { + World.pPathFinder.LoadEntities() + + const int pts0[16] = { + -6, 10, + 6, 10, + 10, 6, + 10, -6, + 6, -10, + -6, -10, + -10, -6, + -10, 6} + World.pPathFinder.SetShape(0, pts0, 8) + + const int pts1[16] = { + -14, 20, + 14, 20, + 20, 14, + 20, -14, + 14, -20, + -14, -20, + -20, -14, + -20, 14} + World.pPathFinder.SetShape(1, pts1, 8) + + const int pts2[16] = { + -20, 26, + 20, 26, + 26, 20, + 26, -20, + 20, -26, + -20, -26, + -26, -20, + -26, 20} + World.pPathFinder.SetShape(2, pts2, 8) + + const int pmaxsize = 96, pmidsize = 48 + const int mmaxsize = -96, mmidsize = -48 + const int pshape[16] = { + pmidsize, pmaxsize, //0 + pmaxsize, pmidsize, + pmaxsize, mmidsize, //2 + pmidsize, mmaxsize, + mmidsize, mmaxsize, //4 + mmaxsize, mmidsize, + mmaxsize, pmidsize, //6 + mmidsize, pmaxsize} + World.pPathFinder.SetShape(8, pshape, 8) + + string pnames[512], aname + + //portal - entity + int nump = World.pPathFinder.GetPortalNames(pnames, sizeof(pnames)) + + for(int n = 0; n < nump; n++) + { + aname = pnames[n] + + info_portal pp = FindClass(aname) + if(pp) + { + //already in map + if(ClassName(pp) != "info_portal") + { + DPrint(ClassName(pp) + " '" + pp._name + "' named as potal!") + ErrorNum++ + } + continue + } + + pp = new info_portal + pp.SetName(aname) + } + + CPosition pos1 = new CPosition + CPosition pos2 = new CPosition + + for(info_connection wc = GetNextEntity(NULL, CInfoConnection); wc != NULL; wc = GetNextEntity(wc, CInfoConnection)) + { + info_connection nextwc + + if(!wc.link) //could be target for another one-way link + { + continue + } + + if(wc.type == 0) + { + DPrint("info_connection '" + wc._name + "' has no type set! Ignored!") + ErrorNum++ + continue + } + + nextwc = FindClass(wc.link) + if(!nextwc) + { + DPrint("info_connection '" + wc._name + "' can't found link '" + wc.link + "'") + ErrorNum++ + continue + } + + if(!World.pPathFinder.PositionForPoint(GetMatrix(wc, 3) + "0 0 2", pos1)) + { + DPrint("info_connection '" + wc._name + "' out of area") + ErrorNum++ + continue + } + + if(!World.pPathFinder.PositionForPoint(GetMatrix(nextwc, 3) + "0 0 2", pos2) + { + DPrint("info_connection '" + nextwc._name + "' out of area") + ErrorNum++ + continue + } + + if(!IsConnected(pos1, pos2)) + { + DPrint("info_connection '" + wc._name + "' and '" + nextwc._name + "' aren't in the same group") + ErrorNum++ + continue + } + + World.pPathFinder.AddConnection(wc, pos1, pos2) + } + + delete pos1 + delete pos2 + + for(wp = GetNextEntity(NULL, CInfoWaypoint); wp != NULL; wp = GetNextEntity(wp, CInfoWaypoint)) + { + if(!wp._name || substr(wp._name, 0, 1) == "@") + continue + + CPosition cpos = wp.GetWPos() + if(!cpos) + { + DPrint("info_waypoint " + wp._name + " is not on valid area") + + //AddDShape(SHAPE_BBOX, 0x7f7f7f7f, 0, GetMatrix(wp, 3) - "2 2 2", GetMatrix(wp, 3) + "2 2 2") + //AddDShape(SHAPE_BBOX, 0x7f7f7f7f, 0, wp.coords - "2 2 2", wp.coords + "2 2 2") + + ErrorNum++ + continue + } + + //link only cover/shoot points + if(wp.flags & 6) + { + wp.node = World.pPathFinder.LinkWaypoint(wp, cpos) + if(wp.node == 0) + { + DPrint("info_waypoint " + wp._name + " can't be linked") + ErrorNum++ + } + } + } + + int usedshapes = 0 + int minshape = 9999 + + for(cc = GetNextEntity(NULL, CAICreatureClass); cc != NULL; cc = GetNextEntity(cc, CAICreatureClass)) + { + usedshapes = 1 << cc.ShapeIndex | usedshapes + + if(cc.ShapeIndex < minshape) + minshape = cc.ShapeIndex + } + + World.pPathFinder.Complete(usedshapes) + + if(free && minshape < 31) + { + for(wp = GetNextEntity(NULL, CInfoWaypoint); wp != NULL; wp = GetNextEntity(wp, CInfoWaypoint)) + { + if(!wp._name) + continue + + cpos = wp.GetWPos() + if(!cpos) + continue + + if(World.pPathFinder.TestPointCollision(minshape, cpos)) + { + DPrint("info_waypoint " + wp._name + " is obstructed") + ErrorNum++ + } + } + } + } + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + LoadNAV("worlds/" + g_sThisLevel + ".nav", true) + } + +//----------------------------------------------------------------- + void InitPhysics() + { + dSetInteractionLayer(ET_WORLD, ET_WORLD|ET_DEFAULT|ET_PLAYER|ET_NPC|ET_RAGDOLL|ET_DEBRIS|ET_SHELL|ET_GRENADE|ET_MANIPULATING, true) + dSetInteractionLayer(ET_DEFAULT, ET_WORLD|ET_DEFAULT|ET_PLAYER|ET_NPC|ET_RAGDOLL|ET_DEBRIS|ET_DOOR|ET_GRENADE|ET_MANIPULATING, true) + dSetInteractionLayer(ET_PLAYER, ET_VEHICLE|ET_PLAYERCLIP|ET_WORLD|ET_DEFAULT|ET_PLAYER|ET_NPC|ET_DEBRIS|ET_DOOR, true) + dSetInteractionLayer(ET_NPC, ET_WORLD|ET_DEFAULT|ET_PLAYER|ET_NPC|ET_DEBRIS|ET_DOOR|ET_GRENADE|ET_MANIPULATING, true) + dSetInteractionLayer(ET_RAGDOLL, ET_WORLD|ET_DEFAULT|ET_RAGDOLL|ET_DEBRIS|ET_DOOR|ET_GRENADE|ET_MANIPULATING, true) + dSetInteractionLayer(ET_DEBRIS, ET_WORLD|ET_DEFAULT|ET_PLAYER|ET_NPC|ET_RAGDOLL|ET_DEBRIS|ET_DOOR|ET_GRENADE, true) + dSetInteractionLayer(ET_SHELL, ET_WORLD|ET_DEFAULT|ET_SHELL|ET_DOOR|ET_MANIPULATING, true) + dSetInteractionLayer(ET_DOOR, ET_DEFAULT|ET_PLAYER|ET_NPC|ET_RAGDOLL|ET_DEBRIS|ET_SHELL|ET_DOOR|ET_GRENADE|ET_MANIPULATING, true) + dSetInteractionLayer(ET_GRENADE, ET_WORLD|ET_DEFAULT|ET_NPC|ET_RAGDOLL|ET_DEBRIS|ET_DOOR|ET_GRENADE|ET_MANIPULATING, true) + dSetInteractionLayer(ET_MANIPULATING, ET_WORLD|ET_DEFAULT|ET_NPC|ET_RAGDOLL|ET_DOOR|ET_GRENADE|ET_MANIPULATING, true) //nastavuje sa tomu co drzi player + + dSetInteractionLayer(ET_NOCOLLISION, ET_NOCOLLISION, false) + dSetInteractionLayer(ET_DOOR, ET_DOOR, false) + + dSetInteractionLayer(ET_VEHICLE, ET_GRENADE|ET_MANIPULATING|ET_VEHICLE|ET_PLAYERCLIP|ET_WORLD|ET_DEFAULT|ET_PLAYER|ET_NPC|ET_DEBRIS|ET_DOOR, true) + + dSetInteractionLayer(ET_PLAYERCAST, ET_VEHICLE|ET_PLAYERCLIP|ET_WORLD|ET_DEFAULT|ET_NPC|ET_DOOR, true) + + dSetInteractionLayer(ET_PLAYERCLIP, ET_PLAYERCAST|ET_PLAYER|ET_VEHICLE, true) + + //dSetInteractionLayer(ET_WORLD, ET_WORLD|ET_DEFAULT|ET_PLAYER|ET_NPC|ET_RAGDOLL|ET_DEBRIS|ET_SHELL|ET_DOOR|ET_GRENADE, true) + + dSetInteractionLayer(ET_NPC, ET_NPC, false) + +// NxSceneSetActorGroupPairFlags(0, 1, 0) + // NxSceneSetGroupCollision(0, 0, false) //world-world + NxSceneSetGroupCollision(0, 0, true) //world-world + NxSceneSetGroupCollision(0, 1, true) //world-rigidbody + NxSceneSetGroupCollision(1, 2, true) //rigidbody-func + NxSceneSetGroupCollision(0, 2, false) //world-func + } + +//----------------------------------------------------------------- + void EOnLoad(MinClass other, int extra) + { + LoadNAV("worlds/" + g_sThisLevel + ".nav", false) + InitPhysics() + ErrorNum = 0 + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { +#ifdef DEVELOPER + InitDirector(this) +#endif + } + +//----------------------------------------------------------------- + void EOnTimer(MinClass other, int extra) + { + if(!DebugLevel && other == Player) + { + if(!GameOverSnd) + GameOverSnd = GetSoundEx("sound/ambiences/end_title.ogg", 1, SF_STREAM) + + GameOverSound = PlaySound(NULL, GameOverSnd, SF_AMBIENT|SF_MUSIC) + + if(MusicPlayer) + MusicPlayer.PlayBackMusic(this, BS_NONE) + } + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(ScreenDisplay) //updatujeme fullscreen display + { + ScreenDisplay.UpdateTime() + ScreenDisplay.UpdateElements() + } + + if(BulletTimeFade == 0) //ak nebezi bullettime efekt ani ten v credits + { + if(r_bloom) + SetPostEffect(6, r_gbias, r_blurscale, r_imgscale, r_gauss) + else + SetPostEffect(0, 0, 0, 0, 0) + } + +#ifdef DEVELOPER + if(g_FromConsoleCall != "") //volanie dynamickych metod z konzole + { + int lng = strlen(g_FromConsoleCall) + + if(lng > 2) + CallMethods(this, g_FromConsoleCall) + + g_FromConsoleCall = "" + } +#endif + + if(ETime < ETimeMax) + { + CalcMatrixFromCamera() + + float QMult, EFade + ETime += 100 * ftime + ETime2 += ESpeed * ftime + EFade = 1 + + if(EFadeInTime > 0) //pokial nastaveny fadeIn/Out + { + if(ETime < EFadeInTime) //rozjazd + EFade = ETime / EFadeInTime + else + EFadeInTime = 0 + } + + if(EFadeOutTime > 0) + { + float tmp = ETimeMax - EFadeOutTime + float ff + if(ETime >= tmp) //dojazd + { + ff = ETimeMax - ETime + EFade = ff / EFadeOutTime + } + } + + float rr = ETime2 * 1.1 + rr = sin(rr * DEG2RAD) + QMult = 2 * EPower * EFade + vector vv = g_CamMat[0] * QMult //g_CamMat[2] hore - dole + EarthquakeOff = vv * rr + + rr = sin(ETime2 * DEG2RAD) + QMult = 2 * EPower * EFade + EarthquakeAng[2] = rr * QMult + + float QVert = ETime2 * 1.2 + rr = sin(QVert * DEG2RAD) + QMult = 1 * EPower * EFade + EarthquakeAng[0] = rr * QMult + } + else + { + ETime = ETimeMax + EPriority = 0 + EarthquakeOff = ZeroVec + EarthquakeAng = ZeroVec + } +/* + if(KeyState(KC_B)) + { + ClearKey(KC_B) +// _value = "500, 1, 1, 100, 100" + _value = "1000, 0.4, 1.8, 200, 200" + M_Quake(this) + } +/*/ +/* + if(KeyState(KC_B)) + { + ClearKey(KC_B) + M_Quake(this) + } +*/ + + if(CutScene == true) + return + + AICreatureClass cl + +#ifdef DEVELOPER + if(DirectorActive == true) + { + ProcessDirector(this) + return + } + + if(KeyState(KC_RCONTROL)) + { + if(KeyState(KC_A)) + { + ClearKey(KC_A) + + + g_bDoShowAI = true + } + + if(KeyState(KC_F)) + { + ClearKey(KC_F) + + g_bFreezeAI = 1 - g_bFreezeAI + for(cl = GetNextEntity(NULL, CAICreatureClass); cl != NULL; cl = GetNextEntity(cl, CAICreatureClass)) + { + cl.Stopped = g_bFreezeAI + } + + if(g_bFreezeAI && !g_bShowAI) + { + g_bDoShowAI = true + } + else + { + if(!g_bFreezeAI && g_bShowAI) + g_bDoShowAI = true + } + } + + if(KeyState(KC_X)) + { + ClearKey(KC_X) + showfilter() + } + } + + if( KeyState(KC_F11) != false) + { + ClearKey(KC_F11) + ShowDirector(this) + } + + if(KeyState(KC_F2)) + { + ClearKey(KC_F2) + bDoRestingTest = true + } + + if(bDoRestingTest) + { + bDoRestingTest = false + + for(cl = GetNextEntity(NULL, CExtClass); cl != NULL; cl = GetNextEntity(cl, CExtClass)) + { + if(IsInherited(cl, CCreatureClass)) + continue + + if(cl.IsRigidBody() && dBodyIsActive(cl)) + { + Print(String("Warning: Physical entity is not at rest " + ClassName(cl) + " " + cl._name)) + } + } + } + +#endif + + if(g_bDoShowAI) + { + g_bDoShowAI = false + + for(cl = GetNextEntity(NULL, CCreatureClass); cl != NULL; cl = GetNextEntity(cl, CCreatureClass)) + { + if(g_bShowAI) + { + if(cl.WAI) + ShowWidget(cl.WAI, false) + cl.ShowAI = false + } + else + { + if(cl.status < STATE_DIE) + { + if(cl.WAI == NULL) + cl.WAI = CreateWidget(WTYPE_TEXT, 0, 0, 160, 256, WF_SOURCEALPHA|WF_BLEND|WF_EXACTPOS, 0xe0ffffff, 255) + + ShowWidget(cl.WAI, true) + cl.ShowAI = true + } + } + } + + g_bShowAI = 1 - g_bShowAI + } + } + +//----------------------------------------------------------------- + void SetMusicPaths() + { + SoundPaths[BS_AMBIENT] = MusicAmbient + SoundPaths[BS_ATMOSPHERE] = MusicAtmosphere + SoundPaths[BS_FIGHT] = MusicFight + SoundPaths[BS_FIGHT2] = MusicFight2 + SoundPaths[BS_DIALOG] = MusicDialog + SoundPaths[BS_DIALOG2] = MusicDialog2 + + SoundVolumes[BS_AMBIENT] = atof(MAmbientVol) + SoundVolumes[BS_ATMOSPHERE] = atof(MAtmosphereVol) + SoundVolumes[BS_FIGHT] = atof(MFightVol) + SoundVolumes[BS_FIGHT2] = atof(MFight2Vol) + SoundVolumes[BS_DIALOG] = atof(MDialogVol) + SoundVolumes[BS_DIALOG2] = atof(MDialog2Vol) + } + +//----------------------------------------------------------------- + void world() + { + ClassType = ClassTypeWorld + SetEventMask(this,EV_FRAME|EV_INIT|EV_ONLOAD|EV_TIMER|EV_LOADED) + + name = g_sThisLevel + + //bDoRestingTest = true + + ETime = 0 + ETimeMax = 0 + EPriority = 0 + + if(!ItemColPtr) + ItemColPtr = new ItemCollection + + if(!DispColPtr) + DispColPtr = new DisplayCollection + + InitSpeechSet() + + SetMusicPaths() + + if(viewdist == 0) + viewdist = 16432 + + clamp AtmosphereToxicity<0, 1> //0 = maximum 1 = medium 2 = low + + InitPhysics() + } + + void ~world() + { + if(ItemColPtr) + { + delete ItemColPtr + ItemColPtr = NULL + } + + if(DispColPtr) + { + delete DispColPtr + DispColPtr = NULL + } + + if(GameOverSound) + { + EndSound(GameOverSound) + GameOverSound = 0 + } + + ReleaseRicParticles() + +#ifdef EDITOR + g_EditorRuns = -1 +#endif + + _eclass ec = GetNextEntity(NULL, CJointClass) //najprv mazeme jointy + _eclass current + while(ec) + { + current = ec + ec = GetNextEntity(ec, CJointClass) + + if(IsInherited(current, CJointClass)) + delete current + } + + //world se smaze jako posledni + for(ec = GetNextEntity(NULL, NULL); ec != NULL; ec = GetNextEntity(ec, NULL)) + { + if(this != ec) + delete ec + } + + CleanupAnimSets() + } +} + + +//================================================================================= + +#ifdef EDITOR +#include "scripts/editor_path.h" +#include "scripts/editor.h" +#endif + +#include "scripts/console.h" + +int ItemValues[64],ItemValuesBak[64] + +//================================================================================= +void SaveConfig() +{ + int f = OpenFile("settings.cfg",FILEMODE_WRITE) + + if(f) + { + FPrintln(f, "//ENGINE CONFIG FILE. DO NOT MODIFY!!!") + FPrintln(f, " ") + + FPrintln(f, "//video options") + + //parse video mode + string vmode = "" + + if(g_iVMode >= 0) + vmode = g_sVideoModes[g_iVMode] + + int c = strstr(vmode, "x") + if(c == -1 || vmode == "") + { + FPrint(f, "ScreenWidth ") + FPrintln(f, itoa(g_iWidth)) + + FPrint(f, "ScreenHeight ") + FPrintln(f, itoa(g_iHeight)) + } + else + { + FPrint(f, "ScreenWidth ") + FPrintln(f, substr(vmode, 0, c)) + + vmode = substr(vmode, c + 1, strlen(vmode) - c - 1) + c = strstr(vmode, "x") + FPrint(f, "ScreenHeight ") + if(c == -1) + FPrintln(f, vmode) + else + FPrintln(f, substr(vmode, 0, c)) + } + + FPrint(f, "Fullscreen ") + FPrintln(f, g_iFullscreen) + + FPrint(f, "FSAA ") + FPrintln(f, g_iFSAA) + + FPrint(f, "TextureDepth ") + FPrintln(f, r_texcompress) + + FPrint(f, "TextureDetail ") + FPrintln(f, r_texdetail) + + FPrint(f, "Bloom ") + FPrintln(f, r_bloom) + + FPrint(f, "Dither ") + FPrintln(f, g_iDither) + + FPrint(f, "TextureFilter ") + FPrintln(f, r_texfilter) + + FPrint(f, "MaxAniso ") + FPrintln(f, r_maxaniso) + + FPrint(f, "ShaderLevel ") + FPrintln(f, r_shaderlevel) + + FPrint(f, "GeometricDetail ") + FPrintln(f, g_iGeomDetail) + + FPrint(f, "Brightness ") + FPrintln(f, g_iBrightness) + + FPrint(f, "VSync ") + FPrintln(f, g_iVSync) + + FPrintln(f, "//audio options") + + FPrint(f, "EffectsVolume ") + FPrintln(f, g_iEffectsVolume) + + FPrint(f, "MusicVolume ") + FPrintln(f, g_iMusicVolume) + + FPrint(f, "SoundQuality ") + FPrintln(f, g_iSoundQuality) + + FPrint(f, "OutputRate ") + FPrintln(f, g_iOutputRate) + + FPrint(f, "Speakers ") + FPrintln(f, g_iSpeakers) + + FPrint(f, "EnableEAX ") + FPrintln(f, g_bEAX) + + FPrint(f, "EnableSoundOcclusion ") + FPrintln(f, g_bSoundOcclusion) + + FPrintln(f, "//advanced options") + + FPrint(f, "ModelShadows ") + FPrintln(f, r_shadow) + + FPrint(f, "Reflections ") + FPrintln(f, r_reflection) + + FPrint(f, "Bump ") + FPrintln(f, r_normal) + + FPrint(f, "Parallax ") + FPrintln(f, r_parallax) + + FPrint(f, "TerrainQuality ") + FPrintln(f, r_terrquality) + + FPrint(f, "TerrainSpecular ") + FPrintln(f, r_terrspecular) + + FPrint(f, "TerrainParallax ") + FPrintln(f, r_terrparallax) + + FPrint(f, "ScreenQuality ") + FPrintln(f, r_screenquality) + + FPrint(f, "PhysX ") + FPrintln(f, g_physx) + + FPrintln(f, "") + FPrintln(f, "//Defined primary and secondary control keys") + + FPrint(f, "Move_Forward_1 ") + FPrintln(f, g_KeyDef1[MOVE_F]) + FPrint(f, "Move_Forward_2 ") + FPrintln(f, g_KeyDef2[MOVE_F]) + + FPrint(f, "Move_Backward_1 ") + FPrintln(f, g_KeyDef1[MOVE_B]) + FPrint(f, "Move_Backward_2 ") + FPrintln(f, g_KeyDef2[MOVE_B]) + + FPrint(f, "Move_Left_1 ") + FPrintln(f, g_KeyDef1[LEFT]) + FPrint(f, "Move_Left_2 ") + FPrintln(f, g_KeyDef2[LEFT]) + + FPrint(f, "Move_Right_1 ") + FPrintln(f, g_KeyDef1[RIGHT]) + FPrint(f, "Move_Right_2 ") + FPrintln(f, g_KeyDef2[RIGHT]) + + FPrint(f, "Jump_1 ") + FPrintln(f, g_KeyDef1[JUMP]) + FPrint(f, "Jump_2 ") + FPrintln(f, g_KeyDef2[JUMP]) + + FPrint(f, "Crouch_1 ") + FPrintln(f, g_KeyDef1[CROUCH]) + FPrint(f, "Crouch_2 ") + FPrintln(f, g_KeyDef2[CROUCH]) + + FPrint(f, "Walk_1 ") + FPrintln(f, g_KeyDef1[WALK_MODE]) + FPrint(f, "Walk_2 ") + FPrintln(f, g_KeyDef2[WALK_MODE]) + + FPrint(f, "Prim_Attack_1 ") + FPrintln(f, g_KeyDef1[P_ATTACK]) + FPrint(f, "Prim_Attack_2 ") + FPrintln(f, g_KeyDef2[P_ATTACK]) + + FPrint(f, "SecAttack_1 ") + FPrintln(f, g_KeyDef1[S_ATTACK]) + FPrint(f, "SecAttack_2 ") + FPrintln(f, g_KeyDef2[S_ATTACK]) + + FPrint(f, "Prev_Weapon_1 ") + FPrintln(f, g_KeyDef1[PREV_WEAPON]) + FPrint(f, "Prev_Weapon_2 ") + FPrintln(f, g_KeyDef2[PREV_WEAPON]) + + FPrint(f, "Next_Weapon_1 ") + FPrintln(f, g_KeyDef1[NEXT_WEAPON]) + FPrint(f, "Next_Weapon_2 ") + FPrintln(f, g_KeyDef2[NEXT_WEAPON]) + + FPrint(f, "Reload_1 ") + FPrintln(f, g_KeyDef1[RELOAD]) + FPrint(f, "Reload_2 ") + FPrintln(f, g_KeyDef2[RELOAD]) + + FPrint(f, "Action_(Use)_1 ") + FPrintln(f, g_KeyDef1[USE]) + FPrint(f, "Action_(Use)_2 ") + FPrintln(f, g_KeyDef2[USE]) + + FPrint(f, "Flashlight_1 ") + FPrintln(f, g_KeyDef1[FLASHLIGHT]) + FPrint(f, "Flashlight_2 ") + FPrintln(f, g_KeyDef2[FLASHLIGHT]) + + FPrint(f, "RemoteController_1 ") + FPrintln(f, g_KeyDef1[CONTROLLER]) + FPrint(f, "RemoteController_2 ") + FPrintln(f, g_KeyDef2[CONTROLLER]) + + FPrint(f, "BulletTime_1 ") + FPrintln(f, g_KeyDef1[BULLET_TIME]) + FPrint(f, "BulletTime_2 ") + FPrintln(f, g_KeyDef2[BULLET_TIME]) + + FPrint(f, "TaskList_1 ") + FPrintln(f, g_KeyDef1[TASKLIST]) + FPrint(f, "TaskList_2 ") + FPrintln(f, g_KeyDef2[TASKLIST]) + + FPrint(f, "LeanLeft_1 ") + FPrintln(f, g_KeyDef1[LEAN_LEFT]) + FPrint(f, "LeanLeft_2 ") + FPrintln(f, g_KeyDef2[LEAN_LEFT]) + + FPrint(f, "LeanRight_1 ") + FPrintln(f, g_KeyDef1[LEAN_RIGHT]) + FPrint(f, "LeanRight_2 ") + FPrintln(f, g_KeyDef2[LEAN_RIGHT]) + + FPrint(f, "Jackhammer_1 ") + FPrintln(f, g_KeyDef1[WEAP_JACKHAMMER]) + FPrint(f, "Jackhammer_2 ") + FPrintln(f, g_KeyDef2[WEAP_JACKHAMMER]) + + FPrint(f, "Pistol_1 ") + FPrintln(f, g_KeyDef1[WEAP_PISTOL]) + FPrint(f, "Pistol_2 ") + FPrintln(f, g_KeyDef2[WEAP_PISTOL]) + + FPrint(f, "Shotgun_1 ") + FPrintln(f, g_KeyDef1[WEAP_SHOTGUN]) + FPrint(f, "Shotgun_2 ") + FPrintln(f, g_KeyDef2[WEAP_SHOTGUN]) + + FPrint(f, "Machinegun_1 ") + FPrintln(f, g_KeyDef1[WEAP_MACHINEGUN]) + FPrint(f, "Machinegun_2 ") + FPrintln(f, g_KeyDef2[WEAP_MACHINEGUN]) + + FPrint(f, "SniperRifle_1 ") + FPrintln(f, g_KeyDef1[WEAP_SNIPER_RIFLE]) + FPrint(f, "SniperRifle_2 ") + FPrintln(f, g_KeyDef2[WEAP_SNIPER_RIFLE]) + + FPrint(f, "RocketLauncher_1 ") + FPrintln(f, g_KeyDef1[WEAP_ROCKET_LAUNCHER]) + FPrint(f, "RocketLauncher_2 ") + FPrintln(f, g_KeyDef2[WEAP_ROCKET_LAUNCHER]) + + FPrint(f, "Flamethrower_1 ") + FPrintln(f, g_KeyDef1[WEAP_FLAMETHROWER]) + FPrint(f, "Flamethrower_2 ") + FPrintln(f, g_KeyDef2[WEAP_FLAMETHROWER]) + + FPrint(f, "Grenade_1 ") + FPrintln(f, g_KeyDef1[WEAP_GRENADE]) + FPrint(f, "Grenade_2 ") + FPrintln(f, g_KeyDef2[WEAP_GRENADE]) + + FPrint(f, "QuickLoad_1 ") + FPrintln(f, g_KeyDef1[QUICKLOAD]) + FPrint(f, "QuickLoad_2 ") + FPrintln(f, g_KeyDef2[QUICKLOAD]) + + FPrint(f, "QuickSave_1 ") + FPrintln(f, g_KeyDef1[QUICKSAVE]) + FPrint(f, "QuickSave_2 ") + FPrintln(f, g_KeyDef2[QUICKSAVE]) + + FPrint(f, "InvertMouse ") + FPrintln(f, g_InvMouse) + + FPrint(f, "MouseSpeedH ") + FPrintln(f, g_MSpeedH) + + FPrint(f, "MouseSpeedV ") + FPrintln(f, g_MSpeedV) + + FPrint(f, "Joypad ") + FPrintln(f, g_Joypad) + + FPrint(f, "Subtitles ") + FPrintln(f, g_Subtitles) + + CloseFile(f) + } +} + +//================================================================================= +int WidthFromVMode(int vmod) +{ + if(vmod < 0) + return 640 + + string vmode = g_sVideoModes[vmod] + + int c = strstr(vmode, "x") + + return atoi(substr(vmode, 0, c)) +} + +//================================================================================= +int HeightFromVMode(int vmod) +{ + if(vmod < 0) + return 480 + + string vmode = g_sVideoModes[vmod] + + int c = strstr(vmode, "x") + + vmode = substr(vmode, c + 1, strlen(vmode) - c - 1) + c = strstr(vmode, "x") + if(c == -1) + return atoi(vmode) + + return atoi(substr(vmode, 0, c)) +} + +//================================================================================= +void ApplyOptions() +{ + int val + +//user just changed resolution. Reset it! + if(g_iVMode != ItemValues[10] || g_iFSAA != ItemValues[61]) + { + g_iVMode = ItemValues[10] + g_iFSAA = ItemValues[61] + + g_iWidth = WidthFromVMode(g_iVMode) + g_iHeight = HeightFromVMode(g_iVMode) + + ResetRender(g_iWidth, g_iHeight) + } + +//Video options + r_shaderlevel = ItemValues[21] + g_iGeomDetail = ItemValues[22] + r_texfilter = ItemValues[23] + r_maxaniso = ItemValues[50] + 1 + val = ItemValues[24] + r_texcompress = val + g_iBrightness = ItemValues[25] + +//Audio options + g_iEffectsVolume = ItemValues[26] + g_iMusicVolume = ItemValues[27] + g_iSoundQuality = ItemValues[28] + g_bEAX = ItemValues[11] + g_iOutputRate = ItemValues[12] + g_iSpeakers = ItemValues[13] + g_bSoundOcclusion = ItemValues[14] + +//Advanced + r_shadow = ItemValues[30] + r_reflection = ItemValues[31] +// r_normal = ItemValues[32] + r_specular = ItemValues[33] + r_texdetail = ItemValues[34] + r_terrparallax = ItemValues[35] + r_terrspecular = ItemValues[36] + r_terrquality = ItemValues[37] + + r_screenquality = ItemValues[45] + g_physx = ItemValues[46] + +//Controls + for(int n = 0; n < sizeof(g_KeyDef1); n++) + { + g_KeyDef1[n] = g_KeyDef1_temp[n] + g_KeyDef2[n] = g_KeyDef2_temp[n] + } + + g_InvMouse = ItemValues[51] + g_MSpeedH = ItemValues[52] + g_MSpeedV = ItemValues[53] + g_Subtitles = ItemValues[55] + g_Joypad = ItemValues[56] + + g_fMouseSpeedH = g_MSpeedH * 0.0005 + 0.005 + if(g_InvMouse) + g_fMouseSpeedV = -g_MSpeedV * 0.00035 - 0.00125 + else + g_fMouseSpeedV = g_MSpeedV * 0.00035 + 0.00125 + + r_bloom = ItemValues[60] +} + +//================================================================================= +void GetOptions() +{ +//Video options + ItemValues[10] = g_iVMode + ItemValues[61] = g_iFSAA + ItemValues[21] = r_shaderlevel + ItemValues[22] = g_iGeomDetail + ItemValues[23] = r_texfilter + ItemValues[24] = r_texcompress + ItemValues[25] = g_iBrightness + clamp r_maxaniso<1, 16> + ItemValues[50] = r_maxaniso - 1 + +//Audio options + ItemValues[11] = g_bEAX + ItemValues[12] = g_iOutputRate + ItemValues[13] = g_iSpeakers + ItemValues[14] = g_bSoundOcclusion + + ItemValues[26] = g_iEffectsVolume + ItemValues[27] = g_iMusicVolume + ItemValues[28] = g_iSoundQuality + +//Advanced + ItemValues[30] = r_shadow + ItemValues[31] = r_reflection + ItemValues[33] = r_specular + ItemValues[34] = r_texdetail + ItemValues[35] = r_terrparallax + ItemValues[36] = r_terrspecular + ItemValues[37] = r_terrquality + + ItemValues[45] = r_screenquality + ItemValues[46] = g_physx + +//Controls + for(int n = 0; n < sizeof(g_KeyDef1); n++) + { + g_KeyDef1_temp[n] = g_KeyDef1[n] + g_KeyDef2_temp[n] = g_KeyDef2[n] + } + + ItemValues[51] = g_InvMouse + ItemValues[52] = g_MSpeedH + ItemValues[53] = g_MSpeedV + ItemValues[55] = g_Subtitles + ItemValues[56] = g_Joypad + ItemValues[60] = r_bloom +} + +void LoadMenuMap() +{ + if(MenuMap) + return + + MenuMap = LoadMap("worlds/menu.wrl", true) + + if(MenuMap != NULL) + { + SetWidgetWorld(WView, MenuMap, 0) + ShowWidget(WView, true) + } +} + +void UnloadMenuMap() +{ + SetWidgetWorld(WView, NULL, 0) + ShowWidget(WView, false) + + if(MenuMap != NULL) + { + FreeMap(MenuMap) + MenuMap = NULL + } +} + +//----------------------------------------------------------------- +bool CompareMouseGlobal(int l, int t, int r, int b) +{ + r = l + r + b = t + b + if(MouseX < l || MouseX > r || MouseY < t || MouseY > b) + return false + + return true +} + + +#include "scripts/menu.h" +#include "scripts/player/interface.h" +#include "scripts/player/player.h" + +//----------------------------------------------------------------- +void world::M_ChangeLevel(ExtClass other) +{ +#ifdef DEVELOPER + Print(String("Changing Next Level. Caller is " + other._name)) +#endif + +#ifndef EDITOR + string Value = other._value + strlower(Value) + string Parms[8] + int NumParms = ParseString(Value, Parms) + + bool NoFade = false + + if(NumParms == 3 && Parms[2] == "nofade") + NoFade = true + + if(CutScene) + { + //if we were playing cutscene, get back our FOV + SetCameraVerticalFOV(0, pfov) + } + + creature_player pla = World.Player + pla.WriteCurrentStorageTo(g_PlayerStorage) //prenasame playerove veci z levelu do levelu. musi to byt tu pretoze jedine to co je volane z ingame scriptu je naozaj dalsi level + change_level(Parms[0], NoFade) +#endif +} + +//================================================================================= +bool LoadMapCallback(string name, int progr) +{ + +#ifdef EDITOR + if(GetAsyncKeyState(0x1b) & 0x8000) + { + return false + } +#endif + + if(!g_sThisLevel) + { + int pos = strstr(name, ".wrl") + if(pos >= 0) + g_sThisLevel = substr(name, 0, pos) + + pos = strstr(g_sThisLevel, "/") + + if(pos >= 0) + g_sThisLevel = substr(name, pos + 1, strlen(g_sThisLevel) - pos - 1) + } + +/* + if(LevelNumber) + { + SetWidgetText(LevelNumber, 0, g_sThisLevel) + ShowWidget(LevelNumber, true) + } +*/ + + if(g_wProgress) + SetWidgetPos(g_wProgress, 14, 573, 774 * progr / 1000, 16) + +#ifdef EDITOR + SetLoadProgress(progr) +#endif + + return true +} + +//================================================================================= +void Back2Game(int map) +{ + g_iMInGame = 1 + ShowWidget(WView, true) + ShowWidget(WMousePointer, false) + + SetWidgetPos(WMousePointer, 400, 300, 63, 63) + SetWidgetWorld(WView, map, 0) + EndSound(MenuMusicID) + MenuMusicID = 0 + + MouseX = 0 + MouseY = 0 + MouseDeltaX = 0 + MouseDeltaY = 0 + +#ifdef _XBOX + ClearJoyButton(JB_A) +#else + KEY(P_ATTACK, true) //vyclearujeme to pretoze po kliknuti na resume player hned nieco robi +#endif +} + +//================================================================================= +void Wait4Key() +{ + SetWidgetPos(g_wProgress, 14, 573, 774, 16) + g_iMInGame = -1 + + SetWidgetTextEx(g_wLoading, 0, true, "#LoadWaitingText") +} + +//================================================================================= +void BeforeLoading(string name) +{ + Print(String("Loading level : " + name)) + + g_wProgress = CreateWidget(WTYPE_IMAGE, 233, 530, 355, 16, WF_VISIBLE | WF_SOURCEALPHA | WF_BLEND, 0xffffffff, 127) + LoadWidgetImage(g_wProgress, 0, "gfx/hud_misc/progressbar") + + int wWidth = 800 + int wHeight = 600 + int wflags = WF_VISIBLE + + g_wBackground = CreateWidget(WTYPE_IMAGE, 0, 0, wWidth, wHeight, wflags, 0xffffffff, 126) + string LScreen = "gfx/backgrounds/" + + if(!LoadWidgetImage(g_wBackground, 0, "worlds/" + name)) + { + LScreen = "gfx/hud_misc/loading_screen_default.dds" + LoadWidgetImage(g_wBackground, 0, LScreen) + } + + g_wLoading = CreateWidget(WTYPE_TEXT, 200, 545, 400, 33, WF_BLEND|WF_VISIBLE|WF_CENTER, ARGB(255,130,255,255), 130) + SetFont(g_wLoading, MainFont) + SetWidgetTextEx(g_wLoading, 0, true, "#LoadingText") + + g_bEndLevel = false + g_iMInGame = 0 + g_sThisLevel = name +} + +//================================================================================= +void AfterLoading() +{ + if(g_wBackground) + { + DestroyWidget(g_wBackground) + g_wBackground = NULL + } + + if(g_wProgress) + { + DestroyWidget(g_wProgress) + g_wProgress = NULL + } + + if(g_wLoading) + { + DestroyWidget(g_wLoading) + g_wLoading = NULL + } + + //zasejvujeme na zaciatku levelu ale nie ked je to z Loadnutej pozicie alebo ked je mapa pustena cez viewer alebo to je spustene cez tutorial button + if(g_FromSavePos == false && g_RunMode == RUNMODE_NORMAL && g_sThisLevel != "l0i") + NeedAutosave = true + + KEY(P_ATTACK, true) +} + +//================================================================================= +int LoadMapEx(string name) +{ + BeforeLoading(name) + +#ifdef DEMO + if(substr(name, 0, 1) == "l") + { + if(substr(name, 1, 1) == "0") + { + if(substr(name, 2, 1) == "1" || substr(name, 2, 1) == "3") + { + goto valid + } + } + } + return 0 +valid:; +#endif + + int map = LoadMap("worlds/" + name + ".wrl", true) + + if(map != NULL) + { + Back2Game(map) + g_bStartLevel = true + LoadBlackWidget() + + //hod ho do cekaciho kodu + if(!DebugLevel) + { + Wait4Key() + return map + } + } + AfterLoading() + return map +} + +//================================================================================= +int LoadSaveMapEx(string name, string sf) +{ + BeforeLoading(name) + + g_FromSavePos = true + + SetWidgetWorld(WView, NULL, 0) + int map = LoadSaveMap(globalmap, sf) + + if(map) + { + Back2Game(map) + g_bStartLevel = true + LoadBlackWidget() + + //hod ho do cekaciho kodu + if(!DebugLevel) + { + Wait4Key() + return map + } + } + + AfterLoading() + return map +} + +//================================================================================= +void UnloadMap() +{ + SetWidgetWorld(WView, NULL, 0) + ShowWidget(WView, false) + if(globalmap != NULL) + { + FreeMap(globalmap) + globalmap = NULL + } +} + + +//================================================================================= +void SetConfigValue(string item, string value) +{ + switch(item) + { + case "ScreenDepth": + break + + case "Bloom": + r_bloom = atoi(value) + break + + case "FSAA": + g_iFSAA = atoi(value) + break + + case "ScreenWidth": + g_iWidth = atoi(value) + break + + case "ScreenHeight": + g_iHeight = atoi(value) + break + + case "Fullscreen": + g_iFullscreen = atoi(value) + break + + case "TextureDepth": + r_texcompress = atoi(value) + if(r_texcompress == 32) + r_texcompress = 1 + break + + case "TextureDetail": + r_texdetail = atoi(value) + break + + case "Dither": + g_iDither = atoi(value) + break + + case "TextureFilter": + r_texfilter = atoi(value) + break + + case "MaxAniso": + r_maxaniso = atoi(value) + break + + case "ShaderLevel": + r_shaderlevel = atoi(value) + clamp r_shaderlevel<0, r_maxshaderlevel> + break + + case "GeometricDetail": + g_iGeomDetail = atoi(value) + break + + case "DetailMap": + break + + case "Brightness": + g_iBrightness = atoi(value) + break + + case "VSync": + g_iVSync = atoi(value) + break + + case "EffectsVolume": + g_iEffectsVolume = atoi(value) + break + + case "MusicVolume": + g_iMusicVolume = atoi(value) + break + + case "SoundQuality": + g_iSoundQuality = atoi(value) + break + + case "Speakers": + g_iSpeakers = atoi(value) + break + + case "OutputRate": + g_iOutputRate = atoi(value) + break + + case "EnableEAX": + g_bEAX = atoi(value) + break + + case "EnableSoundOcclusion": + g_bSoundOcclusion = atoi(value) + break + + case "ModelShadows": + r_shadow = atoi(value) + clamp r_shadow<0, 1> + break + + case "Reflections": + r_reflection = atoi(value) + break + + case "Bump": + r_normal = atoi(value) + break + + case "Parallax": + r_parallax = atoi(value) + break + + case "TerrainQuality": + r_terrquality = atoi(value) + break + + case "TerrainSpecular": + r_terrspecular = atoi(value) + break + + case "TerrainParallax": + r_terrparallax = atoi(value) + break + + case "PPQuality": + r_screenquality = atoi(value) + break + + case "ScreenQuality": + r_screenquality = atoi(value) + break + + case "PhysX": + g_physx = atoi(value) + break + + case "Move_Forward_1": + g_KeyDef1[MOVE_F] = atoi(value) + break + + case "Move_Backward_1": + g_KeyDef1[MOVE_B] = atoi(value) + break + + case "Move_Left_1": + g_KeyDef1[LEFT] = atoi(value) + break + + case "Move_Right_1": + g_KeyDef1[RIGHT] = atoi(value) + break + + case "Jump_1": + g_KeyDef1[JUMP] = atoi(value) + break + + case "Crouch_1": + g_KeyDef1[CROUCH] = atoi(value) + break + + case "Walk_1": + g_KeyDef1[WALK_MODE] = atoi(value) + break + + case "Prim_Attack_1": + g_KeyDef1[P_ATTACK] = atoi(value) + break + + case "SecAttack_1": + g_KeyDef1[S_ATTACK] = atoi(value) + break + + case "Next_Weapon_1": + g_KeyDef1[NEXT_WEAPON] = atoi(value) + break + + case "Prev_Weapon_1": + g_KeyDef1[PREV_WEAPON] = atoi(value) + break + + case "Reload_1": + g_KeyDef1[RELOAD] = atoi(value) + break + + case "Action_(Use)_1": + g_KeyDef1[USE] = atoi(value) + break + + case "Flashlight_1": + g_KeyDef1[FLASHLIGHT] = atoi(value) + break + + case "RemoteController_1": + g_KeyDef1[CONTROLLER] = atoi(value) + break + + case "BulletTime_1": + g_KeyDef1[BULLET_TIME] = atoi(value) + break + + case "TaskList_1": + g_KeyDef1[TASKLIST] = atoi(value) + break + + case "LeanLeft_1": + g_KeyDef1[LEAN_LEFT] = atoi(value) + break + + case "LeanRight_1": + g_KeyDef1[LEAN_RIGHT] = atoi(value) + break + + case "Jackhammer_1": + g_KeyDef1[WEAP_JACKHAMMER] = atoi(value) + break + + case "Pistol_1": + g_KeyDef1[WEAP_PISTOL] = atoi(value) + break + + case "Shotgun_1": + g_KeyDef1[WEAP_SHOTGUN] = atoi(value) + break + + case "Machinegun_1": + g_KeyDef1[WEAP_MACHINEGUN] = atoi(value) + break + + case "SniperRifle_1": + g_KeyDef1[WEAP_SNIPER_RIFLE] = atoi(value) + break + + case "RocketLauncher_1": + g_KeyDef1[WEAP_ROCKET_LAUNCHER] = atoi(value) + break + + case "Flamethrower_1": + g_KeyDef1[WEAP_FLAMETHROWER] = atoi(value) + break + + case "Grenade_1": + g_KeyDef1[WEAP_GRENADE] = atoi(value) + break + + case "QuickLoad_1": + g_KeyDef1[QUICKLOAD] = atoi(value) + break + + case "QuickSave_1": + g_KeyDef1[QUICKSAVE] = atoi(value) + break +//#ifndef XBOX +//xbox klavesy ktore su navyse +//#endif + + case "Move_Forward_2": + g_KeyDef2[MOVE_F] = atoi(value) + break + + case "Move_Backward_2": + g_KeyDef2[MOVE_B] = atoi(value) + break + + case "Move_Left_2": + g_KeyDef2[LEFT] = atoi(value) + break + + case "Move_Right_2": + g_KeyDef2[RIGHT] = atoi(value) + break + + case "Jump_2": + g_KeyDef2[JUMP] = atoi(value) + break + + case "Crouch_2": + g_KeyDef2[CROUCH] = atoi(value) + break + + case "Walk_2": + g_KeyDef2[WALK_MODE] = atoi(value) + break + + case "Prim_Attack_2": + g_KeyDef2[P_ATTACK] = atoi(value) + break + + case "SecAttack_2": + g_KeyDef2[S_ATTACK] = atoi(value) + break + + case "Prev_Weapon_2": + g_KeyDef2[PREV_WEAPON] = atoi(value) + break + + case "Next_Weapon_2": + g_KeyDef2[NEXT_WEAPON] = atoi(value) + break + + case "Reload_2": + g_KeyDef2[RELOAD] = atoi(value) + break + + case "Action_(Use)_2": + g_KeyDef2[USE] = atoi(value) + break + + case "Flashlight_2": + g_KeyDef2[FLASHLIGHT] = atoi(value) + break + + case "RemoteController_2": + g_KeyDef2[CONTROLLER] = atoi(value) + break + + case "BulletTime_2": + g_KeyDef2[BULLET_TIME] = atoi(value) + break + + case "TaskList_2": + g_KeyDef2[TASKLIST] = atoi(value) + break + + case "LeanLeft_2": + g_KeyDef2[LEAN_LEFT] = atoi(value) + break + + case "LeanRight_2": + g_KeyDef2[LEAN_RIGHT] = atoi(value) + break + + case "Jackhammer_2": + g_KeyDef2[WEAP_JACKHAMMER] = atoi(value) + break + + case "Pistol_2": + g_KeyDef2[WEAP_PISTOL] = atoi(value) + break + + case "Shotgun_2": + g_KeyDef2[WEAP_SHOTGUN] = atoi(value) + break + + case "Machinegun_2": + g_KeyDef2[WEAP_MACHINEGUN] = atoi(value) + break + + case "SniperRifle_2": + g_KeyDef2[WEAP_SNIPER_RIFLE] = atoi(value) + break + + case "RocketLauncher_2": + g_KeyDef2[WEAP_ROCKET_LAUNCHER] = atoi(value) + break + + case "Flamethrower_2": + g_KeyDef2[WEAP_FLAMETHROWER] = atoi(value) + break + + case "Grenade_2": + g_KeyDef2[WEAP_GRENADE] = atoi(value) + break + + case "QuickLoad_2": + g_KeyDef2[QUICKLOAD] = atoi(value) + break + + case "QuickSave_2": + g_KeyDef2[QUICKSAVE] = atoi(value) + break + +//#ifndef XBOX +//xbox klavesy ktore su navyse +//#endif + + case "InvertMouse": + g_InvMouse = atoi(value) + break + + case "MouseSpeedH": + g_MSpeedH = atof(value) + break + + case "MouseSpeedV": + g_MSpeedV = atof(value) + break + + case "Subtitles": + g_Subtitles = atof(value) + break + + case "Joypad": + g_Joypad = atoi(value) + break + + } +} + +void SetDefaultKeys() +{ + g_KeyDef1[MOVE_F] = KC_W + g_KeyDef2[MOVE_F] = 0 + g_KeyDef1[MOVE_B] = KC_S + g_KeyDef2[MOVE_B] = 0 + g_KeyDef1[LEFT] = KC_A + g_KeyDef2[LEFT] = 0 + g_KeyDef1[RIGHT] = KC_D + g_KeyDef2[RIGHT] = 0 + g_KeyDef1[JUMP] = KC_SPACE + g_KeyDef2[JUMP] = 0 + g_KeyDef1[CROUCH] = KC_C + g_KeyDef2[CROUCH] = 0 + g_KeyDef1[WALK_MODE] = KC_LSHIFT + g_KeyDef2[WALK_MODE] = 0 + g_KeyDef1[P_ATTACK] = -1 + g_KeyDef2[P_ATTACK] = 0 + g_KeyDef1[S_ATTACK] = -3 + g_KeyDef2[S_ATTACK] = 0 + g_KeyDef1[NEXT_WEAPON] = KC_NEXT + g_KeyDef2[NEXT_WEAPON] = -5 + g_KeyDef1[PREV_WEAPON] = KC_PRIOR + g_KeyDef2[PREV_WEAPON] = -4 + g_KeyDef1[RELOAD] = KC_R + g_KeyDef2[RELOAD] = 0 + g_KeyDef1[USE] = KC_F + g_KeyDef2[USE] = 0 + g_KeyDef1[FLASHLIGHT] = KC_T + g_KeyDef2[FLASHLIGHT] = 0 + g_KeyDef1[CONTROLLER] = KC_TAB + g_KeyDef2[CONTROLLER] = 0 + g_KeyDef1[BULLET_TIME] = KC_LCONTROL + g_KeyDef2[BULLET_TIME] = 0 + g_KeyDef1[TASKLIST] = KC_Z + g_KeyDef2[TASKLIST] = 0 + g_KeyDef1[LEAN_LEFT] = KC_Q + g_KeyDef2[LEAN_LEFT] = 0 + g_KeyDef1[LEAN_RIGHT] = KC_E + g_KeyDef2[LEAN_RIGHT] = 0 + g_KeyDef1[WEAP_JACKHAMMER] = KC_1 + g_KeyDef2[WEAP_JACKHAMMER] = 0 + g_KeyDef1[WEAP_PISTOL] = KC_2 + g_KeyDef2[WEAP_PISTOL] = 0 + g_KeyDef1[WEAP_SHOTGUN] = KC_3 + g_KeyDef2[WEAP_SHOTGUN] = 0 + g_KeyDef1[WEAP_MACHINEGUN] = KC_4 + g_KeyDef2[WEAP_MACHINEGUN] = 0 + g_KeyDef1[WEAP_SNIPER_RIFLE] = KC_5 + g_KeyDef2[WEAP_SNIPER_RIFLE] = 0 + g_KeyDef1[WEAP_ROCKET_LAUNCHER] = KC_6 + g_KeyDef2[WEAP_ROCKET_LAUNCHER] = 0 + g_KeyDef1[WEAP_FLAMETHROWER] = KC_7 + g_KeyDef2[WEAP_FLAMETHROWER] = 0 + g_KeyDef1[WEAP_GRENADE] = KC_8 + g_KeyDef2[WEAP_GRENADE] = 0 + g_KeyDef1[QUICKLOAD] = KC_F9 + g_KeyDef2[QUICKLOAD] = 0 + g_KeyDef1[QUICKSAVE] = KC_F5 + g_KeyDef2[QUICKSAVE] = 0 + +//#ifndef XBOX +//xbox klavesy ktore su navyse +//#endif + + g_InvMouse = 1 + g_MSpeedH = 70 + g_MSpeedV = 40 + g_Subtitles = 1 + g_Joypad = 0 +} + +//================================================================================= +void SetDefaultSettings() +{ + SetDefaultKeys() + + GetOptions() + SetMenuValue(0) + SetMenuValue(1) + SetMenuValue(2) + SetWidTexts() +} + +//================================================================================= +void LoadConfig() +{ + //nastavime defaulty uz tady, kdyby nekdo neco odmazl z cfg fajlu + g_iFullscreen = 1 + g_iWidth = 1024 + g_iHeight = 768 + g_iFSAA = 0 + + r_texcompress = 1 + r_shadow = 1 + r_texdetail = 0 + g_iGeomDetail = 2 + g_iBrightness = 50 + g_iEffectsVolume = 60 + g_iMusicVolume = 60 + r_shaderlevel = r_recommendedshaderlevel + r_reflection = 1 + r_normal = 1 + + if(r_recommendedshaderlevel == 0) + { + r_terrquality = 0 + r_terrspecular = 0 + r_terrparallax = 0 + r_texfilter = 1 + r_maxaniso = 0 + r_bloom = 0 + r_screenquality = 0 + } + else + { + r_terrquality = 1 + r_terrspecular = 1 + r_terrparallax = 1 + r_texfilter = 2 + r_maxaniso = 2 + r_bloom = 1 + r_screenquality = 1 + } + g_iDither = 0 + g_bEAX = 1 + g_iSoundQuality = 1 + g_iOutputRate = 1 + g_iSpeakers = -1 + g_bSoundOcclusion = true + + g_iVSync = true + + SetDefaultKeys() + + int f = OpenFile("settings.cfg", FILEMODE_READ) + if(f == NULL) + { + SaveConfig() + } + else + { + string str,item,value + + while(true) + { + int d + + if(FGets(f,str) < 0) + break + + if(strstr(str, "//") >= 0) + continue + + d = strstr(str," ") + if(d <= 0) + continue + item = substr(str, 0, d) + value = substr(str, d + 1, strlen(str) - d - 1) + + SetConfigValue(item,value) + } + CloseFile(f) + } + + //validate settings + if(r_maxshaderlevel == 0) + { + r_shaderlevel = 0 + r_bloom = 0 + r_terrquality = 0 + r_terrspecular = 0 + r_terrparallax = 0 + } + +#ifdef _XBOX + g_Joypad = true +#endif + + g_fMouseSpeedH = g_MSpeedH * 0.0005 + 0.005 + + if(g_InvMouse) + g_fMouseSpeedV = g_MSpeedV * -0.00035 - 0.00125 + else + g_fMouseSpeedV = g_MSpeedV * 0.00035 + 0.00125 +} + +#ifdef DEVELOPER + +//--------------------------------------------------------------------------------- +void SaveDefaultDeveloperConfig() +{ + int f = OpenFile("DevSettings.cfg",FILEMODE_WRITE) + + if(f) + { + FPrintln(f, "//DEVELOPER CONFIG FILE. CAN MODIFY") + FPrintln(f, "") + + FPrintln(f, "g_FlySpeed 400") + FPrintln(f, "getweapons") + FPrintln(f, "getammo") + FPrintln(f, "getimmortality") + FPrintln(f, "gethubbardium") + + CloseFile(f) + } +} + +//--------------------------------------------------------------------------------- +void LoadDeveloperConfig() +{ +begin: + int f = OpenFile("DevSettings.cfg",FILEMODE_READ) + if(f == NULL) + { + SaveDefaultDeveloperConfig() + goto begin + } + + string str,item,value + + while(true) + { + int d + + if(FGets(f,str) < 0) + break + + if(strstr(str, "//") >= 0) + continue + + d = strstr(str," ") + if(d <= 1) + { + if(str) + { + item = str + value = "" + } + else + continue + } + else + { + item = substr(str, 0, d) + value = substr(str, d + 1, strlen(str) - d - 1) + } + + int IntegerVar + float FloatVar + vector VectorVar + string StringVar + + if(!GetValue(NULL, item, 0, IntegerVar)) + { + if(!GetValue(NULL, item, 0, FloatVar)) + { + if(!GetValue(NULL, item, 0, VectorVar)) + { + if(!GetValue(NULL, item, 0, StringVar)) + { + if(!Call(NULL, item, NULL)) + { + string ErrMsg = "Cannot realize developer command " + item + DPrint(ErrMsg) + } + } + else + SetValue(NULL, item, 0, value) + } + else + SetValue(NULL, item, 0, atov(value)) + } + else + SetValue(NULL, item, 0, atof(value)) + } + else + SetValue(NULL, item, 0, atoi(value)) + } + CloseFile(f) +} +#endif + + +//================================================================================= +widget WSplash + +void SetSplash() +{ + g_iMInGame = 666 + WSplash = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_VISIBLE|WF_BLEND | WF_SOURCEALPHA, 0xffffffff, 666) + LoadWidgetImage(WSplash, 0, "gfx/last_screen.jpg") + AnyKey() //musime clearovat +} + +//================================================================================= +void Cleanup() +{ + if(g_PlayerStorage) + { + delete g_PlayerStorage + g_PlayerStorage = NULL + } + + CleanupWidgets() + CleanupSoundSets() +} + +bool LoadPlayerStorageBack(string MapPath) +{ + int n = 0 + int k + string tokens[30] + string uv = tostr(34) + string token + int WeapClnum + + if(strlen(MapPath) < 4) + return false + + tparse tp = BeginParse(MapPath) + + if(!tp) + { + string msg = "No found file " + MapPath + Print(msg) + return false + } + + if(!g_PlayerStorage) + g_PlayerStorage = new PlayerStorage + + PlayerStorage st = g_PlayerStorage + + bool result = false + int checksum = -1 + + int Tnum = 1 + while(Tnum) + { + Tnum = ParseLine(tp, n++, tokens) + + if(Tnum == 0) + continue + + token = tokens[2] + + switch(tokens[0]) + { + case "DifficultyLevel": + st.DifficultyLevel = atoi(token) + checksum = AddToCheckSum(checksum, st.DifficultyLevel, 1) + break + + case "CurrentWeapon": + st.CurrentWeapon = atoi(token) + checksum = AddToCheckSum(checksum, st.CurrentWeapon, 2) + break + + case "BulletTime": + st.BulletTime = atof(token) + checksum = AddToCheckSum(checksum, st.BulletTime, 3) + break + + case "Health": + st.health = atof(token) + checksum = AddToCheckSum(checksum, st.health, 4) + break + + case "Oxygen": + st.oxygen = atof(token) + checksum = AddToCheckSum(checksum, st.oxygen, 5) + break + + case "Flashlight": + st.flashlight = atof(token) + checksum = AddToCheckSum(checksum, st.flashlight, 6) + break + + case "Weapons": + st.NumWeapons = Tnum - 2 + for(k = 0; k < st.NumWeapons; k++) + { + st.weapons[k] = atoi(tokens[k + 2]) + checksum = AddToCheckSum(checksum, st.weapons[k], 7) + } + break + + case "Ammo": + int NumAmmos = Tnum - 2 + for(k = 0; k < NumAmmos; k++) + { + st.ammo[k] = atoi(tokens[k + 2]) + checksum = AddToCheckSum(checksum, st.ammo[k], 8) + } + break + + case "AmmoInMagazines": + int NumMagazines = Tnum - 2 + for(k = 0; k < NumMagazines; k++) + { + st.MagazinesAmmo[k] = atoi(tokens[k + 2]) + checksum = AddToCheckSum(checksum, st.MagazinesAmmo[k], 9) + } + break + + case "Checksum": + int chk = atoi(tokens[2]) + if(chk == checksum) + { + result = true + Print("Bad checksum") + } + break + } + } + EndParse(tp) + return result +} + +void LoadSavedPosition(int slot) +{ + if(slot == -1) //toto sa nesmie nikdy stat + return + + g_RunMode = RUNMODE_NORMAL + + if(SaveTypes[slot] > SAVETYPE_EMPTY) + { + string MapFileName = SaveFileNames[slot] //najprv musime vytiahnut co potrebujeme pretoze PopMenu(false) nam zavrie load menu a tym padom prehadze sloty (doplnuje empty slot) + string MapName = SaveMapsNames[slot] + int SaveType = SaveTypes[slot] + + ShowSavesListbox(false) + + if(MenuStackOff > 0) + { + PopMenu(false) + FreeMenu() + } + + UnloadMenuMap() + g_FromSavePos = true + + if(SaveType == SAVETYPE_AUTO) //iba nahrajeme mapu a nahadzeme playerovi veci zo soft sejvu + { + ShowWidget(WView, false) + + if(LoadPlayerStorageBack("save/" + MapFileName + ".sav") == true) + globalmap = LoadMapEx(MapName) + else + globalmap = LoadMapEx("l01") //bol podvod na sejvoch tak nech si to zahraje pekne znova + } + else + globalmap = LoadSaveMapEx(MapName, "save/" + MapFileName + ".sav") + } +} + +bool LoadGameDeleteDisabled + +void ProcessLoadSavedMap() +{ + if(g_LB_Update) + { + int LB_ClickedLine = LB_Update() + g_SaveSelected = LB_GetSelectedLine() + + if(g_SaveSelected >= 0) + { + if(SaveTypes[g_SaveSelected] <= SAVETYPE_AUTO) + { + if(!LoadGameDeleteDisabled) + { + GUIDisableItem("loadgame_delete") + LoadGameDeleteDisabled = true + } + } + else + { + if(LoadGameDeleteDisabled) + { + GUIEnableItem("loadgame_delete") + LoadGameDeleteDisabled = false + } + } + } + + if(LB_ClickedLine != -1) //bolo nieco vybrane + { + if(SaveTypes[g_SaveSelected] > SAVETYPE_EMPTY) + { + if(g_IMBackground) + { + DestroyWidget(g_IMBackground) + g_IMBackground = NULL + } + + UnloadMap() + LoadSavedPosition(LB_ClickedLine) + } + } + } +} + +void SavePlayerStorage(string EntFile) +{ + creature_player pl = World.Player + if(pl == NULL) + return + + int f = OpenFile(EntFile, FILEMODE_WRITE) + + if(!f) + return + + string line + string uv = tostr(34) //uvodzovky + int n + int checksum = -1 + + pl.WriteCurrentStorageTo(g_PlayerStorage) + PlayerStorage st = g_PlayerStorage + + line = "DifficultyLevel = " + uv + itoa(st.DifficultyLevel) + uv + checksum = AddToCheckSum(checksum, st.DifficultyLevel, 1) + FPrintln(f, line) + + line = "CurrentWeapon = " + uv + itoa(st.CurrentWeapon) + uv + checksum = AddToCheckSum(checksum, st.CurrentWeapon, 2) + FPrintln(f, line) + + line = "BulletTime = " + uv + ftoa(st.BulletTime) + uv + checksum = AddToCheckSum(checksum, st.BulletTime, 3) + FPrintln(f, line) + + line = "Health = " + uv + ftoa(st.health) + uv + checksum = AddToCheckSum(checksum, st.health, 4) + FPrintln(f, line) + + line = "Oxygen = " + uv + ftoa(st.oxygen) + uv + checksum = AddToCheckSum(checksum, st.oxygen, 5) + FPrintln(f, line) + + line = "Flashlight = " + uv + ftoa(st.flashlight) + uv + checksum = AddToCheckSum(checksum, st.flashlight, 6) + FPrintln(f, line) + + line = "Weapons =" + for(n = 0; n < st.NumWeapons; n++) + { + checksum = AddToCheckSum(checksum, st.weapons[n], 7) + line += " " + itoa(st.weapons[n]) + } + FPrintln(f, line) + + line = "Ammo =" + for(n = 0; n < st.NumWeapons; n++) + { + checksum = AddToCheckSum(checksum, st.ammo[n], 8) + line += " " + itoa(st.ammo[n]) + } + FPrintln(f, line) + + line = "AmmoInMagazines =" + for(n = 0; n < st.NumWeapons; n++) + { + checksum = AddToCheckSum(checksum, st.MagazinesAmmo[n], 9) + line += " " + itoa(st.MagazinesAmmo[n]) + } + FPrintln(f, line) + + line = "Checksum = " + itoa(checksum) + FPrintln(f, line) + CloseFile(f) +} + + +void WriteCurrentSavelist() +{ + string SaveList = "save/save.lst" + int f = OpenFile(SaveList, FILEMODE_WRITE) + string ln + string SaveHeader + string uv = tostr(34) + + for(int n = 0; n < sizeof(SaveFileNames); n++) + { + if(SaveTypes[n] > SAVETYPE_EMPTY) + { + if(SaveTypes[n] == SAVETYPE_AUTO) //save na zaciatku levelu bude iba medzilevelovy save + SaveHeader = "SOFTSAVE" + + if(SaveTypes[n] == SAVETYPE_NORMAL) + SaveHeader = "SAVE" + + if(SaveTypes[n] == SAVETYPE_QUICK) + SaveHeader = "QUICKSAVE" + + ln = SaveHeader + " " + SaveFileNames[n] + " " + SaveMapsNames[n] + " " + uv + SaveMapsTimes[n] + uv + FPrintln(f, ln) + } + } + CloseFile(f) +} + +int FreeSlotToSave(int index) +{ + int LastIdex = sizeof(SaveFileNames) - 1 + for(int n = LastIdex; n > index; n--) + { + int before = n - 1 + SaveFileNames[n] = SaveFileNames[before] + SaveMapsNames[n] = SaveMapsNames[before] + SaveMapsTimes[n] = SaveMapsTimes[before] + SaveTypes[n] = SaveTypes[before] + } +} + +const int SAVE_DISABLED = 0 +const int SAVE_ENABLED = 1 +const int SAVE_NEED_REQUEST = 2 + +int CanSaveToSelectedSlot() +{ + int SelectedType = SaveTypes[g_SaveSelected] + + if(SelectedType == SAVETYPE_NONE) + return SAVE_DISABLED + + if(SelectedType == SAVETYPE_QUICK) //nemozeme presejvovat quicksave normalnym sejvom + return SAVE_DISABLED + + if(SelectedType == SAVETYPE_EMPTY) //free slot. mozeme ukladat bez opytania + return SAVE_ENABLED + + if(SelectedType == SAVETYPE_NORMAL || SelectedType == SAVETYPE_AUTO) //v slote je nieco ulozene tak sa musime spytat ci to mozeme prepisat + { + //vyhodit request a ked ano tak true + return SAVE_NEED_REQUEST + } +} + +void SaveActPos(int SaveType) +{ + int SlotToSave = -1 + int n + + if(SaveType == SAVETYPE_AUTO) + { + for(n = 0; n < sizeof(SaveTypes); n++) //za normalna sejvujeme na empty slot + { + if(SaveTypes[n] == SAVETYPE_EMPTY) //musi tam byt + { + SlotToSave = n + 1 + FreeSlotToSave(SlotToSave) //empty slot nechame a za neho sejvneme. vsetko shiftneme dolu + break + } + } + } + + if(SaveType == SAVETYPE_NORMAL) //jedine z menu + { + int SelectedType = SaveTypes[g_SaveSelected] + if(SelectedType == SAVETYPE_QUICK) //nemozeme presejvovat quicksave normalnym sejvom + return + + if(SelectedType == SAVETYPE_EMPTY) //free slot. mozeme ukladat bez opytania + { + SlotToSave = g_SaveSelected + 1 + FreeSlotToSave(SlotToSave) //musime posunut to co v slote je a vsetko za tym dolu + } + + if(SelectedType == SAVETYPE_NORMAL || SelectedType == SAVETYPE_AUTO) //v slote je nieco ulozene tak mazeme stary sejv. prepisanie uz povolene bolo + { + SlotToSave = g_SaveSelected + DeleteFileA(GetFilePath("save/" + SaveFileNames[SlotToSave] + ".sav")) + } + } + + if(SaveType == SAVETYPE_QUICK) + { + SlotToSave = 0 //quicksejvy sejvujeme vzdy na prvy slot + int NumQuickSaves = 0 + for(n = 0; n < sizeof(SaveTypes); n++) //zistime kolko quicksejvov mame. mozu byt maximalne 2 + { + if(SaveTypes[n] == SAVETYPE_QUICK) + NumQuickSaves++ + } + + if(NumQuickSaves < 2) //este nemame ulozene 2 quicksejvy coz je maximalny pocet takze vsetko shiftneme dolu. posledny sejv vypada zo zoznamu + FreeSlotToSave(0) + else //su tam dva takze ten prvy presunieme na druhe miesto. ten druhy je uz nepotrebny + { + DeleteFileA(GetFilePath("save/" + SaveFileNames[1] + ".sav")) //stary quicksejv uz je nepotrebny takze ho zmazeme + SaveFileNames[1] = SaveFileNames[0] + SaveMapsNames[1] = SaveMapsNames[0] + SaveMapsTimes[1] = SaveMapsTimes[0] + SaveTypes[1] = SaveTypes[0] + } + + if(NumQuickSaves > 0) //ak tam bol aspon jeden quicksave tak ten prvy bol presunuty na druhy slot. potrebujeme ho premenovat + { + string OldFname = SaveFileNames[1] + ".sav" + string OldFilename = GetFilePath("save/" + OldFname) //ten ktory bol doteraz novy premenujeme na stary + int spos = strlen(OldFilename) + spos = spos - strlen(OldFname) + string NewFilename = substr(OldFilename, 0, spos) + "quicksave_previous.sav" + bool res = MoveFileA(OldFilename, NewFilename) + SaveFileNames[1] = "quicksave_previous" + } + } + + if(SlotToSave == -1) + return + + if(SaveType == SAVETYPE_QUICK) + SaveFileNames[SlotToSave] = "quicksave_last" + else + SaveFileNames[SlotToSave] = g_sThisLevel + itoal(++SaveIdent, 4) + + SaveMapsNames[SlotToSave] = World.name + SaveTypes[SlotToSave] = SaveType + + string DateTime = GetDateTime() + string SDate = substr(DateTime, 0, 10) + string STime = substr(DateTime, 11, 8) + DateTime = SDate + " " + STime + SaveMapsTimes[SlotToSave] = DateTime + + WriteCurrentSavelist() + string SaveFile = "save/" + SaveFileNames[SlotToSave] + ".sav" +/* + string SaveDir = GetFilePath("enforce2.dll") + if(strstr(SaveDir, "enforce2.dll") != -1) + SaveDir = substr(SaveDir, 0, strstr(SaveDir, "enforce2.dll")) + + int a = GetFileAttributesA(SaveDir) + Print(SaveDir) + + if(a == -1 || a & 0x00000010) + { + int res2 = CreateDirectoryA(SaveDir, NULL) + Print(res2) + Print("create dir") + }*/ + + if(SaveType == SAVETYPE_AUTO) //falosny sejv na zaciatku levelu + SavePlayerStorage(SaveFile) + else + SaveMap(globalmap, SaveFile) //normalny sejv alebo quicksejv + + g_SaveSelected = SlotToSave //kurzor tam kam sme ulozili +} + +void DeleteSavedPosition() +{ + if(SaveTypes[g_SaveSelected] > SAVETYPE_EMPTY) + { +#ifndef _XBOX + bool res = DeleteFileA(GetFilePath("save/" + SaveFileNames[g_SaveSelected] + ".sav")) +#endif + + int LastIndex = sizeof(SaveTypes) - 1 + for(int n = g_SaveSelected; n < LastIndex; n++) + { + int next = n + 1 + SaveFileNames[n] = SaveFileNames[next] + SaveMapsNames[n] = SaveMapsNames[next] + SaveMapsTimes[n] = SaveMapsTimes[next] + SaveTypes[n] = SaveTypes[next] + } + WriteCurrentSavelist() + ShowSavesListbox(false) + ShowSavesListbox(true) + } +} + +void SaveToSelectedSlot() +{ + widget SavingInfo = CreateWidget(WTYPE_TEXT, 350, 500, 100, 40, WF_CENTER|WF_VCENTER|WF_VISIBLE, 0xffffffff, 300) + SetFont(SavingInfo, MainFont) + SetWidgetTextEx(SavingInfo, 0, false, "#quicksave") + ShowWidget(WMousePointer, false) + Repaint() + Repaint() + SaveActPos(SAVETYPE_NORMAL) //ulozi hru + novy savelist + ClearMousePress(0) //inac by sa sejvovalo kazdy frame + ClearKey(KC_RETURN) + ShowSavesListbox(false) //skryjeme stary listbox. to co je v nom uz neni aktualne + ShowSavesListbox(true) //zobrazime nanovo. uz bude akceptovat novy savelist + DestroyWidget(SavingInfo) + ShowWidget(WMousePointer, true) +} + +bool RequestForSave() +{ + int SlotAccesibility = CanSaveToSelectedSlot() + + if(SlotAccesibility == SAVE_DISABLED) //do selektnuteho slotu sa neda sejvovat + return false + + if(SlotAccesibility == SAVE_ENABLED) //mozeme sejvovat + { + SaveToSelectedSlot() + return true + } + + if(SlotAccesibility == SAVE_NEED_REQUEST) //spytat sa ci sa moze presejvit existujuci + { + if(!ConfDialog) + ConfDialog = new ConfirmDialog("#save_req_del", "savegame_overwrite_yes", "savegame_cancel") //bude odstavene ovladanie menu. + + LB_EnableEvents(false) + return false + } + return false +} + +void RequestForDelete(string ResultOnYes, string ResultOnNo) +{ + if(SaveTypes[g_SaveSelected] <= SAVETYPE_EMPTY) + return + + if(!ConfDialog) + ConfDialog = new ConfirmDialog("#save_req_ow", ResultOnYes, ResultOnNo) //bude odstavene ovladanie menu. + + LB_EnableEvents(false) +} + +void ProcessSaveMap() +{ + if(g_LB_Update) + { + int LB_ClickedLine = LB_Update() + g_SaveSelected = LB_GetSelectedLine() + + if(g_SaveSelected >= 0) + { + if(SaveTypes[g_SaveSelected] <= SAVETYPE_AUTO) + GUIDisableItem("savegame_delete") + else + GUIEnableItem("savegame_delete") + } + + if(LB_ClickedLine != -1) //bolo nieco vybrane + { + if(RequestForSave() == true) + PopMenu(false) //hra bola ulozena takze skocime o menu vysie + } + } +} + +void LoadCustomLevel(string lev) +{ + FreeMenu() + g_FromSavePos = false + UnloadMenuMap() + globalmap = LoadMapEx(lev) +} + +bool LoadVideo(widget w, string name, bool sound) +{ + if(!LoadWidgetImage(w, 0, name + ".avi")) + return false + + if(sound) + { + g_VideoSnd = GetSoundEx(name, 1, SF_STREAM) + g_VideoSound = PlaySound(NULL, g_VideoSnd, SF_AMBIENT|SF_MUSIC|SF_ONCE) + } + return true +} + +void StopVideoSound() +{ + if(g_VideoSound) + EndSound(g_VideoSound) + + g_VideoSound = 0 +} + +//================================================================================= +int GameUpdate() +{ + if(g_EndStatus && g_EscKey == false) //klavesu potrebujeme zdetekovat a vyclearovat uplne na zaciatku + { +#ifdef _XBOX + if(JoyButtonState(JB_START)) + { + ClearJoyButton(JB_START) + g_EscKey = true + } + +#else + if(KeyState(KC_ESCAPE)) + { + ClearKey(KC_ESCAPE) + g_EscKey = true + } +#endif + } + + +#ifdef DEVELOPER + + if(KeyState(KC_NUMPADENTER)) + { + ClearKey(KC_NUMPADENTER) + + g_bDebugFSM = 1 - g_bDebugFSM + } + + + +#endif + + if(NeedAutosave) + { + SaveActPos(SAVETYPE_AUTO) + NeedAutosave = false + } + + //jestli je nahrana mapa, tak updatuj + if(globalmap != NULL && g_EndStatus == 0) + PlayMap(globalmap) + +#ifndef EDITOR + if(InCutscene == 0) + { + widget www + + if(g_EndStatus == 0) + { + if(KEY(QUICKSAVE, true)) + { + www = CreateWidget(WTYPE_TEXT, 350, 280, 100, 40, WF_CENTER|WF_VCENTER|WF_VISIBLE, 0xffffffff, 300) + SetFont(www, MainFont) + SetWidgetTextEx(www, 0, false, "#quicksave") + LoadWidgetImage(www, 0, "gfx/black.tga") + Repaint() + Repaint() + SaveActPos(SAVETYPE_QUICK) + + DestroyWidget(www) + } + } + } + + if(KEY(QUICKLOAD, true)) + { + if(SaveTypes[0] == SAVETYPE_QUICK) //ak tam vobec nejaky je + { + if(g_wGameOver1) + { + DestroyWidget(g_wGameOver1) + g_wGameOver1 = NULL + } + + if(g_wGameOver2) + { + DestroyWidget(g_wGameOver2) + g_wGameOver2 = NULL + } + + www = CreateWidget(WTYPE_TEXT, 0, 0, 800, 600, WF_CENTER|WF_VCENTER|WF_VISIBLE, 0xffffffff, 300) + SetFont(www, MainFont) + SetWidgetTextEx(www, 0, false, "#quickload") + LoadWidgetImage(www, 0, "gfx/black.tga") + + Repaint() + Repaint() + + g_sThisLevel = SaveMapsNames[0] + g_bEndLevel = false + g_EndStatus = 0 + g_iMInGame = 1 + globalmap = LoadSaveMap(globalmap, "save/" + SaveFileNames[0] + ".sav") //posledny quicksave + DestroyWidget(www) + ShowWidget(g_wBlack, false) + } + } +#endif + +//cheat next level + if(CheatNextLevel) + { + CheatNextLevel = false + + for(int n = 0; n < g_iNumLevels; n++) + { + if(g_sLevelNames[n] == g_sThisLevel) + { + n++ + if(n < g_iNumLevels) + { + change_level(g_sLevelNames[n], false) + break + } + } + } + } + + if(!g_bEndLevel) + { +#ifdef _XBOX + + if(JoyButtonState(JB_START)) + { + return true //nedovolime ingame menu + ClearJoyButton(JB_START) +#else + if(KeyState(KC_ESCAPE)) + { + ClearKey(KC_ESCAPE) +#endif + g_iMInGame = 2 + } + } + +//OnChangeLevel + if(g_bEndLevel) + { + switch(g_EndStatus) + { + case 20: + if(FadeWidget(g_wBlack, 500, FADE_BACK)) + { + if(!g_wGameOver1) + { + g_wGameOver1 = CreateWidget(WTYPE_TEXT, 146, 210, 512, 128, WF_SOURCEALPHA|WF_BLEND|WF_CENTER|WF_VISIBLE, 0xffffffff, 126) + SetFont(g_wGameOver1, LargeFont) + SetWidgetTextEx(g_wGameOver1, 0, true, "#game_over_label") +// LoadWidgetImage(g_wGameOver1, 0, "gfx/gameover.tga") + } + + if(!g_wGameOver2) + { + g_wGameOver2 = CreateWidget(WTYPE_TEXT, 146, 270, 512, 128, WF_SOURCEALPHA|WF_BLEND|WF_CENTER|WF_VISIBLE, 0xffffffff, 127) + SetFont(g_wGameOver2, MainFont) + SetWidgetTextEx(g_wGameOver2, 0, true, "#game_over_esc") + SetWidgetTextEx(g_wGameOver2, 1, true, "#game_over_lmb") + SetWidgetTextEx(g_wGameOver2, 2, true, "#game_over_quickload1 " + KeyNames[g_KeyDef1[QUICKLOAD]] + " #game_over_quickload2") +// LoadWidgetImage(g_wGameOver1, 0, "gfx/gameover.tga") + } + + g_EndStatus = 21 + } + break + + case 21: + if(g_EscKey) + { + g_EscKey = false + g_EndStatus = 22 + } + else + { + if(MousePress(0)) + { + ClearMousePress(0) + g_sNextLevel = "restart" + g_EndStatus = 22 + } + } + break + + case 22: + if(FadeWidget(g_wGameOver1, -500, FADE_TEXT)) + { + if(g_wGameOver1) + { + DestroyWidget(g_wGameOver1) + g_wGameOver1 = NULL + } + + if(g_wGameOver2) + { + DestroyWidget(g_wGameOver2) + g_wGameOver2 = NULL + } + + if(g_sNextLevel == "restart") //restart alebo hlavne menu + { + g_sNextLevel = g_sThisLevel + g_EndStatus = 0 + UnloadMap() + LoadSavedPosition(GetLastAutoSavedSlotOfLevel(g_sThisLevel)) //nahravame najnovsi autosave tohto levelu + } + else + g_sNextLevel = "finale" + + g_EndStatus = 10 + } + else + { + if(g_wGameOver2) + SetWidgetTextColor(g_wGameOver2, ARGB(g_FadeCounter, g_FadeCounter, g_FadeCounter, g_FadeCounter)) + } + break + + case 11: + if(FadeWidget(g_wBlack, 500, FADE_BACK)) + { +// g_DemoEndVideo = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_SOURCEALPHA|WF_BLEND|WF_CENTER, 0x00ffffff, 126) +// LoadWidgetImage(g_DemoEndVideo, 0, "gfx/endscreen_request.tga") +/* g_DemoEndVideo = CreateWidget(WTYPE_TEXT, 0, 295, 800, 60, WF_SOURCEALPHA|WF_BLEND|WF_CENTER, 0x00ffffff, 126) + SetFont(g_DemoEndVideo, LargeFont) + SetWidgetText(g_DemoEndVideo, 0, "End of Demo") + SetWidgetText(g_DemoEndVideo, 1, "Press any key to main menu...")*/ + g_EndStatus = 12 + } + break + + case 12: + if(Delay(100)) + { + g_sNextLevel = "finale" + g_EndStatus = 10 + } + break + + case 13: + if(FadeWidget(g_DemoEndVideo, 500, FADE_BACK)) + { + g_EndStatus = 14 + } + break + + case 14: + if(AnyKey()) + g_EndStatus = 15 + break + + case 15: + if(FadeWidget(g_DemoEndVideo, -500, FADE_BACK)) + { + g_sNextLevel = "finale" + g_EndStatus = 10 + } + break + + case 1: + if(g_sNextLevel == "demoend") + g_EndStatus = 11 + else + { + switch(g_sNextLevel) + { + case "Escape=Menu LMB=Restart": + g_EndStatus = 20 + break + + case "finale": +// ShowWidget(g_wBlack, false) + EndGameMessageLeft = g_iWidth / 2 + EndGameMessageTop = g_iHeight / 2 + EndGameMessageHeight = 512 + EndGameMessageWidth = 512 + EndGameMessageLeft -= EndGameMessageWidth / 2 + EndGameMessageTop -= EndGameMessageHeight / 2 + + EndGameMessage = CreateWidget(WTYPE_TEXT, EndGameMessageLeft, EndGameMessageTop, EndGameMessageWidth, EndGameMessageHeight, /*WF_VISIBLE|*/WF_SOURCEALPHA|WF_BLEND|WF_NOFILTER|WF_EXACTSIZE|WF_EXACTPOS|WF_CENTER|WF_VCENTER, 0x00ffffff, 150) + SetWidgetTextEx(EndGameMessage, 0, true, "#the_end") + SetWidgetTextColor(EndGameMessage, ARGB(255, 255, 255, 255)) + SetWidgetColor(EndGameMessage, ARGB(0, 0, 0, 0)) + SetFont(EndGameMessage, LargeFont) + g_EndStatus = 3 + break + + case "finale_skip": + if(globalmap) //mapa sa uz neupdatuje tak musim zrusit zvuk ktory prave hraje + { + SetCurrentMap(globalmap) + + if(World.MusicPlayer) + World.MusicPlayer.InterruptPlaying() + } + + SetWidgetColor(g_wBlack, 0xffffffff) + ShowWidget(g_wBlack, true) + g_sNextLevel = "finale" + g_EndStatus = 1 + break + + default: + g_EndStatus = 9 + } + } + break +/* + case 2: + if(FadeWidget(g_wBlack, 200, FADE_BACK)) + g_EndStatus = 3 +// EndGameScreen = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, WF_VISIBLE, 0xffffffff, 10) +// LoadWidgetImage(EndGameScreen, 0, "gfx/black.tga") + break*/ + + case 3: + if(FadeWidget(EndGameMessage, 100, FADE_TEXT)) + g_EndStatus = 4 + break + + case 4: + if(Delay(300)) + { + g_EndStatus = 5 + InitCredits() + } + break + + case 5: + UpdateCredits() + + if(EndGameMessageTop > -EndGameMessageHeight) + { + EndGameMessageTop -= ftime * CreditsSpeed + SetWidgetPos(EndGameMessage, EndGameMessageLeft, EndGameMessageTop, EndGameMessageWidth, EndGameMessageHeight) + } + else + ShowWidget(EndGameMessage, false) + + if(g_EscKey) + { + g_EscKey = false + g_EndStatus = 10 + ShowWidget(g_wBlack, true) + } + break +/* + case 6: + if(FadeWidget(g_wBlack, 1000, FADE_BACK)) + g_EndStatus = 10 + break +*/ + case 9: + if(FadeWidget(g_wBlack, 300, FADE_BACK)) + g_EndStatus = 10 + break + + case 10: + g_EndStatus = 0 + //prechod do dalsiho levelu + SetWidgetWorld(WView, NULL, 0) + + if(g_sNextLevel == "demoend") + { + g_EndStatus = 11 + return true + } + + if(g_sNextLevel == "finale" || g_sNextLevel == "gameover" || g_RunMode == RUNMODE_TUTORIAL) + { + UnloadMap() + + if(g_DemoEndVideo) + DestroyWidget(g_DemoEndVideo) + + g_DemoEndVideo = NULL + StopVideoSound() + +/* if(EndGameScreen) + { + DestroyWidget(EndGameScreen) + EndGameScreen = NULL + }*/ + + if(EndGameMessage) + { + DestroyWidget(EndGameMessage) + EndGameMessage = NULL + } + + DestroyCredits() + + ShowWidget(g_wBlack, false) + InitMenu(true) + PushMenu("main_menu") + g_iMInGame = 4 + return true + } + else + { + UnloadMap() + + g_FromSavePos = false + globalmap = LoadMapEx(g_sNextLevel) + + if(globalmap == NULL) + { + Error("Can't load next level " + g_sNextLevel) + ShowWidget(g_wBlack, false) + InitMenu(true) + PushMenu("main_menu") + g_iMInGame = 4 + return true + } + } + break + } + } + + if(g_bStartLevel) + { + g_EndStatus = 0 + + if(FadeWidget(g_wBlack, -150, FADE_BACK)) + { + g_bStartLevel = 0 + if(g_wBlack) + ShowWidget(g_wBlack, false) + } + } + + + return true +} + +//================================================================================= +int StWidStat + +void ProcessStartScreens() +{ + if(AnyKey()) + { + LoadBlackWidget() + ShowWidget(g_wBlack, true) +#ifdef DEMO + if(StWidStat == 14) + StWidStat = 15 + else + StWidStat = 12 +#else + StWidStat = 15 +#endif + StopVideoSound() + } + + switch(StWidStat) + { + case 0: + ShowWidget(g_wBlack, false) + + if(!g_StartVideo) + g_StartVideo = CreateWidget(WTYPE_VIDEO, 0, 0, 800, 600, WF_VISIBLE|WF_BLEND|WF_STRETCH, 0xffffffff, 124) + + ShowWidget(g_StartVideo, true) + LoadVideo(g_StartVideo, "video/logo_bes", true) + PlayVideo(g_StartVideo, VP_PLAY) + StWidStat = 1 + StWidStat = 2 + break + + case 1: + if(PlayVideo(g_StartVideo, VP_ISPLAYING) == false) + { + ShowWidget(g_wBlack, true) + StopVideoSound() + StWidStat = 2 + + if(!g_StartScreen) + { + g_StartScreen = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, 0, 0, 124) + LoadWidgetImage(g_StartScreen, 0, "gfx/bluemedium.tga") + ShowWidget(g_StartScreen, true) + SetWidgetColor(g_StartScreen, 0xffffffff) + } + } + break + + case 2: + if(FadeWidget(g_wBlack, -300, FADE_BACK)) + { + StWidStat = 3 + } + break + + case 3: + if(Delay(500)) + { + StWidStat = 4 + } + break + + case 4: + if(FadeWidget(g_wBlack, 300, FADE_BACK)) + { +// StWidStat = 500 + StWidStat = 5 + } + break + /* + case 500: + if(!g_StartScreen) + g_StartScreen = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, 0, 0, 124) + LoadWidgetImage(g_StartScreen, 0, "gfx/apdemo.tga") + ShowWidget(g_StartScreen, true) + SetWidgetColor(g_StartScreen, 0xffffffff) + StWidStat = 501 + break + + case 501: + if(FadeWidget(g_wBlack, -300, FADE_BACK)) + { + StWidStat = 502 + } + break + + case 502: + if(Delay(500)) + { + StWidStat = 503 + } + break + + case 503: + if(FadeWidget(g_wBlack, 300, FADE_BACK)) + { + StWidStat = 5 + } + break +*/ + case 5: + if(g_StartScreen) + ShowWidget(g_StartScreen, false) + LoadVideo(g_StartVideo, "video/logo_idea", true) + PlayVideo(g_StartVideo, VP_PLAY) + ShowWidget(g_wBlack, false) + StWidStat = 6 + break + + case 6: + if(PlayVideo(g_StartVideo, VP_ISPLAYING) == false) + { + StWidStat = 13 + ShowWidget(g_wBlack, true) + ShowWidget(g_StartVideo, false) + StopVideoSound() + } + break +/* + + case 4: + if(Delay(1)) + { + ShowWidget(g_wBlack, false) + LoadVideo(g_StartVideo, "video/local_publisher", true) + PlayVideo(g_StartVideo, VP_PLAY) + ShowWidget(g_StartVideo, true) + StWidStat = 5 + } + break + + case 5: + if(PlayVideo(g_StartVideo, VP_ISPLAYING) == false) + { + ShowWidget(g_wBlack, true) + StopVideoSound() + StWidStat = 6 + } + break + + case 6: + if(Delay(1)) + { + StWidStat = 7 + ShowWidget(g_wBlack, false) + LoadVideo(g_StartVideo, "video/logo_meqon", true) + PlayVideo(g_StartVideo, VP_PLAY) + ShowWidget(g_StartVideo, true) + } + break + + case 7: + if(PlayVideo(g_StartVideo, VP_ISPLAYING) == false) + { + ShowWidget(g_wBlack, true) + StopVideoSound() + StWidStat = 8 + } + break + + case 8: + if(Delay(1)) + { + ShowWidget(g_wBlack, false) + LoadVideo(g_StartVideo, "video/nvidia", true) + PlayVideo(g_StartVideo, VP_PLAY) + ShowWidget(g_StartVideo, true) + StWidStat = 9 + } + break + + case 9: + if(PlayVideo(g_StartVideo, VP_ISPLAYING) == false) + { + ShowWidget(g_wBlack, true) + StopVideoSound() + StWidStat = 10 + } + break + + case 10: + if(Delay(1)) + { + ShowWidget(g_wBlack, false) + LoadVideo(g_StartVideo, "video/soundblaster", true) + PlayVideo(g_StartVideo, VP_PLAY) + ShowWidget(g_StartVideo, true) + StWidStat = 11 + } + break + + case 11: + if(PlayVideo(g_StartVideo, VP_ISPLAYING) == false) + { + StopVideoSound() + StWidStat = 14 + } + break +*/ + case 12: + if(FadeWidget(g_wBlack, 300, FADE_BACK)) + { + if(!g_StartScreen) + g_StartScreen = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, 0, 0, 124) + + LoadWidgetImage(g_StartScreen, 0, "gfx/menu/apdemo.jpg") + ShowWidget(g_StartScreen, true) + SetWidgetColor(g_StartScreen, 0xffffffff) + StWidStat = 13 + } + break + + case 13: + ShowWidget(g_wBlack, false) + if(FadeWidget(g_StartScreen, 333, FADE_BACK)) + StWidStat = 14 + break + + case 14: + //if(Delay(20000)) + //{ + StWidStat = 15 + //} + break + + case 15: + if(g_StartScreen) + DestroyWidget(g_StartScreen) + + if(g_StartVideo) + DestroyWidget(g_StartVideo) + + g_StartScreen = NULL + g_StartVideo = NULL + + g_FirstRun = false + InitMenu(true) + PushMenu("main_menu") +// ShowWidget(WComDemo, true) + break + } +} + +//================================================================================= +#ifdef _XBOX +void UpdateStatKeysXBox() +{ + if(JoyButtonState(JB_BACK, false)) + { + if(JoyButtonState(JB_A, false)) + { + JoyButtonState(JB_A, true) + g_iStats++ + if(g_iStats >= 3) + g_iStats = 0 + } + + if(JoyButtonState(JB_B, false)) + { + JoyButtonState(JB_B, true) + if(g_iWire == 0 && g_iDepthComplex == 0) + { + g_iWire = 1 + } + else + { + if(g_iWire == 1) + { + g_iWire = 0 + g_iDepthComplex = 1 + } + else + { + if(g_iDepthComplex == 1) + { + g_iDepthComplex = 0 + g_iWire = 0 + } + } + } + } + } +} +#endif +//================================================================================= +void UpdateStatKeys() +{ + if(KeyState(KC_RCONTROL) == true) + { + if(KeyState(KC_F8) == true) + { + ClearKey(KC_F8) + + d_showboxes = d_showboxes + 1 & 3 + } + } + + if(KeyState(KC_F8) == true) + { + ClearKey(KC_F8) + g_iStats++ + if(g_iStats >= 3) + g_iStats = 0 + } + + if(KeyState(KC_F9) == true) + { + ClearKey(KC_F9) + + if(KeyState(KC_LSHIFT) || KeyState(KC_RSHIFT)) + { + r_showrb = 1 - r_showrb + } + else + { + if(g_iWire == 0 && g_iDepthComplex == 0) + { + g_iWire = 1 + } + else + { + if(g_iWire == 1) + { + g_iWire = 0 + g_iDepthComplex = 1 + } + else + { + if(g_iDepthComplex == 1) + { + g_iDepthComplex = 0 + g_iWire = 0 + } + } + } + } + } +} + + +//================================================================================= +int UpdateMenu() +{ + if(g_wBlack) + ShowWidget(g_wBlack, false) //v menu nesmie byt vidiet v ziadnom pripade cierny widget + + string res = GUIUpdateMenu() + + if(res == "_ESCAPE") //escape v ktoromkolvek menu + { + if(MenuActive == "main_menu") //quit z hry. + { +//must not quit!!! +#ifdef _XBOX + return true +#endif + + UnloadMenuMap() + FreeMenu() +//#ifdef DEVELOPER + Cleanup() + return false +//#endif + SetSplash() + return false + } + + if(ListKeyInput != 0) //Kdyz se zrovna edituje klavesa v controls menu + return true + + if(PopMenu(false)) + return true //keep in menu + else + { + FreeMenu() + + //exception = back to game + if(g_iMInGame == 4) + { + Back2Game(globalmap) + return true + } + +//#ifdef DEVELOPER + Cleanup() + return false +//#endif + SetSplash() + return true + } + } + + if(res == "") + { + if(MenuActive == "controls_menu") + SetItemsPosition(ListboxItemWidgets, ListboxPrimaryWidget, ListboxSecondaryWidget, ListboxBack, Scrollbar, SelectedLine, ListboxCol0Pos, ListboxCol1Pos, ListboxCol2Pos, ItemOffsetV, ListboxItemsNum) + + if(MenuActive == "loadgame_menu") + ProcessLoadSavedMap() + + if(MenuActive == "savegame_menu") + ProcessSaveMap() + + if(MenuActive == "credits_menu") + UpdateCredits() + + return true //keep in menu + } + + switch(MenuActive) + { + case "newgame_menu": + g_RunMode = RUNMODE_NORMAL + + switch(res) + { + case "newgame_easy": + BeforeNewGame(DIFFICULTY_EASY) + g_DifficultySelected = DIFFICULTY_EASY + break + case "newgame_normal": + BeforeNewGame(DIFFICULTY_NORMAL) + g_DifficultySelected = DIFFICULTY_NORMAL + break + case "newgame_hard": + BeforeNewGame(DIFFICULTY_HARD) + g_DifficultySelected = DIFFICULTY_HARD + break + default: + if(strstr(res, "newgame_") == 0) //z pripdaneho rozstrelu + { + BeforeNewGame(DIFFICULTY_NORMAL) + string levname = substr(res, 8, strlen(res) - 8) + LoadCustomLevel(levname) + } + break + } + +#ifdef DEMO + PushMenu("newgame_menu2") +#else + LoadCustomLevel("l0i") +#endif + break + +#ifdef DEMO + case "newgame_menu2": + g_RunMode = RUNMODE_NORMAL + + if(strstr(res, "newgame_") == 0) //z pripdaneho rozstrelu + { + string lvl = substr(res, 8, strlen(res) - 8) + BeforeCustomLevel(g_DifficultySelected, lvl) + LoadCustomLevel(lvl) + } + break +#endif + + case "main_menu": + switch(res) + { + case "main_continue_game": + g_RunMode = RUNMODE_NORMAL + g_SaveSelected = 0 + LoadSavedPosition(GetLastSavedSlot()) //nahrajeme poslednu sejvnutu poziciu + break + + case "main_new_game": //natvrdo. pre vyber cez ikony je v menu.h GUIAction(GUI_ACTION_MENU, "newgame_menu") + g_RunMode = RUNMODE_NORMAL + BeforeNewGame(DIFFICULTY_NORMAL) + LoadCustomLevel("l0i") + break + + case "main_tutorial": + g_RunMode = RUNMODE_TUTORIAL + BeforeNewGame(DIFFICULTY_NORMAL) + LoadCustomLevel("l00") + break + + case "main_load_game": +// PushMenu("load_game") +// LoadSaveList() +// ShowSavesListbox(true) + return true + break + + case "main_exit": + UnloadMenuMap() + FreeMenu() +//#ifdef DEVELOPER + Cleanup() + return false +//#endif + SetSplash() + return true + } + break + + case "audio_menu": + g_iEffectsVolume = ItemValues[26] + g_iMusicVolume = ItemValues[27] + + if(res == "audio_eax") + { + if(ItemValues[11]) + GUIDisableItem("audio_quality") + else + GUIEnableItem("audio_quality") + } + break + + + case "ingame_menu": + switch(res) + { + case "ingame_resume_game": + PopMenu(false) + FreeMenu() + Back2Game(globalmap) + + return true + + case "ingame_quit": + UnloadMap() + PopMenu(false) + InitMenu(true) + PushMenu("main_menu") + return true + } + break + + case "video_menu": + if(res == "video_shaders") + { + //lower terrain quality + ItemValues[35] = 0 + ItemValues[36] = 0 + ItemValues[37] = 0 + } + + if(res == "video_filtering") + { + if(ItemValues[23] != 2) + GUIDisableItem("video_aniso") + else + GUIEnableItem("video_aniso") + } + break + + case "advanced_menu": + if(res == "advanced_terrquality") + { + if(ItemValues[37]) + { + GUIEnableItem("advanced_terrparallax") + } + else + { + if(ItemValues[35]) + SwitchMenuItem("advanced_terrparallax", 1) + GUIDisableItem("advanced_terrparallax") + } + } + break + + case "loadgame_menu": + switch(res) + { + case "loadgame_load": //Stlacene Load + if(SaveTypes[g_SaveSelected] > SAVETYPE_EMPTY) + { + if(g_IMBackground) + { + DestroyWidget(g_IMBackground) + g_IMBackground = NULL + } + + UnloadMap() + LoadSavedPosition(g_SaveSelected) + } + return true + + case "loadgame_cancel": + if(ConfDialog) + { + delete ConfDialog + ConfDialog = NULL + } + LB_EnableEvents(true) + return true + + case "loadgame_delete_yes": + if(ConfDialog) + { + delete ConfDialog + ConfDialog = NULL + } + DeleteSavedPosition() + ClearMousePress(0) + ClearKey(KC_RETURN) + LB_EnableEvents(true) +/* + if(SaveTypes[g_SaveSelected] == SAVETYPE_NONE) + { + GUIDisableItem("loadgame_load") + GUIDisableItem("loadgame_delete") + }*/ + return true + + case "loadgame_delete": + RequestForDelete("loadgame_delete_yes", "loadgame_cancel") + return true + } + return true + + case "savegame_menu": + switch(res) + { + case "savegame_overwrite_yes": + if(ConfDialog) + { + delete ConfDialog + ConfDialog = NULL + } + SaveToSelectedSlot() + LB_EnableEvents(true) + PopMenu(false) //hra bola ulozena takze skocime o menu vysie + return true + + case "savegame_cancel": + if(ConfDialog) + { + delete ConfDialog + ConfDialog = NULL + } + LB_EnableEvents(true) + return true + + case "savegame_save": + if(RequestForSave() == true) + PopMenu(false) //hra bola ulozena takze skocime o menu vysie + return true + + case "savegame_delete_yes": + if(ConfDialog) + { + delete ConfDialog + ConfDialog = NULL + } + DeleteSavedPosition() + ClearMousePress(0) + ClearKey(KC_RETURN) + LB_EnableEvents(true) +/* + if(SaveTypes[g_SaveSelected] == SAVETYPE_NONE) + { + GUIDisableItem("loadgame_load") + GUIDisableItem("loadgame_delete") + }*/ + return true + + case "savegame_delete": + RequestForDelete("savegame_delete_yes", "savegame_cancel") + return true + } + return true + break + } + + return true +} + +//================================================================================= +int update() +{ + UpdateShaders() + +#ifdef _XBOX + UpdateJoyButtons() +#endif + + if(MenuMap != NULL) + { + PlayMap(MenuMap) + } + + if(g_FirstRun) + { + ProcessStartScreens() + return true + } + +#ifndef _XBOX + UpdateMouseButtons() + UpdateMouseStatus() +#endif + +#ifdef DEVELOPER + UpdateStatKeys() +#endif + +#ifdef _XBOX + UpdateStatKeysXBox() +#endif + + switch(g_iMInGame) + { + //exit splash screen + case 666: + if(AnyKey()) + { + LoadWidgetImage(WSplash, 0, "gfx/last_screen2.jpg") + g_iMInGame = 667 + } + return true + + case 667: + if(AnyKey()) + { + LoadWidgetImage(WSplash, 0, "gfx/last_screen3.jpg") + g_iMInGame = 668 + } + return true + + case 668: + if(AnyKey()) + { + DestroyWidget(WSplash) + Cleanup() + return false + } + return true + + //------------------------ IN GAME SECTION --------------------------- + case -1: + if(g_wLoading) + { + float c = sin(Flash) * 64 + 191 + SetWidgetTextColor(g_wLoading, AWHITE(c)) + Flash += 0.1 + } + + if(AnyKey()) + { + AfterLoading() + g_iMInGame = 1 + } + return true + + case 1: + return GameUpdate() + + //on game exit + case 2: + if(DebugLevel) + { + UnloadMap() + SaveConfig() + Cleanup() + return false + } + + InitMenu(false) + PushMenu("ingame_menu") + + int MapHandle = SetCurrentMap(globalmap) + DisableEnemies(true) + World.PlayerControl = 0 + SetCurrentMap(MapHandle) + + string bitmap + int wflags = WF_VISIBLE | WF_NOFILTER | WF_SOURCEALPHA|WF_BLEND + int wWidth, wHeight + + g_IMBackground = CreateWidget(WTYPE_IMAGE, 0, 0, 800, 600, wflags, 0xaa7f7f7f, 200) + LoadWidgetImage(g_IMBackground, 0, "gfx/black.tga") + + g_iMInGame = 4 + return true + //------------------------ IN MENU SECTION --------------------------- + + default: + return UpdateMenu() + } + + return true +} + +//================================================================================= +int init() +{ + //debug + LoadConfig() + +#ifdef DEVELOPER + LoadDeveloperConfig() +#endif + + g_lod = 0.001 + g_iFly = false + g_fDopplerFactor = 1.0 + return true +} + +#ifdef DEVELOPER + #include "scripts/viewer.h" + #include "scripts/pviewer.h" +#endif + +//================================================================================= +void InitConfig() +{ + string vmode = itoa(g_iWidth) + "x" + itoa(g_iHeight) + + for(g_iVMode = 0; g_iVMode < sizeof(g_sVideoModes); g_iVMode++) + { + if(vmode == g_sVideoModes[g_iVMode]) + break + + if(g_sVideoModes[g_iVMode] == "") + { + g_sVideoModes[g_iVMode] = vmode + break + } + } +} + +#ifdef _XBOX +int g_expired +#endif + +//================================================================================= +void BasicInit() +{ + WView = CreateWidget(WTYPE_VIEW, 0, 0, 800, 600, WF_VISIBLE, 0, 0) + WMousePointer = CreateWidget(WTYPE_IMAGE, 0, 0, 63, 63, WF_SOURCEALPHA|WF_BLEND|WF_EXACTSIZE|WF_NOFILTER, 0xffffffff, 999) + LoadWidgetImage(WMousePointer, 0, "gfx/cursor.tga") + + LargeFont = CreateFontEx("font_large") + SmallFont = CreateFontEx("font_small") + MainFont = CreateFontEx("font_main") + + CMinClass = Type("MinClass") + CExtClass = Type("ExtClass") + CFuncClass = Type("FuncClass") + CDoorClass = Type("DoorClass") + CItemClass = Type("ItemClass") + CItemMisc = Type("item_misc") + + CFireWeaponClass = Type("FireWeaponClass") + CSteelWeaponClass = Type("SteelWeaponClass") + CWeaponClass = Type("WeaponClass") + + CTriggerClass = Type("TriggerClass") + CTriggerHackDetector = Type("trigger_hack_detector") + CCreatureClass = Type("CreatureClass") + CAICreatureClass = Type("AICreatureClass") + CMiscPhysicsModel = Type("misc_physics_model") + CPhysicsPart = Type("physics_part") + CMiscPhysicsGlass = Type("misc_physics_glass") + CItemWeaponMine = Type("item_weapon_mine") + CGlassDebris = Type("GlassDebris") + CItemWeaponSteel = Type("item_weapon_steel") + CBrkDebris = Type("brk_debris") + CProjectile = Type("Projectile") + CTriggerDynamic = Type("trigger_dynamic") + CFuncDoor = Type("func_door") + CFuncDoorRot = Type("func_door_rot") + CRigidBodyClass = Type("RigidBodyClass") + CMiscPhysicsPack = Type("misc_physics_pack") + CParticleEffector = Type("misc_particle_effector") + CInfoWaypoint = Type("info_waypoint") + CInfoPath = Type("info_path") + CInfoConnection = Type("info_connection") + CInfoNull = Type("info_null") + CInfoPathSwitch = Type("info_pathswitch") + CEnterableVehicle = Type("EnterableVehicle") + CRBone = Type("RBone") + CJointClass = Type("JointClass") + + if(!dMaterialLoad("obj/materials.xml")) + { + DPrint("Can't load obj/materials.xml") + } +} + +//================================================================================= +bool CommonInit(bool initanims, bool initsounds) +{ + //pomocne bitove masky + TRACE_DEFAULT = TRACE_WORLD|TRACE_DETAIL|TRACE_PATCH|TRACE_ENTS + NOISE_NOSHOT_MASK = NOISE_FOOTSTEP|NOISE_THUD + + if(!CompileAnims("anm/anim.def")) + return false + + if(LoadStringTable("strings.xml") == 0) + DPrint("Can't load string table") + + InitSkeletons() + +#ifdef DEVELOPER + ComputerName = " " + int len[2] = {33} + + GetComputerNameA(ComputerName, len) + strlower(ComputerName) +#endif + + if(initsounds) + { + LoadSoundSets() + LoadSounds() + } + + LoadSoundMaterials() + + Init_Keynames() + InitWidgets() + CalculateGlassMaskUV() //predpocita UVcka pre vsetky rozbitelne skla + + g_iPhysicsIteration = 20 //pocet iteracii. + g_fPhysicsErrorReduction = 10 //vysia hodnota viac napravuje chyby. + g_fPhysicsTolerance = 0.001 //vsetky iteracie sa nevykonaju pokial su chyby mensie nez tato hodnota. default 0 + g_fPhysicsCollisionEpsilon = 0.015 //tolerance detektoru kolizi + + float Extends[2] + Extends[0] = PlayerCapsuleExtends[0] * 2 + Extends[1] = PlayerCapsuleExtends[1] * 2 + + for(int n = 0; n < 2; n++) + { + PlayerCapsuleHeights[n] = Extends[n] + (PlayerCapsuleRadius * 2) + PlayerCapsuleHalfHeights[n] = PlayerCapsuleHeights[n] * 0.5 + } + + InitPhysicsPartsDef() + InitDecalDefs() + InitHurtFactors() +} + +//================================================================================= +int main(string parms) +{ +// parms = "l01" +//d_pathengine = 1 +//r_specularbias = 1 +//r_diffuse = 0 + + InitConfig() + SaveConfig() + + BasicInit() + + strlower(parms) + + if(strstr(parms, ".ptc") != -1) + CommonInit(false, false) + else + { + if(strstr(parms, ".xob") != -1) + { + CompileAnims("anm/anim.def") + } + else + CommonInit(true, true) + } + +#ifdef DEVELOPER + + if( parms != "") + { + g_iMInGame = 1 + DebugLevel = true + + if(strlen(parms) > 9 && substr(parms, 0, 9) == "creature_") + { + gOBJType = 4 + g_Viewer = true + if(CreatureViewer(parms) == false) + { + Cleanup() + return false + } + } + else + { + string name + int p = strstr(parms, tostr(34)) + if(p >= 0) + { + name = substr(parms, p + 1, strlen(parms) - p - 1) + + p = strstr(name, tostr(34)) + if(p >= 0) + { + name = substr(name, 0, p) + } + name = GetRelativeFilePath(name) + } + else + name = GetRelativeFilePath(parms) + + if(strstr(name, ".xob") != -1) + { + gOBJType = 1 + g_Viewer = true + if(TOBViewer(name) == false) + { + Cleanup() + return false + } + } + else + { + if(strstr(name, ".dpl") != -1) + { + g_Viewer = true + if(DPLViewer(name) == false) + { + Cleanup() + return false + } + } + else + { + if(strstr(name, ".ptc") != -1) + { + gOBJType = 2 + g_Viewer = true + if(TOBViewer(name) == false) + { + Cleanup() + return false + } + } + else + { + if(WRLViewer(name) == false) + { + Cleanup() + return false + } + return true + } + } + } + } + + Back2Game(globalmap) + return true + } + +#endif + + DebugLevel = false + SaveConfig() + +#ifdef DEVELOPER + InitMenu(true) + PushMenu("main_menu") +#else +// LoadStartScreens() + LoadBlackWidget() //prekryjeme uvodne bliknutie + ShowWidget(g_wBlack, true) + g_FirstRun = true +#endif + + return true +} diff --git a/Alpha Prime/Mod/scripts/shaders.h b/Alpha Prime/Mod/scripts/shaders.h new file mode 100644 index 0000000..de47095 --- /dev/null +++ b/Alpha Prime/Mod/scripts/shaders.h @@ -0,0 +1,109 @@ +const float g_RefractGlassMat0[4] = {0.02, 0.0, 0.0, 0.0} +const float g_RefractGlassMat1[4] = {0.0, 0.02, 0.0, 0.0} + +float g_fTime,g_fTime01,g_fTime001,g_fTime10,g_fTime100 +float g_fTimeR,g_fTime01R,g_fTime001R,g_fTime10R,g_fTime100R +float g_fRotate,g_fRRotate +float g_fScaleSin,g_fScaleSin100 +float g_fHSRotate, g_fHMRotate, g_fHHRotate +float g_ShaderShift +float g_lightningU, g_lightningV +int g_iAngle +float g_fNoiseU, g_fNoiseV + + +int g_iColorElevatorBig01_L1 +int g_iColorElevatorBig01_L2 + + +float g1 = 0.1 +float g2 = 0.05 + +//================================================================= +float tab(float table[], float t) +{ + int s = sizeof(table) + int i = floor(t) + + t = t - i + i = i % s + + return 1 - t * table[i] + (t * table[i + 1 % s]) +} + +//================================================================= +float wave[2] = {155, 255} +float DronFlare[2] = {0, 20} +float LiftL1[12] = {255, 20, 20, 20, 20, 20, 50, 20, 20, 20, 20, 20} +float LiftL2[12] = { 20, 20, 20,255, 20, 20, 20, 20, 20, 50, 20, 20} + + +//================================================================= +void UpdateShaders() +{ + + float t + int jbc + + g_fTime100 = g_fTime * 100 + g_fTime10 = g_fTime * 10 + g_fTime01 = g_fTime * 0.1 + g_fTime001 = g_fTime * 0.01 + g_fTimeR = 0 - g_fTime + g_fTime100R = 0 - g_fTime100 + g_fTime10R = 0 - g_fTime10 + g_fTime01R = 0 - g_fTime01 + g_fTime001R = 0 - g_fTime001 + +// -- Elevator big 01 ------ + jbc = tab(LiftL1, g_fTime10) + g_iColorElevatorBig01_L1 = ARGBF(255, jbc, jbc, jbc) + jbc = tab(LiftL2, g_fTime10) + g_iColorElevatorBig01_L2 = ARGBF(255, jbc, jbc, jbc) + + +// lightning animtex 8 x 4 pole +/* + lightningspeed = g_fTime100 * 25 + g_lightningU = lightningspeed * 0.125 + g_lightningU = floor( g_lightningU * 0.01) * 0.25 + g_lightningV = floor( lightningspeed * 0.01) * 0.125 +*/ + g_lightningU = floor( g_fTime100 * 0.03125 ) * 0.25 + g_lightningV = floor( g_fTime100 * 0.25 ) * 0.125 + + +// -- OTHERS ------ + vector vec = Vector(-sin(g_fTime * 4), cos(g_fTime * 4), 1) + + VectorNormalize(vec) + vec = vec * (float)0.7 + g_iAngle = VectortoRGBA(vec, 0.5) + + g_ShaderShift = g_ShaderShift + ftime + + t = g_fTime * 2.0 + g_fScaleSin = sin(t) * 0.5 + 1 + + g_fScaleSin100 = sin(t) * 100 + + t = ftime * 0.5 + g_fRotate = g_fRotate + t + + t = ftime * 0.1047 + g_fHSRotate = g_fHSRotate - t + t = ftime * 0.001745 + g_fHMRotate = g_fHMRotate - t + t = ftime * 0.0002908 + g_fHHRotate = g_fHHRotate - t + + g_fRRotate = 0 - g_fRotate * 2 +// if(g_fRotate > M_PI2) +// g_fRotate = g_fRotate - M_PI2 + + g_fTime += ftime + + g_fNoiseU = frand(-1, 1) + g_fNoiseV = frand(-1, 1) + +} \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/soundset.h b/Alpha Prime/Mod/scripts/soundset.h new file mode 100644 index 0000000..58ffacb --- /dev/null +++ b/Alpha Prime/Mod/scripts/soundset.h @@ -0,0 +1,454 @@ +//================================================================================= +// TODO: Move it elsewhere! +//================================================================================= +const int ST_RELOADING = 1 //prebijeni zbrane. Vykriky kryjte me apod. +const int ST_CHANGINGWP = 2 //zmena strelecke pozice, protoze stavajici stoji za hovno. +const int ST_TAKECOVER = 3 //dostal kour a klidi se na krytou pozici. +const int ST_ALERT = 4 //byl v klidu a spatril nepritele. +const int ST_ALERTBYATTACK = 5 //byl v klidu a uvidel jak do jeho kamose strili nepritel +const int ST_ALERTBYSOUND = 6 //byl v klidu a zaslechl podezrely zvuk, takze se jde podivat, co se deje. Obvykle + //vzapeti nasleduje faze 4. protoze treba zaslechne kroky a otoci se, cimz spatri nepritele. +const int ST_ALERTBYDEAD = 7 //byl v klidu a nasel mrtvolu. Jde se podivat o co jde. +const int ST_ALERTBYSHOT = 8 // byl v klidu a dostal zasah. +const int ST_ALERTBYFRIENDISSHOT = 9 // byl v klidu a videl kamose, jak dostal zasah. +const int ST_SQUADATTACKED = 10 // skupina byla prepadena +const int ST_TEAMMATEKILLED = 11 // nekdo ze skupiny byl zabit +const int ST_SQUADLASTMAN = 12 // ve skupine zbyva posledni clovek +const int ST_GRENADE = 13 //kurva, granat! +const int ST_SIZEOF = 14 + +const int SPEAKERS_COUNT = 4 + +class SpeechSet extends _serializable +{ + string Name + + hsound Samples[ST_SIZEOF][16] + string SampleNames[ST_SIZEOF][16] + int Counts[ST_SIZEOF] + int Position[ST_SIZEOF] + int LoadCount + +//----------------------------------------------------------------- + hsound GetSound(int type) + { + int pos = Position[type] + hsound hs = Samples[type][pos] + + pos++ + if(pos > Counts[type]) + pos = 0 + + Position[type] = pos + + return hs + } + +//----------------------------------------------------------------- + bool HasSounds(int type) + { + if(Counts[type]) + return true + + return false + } + +//----------------------------------------------------------------- + void Load() + { + LoadCount++ + if(LoadCount > 1) + return + + for(int t = 0; t < ST_SIZEOF; t++) + { + for(int n = 0; n < Counts[t]; n++) + { + Samples[t][n] = GetSoundEx(SampleNames[t][n], 1, SF_3D) + } + } + } + +//----------------------------------------------------------------- + void Unload() + { + LoadCount-- + if(LoadCount > 0) + return + + for(int t = 0; t < ST_SIZEOF; t++) + { + for(int n = 0; n < Counts[t]; n++) + { + Samples[t][n] = HNULL + } + } + } + +//----------------------------------------------------------------- + void SpeechSet(string name) + { + Name = name + } +} + +class SoundSet +{ + string Name + int Count +} + +//Humus, ale setri pamet. Pouzijeme jen tolik, kolik potrebujem +//TODO: pouvazovat nad dynamickym polem :-/ +class SoundSet16 extends SoundSet +{ + string Sounds[16] + int Numbers[16] +} + +class SoundSet32 extends SoundSet +{ + string Sounds[32] + int Numbers[32] +} + +class SoundSet64 extends SoundSet +{ + string Sounds[64] + int Numbers[64] +} + +SoundSet64 SoundSets[96] +int NumSoundSets + +//--------------------------------------------------------------------------------- +bool LoadSoundSet(string name, hsound sounds[], bool global = false) +{ + for(int n = 0; n < NumSoundSets; n++) + { + int sf = 0 + + if(global) + sf = SF_GLOBAL + + SoundSet64 ss = SoundSets[n] + if(ss.Name == name) + { + for(int s = 0; s < ss.Count; s++) + { + sounds[ss.Numbers[s]] = GetSoundEx(ss.Sounds[s], 0, sf) + } + return true + } + } + + DPrint("Can't found SoundSet '" + name + "'") + return false +} + +//--------------------------------------------------------------------------------- +SoundSet64 AddSoundSet(string name, int count, string names[], int numbers[]) +{ + SoundSet64 ss + + if(count > 32) + ss = new SoundSet64 + else + { + if(count > 16) + ss = new SoundSet32 + else + ss = new SoundSet16 + } + + ss.Name = name + ss.Count = count + +// Print(String("AddSoundSet " + name)) + + for(int n = 0; n < count; n++) + { + // Print(String("Sound " + names[n] + " " + itoa(numbers[n]))) + ss.Sounds[n] = names[n] + ss.Numbers[n] = numbers[n] + } + + SoundSets[NumSoundSets++] = ss + + return ss +} + +//--------------------------------------------------------------------------------- +void CleanupSoundSets() +{ + for(int n = 0; n < NumSoundSets; n++) + { + delete SoundSets[n] + SoundSets[n] = NULL + } + NumSoundSets = 0 +} + +//--------------------------------------------------------------------------------- +bool LoadSoundSets() +{ + CleanupSoundSets() + + int f = OpenFile("scripts/definitions/soundsets.h", FILEMODE_READ) + + if(f == NULL) + { + DPrint("Can't load 'scripts/definitions/soundsets.h'") + return false + } + + string line + string name + + string sounds[128] + int numbers[128] + int count + int linenum = 0 + while(FGets(f, line) >= 0) + { + linenum++ + string token + + int type = ParseStringEx(line, token) + + if(type == 1) + { + if(token == "{") + { + //assert(name != "") + continue + } + + if(token == "}") + { + //assert(name != "") + AddSoundSet(name, count, sounds, numbers) + count = 0 + name = "" + continue + } + DPrint("SoundSet: Syntax error on line " + itoa(linenum)) + return false + } + + if(type != 3) + { + continue + } + + if(token == "soundset") + { + if(ParseStringEx(line, name) != 2) + { + DPrint("SoundSet: Syntax error on line " + itoa(linenum)) + return false + } + continue + } + + if(token == "sound") + { + if(ParseStringEx(line, token) != 4) + { + DPrint("SoundSet: Syntax error on line " + itoa(linenum)) + return false + } + numbers[count] = atoi(token) + + if(ParseStringEx(line, token) != 1) + { + DPrint("SoundSet: Syntax error on line " + itoa(linenum)) + return false + } + + if(ParseStringEx(line, token) != 2) + { + DPrint("SoundSet: Syntax error on line " + itoa(linenum)) + return false + } + sounds[count] = token + count++ + continue + } + } + CloseFile(f) + return true +} + +//--------------------------------------------------------------------------------- +string RemoveQuotes(string str) +{ + if(strlen(str) >= 2 && substr(str, 0, 1) == tostr(34)) + return substr(str, 1, strlen(str) - 2) + + return str +} + +string SoundMaterials[256] +int NumSoundMaterials +string SndMatParms[256][4] +hsound MaterialSounds[256][3] +int MatRemap[256] +int LogicalMaterials[256] +int PhysMatRemap[256] +int MatHardness[32] + +//--------------------------------------------------------------------------------- +int GetLogicalMaterial(int mat) //Surf2Mat vracia index na predefinovane materialy zo sounds/materials.h .Toto ho prevedie na jeden z 10 defaultnych materialov +{ + return LogicalMaterials[MatRemap[mat]] +} + +//--------------------------------------------------------------------------------- +hsound GetImpactSound(int Mat1, int Mat2) +{ + return MaterialSounds[MatRemap[Mat1]][MatHardness[MatRemap[Mat2]]] +} + +//--------------------------------------------------------------------------------- +void LoadSoundMaterials() +{ + int n + string tokens[32] + int NumTokens + string uv = tostr(34) + string DefinitionFile = "sound/materials.h" + tparse tp = BeginParse(DefinitionFile) + NumSoundMaterials = 0 + int CloneIndex = 32 //od 32 zacinaju custom (sound) materialy + int RetypeIndex = MATERIAL_LAST //od MATERIAL_LAST do 31 budu custom fyzikalne materialy (material/player a pod) + string PhysMat, SndMat + + + if(!tp) + { + string msg = "No found file " + DefinitionFile + Print(msg) + return + } + + for(n = 0; n < sizeof(MatHardness); n++) + { + MatHardness[n] = 2 + } + + MatHardness[MATERIAL_METAL] = 0 + MatHardness[MATERIAL_IRON] = 0 + MatHardness[MATERIAL_GLASS] = 0 + MatHardness[MATERIAL_BETON] = 0 + MatHardness[MATERIAL_STONE] = 0 + MatHardness[MATERIAL_GRAVEL] = 0 + + MatHardness[MATERIAL_PLASTIC] = 1 + MatHardness[MATERIAL_RUBBER] = 1 + MatHardness[MATERIAL_FLESH] = 1 + + for(n = 0; n < sizeof(MatRemap); n++) + { + MatRemap[n] = 0 + } + + n = 0 + NumTokens = ParseLine(tp, n++, tokens) + + while(NumTokens) + { + switch(tokens[0]) + { + case "material": + SoundMaterials[NumSoundMaterials] = RemoveQuotes(tokens[1]) + SndMatParms[NumSoundMaterials][0] = "" + break + + case "{": + break + + case "physicsmaterial": + SndMatParms[NumSoundMaterials][0] = RemoveQuotes(tokens[2]) + break + + case "sound_hard": + SndMatParms[NumSoundMaterials][1] = RemoveQuotes(tokens[2]) + break + + case "sound_solid": + SndMatParms[NumSoundMaterials][2] = RemoveQuotes(tokens[2]) + break + + case "sound_soft": + SndMatParms[NumSoundMaterials][3] = RemoveQuotes(tokens[2]) + break + + case "}": + PhysMat = SndMatParms[NumSoundMaterials][0] + SndMat = SoundMaterials[NumSoundMaterials] + + if(PhysMat == "") //nema definovany fyzikalny material takze to je defaultny material + { + PhysMat = SndMat + SndMatParms[NumSoundMaterials][0] = PhysMat + } + + int Type = 0 + + if(SndMat != PhysMat) //vytvarame kopiu defaultneho materialu + { + if(dMaterialClone("material/" + SndMat, "material/" + PhysMat, CloneIndex)) //spravime jeho kopiu podla nazvu + { + int PhysInd = dMaterialGetType("material/" + PhysMat) + + Type = PhysMatRemap[PhysInd] + MatRemap[CloneIndex++] = NumSoundMaterials + } + } + else //pokial sa nazov zhoduje s existujucim materialom, ide o definiciu pre defaultny material takze iba nastavime index + { + Type = dMaterialGetType("material/" + PhysMat) + PhysMatRemap[NumSoundMaterials] = Type + + if(Type) + { + if(MatRemap[Type]) //ak niektory custom fyzikalny material pouziva defaultny material, pretypujeme ho + { + MatRemap[RetypeIndex] = NumSoundMaterials + dMaterialSetType("material/" + PhysMat, RetypeIndex) + RetypeIndex++ + } + else + MatRemap[Type] = NumSoundMaterials //defaultny material + } + } + + LogicalMaterials[NumSoundMaterials] = Type + NumSoundMaterials++ + break + } + + NumTokens = ParseLine(tp, n++, tokens) + } + + EndParse(tp) +end:; + + for(n = 0; n < NumSoundMaterials; n++) //nahrajeme zvuky + { + for(int s = 1; s <= 3; s++) + { + if(SndMatParms[n][s]) + MaterialSounds[n][s - 1] = GetSoundEx(SndMatParms[n][s], 1, SF_3D) + } + } +/* Print(NumSoundMaterials) + for(n = 0; n < NumSoundMaterials; n++) + { + int Lg = GetLogicalMaterial(n) + string sss = SoundMaterials[n] + " " + itoa(Lg); + Print(sss) + }*/ +} + diff --git a/Alpha Prime/Mod/scripts/super.h b/Alpha Prime/Mod/scripts/super.h new file mode 100644 index 0000000..7735720 --- /dev/null +++ b/Alpha Prime/Mod/scripts/super.h @@ -0,0 +1,5641 @@ +class CreatureClass; +class info_cutscene; +class func_display; +class DisplayCollection; +class RigidBodyClass; +class ItemCollection; + +int ErrorNum +int g_Subtitles +bool g_Viewer + +vector g_vIdentMatrix[4] = {"1 0 0", "0 1 0", "0 0 1", "0 0 0"} +/* +vector[] OffsetMatrix(vector off) +{ + vector mat[4] = {"1 0 0", "0 1 0", "0 0 1"} + + mat[3] = off + return mat +} +*/ + +vector g_CamMat[4] + +int TRACE_DEFAULT + +float LinearVol(float val) +{ + float tmp = 1 - (val * val * val * val) + tmp = tmp * 0.5 + return val + tmp +} + +//----------------------------------------------------------------- +vector Angles(int angle) +{ +//-1 up +//-2 down +// 0 - 359 angle + +vector out + + out = ZeroVec + + if( angle >= 0) + { + out[YAW] = angle + } + else + { + if( angle == -1) + out[0] = 90 + else + out[0] = 270 + } + + return out +} + +vector atov(string str) +{ + string tokens[3] + string tmp + int pos + vector vv = ZeroVec + + if(strlen(str) < 5) //neni to vector + return ZeroVec + + pos = strstr(str, " ") + if(pos <= 0) + return vv + + vv[0] = atof(substr(str, 0 , pos)) + str = substr(str, pos + 1, strlen(str) - 1 - pos) + + pos = strstr(str, " ") + if(pos <= 0) + return vv + + vv[1] = atof(substr(str, 0 , pos)) + str = substr(str, pos + 1, strlen(str) - 1 - pos) + + vv[2] = atof(str) + + return vv +} + + +string vectoa(vector vec) +{ + float f0 = vec[0] + float f1 = vec[1] + float f2 = vec[2] + + return ftoa(f0) + " " + ftoa(f1) + " " + ftoa(f2) +} + +bool atob(string str) +{ + if(str == "true") + return true + + return false +} + +int StringToColor(string str) +{ + vector rgb = atov(str) + float r = rgb[0] * (float)255 + float g = rgb[1] * (float)255 + float b = rgb[2] * (float)255 + return ARGB(63, r, g, b) +} + +string RemoveChars(string str, string sample) +{ + string chr + string buffer + int lenght = strlen(str) + + if(lenght == 0) + return str + + if(strlen(sample) != 1) + return str + + for(int n = 0; n < lenght; n++) + { + chr = substr(str, n, 1) + if(chr != sample) + buffer = buffer + chr + } + + string result = buffer + buffer = "" + return result +} + +string ReplaceChars(string str, string OldChar, string NewChar) +{ + string chr + string buffer + int lenght = strlen(str) + + if(lenght == 0) + return str + + if(strlen(OldChar) != 1) + return str + + if(strlen(NewChar) != 1) + return str + + for(int n = 0; n < lenght; n++) + { + chr = substr(str, n, 1) + if(chr == OldChar) + chr = NewChar + + buffer = buffer + chr + } + + string result = buffer + buffer = "" + return result +} + +void GetRotatedSpriteUVs(float UVarray[], float angle) +{ + float RadAngle = angle * DEG2RAD + + float s = sin(RadAngle) * 0.5 + float c = cos(RadAngle) * 0.5 + float is = -s + float ic = -c + + UVarray[0] = ic + s + 0.5 + UVarray[1] = is - c + 0.5 + UVarray[2] = c + s + 0.5 + UVarray[3] = s - c + 0.5 + UVarray[4] = c - s + 0.5 + UVarray[5] = s + c + 0.5 + UVarray[6] = ic - s + 0.5 + UVarray[7] = is + c + 0.5 +} + +vector IntersectLines(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) +{ + float a1,b1,c1,a2,b2,c2,det_inv,m1,m2 + float aa,bb + + aa = x1 - x0 + + if (aa != 0) + m1 = y1 - y0 / (x1 - x0) + else + m1 = 99999999999999 // close enough to infinity + + aa = x3 - x2 + + if (aa != 0) + m2 = y3 - y2 / (x3 - x2) + else + m2 = 99999999999999 // close enough to infinity + + a1 = m1 + a2 = m2 + + b1 = -1 + b2 = -1 + + c1 = y0 - (m1 * x0) + c2 = y2 - (m2 * x2) + + aa = a1 * b2 + bb = a2 * b1 + det_inv = 1 / (aa - bb) + + float xi, yi + aa = b1 * c2 + bb = b2 * c1 + xi = aa - bb * det_inv + + aa = a2 * c1 + bb = a1 * c2 + yi = aa - bb * det_inv + return Vector(xi, yi, 0) +} + +//-------------------------------------------------------------- +bool InRect(int left ,int right ,int top ,int bottom ,int X ,int Y) +{ + if(X < left || X > right || Y < top || Y > bottom) + return false + + return true +} + +//-------------------------------------------------------------- +bool InRectEx(int left ,int top ,int width ,int height ,int X ,int Y) +{ + int right = left + width + int bottom = top + height + + if(X < left || X > right || Y < top || Y > bottom) + return false + + return true +} + +//-------------------------------------------------------------- +vector ComputeInertiaForNullBody(float mass) +{ +// float a = mass * 10 + return Vector(mass, mass, mass) +} + +//================================================================== +class Particle extends _eclass +{ + cache 16 + int ClassType + //float ScaleTcMod +} + +//================================================================== +class MinClass extends _eclass +{ + cache 16 + int ClassType + int ClassNum + int status + +//----------------------------------------------------------------- + void MinClass() + { + SetEventMask(this, EV_INIT) + } +} + +const int FADEOUT_START = 1 +const int FADEOUT_END = 2 +const int FADEIN_START = 3 +const int FADEIN_END = 4 + +const int ACT_DISABLE = 0 +const int ACT_ENABLE = 1 +const int ACT_BLOCKED = 2 + +const int ACT_ENTITY_DEFAULT = 0 //user nenastavil nic tak entita nastavuje to co bude pravdepodobne vyhovovat +const int ACT_NONE = 1 //zakazane aktivovanie +const int ACT_USEKEY = 2 +const int ACT_USEKEY_DISP = 3 +const int ACT_USEKEY_DISTANCE = 4 +const int ACT_DISTANCE_ONLY = 5 + +vector GetCenterOfEntity(MinClass ent) +{ + vector Pos, mins, maxs + GetBoundBox(ent, mins, maxs) //GetCBoundBox(ent, mins, maxs) + + vector offset = mins + maxs * (float)0.5 + vector matrix[4] + + GetMatrix4(ent, matrix) + + Pos = VectorMatrixMultiply4(matrix, offset) //musime akceptovat transformaciu +/* + vector Pos, mins, maxs + Pos = GetMatrix(ent, 3) + GetBoundBox(ent,mins,maxs) + mins = Pos + mins + maxs = Pos + maxs + Pos = mins + maxs + Pos = Pos * (float)0.5*/ + return Pos +} + + +class ItemDef extends _serializable +{ + string ID + string name + string description + string model + vobject obj + bool physics + bool pickable + +//--------------------------------------------------------------------------- + void ~ItemDef() + { + if(obj) + { + ReleaseObject(obj, 0) + obj = VNULL + } + } +} + +class ItemCollection extends _serializable +{ + ItemDef Items[256] + int ItemsNum + +//--------------------------------------------------------------------------- + int GetItemIndex(string id) + { + if(!id) + return -1 + + ItemDef CurItem + + for(int n = 0; n < ItemsNum; n++) + { + CurItem = Items[n] + + if(CurItem.ID == id) + return n + } + return -1 + } + +//--------------------------------------------------------------------------- + ItemDef GetItem(string id) + { + int index = GetItemIndex(id) + + if(index == -1) + return NULL + + return Items[index] + } + +//--------------------------------------------------------------------------- + ItemDef GetItemFromIndex(int index) + { + if(index >= ItemsNum) + return NULL + + if(index == -1) + return NULL + + return Items[index] + } + +//--------------------------------------------------------------------------- + vobject GetObjectFromID(string id) + { + ItemDef CurItem = GetItem(id) + + if(!CurItem) + return VNULL + + if(CurItem.obj == VNULL) + CurItem.obj = GetObject(CurItem.model) + + return CurItem.obj + } + +//--------------------------------------------------------------------------- + vobject GetObjectFromIndex(int index) + { + ItemDef CurItem = GetItemFromIndex(index) + + if(!CurItem) + return VNULL + + if(CurItem.obj == VNULL) + CurItem.obj = GetObject(CurItem.model) + + return CurItem.obj + } + +//--------------------------------------------------------------------------- + void LoadDefinitions() + { + tparse tp = BeginParse("scripts/definitions/items_def.h") + + if(!tp) + return + + string tokens[10] + int index + int n + int line = 0 + int MaxItems = sizeof(Items) + ItemDef CurDef = NULL + int MaxWeapons = 10 //prvych 10 su zbrane + ItemsNum = MaxWeapons + + for(n = 0; n < MaxWeapons; n++) //rezervovane na zbrane + Items[n] = new ItemDef + + n = 0 + while(ParseLine(tp, n++, tokens)) + { + if(ItemsNum >= MaxItems) + continue + + if(tokens[0] == "WEAPON") + { + int WeapIndex = -1 + string value = tokens[1] + GetValue(NULL, value, 0, WeapIndex) + CurDef = Items[WeapIndex] + CurDef.ID = tokens[1] + continue + } + + if(tokens[0] == "ITEM") + { + CurDef = new ItemDef + Items[ItemsNum++] = CurDef + CurDef.ID = tokens[1] + continue + } + + if(tokens[0] == "name") + { + if(CurDef) + CurDef.name = RemoveQuotes(tokens[1]) + continue + } + + if(tokens[0] == "model") + { + if(CurDef) + CurDef.model = RemoveQuotes(tokens[1]) + continue + } + + if(tokens[0] == "physics") + { + if(CurDef) + CurDef.physics = atoi(tokens[1]) + continue + } + + if(tokens[0] == "pickable") + { + if(CurDef) + CurDef.pickable = atoi(tokens[1]) + continue + } + } + EndParse(tp) + } + +//--------------------------------------------------------------------------- + void ItemCollection() + { + LoadDefinitions() + +#ifdef EDITOR + string AllItemNames[256] + int AllItemNamesNum = 0 + ItemDef current + + for(int n = 0; n < ItemsNum; n++) + { + current = Items[n] + + if(current.name) + AllItemNames[AllItemNamesNum++] = current.ID + } + + SetItemNames(AllItemNames, AllItemNamesNum) +#endif + } + +//--------------------------------------------------------------------------- + void ~ItemCollection() + { + ItemDef CurItem + for(int n = 0; n < ItemsNum; n++) + { + CurItem = Items[n] + delete CurItem + Items[n] = NULL + } + } +} + +const float HG_OpacitySelected = 255 +const float HG_OpacityUnselected = 70 + +//--------------------------------------------------------------------------------- +class HackInterface extends _eclass +{ + MinClass Owner + int IconType + string name + string IconName + string description + widget WSymbol, WSymbol2, WLabel, WArrow, WProgress, WProgressBack + float SelectTargetOpacity //select znamena nafadovat do tejto hodnoty + float SelectOpacity //aktualna hodnota + float GlobalVisibilityScale //ovlada player podla viditelnosti Hack GUI + float FlashScale //koli selectu potrebujeme flashnut + float FadeScaleTarget //cielova hodnota + float FadeScale //normalny fade vidime/nevidime + float DistanceScale + float Xpos, Ypos + float RotDir + float RotAngle + float HackingTime //cas potrebny na zalogovanie (bar) + float CurHackingTime //jak dlho uz logujeme + float ProgressFlickTimer //ked je progres na konci tak text na nom blika + int ProgressTextVis + +//--------------------------------------------------------------------------------- + bool CanHacking() + { + return true + } + +//--------------------------------------------------------------------------------- + int CanLogin() + { + if(CurHackingTime == HackingTime) + return true + else + return false + } + +//--------------------------------------------------------------------------------- + bool NeedLogOut() //ked entita uz nechce aby bol player nalogovany + { + return false + } + +//--------------------------------------------------------------------------------- + void LogIn() + { + } + +//--------------------------------------------------------------------------------- + void LogOut() + { + } + +//--------------------------------------------------------------------------------- + float GetMaxLoginTime() + { + return -1 //neobmedzeny + } + +//--------------------------------------------------------------------------------- + bool SetHackPreviewCamera() + { + return false + } + +//--------------------------------------------------------------------------------- + void Select(bool select) + { + if(select) + { + SelectTargetOpacity = HG_OpacitySelected + FlashScale = 0 + + if(CurHackingTime < HackingTime) //to co sme uz raz nahackovali nebudeme hackovat znova + CurHackingTime = 0 +/* + if(MouseDeltaX > 0) + RotDir = -1 + else + RotDir = 1 +*/ + RotDir = -1 + + } + else + SelectTargetOpacity = HG_OpacityUnselected + } + +//--------------------------------------------------------------------------------- + void Show(bool show) + { + ShowWidget(WSymbol, show) + ShowWidget(WSymbol2, show) + ShowWidget(WLabel, show) + ShowWidget(WArrow, show) + ShowWidget(WProgress, show) + ShowWidget(WProgressBack, show) + } + +//--------------------------------------------------------------------------------- + void SetVisibility(float rate) + { + GlobalVisibilityScale = rate + } + +//--------------------------------------------------------------------------------- + void FadeIn() + { + FadeScaleTarget = 1 + } + +//--------------------------------------------------------------------------------- + void FadeOut() + { + FadeScaleTarget = 0 + } + +//--------------------------------------------------------------------------------- + bool IsVisible() + { + if(FadeScaleTarget == 0) + return false + + return true + } + +//--------------------------------------------------------------------------------- + vector GetVisualPos() + { + return GetMatrix(Owner, 3) + } + +//--------------------------------------------------------------------------------- + MinClass GetMainEntity() + { + return Owner + } + +//--------------------------------------------------------------------------------- + vector OnFrontPlane(vector Point) + { + vector CameraVector = g_CamMat[1] + vector CameraPos = g_CamMat[3] + + float d = CameraVector * CameraPos + + float d2 = CameraVector * Point + d2 = -d2 + + return CameraVector * d2 + Point + } + +//--------------------------------------------------------------------------------- + void UpdateVisualizers(vector PlayerPos); + +//--------------------------------------------------------------------------------- + void OnFrame() + { + } + +//--------------------------------------------------------------------------------- + void BeforeInit() + { + } + + void HackInterface(MinClass owner); + +//--------------------------------------------------------------------------------- + void ~HackInterface() + { + if(WSymbol) + { + DestroyWidget(WSymbol) + WSymbol = NULL + } + + if(WSymbol2) + { + DestroyWidget(WSymbol2) + WSymbol2 = NULL + } + + if(WLabel) + { + DestroyWidget(WLabel) + WLabel = NULL + } + + if(WArrow) + { + DestroyWidget(WArrow) + WArrow = NULL + } + + if(WProgress) + { + DestroyWidget(WProgress) + WProgress = NULL + } + + if(WProgressBack) + { + DestroyWidget(WProgressBack) + WProgressBack = NULL + } + } +} + +//---------------------------------------------------------------- +//Shoot() response +const int SR_NONE = 0 +const int SR_HIT = 1 +const int SR_COVERED = 2 +const int SR_KILL = 3 + +const int HT_SHOT = 0 +const int HT_EXPLOSION = 1 +const int HT_IMPACT = 2 +const int HT_FLAME = 3 +const int HT_HURT_TRIGGER = 4 + +//---------------------------------------------------------------- +class ShotStorage extends _serializable +{ + int HurtType //zakladny typ zranenia. strela, vybuch, zranenie fyzikou, plamen + MinClass shooter + CreatureClass target //pri zranovani fyzikou potrebujeme vediet koho budeme zranovat pretoze priamo z contact eventu to neni mozne + vector from //u vybuchu je to pozicia vybuchu + vector VisualsFrom //trasujeme z kamery ale streak poleti od zbrane + vector to + vector dir + float power //sila pre impact/sila po vizualnej stranke + float damage //kolko energie to zoberie + float BulletRainInc //o kolik bude zvysovat bullet rain counter u AI jednotek (default == 1.0) + int NumBullets + float precision + float MarkSize //velkost decalu + int RicDecalType //typ strely pre decal DE_BULLET, DE_PLASMA + int RicSndType //typ strely pre RicSound SE_BULLET, SE_PLASMA + int RicParticlesType //typ strely pre RicParticles PE_BULLET, PE_PLASMA + float StreakWidth + float StreakSpeed + float StreakLength + float CameraHitFactor //jak to sekne kamerou ked player dostane zasah + int StreakShader + int ID //viz. World::ShootID + int Bone //copy of g_iTraceBone after TraceLineEx + float radius //pre vybuch + float timer //pri zranovani fyzikou pouzivame pre delay jak casto entitu target zranime + float timer2 //pri zranovani fyzikou pouzivame pre maximalny cas po ktory bude entita ktora toto vlastni zranovat + int flags //pouziva sa pri zranovani fyzikou +//---------------------------------------------------------------- + int Shoot(MinClass other); +} + +#ifdef EDITOR +class EntityDef +{ + string ClassName + string Keys[70] + string Events[30] + string Color + int NumKeys + int NumEvents + string VisualsType + string VisualsSize + + void AddKey(string key) //volane z GetEntityDefinitionsFromXML() + { + if(NumKeys >= sizeof(Keys)) + return + + Keys[NumKeys++] = key + } + + void AddEvent(string event) + { + if(NumEvents >= sizeof(Events)) + return + + Events[NumEvents++] = event + } + + void SetColor(string color) + { + Color = color + } + + void SetDefaultVisuals(string type, string size) + { + VisualsType = type + VisualsSize = size + } +} + +class EntityDefManager +{ + EntityDef EntDefs[200] + int EntDefsNum + +//-------------------------------------------------------------------------------- + void AddDefinition(EntityDef def) + { + EntDefs[EntDefsNum++] = def + } + +//-------------------------------------------------------------------------------- + EntityDef GetDefinition(string ClassName) + { + EntityDef Current + for(int d = 0; d < EntDefsNum; d++) + { + Current = EntDefs[d] + + if(Current.ClassName == ClassName) + return Current + } + return NULL + } + +//-------------------------------------------------------------------------------- + int GetClassNames(string array[]) + { + EntityDef Current + + for(int d = 0; d < EntDefsNum; d++) + { + Current = EntDefs[d] + array[d] = Current.ClassName + } + return EntDefsNum + } + +//-------------------------------------------------------------------------------- + void CleanUp() + { + for(int d = 0; d < EntDefsNum; d++) + { + delete EntDefs[d] + EntDefs[d] = NULL + } + EntDefsNum = 0 + } + +//-------------------------------------------------------------------------------- + void LoadDefinitions() + { + CleanUp() + string ClassNames[200] + int Num = GetClassNamesFromXML(ClassNames) + + EntityDef Current + for(int n = 0; n < Num; n++) + { + Current = new EntityDef + Current.ClassName = ClassNames[n] + GetEntityDefinitionsFromXML(Current, Current.ClassName) //do toho classu mi nasypeme definicie + AddDefinition(Current) + } + } + +//-------------------------------------------------------------------------------- + void EntityDefManager() + { + LoadDefinitions() + } + +//-------------------------------------------------------------------------------- + void ~EntityDefManager() + { + CleanUp() + } +} + +EntityDefManager DefManager +#endif + +//predchozi entita pri FindClass +MinClass PrevFind, DefFind + +class ExtClass; +ExtClass FindClass(string name); + +//================================================================================= +class ExtClass extends MinClass +{ + string _name, _value, _state + string _userevents, _userstates + string _userevent0, _userevent1, _userevent2, _userevent3 + string _surfaces + + string parent //kluc + ExtClass Owner + ExtClass FirstChild, NextChild,Parent + int Dependencies // if(Dependencies > 0) - entita nemoze byt za behu zmazana pretoze na nej visi nejaka funkcnost + + string link + + int UseClass + float ActivateDist + int ActivateMethod + string OnSuccess, OnFail, OnLoad + + string UseName + int ActionNum + + string display + ExtClass Display + + HackInterface HackInterf + + string prefab + + int FlameID //filtrovani opakovaneho detekovani plamenem + + +//----------------------------------------------------------------- +// AI, jak pro CreatureClass, tak pro staticke a dynamicke prekazky. +//----------------------------------------------------------------- + CPosition WPosition + int WAFrame + CAgent agent //kolizni primitiv pro PathEngine + CPosition GetWPos(); + void UpdateAgent(bool set); + +//----------------------------------------------------------------- + void Show(bool show) + { + if(show) + SetFlags(this, TFL_VISIBLE) + else + ClearFlags(this, TFL_VISIBLE) + } + +#ifdef EDITOR + int DefXMLPtr //pointer na element s definiciami klucov atd. + EntityDef DefPtr //kopia z XML pre veci ktore casto pouzivame + + string EKeyValues[40] + int EKeyTypes[40] + bool CategoryHidden + int CategoryHiddenFlags + bool Hidden + int HiddenFlags + bool NotEditable + int EngineFlags + Shape MainVisShape + string ParentName //entita ktora je parentom z AddChild() + string ChildsNames[16] + int ChildsNamesNum + + ExtClass GetEventualOwner() + { + return this + } + +//--------------------------------------------------------------------- + string GetKeyValue(string key) + { + for(int n = 0; n < DefPtr.NumKeys; n++) + { + if(DefPtr.Keys[n] == key) + return EKeyValues[n] + } + return "" + } + +//--------------------------------------------------------------------- + void NullKeyValue(string key) + { + for(int n = 0; n < DefPtr.NumKeys; n++) + { + if(DefPtr.Keys[n] == key) + EKeyValues[n] = "" + } + } + +//--------------------------------------------------------------------- + void EditorOpened() + { + } + +//--------------------------------------------------------------------- + bool CanEdit() //niektore entity nemozno editovat vecsinou po nejakej udalosti. napriklad player ked zoberie zbran + { + return true + } + +//--------------------------------------------------------------------- + void CreateCustomVisuals() + { + } + +//--------------------------------------------------------------------- + void UpdateCustomVisuals() + { + } + +//--------------------------------------------------------------------- + void DestroyCustomVisuals() + { + } + +//--------------------------------------------------------------------- + void UpdateMainVisualizer() + { + UpdateCustomVisuals() + if(MainVisShape) + { + vector mat[4] + GetMatrix4(this, mat) + MainVisShape.SetMatrix(mat) + } + } + +//--------------------------------------------------------------------- + void RefreshInEditor() //volame z editoru namiesto UpdateEntity() aby sa rekurzivne refreshovalo vsetko potrebne + { + UpdateEntity(this) + UpdateMainVisualizer() + + if(ChildsNamesNum > 0) + { + local ExtClass Child + + for(local int n = 0; n < ChildsNamesNum; n++) + { + Child = FindClass(ChildsNames[n]) + + if(Child) + Child.RefreshInEditor() //ideme do rekurzivy + } + } + } + +//--------------------------------------------------------------------- + ExtClass FindParentRoot() + { + ExtClass ext = GetParent() + + if(!ext) + return NULL + + while(true) + { + ExtClass parent = ext.GetParent() + if(parent == NULL) + return ext + + ext = parent + } + } + +//--------------------------------------------------------------------- + void AfterReloadInEditor() //volane pote, co se entita zmenila/premistila a editor ji reloadnul + { + } + +//--------------------------------------------------------------------- + void OnPositionChangingInEditor(vector Pos, vector Angs) //volane kazdy frame sa meni pozicia pomocou editoru + { + SetOrigin(this, Pos) + SetAngles(this, Angs) + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + + UpdateMainVisualizer() + } + +//--------------------------------------------------------------------- + void CreateEditorVisuals() + { + if(CategoryHidden || Hidden) + return + + CreateCustomVisuals() + + if(!MainVisShape) + { + UpdateEntity(this) + vector mat[4] + GetMatrix4(this, mat) + int ShapeColor = StringToColor(DefPtr.Color) + + vector dsmin,dsmax + if(DefPtr.VisualsType != "sphere") + { + if(DefPtr.VisualsSize == "?") //z modelu + { + GetBoundBox(this, dsmin, dsmax) + + if(dsmin == ZeroVec && dsmax == ZeroVec) //zrejme este nema priradeny model takze default pre taky pripad + { + dsmin = "-8 -8 -8" + dsmax = "8 8 8" + } + } + else //z definicie v xml + { + string tokens[16] + int NumTok = ParseString(DefPtr.VisualsSize, tokens) + float x = atof(tokens[0]) + float y = atof(tokens[1]) + float z = atof(tokens[2]) + dsmin = Vector(x, y, z) + x = atof(tokens[3]) + y = atof(tokens[4]) + z = atof(tokens[5]) + dsmax = Vector(x, y, z) + } + + dsmin = dsmin - "-0.04 -0.04 -0.04" + dsmax = dsmax - "0.04 0.04 0.04" + } + + switch(DefPtr.VisualsType) + { + case "diamond": + MainVisShape = AddDShape(SHAPE_DIAMOND, ShapeColor, SS_NOZUPDATE|SS_TRANSP, dsmin, dsmax) + break + + case "pyramid": + MainVisShape = AddDShape(SHAPE_PYRAMID, ShapeColor, SS_NOZUPDATE|SS_TRANSP, dsmin, dsmax) + break + + case "box": + MainVisShape = AddDShape(SHAPE_BBOX, ShapeColor, SS_NOZUPDATE|SS_TRANSP, dsmin, dsmax) + break + + case "sphere": + MainVisShape = AddDSphere(ShapeColor, SS_NOZUPDATE|SS_TRANSP, ZeroVec, atof(DefPtr.VisualsSize)) + break + } + + if(MainVisShape) + MainVisShape.SetMatrix(mat) + } + } + +//--------------------------------------------------------------------- + void DestroyEditorVisuals() + { + if(MainVisShape) + { + MainVisShape.Destroy() + MainVisShape = NULL + } + DestroyCustomVisuals() + } +/* +//--------------------------------------------------------------------- + void SetVisualsStyle(int style) //0=normal 1=selected 2=undercursor + { + string DefColor = DefPtr.Color + vector rgb = atov(DefPtr.Color) + float r = rgb[0] * (float)255 + float g = rgb[1] * (float)255 + float b = rgb[2] * (float)255 + float Alpha + int NewColor + + if(style == 0) + { + Alpha = 63 + NewColor = ARGB(Alpha,r,g,b) + } + + if(style == 1) + { + Alpha = 63 + r += 32 + g += 32 + b += 32 + clamp r<0, 255> + clamp g<0, 255> + clamp b<0, 255> + NewColor = ARGB(Alpha,r,g,b) + } + + if(style == 2) + { + Alpha = 15 + NewColor = ARGB(Alpha,0,255,255)//0x0f00ffff//ARGB(Alpha,r,g,b) + } + + DestroyEditorVisuals() + string DefColor = DefPtr.Color + vector rgb = atov(DefPtr.Color) + float r = rgb[0] * (float)255 + float g = rgb[1] * (float)255 + float b = rgb[2] * (float)255 + r += 64 + g += 64 + b += 64 + clamp r<0, 255> + clamp g<0, 255> + clamp b<0, 255> + DefPtr.Color = ftoa(r) + " " + ftoa(g) + " " + ftoa(b) + CreateEditorVisuals() + DefPtr.Color = DefColor + } +*/ +//--------------------------------------------------------------------- + void HideInEditor(bool hide) + { + if(hide) + { + HiddenFlags = GetFlags(this) + ClearFlags(this, TFL_VISIBLE | TFL_SOLID) + Hidden = true + } + else + { + ClearFlags(this, -1) + SetFlags(this, HiddenFlags) + Hidden = false + } + } + +//--------------------------------------------------------------------- + void HideByCategory(bool hide) + { + if(hide) + { + CategoryHiddenFlags = GetFlags(this) + ClearFlags(this, TFL_VISIBLE | TFL_SOLID) + CategoryHidden = true + } + else + { + ClearFlags(this, -1) + SetFlags(this, CategoryHiddenFlags) + CategoryHidden = false + } + } +#endif + +//----------------------------------------------------------------- + bool WTraceFilter(ExtClass other, vector raypos, vector raydir) + { + return false + } + +//----------------------------------------------------------------- + void OnParentRemove() + { + //virtualni fce, zavolana pro kazdy child, jehoz Parent se maze + } + +//----------------------------------------------------------------- +// user funkce, ktera nas prida do seznamu childu parent +//----------------------------------------------------------------- + void AddToParent(ExtClass parent) + { + Parent = parent + + NextChild = parent.FirstChild + parent.FirstChild = this + } + +//----------------------------------------------------------------- +// user funkce, ktera nas odstrani ze seznamu childu parenta +//----------------------------------------------------------------- + void RemoveFromParent() + { + if(Parent == NULL) + return + + ExtClass childs = Parent.FirstChild + + //to by se nemelo stat + if(childs == NULL) + return + + //pokud jsme prvni na seznamu + if(childs == this) + { + Parent.FirstChild = NextChild + return + } + + while(childs) + { + if(childs.NextChild == this) + { + childs.NextChild = NextChild + return + } + + childs = childs.NextChild + } + + //nenasli jsme se v seznamu. To by se nemelo stat :-/ + } + +//----------------------------------------------------------------- + void OnRemove() + { + //my sami muzeme mit parent. + RemoveFromParent() + + ExtClass next + for(ExtClass child = FirstChild; child != NULL; child = next) + { + //odzalohuj si pointer na dalsi child, protoze retezec se mezitim muze zmenit (child se sam smaze) + next = child.NextChild + //informuj childs o tom, ze budem smazani + child.OnParentRemove() + } + } + + +//----------------------------------------------------------------- + //pro animhooky volajici metody + void Exec(string parm); + + void M_Exec(ExtClass other) + { + Exec(other._value) + } + +//----------------------------------------------------------------- + void M_SetCamera(ExtClass other); + +//----------------------------------------------------------------- +// virtualni metody, aby si entity osetrily zacatek/konec cutsceny +//----------------------------------------------------------------- + void BeginCutscene() + { + } + +//----------------------------------------------------------------- + void EndCutscene() + { + } + +//----------------------------------------------------------------- +// pro zvuky spoustene dynamickou metodou +//----------------------------------------------------------------- + int P_Sounds[8] + int NumPSounds + +//----------------------------------------------------------------- +//DYNAMICKE METODY: +//----------------------------------------------------------------- + void M_State(ExtClass other) + { + string tokens[16] + int t = ParseString(_userstates, tokens) + + for(int n = 0; n < t; n++) + { + if(tokens[n] == ",") + continue + + if(tokens[n] == other._value) + { + _state = other._value + return + } + } + + DPrint("Entity '" + _name + "' doesn't have state '" + other._value + "'") + ErrorNum++ + } + +//----------------------------------------------------------------- + void OnParent(ExtClass parent) //je to volane entite ktora bola naparentena na inu entity z ingame skriptu (M_Parent()) + { + } + +//----------------------------------------------------------------- + void M_Parent(ExtClass other); + void M_Use(ExtClass other); + +//----------------------------------------------------------------- + void M_Solid(ExtClass other) + { + SetFlags(this, TFL_SOLID) + } + +//----------------------------------------------------------------- + void M_NonSolid(ExtClass other) + { + ClearFlags(this, TFL_SOLID) + } + +//----------------------------------------------------------------- + void M_EndSound(ExtClass other) + { + if(!NumPSounds) //zvuky uz skoncily + return + + int n = atoi(other._value) + + if(P_Sounds[n]) + { + EndSound(P_Sounds[n]) + P_Sounds[n] = 0 + NumPSounds-- + } + } + +//----------------------------------------------------------------- + void M_Sound(ExtClass other) + { + int n, p = strstr(other._value, ",") + string name + int pf, lf = SF_3D + //simplest case + if(p == -1) + { + pf = SF_ONCE + n = 0 + name = other._value + } + else + { + string val, parm + + pf = 0 + + n = atoi(substr(other._value, 0, p)) + + val = substr(other._value, p + 1, strlen(other._value) - p - 1) + + while(p != -1) + { + p = strstr(val, ",") + + if(p == -1) + parm = val + else + { + parm = substr(val, 0, p) + val = substr(val, p + 1, strlen(val) - p - 1) + } + + triminplace(parm) + triminplace(val) + + strlower(parm) + switch(parm) + { + case "once": + pf |= SF_ONCE + break + + case "ambient": + pf |= SF_AMBIENT + lf = 0 + break + + case "half": + pf |= SF_HALFRANGE + break + + case "quart": + pf |= SF_QUARTERRANGE + break + + default: + name = parm + break + } + } + } + + if(P_Sounds[n]) + EndSound(P_Sounds[n]) + else + NumPSounds++ + + P_Sounds[n] = PlaySound(this, GetSoundEx(name, 1, lf), pf) + + if(pf & SF_ONCE) + SetEventMask(this, EV_SOUNDEND) + } +/* + void SetFade(float fade) + { + TFactor[3] = fade + } + + void FadeHandler(int FadeEvent) + { + } + + void TDynamicFade(local int FadeTime, local float FTarget) + { + local int n + local float FadeRate + + //SetRenderMode(this, TSWITCH_TRANSP) + SetSortBias(this, 1) + + if(FTarget == 1) //FadeIn + { + SetFlags(this, TFL_VISIBLE) + FadeHandler(FADEIN_START) + } + else + FadeHandler(FADEOUT_START) + + if(FadeTime == 0) + FadeTime = 1 + + for(n = 0; n < FadeTime; n += 5) + { + FadeRate = (float)n / (float)FadeTime + + if(!FTarget) + FadeRate = 1 - FadeRate + + SetFade(FadeRate) + Sleep(5) + } + + if(FTarget == 1) + { + SetRenderMode(this, 0) + SetSortBias(this, 0) + FadeHandler(FADEIN_END) + } + else + { + ClearFlags(this, TFL_VISIBLE) + FadeHandler(FADEOUT_END) + } + + SetFade(FTarget) + } + + void M_FadeIn(ExtClass other) + { + thread TDynamicFade(atoi(other._value), 1) + } + + void M_FadeOut(ExtClass other) + { + thread TDynamicFade(atoi(other._value), 0) + } +*/ +//----------------------------------------------------------------- + void M_Show(ExtClass other) + { + Show(true) + } +//----------------------------------------------------------------- + void M_Hide(ExtClass other) + { + Show(false) + } + +//----------------------------------------------------------------- +//virtualni fce, jen pro CreatureClass + void PickItem(int item, bool RealyPick) + { + } + + void AddItem(MinClass it) + { + } + +//----------------------------------------------------------------- + void Activate(int fl, ExtClass other) //aktivacia sa podarila. hrac stlacil use. zavola sa predtym nez sa zacne volat ActivateProcess() + { + } + + void ActivateFail(int fl, ExtClass other) //aktivacia sa nepodarila. na vypis hlasok co k tomu potrebujes atd. + { + } + +//----------------------------------------------------------------- + void ActivateProcess(int fl, ExtClass other) //pokial CanActivate() vracia ACT_ENABLE a hrac drzi USE tak je to volane kazdy frame + { + } + +//----------------------------------------------------------------- + void ActivateProcessEnd() //skoncilo volanie ActivateProcess() + { + } + +//----------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(Display && Display.CanActivate(0, this) == ACT_ENABLE) + return ACT_ENABLE + + return ACT_DISABLE + } + +//----------------------------------------------------------------- + int IsShot(vector rayorigin, vector raydirection) + { + return false + } + +//----------------------------------------------------------------- + int Shoot(ShotStorage shot) + { + return true + } + +//----------------------------------------------------------------- + void EOnSoundEnd(MinClass other, int extra) + { + if(!NumPSounds) + return + + for(int n = 0; n < sizeof(P_Sounds); n++) + { + if(P_Sounds[n] == extra) + { + P_Sounds[n] = 0 + NumPSounds-- + return + } + } + } + +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + if(Display) + Throw(Display, other, EV_VISIBLE, extra) + + return 0 + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra); + void EOnInit(MinClass other, int extra); + +//----------------------------------------------------------------- + void EOnLoad(MinClass other, int extra) + { + if(_name) + { + AddEntityToHashTable(this, _name) + } + } + +//----------------------------------------------------------------- + void ExtClass() + { + TFactor[0] = 1 + TFactor[1] = 1 + TFactor[2] = 1 + TFactor[3] = 1 + SetEventMask(this, EV_LOADED|EV_ONLOAD) + + if(_name) + { + AddEntityToHashTable(this, _name) + } + } + +//----------------------------------------------------------------- + void SetName(string name) + { + if(this == PrevFind) + PrevFind = DefFind + + if(_name) + { + RemoveEntityFromHashTable(this, _name) + } + + _name = name + + if(name) + { + AddEntityToHashTable(this, _name) + } + } + +//----------------------------------------------------------------- + void ~ExtClass() + { + OnRemove() //Informuje entity na tomto zavisle ze sa maze + + if(HackInterf) + { + delete HackInterf + HackInterf = NULL + } + + if(agent) + agent.Destroy() + + if(WPosition) + delete WPosition + + //pokud mazes cachovanou entitu, tak premaz pointer + if(this == PrevFind) + PrevFind = DefFind + + if(_name) + RemoveEntityFromHashTable(this, _name) + + if(Display) + { + delete Display + Display = NULL + } + +#ifdef EDITOR + ExtClass child + int n + + for(n = 0; n < ChildsNamesNum; n++) + { + child = FindClass(ChildsNames[n]) + + if(child) + { + child.ParentName = "" + UpdateEntity(child) + } + } + + DestroyEditorVisuals() +#endif + } +} + +//---------------------------------------------------------------- +void ShotStorage::Shoot(MinClass other) +{ + ExtClass oth = other + + if(IsInherited(oth, CExtClass) == false) + return SR_NONE + + return oth.Shoot(this) +} + +//================================================================================= +ExtClass FindClass(string name) +{ + if(!name) + return NULL + + ExtClass ec = PrevFind + + //optimalizace - pokud hledame opakovane stejnou entitu, tak nehledej znova + //je to bezpecne, i kdyz se entity mazou + if(ec._name == name) + return ec + + ec = FindEntityInHashTable(name) + + if(ec) + PrevFind = ec + + return ec +} +//================================================================================= +int CallStackPos + +//================================================================================= +string CallUserEvents(ExtClass ec, string method) +{ + if(ec._userevents) + { + string events = ec._userevents + int n, p, c + + p = 0 + + while(events) + { + string ev + + c = strstr(events, ",") + if(c != -1) + { + ev = trim(substr(events, 0, c)) + events = substr(events, c + 1, strlen(events) - c - 1) + } + else + { + ev = trim(events) + events = "" + } + + if(ev == method) + goto found + + p++ + } + } + + return "" + +found:; + switch(p) + { + case 0: + return ec._userevent0 + case 1: + return ec._userevent1 + case 2: + return ec._userevent2 + case 3: + return ec._userevent3 + } +} + +//================================================================================= +int ParseParm(string str, int p) +{ + int len = strlen(str) + int count = 1 + p++ + + while(p < len && count > 0) + { + string char = substr(str, p, 1) + if(char == "(") + count++ + else + { + if(char == ")") + { + count-- + + if(count == 0) + return p + } + } + p++ + } + + return -1 +} + +//================================================================================= +#ifdef DEVELOPER +string g_sDebugStack[32] +int g_iDebugStackBottom, g_iDebugStackTop + +void FSMDebugger(ExtClass owner, string ename, string mname, bool show) +{ + string text = itoa(CallStackPos) + " : " + owner._name + " -> " + ename + "." + mname + + if(owner._value) + text += "(" + owner._value + ")" + + g_sDebugStack[g_iDebugStackTop] = text + + g_iDebugStackTop = g_iDebugStackTop + 1 & 31 + if(g_iDebugStackTop == g_iDebugStackBottom) + g_iDebugStackBottom = g_iDebugStackBottom + 1 & 31 + + if(show) + { + string list[32] + int cnt = 0; + + for(int n = g_iDebugStackBottom; n != g_iDebugStackTop; ) + { + list[cnt++] = g_sDebugStack[n] + n = n + 1 & 31 + } + + if(cnt) + { + ShowCursor(true) + SetMousePos(30, 410) + + if(ListBox(list, cnt, cnt - 1, "FSM debugger") == -1) + g_bDebugFSM = 0 + ShowCursor(false) + } + } +} +#endif + +//================================================================================= +void _CallMethods(local ExtClass owner, local string methods) +{ + local string ename = "this" + local ExtClass ec = owner + local int p + local bool skipping = false + string token, token2 + + while(true) + { + int type = ParseStringEx(methods, token) + + //end of string + if(type == 0) + break + + switch(token) + { + //state condition + case "#": + ParseStringEx(methods, token2) + ParseStringEx(methods, token) + + if(token != ":") + { + DPrint("Syntax error in state declaration'" + methods + "' on entity '" + owner._name + "'") + ErrorNum++ + } + if(token2 == "end") + continue + + //skip whole state + if(token2 != owner._state || skipping) + { + p = strstr(methods, "#") + + if(p == -1) + return //there are not other states + + methods = substr(methods, p, strlen(methods) - p) + } + continue + + case "break": + skipping = true + break + + case "WaitFor": + ParseStringEx(methods, token) + ParseStringEx(methods, token2) + ParseStringEx(methods, token) + + if(token != ")") + { + DPrint("Syntax error in WaitFor '" + methods + "' on entity '" + owner._name + "'") + ErrorNum++ + return + } + + if(token2 == "this") + ec = owner + else + { + if(token2 == "disp") + ec = owner.Display + else + ec = FindClass(token2) + } + + if(ec == NULL) + { + DPrint("Entity '" + token2 + "' does not exists in WaitFor on '" + owner._name + "'") + ErrorNum++ + } + else + Wait(ec.ActionNum == 0) + break + + case "debug": +#ifdef DEVELOPER + g_bDebugFSM = 1 +#endif + break + + case "Sleep": + ParseStringEx(methods, token) + + if(ParseStringEx(methods, ename) != 4) + { + DPrint("No number in Sleep '" + ename + "' on entity '" + owner._name + "'") + ErrorNum++ + return + } + + ParseStringEx(methods, token) + + if(token != ")") + { + DPrint("Syntax error in Sleep '" + methods + "' on entity '" + owner._name + "'") + ErrorNum++ + return + } + + Sleep(atoi(ename)) + break + + case "Print": + ParseStringEx(methods, token) + + if(token != "(") + { + DPrint("Syntax error Print '" + token + "' on entity '" + owner._name + "'") + ErrorNum++ + return + } + + p = strstr(methods, ")") + if(p == -1) + { + DPrint("Syntax error Print '" + methods + "' on entity '" + owner._name + "'") + ErrorNum++ + return + } + +#ifdef DEBUG_PRINT + token2 = substr(methods, 0, p) + methods = substr(methods, p + 1, strlen(methods) - p - 1) + + ExtClass ptext + if(token2 == "this") + ptext = owner + else + ptext = FindClass(token2) + + if(ptext) + Print(String(owner._name + ".Print Entity:" + ptext._name + " State:" + ptext._state)) + else + Print(String(owner._name + ".Print " + token2)) +#else + //just skip + methods = substr(methods, p + 1, strlen(methods) - p - 1) +#endif + break + + default: + if(token != ".") + { + ename = token + + ParseStringEx(methods, token) + + if(token != ".") + { + DPrint("Syntax error in method '" + methods + "' on entity '" + owner._name + "'") + ErrorNum++ + return + } + + ParseStringEx(methods, token2) + + if(ename == "this") + ec = owner + else + ec = FindClass(ename) + } + else + { + ParseStringEx(methods, token2) + } + + //parametry + if(strlen(methods) && substr(methods, 0, 1) == "(") + { + p = 1 + int len = strlen(methods) + int count = 1 + + while(p < len) + { + string char = substr(methods, p, 1) + if(char == "(") + count++ + else + { + if(char == ")") + { + count-- + + if(count == 0) + goto done + } + } + p++ + } + + DPrint("Syntax error in method '" + token2 + "' on entity '" + owner._name + "'") + ErrorNum++ + continue + done:; + owner._value = trim(substr(methods, 1, p - 1)) + methods = substr(methods, p + 1, strlen(methods) - p - 1) + } + else + owner._value = "" + + if(ec == NULL) + { + DPrint("Entity '" + ename + "' does not exists in method call on '" + owner._name + "'") + ErrorNum++ + } + else + { + if(CallStackPos >= 31) + { + DPrint("Stack overflow!") + ErrorNum++ +#ifdef DEVELOPER + FSMDebugger(owner, ename, token2, true) +#endif + return + } + + CallStackPos++ + +#ifdef DEVELOPER + FSMDebugger(owner, ename, token2, g_bDebugFSM) +#endif + + if(!Call(ec, "M_" + token2, owner)) + { + string ev = CallUserEvents(ec, token2) + + if(!ev) + { + DPrint("Entity " + ename + " (" + ClassName(ec) + ") have no method '" + token2 + "'") + ErrorNum++ + } + else + thread _CallMethods(ec, ev) + } + CallStackPos-- + } + } + + //should be ';' + if(ParseStringEx(methods, token) == 0) + { + //valid end + return + } + + if(token != ";") + { + DPrint("Command is terminated by '" + token + "' in method call on '" + owner._name + "'") + ErrorNum++ + } + } +} + +//----------------------------------------------------------------- +void CallMethods(ExtClass owner,string methods) +{ + if(methods != "") + thread _CallMethods(owner, methods) +} + +//================================================================================= +class LightClass extends ExtClass +{ + vector coords + vector _color + int style + int intensity + int radius + int corona + int glow + HLIGHT LightHandle + int effect_parm + +//----------------------------------------------------------------- + void Switch(int onoff) + { + } + +//----------------------------------------------------------------- + void Init(int clnum, int flags) + { + float f = _color * _color + if( f == 0) + _color = "255 255 255" + + if( intensity == 0) + intensity = 300 + + if( radius == 0) + radius = intensity + + ClassType = ClassTypeLight + ClassNum = clnum +// SetOrigin(this, coords) + + LightHandle = AddLight(this, style, flags, intensity, radius, _color) + } +} + +bool g_MenuFlash + + +//================================================================================= +class SpeechManager extends _serializable +{ + CreatureClass Speakers[ST_SIZEOF][SPEAKERS_COUNT] + float SpeakTime[ST_SIZEOF][SPEAKERS_COUNT] + bool Emit[ST_SIZEOF][SPEAKERS_COUNT] + float Dist[ST_SIZEOF][SPEAKERS_COUNT] + + bool Say(CreatureClass owner, int type); + void Update(); +} + +/* +speaker.Clear() +speaker.AddDialog(livie, SayID4, 100) +speaker.AddDialog(livie, SayID5, 100) +speaker.AddDialog(livie, SayID6, 100) +speaker.Play() +speaker.PlayIngame() +speaker.Stop() +*/ + +//----------------------------------------------------------------- +class IngameDialog extends _serializable +{ + string ID + string WhoSay + float OverTime + bool transmition + IngameDialog next +} + +const int SP_NONE = 0 +const int SP_MINICUTSCENE = 1 +const int SP_INGAME = 2 + +//================================================================================= +class SpeakTransmitter extends ExtClass +{ + DialogPanel DlgPanel + SubtitlesDialog Subtitles + IngameDialog FirstDialog, LastDialog, PlayingDialog + int InGameDialogSound + float DialogOverTime + int PlayMode + ExtClass SoundPos + +//----------------------------------------------------------------- + void Show(bool show) + { + DlgPanel.Show(show) + } + +//----------------------------------------------------------------- + void StopInGameDialogSound() + { + if(InGameDialogSound) + { + EndSound(InGameDialogSound) + InGameDialogSound = 0 + } + } + +//----------------------------------------------------------------- + bool PlayInGameDialogSound(MinClass owner, string sample, int flags) + { + StopInGameDialogSound() + hsound snd = GetSoundEx(sample, 0, flags) + + if(!snd) + { + DPrint("Can't found dialog sample " + sample) + ErrorNum++ + return false + } + + InGameDialogSound = PlaySound(owner, snd, flags) + return true + } + +//----------------------------------------------------------------- + bool PlayDialog(IngameDialog dialog, int mode) + { + int SoundFlags = SF_ONCE + int IconIndex = GetSayCharacterImageIndex(dialog.WhoSay) + + if(IconIndex == -1) //nebolo zadane meno toho kto hovori ale nazov entity z ktorej ma hrat zvuk + { + SoundPos = FindClass(dialog.WhoSay) + + if(!SoundPos) + { + DPrint(String("speaker: Bad WhoSay parameter in dialog ") + dialog.ID) + ErrorNum++ + return false + } + + SoundFlags |= SF_3D + SetOrigin(this, GetMatrix(SoundPos, 3)) + } + else + { + SoundFlags |= SF_AMBIENT + SoundPos = NULL + } + + if(dialog.transmition) + { + DlgPanel.SetDialogText("#Transmition_Received", dialog.WhoSay) + DlgPanel.Open() + } + else + DlgPanel.Close() //keby bol nahodou otvoreny predchadzajucim dialogom + + if(dialog.WhoSay != "tutorial") //tutorialove hlasky su bez zvukov + PlayInGameDialogSound(this, dialog.ID, SoundFlags) + + Subtitles.SetText("#" + dialog.ID) + Subtitles.Show(true) + DialogOverTime = dialog.OverTime + PlayMode = mode + return true + } + +//----------------------------------------------------------------- + void AddDialog(IngameDialog dialog) + { + if(!FirstDialog) + { + FirstDialog = dialog + LastDialog = dialog + } + else + { + if(!LastDialog) + { + LastDialog = FirstDialog + IngameDialog CurrentDialog = FirstDialog + + while(CurrentDialog) + { + LastDialog = CurrentDialog + CurrentDialog = CurrentDialog.next + } + } + + LastDialog.next = dialog + LastDialog = dialog + } + } + +//---------------------------------------------------------------- + void ClearDialogs() + { + LastDialog = FirstDialog + IngameDialog CurrentDialog = FirstDialog + + while(CurrentDialog) + { + LastDialog = CurrentDialog + CurrentDialog = CurrentDialog.next + delete LastDialog + LastDialog = NULL + } + + FirstDialog = NULL + LastDialog = NULL + PlayingDialog = NULL + } + +//----------------------------------------------------------------- + IngameDialog GetNextDialog() + { + if(!PlayingDialog) + PlayingDialog = FirstDialog + else + PlayingDialog = PlayingDialog.next + + return PlayingDialog + } + +//---------------------------------------------------------------- + void Stop() + { + DlgPanel.Close() + Subtitles.Show(false) + StopInGameDialogSound() + ClearDialogs() + PlayMode = SP_NONE + PlayingDialog = NULL + ActionNum = 0 + } + +//---------------------------------------------------------------- + bool Play(int mode) //0=zastavi hru 1=hraje ingame bez prerusenia hry + { + if(PlayMode != SP_NONE) + return false + + IngameDialog ToPlay = GetNextDialog() + + if(!ToPlay) + return false + + if(!PlayDialog(ToPlay, mode)) + return false + + ActionNum = 1 //aby fungovalo WaitFor() + return true + } + +//----------------------------------------------------------------- + void OnFrame() //preposiela world + { + if(PlayMode && PlayingDialog) //ak je vobec zobrazeny nejaky dialog + { + if(SoundPos) + SetOrigin(this, GetMatrix(SoundPos, 3)) + + bool NeedClose = false + + if(PlayingDialog.transmition) //vysielacka + { + if(!InGameDialogSound && DlgPanel.status == 2 && DialogOverTime >= 0) + NeedClose = true + } + else + { + if(!InGameDialogSound && DialogOverTime >= 0) //DialogOverTime = -1 = ma zostat otvoreny + NeedClose = true + } + + if(NeedClose) + { + DialogOverTime -= ftime * 100 + + if(DialogOverTime <= 0) + { + DialogOverTime = 0 + IngameDialog NextToPlay = GetNextDialog() + + if(NextToPlay && NextToPlay.ID == "ScriptCall") //moze tam byt aj dialog ktory slusi iba na zavolanie niecoho do skriptu + { + CallMethods(this, NextToPlay.WhoSay) + NextToPlay = GetNextDialog() + } + + if(!NextToPlay || !PlayDialog(NextToPlay, PlayMode)) + Stop() + } + } + } + DlgPanel.OnFrame() + } + +//----------------------------------------------------------------- + void BeginCutscene() + { + Stop() + } + +//----------------------------------------------------------------- + void AddDialogFromGame(string ParmsString, bool transmition) + { + string Parms[8] + int NumParms = ParseString(ParmsString, Parms) + + if(NumParms < 3 || NumParms > 5) + { + DPrint("Say:wrong num of parameters " + _name + ".Say") + ErrorNum++ + return + } + + IngameDialog dialog = new IngameDialog + dialog.ID = Parms[0] + dialog.WhoSay = Parms[2] + dialog.OverTime = 50 //defaultne zostava viditelny pol sekundy po dohrani samplu + dialog.transmition = transmition + + if(NumParms >= 5) + dialog.OverTime = atof(Parms[4]) + + AddDialog(dialog) + } + +//----------------------------------------------------------------- + void M_AddDialog(ExtClass other) //speaker.AddDialog(text, KtoHovori, cas) + { + AddDialogFromGame(other._value, false) + } + +//----------------------------------------------------------------- + void M_AddTransDialog(ExtClass other) //speaker.AddTransDialog(text, KtoHovori, cas) + { + AddDialogFromGame(other._value, true) + } + +//--------------------------------------------------------------------------------- + void M_AddCall(ExtClass other) + { + IngameDialog dialog = new IngameDialog + dialog.ID = "ScriptCall" + dialog.WhoSay = other._value + dialog.OverTime = 0 + dialog.transmition = false + AddDialog(dialog) + } + +//----------------------------------------------------------------- + void M_Say(ExtClass other) //speaker.Say(text, KtoHovori, cas) + { + Stop() + AddDialogFromGame(other._value, false) + + if(!FirstDialog) + { + DPrint(String("speaker: no dialogs to playing. caller is ") + other._name) + ErrorNum++ + return + } + + if(!Play(SP_INGAME)) + return + } + +//----------------------------------------------------------------- + void M_SayTrans(ExtClass other) //speaker.Say(text, KtoHovori, cas) + { + Stop() + AddDialogFromGame(other._value, true) + + if(!FirstDialog) + { + DPrint(String("speaker: no dialogs to playing. caller is ") + other._name) + ErrorNum++ + return + } + + if(!Play(SP_INGAME)) + return + } + +//----------------------------------------------------------------- + void M_Play(ExtClass other) //speaker.Play(text, KtoHovori, cas) + { + if(!FirstDialog) + { + DPrint(String("speaker: no dialogs to playing. caller is ") + other._name) + ErrorNum++ + return + } + +// if(!Play(SP_MINICUTSCENE)) //spusti to player +// return + + ExtClass player = FindClass("player") + player.Activate(2, this) //player spusti minicutscenu a tieto dialogy okamzite jak bude na zemi a odlozi zbran + ActionNum = 1 //musi byt aj tu pretoze sa tu nevola play a az player ho zavola s malym spozdenim + } + +//----------------------------------------------------------------- + void M_PlayIngame(ExtClass other) //speaker.PlayIngame(text, KtoHovori, cas) + { + if(!FirstDialog) + { + DPrint(String("speaker: no dialogs to playing. caller is ") + other._name) + ErrorNum++ + return + } + + if(!Play(SP_INGAME)) + return + } + +//--------------------------------------------------------------------------------- + void M_Stop(ExtClass other) + { + Stop() + } + +//---------------------------------------------------------------- + void M_Clear(ExtClass other) + { + ClearDialogs() + PlayMode = SP_NONE + } + +//----------------------------------------------------------------- + void EOnSoundEnd(MinClass other, int extra) + { + if(extra == InGameDialogSound) + { + InGameDialogSound = 0 + return + } + } + +//----------------------------------------------------------------- + void EOnLoad(ExtClass other, int extra) + { + InGameDialogSound = 0 //ak nieco pred sejvom hralo tak simulujeme ze zvuk dohral nech sa pusti nasledujuci dialog + } + +//--------------------------------------------------------------------------------- + void SpeakTransmitter() + { + SetName("speaker") + DlgPanel = new DialogPanel(17, -100) + DlgPanel.SetPos(17, -DlgPanel.GetHeight()) + Subtitles = new SubtitlesDialog(0, 418, 800, 128) + SetEventMask(this, EV_SOUNDEND|EV_ONLOAD) + } + +//--------------------------------------------------------------------------------- + void ~SpeakTransmitter() + { + ClearDialogs() + + if(DlgPanel) + { + delete DlgPanel + DlgPanel = NULL + } + + if(Subtitles) + { + delete Subtitles + Subtitles = NULL + } + } +} + +class SunFlare extends ExtClass +{ + vobject MainObject + string model + bool IsVisible + + void Switch(bool stat) + { + if(stat) + SetFlags(this, TFL_VISIBLE) + else + ClearFlags(this, TFL_VISIBLE) + + IsVisible = stat + } + + void SetAlpha(float targetval) + { + float spd = ftime * 4 + + if(TFactor[3] > targetval) + { + TFactor[3] = TFactor[3] - spd + + if(TFactor[3] < targetval) + { + TFactor[3] = targetval + + if(IsVisible && targetval == 0) + Switch(false) + } + } + + if(TFactor[3] < targetval) + { + TFactor[3] = TFactor[3] + spd + + if(TFactor[3] > targetval) + TFactor[3] = targetval + } + +// g_vSunColor +// g_fSunIntensity + } + + bool SunTracFilter(ExtClass other) + { + if(other.ClassType == ClassTypeCreature && other.ClassNum == ClassNumPlayer) + return false + + return true + } + + void Update(); + + void SunFlare(int type) + { + if(type == 1) + model = "spr/effects/flares/lens0.spr" + + if(type == 2) + model = "spr/effects/flares/lens1.spr" + + MainObject = GetObject(model) + SelectObject(this, MainObject) + } + + void ~SunFlare() + { + if(MainObject) + ReleaseObject(MainObject, 0) + } +} + +//================================================================================= +const int ShellTypes = 4 +const int ShellBufferSize = 16 + +class music_player; + +class WorldClass extends ExtClass +{ + _eclass ViewerClass +#ifdef EDITOR + bool WorkbenchActive + bool EditorActive + MinClass Editor + int PrefabsIncrement + string ThisLevelName + string ThisLevelDir +#endif + + string name //pracovni nazev levlu kteremu odpovida oficialni alias v strings.h + CreatureClass Player + MinClass ManipEntity + float BulletTimeFade + + music_player MusicPlayer + ItemCollection ItemColPtr + DisplayCollection DispColPtr + func_display TurretDisplay1 + func_display CameraDisplay + func_display EnemyDisplay + func_display VehicleLoaderDisplay + func_display MineDisplay + func_display ScreenDisplay + TasklistDialog TaskList + InfoDialog InfDialog + HackInfoDialog HackInfDialog + CrossHairClass Cross + SpeakTransmitter Transmitter + + vector CameraPos + vector CameraAngs + vector CameraNorm + + int NumTurrets1 + int NumMines + int NumVehicleLoaders + int NumVehicleBuggys + int NumCameras + int NumDronEnemies + int NumSpiderEnemies + int NumFlyingItems + + bool CutScene + bool CutSceneSkip + bool PlayerControl + bool ShowCursor + int ActualFrame + + int ShootID //counter unikatniho ID vystrelu + //slouzi pro AI, by odfiltrovalo vice zasahu napr. brokovnici + + float viewdist +// float playerscale, enemyscale + + int DlgSound[4] + string DlgID[4] + int NumDlgSound + int NumAnswers, CurrentAnswer + bool QuestionActive// = false + + float pfov + float InventoryScale //otvoreny inventory = 1, zavreny = 0 + + float FlashTime + float FlashCount + float FlashSpeed1, FlashSpeed2 + vector FlashColor + bool FlashNeedSkip +// string FlSpriteName + + PathFinder pPathFinder + + string OnStart + + SpeechManager SManager + + ExtClass Cameras[32] + int CameraIndex + + //circular buffer for shells + MinClass Shells[ShellTypes][ShellBufferSize] + int ShellTop[ShellTypes] + vobject ShellObjects[ShellTypes] + + vobject Streaks[8][32] + int NumStreaks[8] + + SunFlare flare + int flaretype + +//----------------------------------------------------------------- + void OnCutSceneSkip() + { + if(FlashCount > 0) + FlashNeedSkip = true + } + +//----------------------------------------------------------------- + void ThrowShell(MinClass pivot, MinClass owner, int type, float speed, bool sound); + +//------------------------------------------------------------ + void Quake(float TimeMax, float Power, float Speed, float FadeInTime, float FadeOutTime, int Priority) + { + } + + void ApplyExplosion(MinClass actor, vector pos, float radius, float power, float damage, int type) + { + } + +bool DialogVisible +float DialogTimer + +//----------------------------------------------------------------- + void CloseCutSceneDialog() + { + ShowWidget(WDialogText,false) + DialogVisible = false + } + +//----------------------------------------------------------------- + int Dialog(MinClass owner, string id, int flags) + { + for(int n = 0; n < 4; n++) + SetWidgetText(WDialogText, n, "") + + SetWidgetTextEx(WDialogText, 0, 1, "#" + id) + + hsound snd = GetSoundEx(id, 0, SF_STREAM|SF_NOERROR) + + if(!snd) + { + ShowWidget(WDialogText,true) + DialogVisible = true + DialogTimer = 3.0 + + //DPrint("Can't found dialog sample " + id) + //ErrorNum++ + return 0 + } + + ShowWidget(WDialogText, g_Subtitles) + DialogVisible = g_Subtitles + DialogTimer = 1.5 + + int hsnd = PlaySound(owner, snd, flags | SF_ONCE) + + DlgID[NumDlgSound] = id + DlgSound[NumDlgSound++] = hsnd + NumDlgSound &= 3 + return hsnd + } + +//----------------------------------------------------------------- + bool IsDialogActive(string dlg) + { + for(int n = 0; n < sizeof(DlgID); n++) + { + if(DlgID[n] == dlg) + return true + } + + return false + } + +//----------------------------------------------------------------- + void StopDialogs() + { + for(int n = 0; n < sizeof(DlgSound); n++) + { + if(DlgSound[n]) + { + EndSound(DlgSound[n]) + DlgSound[n] = 0 + } + } + } + +//------------------------------------------------------------ + void ProcessFlash() + { + if(FlashCount <= 0.5) + FlashCount += FlashSpeed1 * ftime + else + FlashCount += FlashSpeed2 * ftime + + if(FlashCount >= FlashTime) + FlashCount = FlashTime + + float FlashRate = FlashCount / 1//FlashTime + float ToAng = FlashRate * 180 + + float res = sin(ToAng * DEG2RAD) + if(res < 0) + res = -res + + if(FlashCount >= FlashTime || FlashNeedSkip) + { + if(FlashTime == 1 || FlashNeedSkip) + { + FlashTime = 0 + res = 0 + ShowWidget(WFlash, false) + FlashNeedSkip = false + } + } + + float a = res * 255 + float r = FlashColor[0] + float g = FlashColor[1] + float b = FlashColor[2] + SetWidgetColor(WFlash, ARGB(a, r, g, b)) + } + +//----------------------------------------------------------------- + void FullscreenFlash(float speed1, float speed2, vector color, float StartTime, float EndTime) + { + SetWidgetColor(WFlash, 0x00ffffff) + ShowWidget(WFlash, true) + FlashTime = EndTime + FlashSpeed1 = speed1 * 0.01 + FlashSpeed2 = speed2 * 0.01 + FlashCount = StartTime + FlashColor = color + } + +//----------------------------------------------------------------- + void M_Flash(ExtClass other) + { + string ParmsAll = ReplaceChars(other._value, ",", " ") + string Parms[8] + int NumParms = ParseString(ParmsAll, Parms) + + if(NumParms != 2) + { + DPrint("Flash:wrong num of parameters " + _name + ".Flash") + ErrorNum++ + return + } + + float speed1 = atof(Parms[0]) + float speed2 = atof(Parms[1]) + vector color = "255 255 255" + + FullscreenFlash(speed1, speed2, color, 0, 1) + } + +//----------------------------------------------------------------- + void M_ShowScreenDisplay(ExtClass other); +//----------------------------------------------------------------- + void M_HideScreenDisplay(); + +bool FirstFrame +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(!FirstFrame) + { + FirstFrame = true + CallMethods(this, OnStart) + } + + ActualFrame = extra + g_FPS = 1 / ftime + + if(g_Viewer) + return + + Transmitter.OnFrame() + TaskList.OnFrame() + InfDialog.OnFrame() + + if(DialogVisible) + { + if(DlgSound[0] == 0 && DlgSound[1] == 0 && DlgSound[2] == 0 && DlgSound[3] == 0) + { + DialogTimer -= ftime + if(DialogTimer <= 0) + { + DialogTimer = 0 + DialogVisible = false + ShowWidget(WDialogText, false) + } + } + } + +/* if(g_MenuFlash) + { + g_MenuFlash = false + FullscreenFlash(1600, 60, "0.2 0.2 0.3", 0, 1) + }*/ + + if(FlashTime > 0) //je mozne ze sprite je viditelny + ProcessFlash() + + SManager.Update() + } + +//----------------------------------------------------------------- + void EOnSoundEnd(MinClass other, int extra) + { + for(int n = 0; n < 4; n++) + { + if(DlgSound[n] == extra) + { + DlgSound[n] = 0 + DlgID[n] = "" + } + } + } + +#ifdef DEVELOPER +//----------------------------------------------------------------- + void M_DebPrint(ExtClass other) + { + InfDialog.ShowMessage(other._value) + } +#endif + +//--------------------------------------------------------------------------------- + void LoadNAV(string name, bool free) + { + } + + void SetCurrent(); + +//----------------------------------------------------------------- + void EOnLoad(MinClass other, int extra) + { + SetCurrent() + DefFind = this + PrevFind = this + CallStackPos = 0 + } + + int ErrorFrame + int ErrorLine + widget ErrorWidget + bool nopvsreported +//----------------------------------------------------------------- + void CreateErrorWidget() + { + if(!ErrorWidget) + { + ErrorWidget = CreateWidget(WTYPE_TEXT, 150, 20, 500, 200, WF_BLEND|WF_VISIBLE, 0x7f7f7f7f, 300) + LoadWidgetImage(ErrorWidget, 0, "gfx/black.tga") + SetWidgetTextColor(ErrorWidget, 0xffffffff) + } + } + +//----------------------------------------------------------------- + void EOnWorldProcess(MinClass other, int extra) + { + SetCurrent() + DefFind = this + PrevFind = this + + currenttime = GetWorldTime() * 0.001 + //viewdist = 512 + SetCameraFarPlane(0, viewdist) + //g_fVisDist = 512 + + + bool test = false + +#ifdef DEVELOPER + test = true +#endif + +#ifndef EDITOR + if(test && ViewerClass == NULL) + { + if(ErrorNum > 0) + { + //let this crap run for a while + ErrorFrame++ + if(ErrorFrame == 5) + { + ErrorNum = 0 + + //if(ComputerName != "fido") + //{ + CreateErrorWidget() + SetWidgetText(ErrorWidget, ErrorLine++, "Level obsahuje vazne chyby ve skriptovani, ci definici entit.") + SetWidgetText(ErrorWidget, ErrorLine++, "Funkcnost bude pravdepodobne omezena, ci zcela chybna") + SetWidgetText(ErrorWidget, ErrorLine++, "Reportujte na Mantis jako 'Level design - skript' problem") + SetWidgetText(ErrorWidget, ErrorLine++, "a pripojte obsah souboru error.log") + SetWidgetText(ErrorWidget, ErrorLine++, "") + //} + } + } + + if(d_nopvs && !nopvsreported) + { + nopvsreported = true + CreateErrorWidget() + SetWidgetText(ErrorWidget, ErrorLine++, "Level nema zkompilovanou viditelnost a neni v provozuschopnem stavu.") + SetWidgetText(ErrorWidget, ErrorLine++, "Reportujte na Mantis jako 'Level design - geometrie' problem.") + SetWidgetText(ErrorWidget, ErrorLine++, "") + } + } +#endif + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + dBodyInteractionLayer(this, ET_WORLD) + } + +//----------------------------------------------------------------- +// Definition of SpeechSet. Must be here because of serialization process +//----------------------------------------------------------------- +SpeechSet SpeechSets[32] +int SpeechSetCount +int CSType + +//----------------------------------------------------------------- +void BeginSpeechSet(string ss) +{ + SpeechSetCount++ + SpeechSets[SpeechSetCount] = new SpeechSet(ss) +} + +//----------------------------------------------------------------- +void SpeechType(int type) +{ + CSType = type +} + +//----------------------------------------------------------------- +void Speech(string sample) +{ + SpeechSet ss = SpeechSets[SpeechSetCount] + + ss.SampleNames[CSType][ss.Counts[CSType]] = sample + ss.Counts[CSType] = ss.Counts[CSType] + 1 +} + +void InitSpeechSet(); + +//----------------------------------------------------------------- +// Definition of animsets. Must be here because of serialization process +//----------------------------------------------------------------- +AnimSet AnimSets[MAX_ANIMSETS] +int NumAnimSets + +//----------------------------------------------------------------- +void Import(string aset) +{ + AnimSet set + + for(int s = 0; s < NumAnimSets; s++) + { + set = AnimSets[s] + + if(set.Name == aset) + break + } + + if(s == NumAnimSets) + { + DPrint("Can't found animset " + aset) + ErrorNum++ + return + } + + for(int n = 0; n < MAX_ANIMSLOTS; n++) + { + if(!CurrentAnimSet.AnimNames[n]) + { + CurrentAnimSet.AnimNames[n] = set.AnimNames[n] + CurrentAnimSet.FPS[n] = set.FPS[n] + } + } +} + +//----------------------------------------------------------------- +void BeginAnimSet(string name) +{ + CurrentAnimSet = new AnimSet(name) + AnimSets[NumAnimSets++] = CurrentAnimSet + CurrentAnimFlags = 0 +} + +//----------------------------------------------------------------- +void Anim(int id, string name, int fps = 0, vector motion = "0 0 0") +{ + CurrentAnimID = id + CurrentAnimSet.AnimNames[id] = name + CurrentAnimSet.FPS[id] = fps + CurrentAnimSet.Motion[id] = motion + CurrentAnimSet.Flags[id] = CurrentAnimFlags +} + +//----------------------------------------------------------------- +void AnimFlags(int flags) +{ + CurrentAnimSet.Flags[CurrentAnimID] = flags +} + +//----------------------------------------------------------------- +void ApplyAnimFlags(int flags) +{ + CurrentAnimFlags |= flags +} + +//----------------------------------------------------------------- +void ClearAnimFlags(int flags) +{ + flags = flags ^ 0xffffffff + CurrentAnimFlags &= flags +} + +//----------------------------------------------------------------- +void InitAnimSets(); +//----------------------------------------------------------------- +void CleanupAnimSets() +{ + for(int s = 0; s < NumAnimSets; s++) + { + AnimSet set = AnimSets[s] + if(set.Counter) + { + set.Counter = 0 + + for(int n = 0; n < MAX_ANIMSLOTS; n++) + { + if(set.Anims[n]) + { + ReleaseObject(set.Anims[n], 0) + set.Anims[n] = VNULL + } + } + } + + delete set + } +} + +//----------------------------------------------------------------- + void WorldClass() + { + SpeechSetCount = -1 + CSType = -1 + + for(int n = 0; n < sizeof(ShellObjectNames); n++) + { + ShellObjects[n] = GetObject(ShellObjectNames[n]) + } + + CameraIndex = 2 + PlayerControl = true + ShowCursor = true + ActualFrame = 0 + + SetCurrent() + DefFind = this + PrevFind = this + + SetCameraFarPlane(0, viewdist) + + SetEventMask(this, EV_ONLOAD|EV_INIT|EV_SOUNDEND|EV_WORLDPROCESS) + CallStackPos = 0 + +/* if(playerscale == 0) + playerscale = 1.0 + + if(enemyscale == 0) + enemyscale = 1.0*/ + + if(!g_Viewer) + { + Transmitter = new SpeakTransmitter() + InfDialog = new InfoDialog(250, 430) + TaskList = new TasklistDialog(Transmitter.DlgPanel, InfDialog, -512, 100) + TaskList.SetPos(-TaskList.width, 17) + Cross = new CrossHairClass + HackInfDialog = new HackInfoDialog(510, 400) + SManager = new SpeechManager + + if(flaretype > 0) + flare = new SunFlare(flaretype) + } + InitAnimSets() + } + + void ~WorldClass() + { + if(ErrorWidget) + { + DestroyWidget(ErrorWidget) + ErrorWidget = NULL + ErrorFrame = 0 + ErrorNum = 0 + } + + for(int n = 0; n < sizeof(ShellObjectNames); n++) + { + if(ShellObjects[n]) + { + ReleaseObject(ShellObjects[n], 0) + ShellObjects[n] = VNULL + } + } + + for(int t = 0; t < sizeof(StreakShaderNames); t++) + { + for(n = 0; n < NumStreaks[t]; n++) + { + ReleaseObject(Streaks[t][n], true) + Streaks[t][n] = VNULL + } + } + + if(flare) + { + delete flare + flare = NULL + } + + if(SManager) + { + delete SManager + SManager = NULL + } + + if(Transmitter) + { + delete Transmitter + Transmitter = NULL + } + + if(TurretDisplay1) + { + delete TurretDisplay1 + TurretDisplay1 = NULL + } + + if(MineDisplay) + { + delete MineDisplay + MineDisplay = NULL + } + + if(CameraDisplay) + { + delete CameraDisplay + CameraDisplay = NULL + } + + if(EnemyDisplay) + { + delete EnemyDisplay + EnemyDisplay = NULL + } + + if(ScreenDisplay) + { + delete ScreenDisplay + ScreenDisplay = NULL + } + + if(InfDialog) + { + delete InfDialog + InfDialog = NULL + } + + if(TaskList) + { + delete TaskList + TaskList = NULL + } + + if(Cross) + { + delete Cross + Cross = NULL + } + + if(HackInfDialog) + { + delete HackInfDialog + HackInfDialog = NULL + } +/* + if(MessagePanel) + { + delete MessagePanel + MessagePanel = NULL + }*/ + } +} + + +WorldClass World + +void HackInterface::HackInterface(MinClass owner) +{ + Owner = owner + BeforeInit() + + HackingTime = 2 + SelectOpacity = HG_OpacityUnselected + SelectTargetOpacity = HG_OpacityUnselected + RotAngle = frand(0, 360) + + WSymbol = CreateWidget(WTYPE_IMAGE, 0, 0, 200, 200, WF_SOURCEALPHA | WF_BLEND|WF_CUSTOMUV|WF_NOWRAP|WF_ADDITIVE, 0xffffffff, 2) + WSymbol2 = CreateWidget(WTYPE_IMAGE, 0, 0, 200, 200, WF_SOURCEALPHA | WF_BLEND|WF_CUSTOMUV|WF_NOWRAP|WF_ADDITIVE, 0xffffffff, 1) + WLabel = CreateWidget(WTYPE_TEXT, 0, 0, 240, 32, WF_SOURCEALPHA | WF_BLEND|WF_ADDITIVE, 0xffffffff, 3) + WProgress = CreateWidget(WTYPE_TEXT, 0, 0, 32, 32, WF_BLEND|WF_CENTER|WF_VCENTER, 0xffffffff, 4) + SetFont(WProgress, MainFont) +// LoadWidgetImage(WProgress, 0, "gfx/remotecontrol/titlegrad.tga") + SetWidgetTextOffset(WProgress, 2, -1) +// SetWidgetTextColor(WProgress, 0xff000000) +// SetWidgetColor(WProgress, 0xffffffff) + + WProgressBack = CreateWidget(WTYPE_IMAGE, 0, 0, 32, 32, WF_BLEND, 0xffffffff, 3) + WArrow = CreateWidget(WTYPE_IMAGE, 0, 0, 32, 32, WF_SOURCEALPHA|WF_BLEND|WF_CUSTOMUV|WF_NOWRAP|WF_ADDITIVE, 0xffffffff, 4) + LoadWidgetImage(WSymbol, 0, "gfx/remotecontrol/spot_camera.tga") + LoadWidgetImage(WSymbol2, 0, "gfx/remotecontrol/spot_camera.tga") + LoadWidgetImage(WLabel, 0, "gfx/remotecontrol/cross_d.tga") + LoadWidgetImage(WArrow, 0, "gfx/remotecontrol/direction.tga") + SetFont(WLabel, MainFont) + + if(name) + SetWidgetTextEx(WLabel, 0, 1, "#" + name) + else + SetWidgetText(WLabel, 0, "NoNameDevice") + + SetWidgetTextOffset(WLabel, 30, -2) +} + +//----------------------------------------------------------------- +void ExtClass::M_Use(ExtClass other) +{ + int CanActiv = CanActivate(0, World.Player) + + if(CanActiv == ACT_ENABLE) //najprvs skusame ci sa to neda aktivovat + CallMethods(this, OnSuccess) + else + CallMethods(this, OnFail) +} + +//----------------------------------------------------------------- +void ExtClass::EOnInit(MinClass other, int extra) +{ + if(UseName) + UseClass = World.ItemColPtr.GetItemIndex(UseName) +} + +//----------------------------------------------------------------- +void SunFlare::Update() +{ + if(g_iIsOutdoor == false) + { + if(IsVisible) + Switch(false) + + return + } + + vector CamPos = World.CameraPos + vector SunPos = CamPos + (g_vSunDirection * (float)1000000) + float dot = World.CameraNorm * g_vSunDirection + /* + vector from = CamPos + vector to = World.CameraNorm * 100 + to = from + to + + if(KeyState(KC_K)) + AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, from, to) +*/ + + if(dot >= 0.6) + { + float Plane[4] + int cont, surf + vector end = SunPos + +// TraceLineEx(PLAYER, CamPos, end, ZeroVec, ZeroVec, NULL, Plane, cont, surf, TRACE_ENTS|TRACE_WORLD|TRACE_DETAIL|TRACE_PATCH, SunTracFilter) + TraceLineEx(DEFAULT, CamPos, end, ZeroVec, ZeroVec, NULL, Plane, cont, surf, TRACE_WORLD|TRACE_DETAIL|TRACE_PATCH, SunTracFilter) +// Print(g_strShader) + + if(surf & SURF_SKY) + { + if(IsVisible == false) + Switch(true) + + dot -= 0.6 + dot *= 2.2 //4.2 + + if(dot > 1) + dot = 1 + + SetAlpha(dot) + } + else + SetAlpha(0) + +// AddDShape(SHAPE_BBOX, 0xffff0000, SS_NOZBUFFER|SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, FinePos - "3 3 3", FinePos + "3 3 3") + +// Print(CamPos) + SetOrigin(this, CamPos + g_vSunDirection) + UpdateEntity(this) + return + } + + if(IsVisible) + Switch(false) +} + +const float ArrayCircleDist = 100 //jak daleko je sipka od stredu entity v 2D +const float HG_SelectorHalfWidth = 75 //polomer vizualizeru +const float HG_SelectorHalfHeight = 75 +const float HG_SelectorWidth = 150 +const float HG_SelectorHeight = 150 +const float HG_LabelOffsetX = 50 //label entity od stredu selectoru +const float HG_LabelOffsetY = 50 +const float HG_LabelWidth = 180 +const float HG_LabelHeight = 32 +const float HG_ProgressOffsetX = 26 +const float HG_ProgressOffsetY = 20 +const float HG_ProgressWidth = 100 +const float HG_ProgressHeight = 16 + +//--------------------------------------------------------------------------------- +void HackInterface::UpdateVisualizers(vector PlayerPos) +{ + float FinalFlashScale + RotAngle += ftime * 30 //pomaly rotujeme dookola + + float diff = SelectTargetOpacity - SelectOpacity + SelectOpacity += diff * ftime * 5 + clamp SelectOpacity<0, 255> + + diff = FadeScaleTarget - FadeScale + FadeScale += diff * ftime * 5 + + //vector orig = GetMatrix(Owner, 3) + //if(!IsBoxVisible(orig, orig, 0)) + //return + + vector CameraLeft = g_CamMat[0] + vector CameraForward = g_CamMat[1] + vector CameraUp = g_CamMat[2] + + vector pos3D = GetVisualPos() + vector PlaOrg = g_CamMat[3]//PlayerPos +// pos3D[2] = PlaOrg[2] + vector DirBetw = pos3D - PlaOrg + float DistFromCamera = VectorNormalize(DirBetw) + + DistanceScale = DistFromCamera - 256 + clamp DistanceScale<0, 256> + DistanceScale /= 512 + clamp DistanceScale<0, 1> + DistanceScale = 1 - DistanceScale + DistanceScale = 0.3 + (DistanceScale * 0.7) + + float DotLeft = CameraLeft * DirBetw + float DotUp = CameraUp * DirBetw + float DotForward = CameraForward * DirBetw + + bool InScreen = false + + if(DotForward < 0 && DotUp > -0.5 && DotUp < 0.5 && DotLeft > -0.6 && DotLeft < 0.6) //je v obraze + InScreen = true + + float xx = 400 + (DotLeft * -580) + float yy = 300 + (DotUp * -580) + + vector v1 = Vector(400, 300, 0) + vector v2 = Vector(xx, yy, 0) + vector Dir2D = v2 - v1 + float Dist = VectorNormalize(Dir2D) + vector angles = Vector2Angles(Dir2D) + float rotang = angles[1] + + float UVs[8] + vector pos + + if(rotang >= 37 && rotang < 143) //spodna strana + { + pos = IntersectLines(-10,590,810,590, 400,300,xx,yy) + + if(pos[0] >= -10 && pos[0] <= 810) //pretina spodnu cast + { + xx = pos[0] + yy = pos[1] + } + } + else + { + if(rotang >= 143 && rotang < 217) //lava strana + { + pos = IntersectLines(10,-10,10,610, 400,300,xx,yy) + + if(pos[1] >= -10 && pos[1] <= 610) //pretina lavu cast + { + xx = pos[0] + yy = pos[1] + } + } + else + { + if(rotang >= 217 && rotang < 323) //horna strana + { + pos = IntersectLines(-10,10,810,10, 400,300,xx,yy) + + if(pos[0] >= -10 && pos[0] <= 810) //pretina hornu cast + { + xx = pos[0] + yy = pos[1] + } + } + else //prava strana + { + pos = IntersectLines(790,-10,790,610, 400,300,xx,yy) + + if(pos[1] >= -10 && pos[1] <= 610) //pretina pravu cast + { + xx = pos[0] + yy = pos[1] + } + } + } + } + + float ArrowTransp + vector pp = ProjectVector(GetMainEntity(), ZeroVec) + + if(pp[2] < 1) + { + Xpos = pp[0] //pozicia na screene + Ypos = pp[1] + float InvScaleX = 800 / g_iWidth + float InvScaleY = 600 / g_iHeight + float VirtPosX = Xpos * InvScaleX //pozicia na virtualnom platne 800x600 + float VirtPosY = Ypos * InvScaleY + + vector vv1 = Vector(VirtPosX, VirtPosY, 0) + vector vv2 = Vector(xx, yy, 0) + float lng = VectorLength(vv1 - vv2) + clamp lng<0, ArrayCircleDist> + float ArrowFadeRate = lng / ArrayCircleDist + + if(InRect(10 ,790 ,10 ,590 ,VirtPosX ,VirtPosY)) + ArrowFadeRate = 0 + + ArrowTransp = ArrowFadeRate * FadeScale * 255 + + // v1 = Vector(400, 300, 0) + v2 = Vector(xx, yy, 0) + Dir2D = v2 - v1 + Dist = VectorNormalize(Dir2D) + + Dist -= 1 - ArrowFadeRate * ArrayCircleDist + Dir2D = Dir2D * Dist + xx = 400 + Dir2D[0] + yy = 300 + Dir2D[1] + + float LabelLeft = VirtPosX + (HG_LabelOffsetX * DistanceScale) + float LabelTop = VirtPosY + (HG_LabelOffsetY * DistanceScale) + float ProgressRate = CurHackingTime / HackingTime + float ProgressWidth = ProgressRate * HG_ProgressWidth + float SymbolHalfWidth = HG_SelectorHalfWidth * DistanceScale + float SymbolHalfHeight = HG_SelectorHalfHeight * DistanceScale + float SymbolWidth = HG_SelectorWidth * DistanceScale + float SymbolHeight = HG_SelectorHeight * DistanceScale + + SetWidgetPos(WSymbol, VirtPosX - SymbolHalfWidth, VirtPosY - SymbolHalfHeight, SymbolWidth, SymbolHeight) + SetWidgetPos(WLabel, LabelLeft, LabelTop, HG_LabelWidth, HG_LabelHeight) + SetWidgetPos(WProgressBack, LabelLeft + HG_ProgressOffsetX, LabelTop + HG_ProgressOffsetY, HG_ProgressWidth, HG_ProgressHeight) + SetWidgetPos(WProgress, LabelLeft + HG_ProgressOffsetX, LabelTop + HG_ProgressOffsetY, ProgressWidth, HG_ProgressHeight) + + if(ProgressRate == 1) + { + ProgressFlickTimer += ftime + + if(ProgressFlickTimer > 0.2) + { + ProgressTextVis = 1 - ProgressTextVis + ProgressFlickTimer = 0 + + if(ProgressTextVis) + SetWidgetTextEx(WProgress, 0, 1, "#READY") + else + SetWidgetText(WProgress, 0, "") + } + } + + FlashScale += ftime + clamp FlashScale<0, 1> + float flip = 1 - FlashScale + FinalFlashScale = flip * flip + FinalFlashScale = 1 - FinalFlashScale + + float RadiusExtend = 120 * FinalFlashScale + float Width = SymbolWidth + (RadiusExtend * DistanceScale) + float Height = SymbolHeight + (RadiusExtend * DistanceScale) + float left = VirtPosX - (Width * 0.5) + float top = VirtPosY - (Height * 0.5) + SetWidgetPos(WSymbol2, left, top, Width, Height) + + GetRotatedSpriteUVs(UVs, FinalFlashScale * 175 * RotDir + RotAngle) + SetWidgetUV(WSymbol, UVs) + SetWidgetUV(WSymbol2, UVs) + + float SelectOpacityRate = SelectOpacity - HG_OpacityUnselected / (HG_OpacitySelected - HG_OpacityUnselected) + float LabelOp = SelectOpacity * FadeScale * GlobalVisibilityScale + float ProgressOp = LabelOp// * SelectOpacityRate + float ProgressBackOp = ProgressOp * 0.25 + + int LabelColor = AWHITE(LabelOp) + SetWidgetColor(WSymbol, LabelColor) + SetWidgetColor(WLabel, LabelColor) + SetWidgetTextColor(WLabel, LabelColor) + SetWidgetColor(WProgress, ARGB(ProgressOp, 136, 241, 254)) + SetWidgetTextColor(WProgress, ARGB(ProgressOp, 0, 0, 0)) + SetWidgetColor(WProgressBack, ARGB(ProgressBackOp, 136, 241, 254)) + + float alp2 = 1 - FinalFlashScale * FadeScale * GlobalVisibilityScale * 255 + SetWidgetColor(WSymbol2, AWHITE(alp2)) + } + else + { + ArrowTransp = FadeScale * 255 //na odvratenej strane sipku vidime vzdy + SetWidgetColor(WSymbol, 0x00000000) + SetWidgetColor(WLabel, 0x00000000) + SetWidgetTextColor(WLabel, 0x00000000) + SetWidgetColor(WProgress, 0x00000000) + SetWidgetTextColor(WProgress, 0x00000000) + SetWidgetColor(WProgressBack, 0x00000000) + } + + SetWidgetColor(WArrow, AWHITE(ArrowTransp)) + SetWidgetPos(WArrow, xx - 16, yy - 16, 32, 32 ) + GetRotatedSpriteUVs(UVs, -rotang) + SetWidgetUV(WArrow, UVs) +} + +//----------------------------------------------------------------- +void ExtClass::M_Parent(ExtClass other) +{ + string Value = other._value + string Parms[8] + int NumParms = ParseString(Value, Parms) + + if(NumParms == 1) + { + int p = atoi(other._value) - 1 + if(p >= -1 && p < 8) + { + SetOrigin(other, ZeroVec) + if(!AddChild(this, other, p)) + { + DPrint("Can't parent " + other._name + " on pivot " + other._value + " of " + _name) + ErrorNum++ + } + else + other.OnParent(this) //informujeme child ze bol naparenteny + } + return + } + + if(NumParms >= 3) + { + ExtClass ChildEnt = FindClass(Parms[0]) + + if(!ChildEnt) + { + DPrint("Can't parent " + Parms[0] + " on " + _name + ". Entity " + Parms[0] + " not exist") + ErrorNum++ + return + } + + int pt = atoi(Parms[2]) - 1 + if(pt >= -1 && pt < 8) + { + UpdateEntity(this) + UpdateEntity(ChildEnt) + vector ChildPos = GetMatrix(ChildEnt, 3) + vector mat[3] + GetMatrix4(this, mat) + vector ParentOff = ZeroVec + + if(NumParms == 5 && Parms[4] == "keepoffset") + { + ParentOff = ChildPos - GetMatrix(this, 3) + ParentOff = VectorMatrixInvMultiply3(mat, ParentOff) + } + + if(AddChild(this, ChildEnt, pt)) + { + SetOrigin(ChildEnt, ParentOff) + UpdateEntity(this) + ChildEnt.OnParent(this) +#ifdef EDITOR + bool ChildFound = false + for(int c = 0; c < ChildsNamesNum; c++) + { + if(ChildsNames[c] == ChildEnt._name) + ChildFound = true + } + + if(!ChildFound) + ChildsNames[ChildsNamesNum++] = ChildEnt._name //nemozeme si ukladat p + + ChildEnt.ParentName = _name +#endif + } + else + { + DPrint("Can't parent " + ChildEnt._name + " on pivot " + Parms[2] + " of " + _name) + ErrorNum++ + } + } + } +} + +//----------------------------------------------------------------- +void WorldClass::SetCurrent() +{ + World = this +} + +//----------------------------------------------------------------- +void ExtClass::UpdateAgent(bool set) +{ + if(!set) + { + if(agent) + { + agent.Destroy() + agent = NULL + } + } + else + { + int ff = GetFlags(this) + + if(ff & TFL_TRIGGER || !ff & TFL_SOLID) + { + if(agent) + { + agent.Destroy() + agent = NULL + } + return + } + + vector mins, maxs + GetBoundBox(this, mins, maxs) + vector mat[4] + GetMatrix4(this, mat) + agent = World.pPathFinder.AgentFromOBB(agent, mat, mins, maxs) + } +} + +//----------------------------------------------------------------- +CPosition ExtClass::GetWPos() +{ + if(WAFrame == g_iViewFrame) + return WPosition + + if(WPosition == NULL) + WPosition = new CPosition + + if(!World.pPathFinder.PositionForPoint(GetOrigin(this), WPosition)) + { + delete WPosition + WPosition = NULL + } + + WAFrame = g_iViewFrame + + return WPosition +} + +//----------------------------------------------------------------- +void ExtClass::Exec(string parm) +{ + CallMethods(this, parm) +} + + +void NotifyNoises(ExtClass actor, vector origin, float radius, int noises); + +//----------------------------------------------------------------- +void SetPosInCamAxis(MinClass other, vector RelCoords, vector angles, float scal) +{ + float f + vector Off + Off[1] = RelCoords[2]//vzdalenost od kamery + f = RelCoords[0] + Off[0] = -f //offset x + f = RelCoords[1] + Off[2] = -f //offset y + + vector mat2[4] + RollPitchYawMatrix(angles, mat2) //rotacia okolo vlastnej osi + + vector res[4] + + mat2[3] = Off + MatrixMultiply4(g_CamMat, mat2, res) + + if(scal == 1.0) + { + SetMatrix(other, res) + return + } + + vector scale[4] + scale[0][0] = scal + scale[1][1] = scal + scale[2][2] = scal + + vector res2[4] + MatrixMultiply4(res, scale, res2) + + SetMatrix(other, res2) +} + +void CalcMatrixFromCamera() +{ + vector CameraAng + + CameraAng[1] = World.CameraAngs[1] + 90.0 + CameraAng[2] = World.CameraAngs[0] * -1 + + RollPitchYawMatrix(CameraAng, g_CamMat) + g_CamMat[3] = World.CameraPos +} + +//============================================================================= +class JointClass extends ExtClass +{ + vector coords + float angle, angle2, angle3 + int flags + string body1, body2 + RigidBodyClass Body1, Body2 + dJoint handle + JointClass NextJoint + +//--------------------------------------------------------------------------------- + void OnBreak(dJoint JointHandle) + { + if(JointHandle != handle && NextJoint) + NextJoint.OnBreak(JointHandle) + } + +//--------------------------------------------------------------------------------- + bool Create() + { + return false + } + +//--------------------------------------------------------------------------------- + void Destroy() + { + if(handle) + { + dJointDestroy(handle) + handle = 0 + } + } + +//--------------------------------------------------------------------------------- + bool FindBodies(); + + +#ifdef EDITOR + void EditorOpened() + { + Destroy() + } +#endif + +//--------------------------------------------------------------------------------- + void EOnLoaded(ExtClass other, int extra); + + +//--------------------------------------------------------------------------------- + void EOnInit(ExtClass other, int extra) + { + SetOrigin(this, coords) + SetAngles(this, Vector(angle3, angle, angle2)) + } + +//--------------------------------------------------------------------------------- + void ~JointClass() + { + Destroy() + } +} + +//================================================================================= +class RichJoint extends JointClass +{ + string OnBreak, OnBreakAngLimit, OnBreakAngSpring + float BreakThreshold, AngLimitThreshold, AngSpringThreshold + float angstiffness + float angdamping + dJoint AngLimitHandle + dJoint AngSpringHandle + +//--------------------------------------------------------------------------------- + void M_BreakAngularLimit(ExtClass other) + { + if(AngLimitHandle) + { + dJointDestroy(AngLimitHandle) + AngLimitHandle = 0 + } + } + +//--------------------------------------------------------------------------------- + void M_BreakAngularSpring(ExtClass other) + { + if(AngSpringHandle) + { + dJointDestroy(AngSpringHandle) + AngSpringHandle = 0 + } + } + +//--------------------------------------------------------------------------------- + void Destroy() + { + if(handle) + { + dJointDestroy(handle) + handle = 0 + } + + if(AngLimitHandle) + { + dJointDestroy(AngLimitHandle) + AngLimitHandle = 0 + } + + if(AngSpringHandle) + { + dJointDestroy(AngSpringHandle) + AngSpringHandle = 0 + } + } + +//--------------------------------------------------------------------------------- + void M_Break(ExtClass other) + { + Destroy() + } + +//--------------------------------------------------------------------------------- + void OnBreak(dJoint JointHandle) + { + bool IsMyJoint = false + + if(JointHandle == handle) //ak sa uthne hlavny joint tak s nim rusime aj limity + { + if(AngSpringHandle) + { + dJointDestroy(AngSpringHandle) + AngSpringHandle = 0 + CallMethods(this, OnBreakAngSpring) + } + + if(AngLimitHandle) + { + dJointDestroy(AngLimitHandle) + AngLimitHandle = 0 + CallMethods(this, OnBreakAngLimit) + } + + handle = 0 + IsMyJoint = true + CallMethods(this, OnBreak) + } + else + { + if(JointHandle == AngLimitHandle) + { + AngLimitHandle = 0 + IsMyJoint = true + CallMethods(this, OnBreakAngLimit) + } + else + { + if(JointHandle == AngSpringHandle) + { + AngSpringHandle = 0 + IsMyJoint = true + CallMethods(this, OnBreakAngSpring) + } + } + } + + if(!IsMyJoint && NextJoint) + NextJoint.OnBreak(JointHandle) + } +} + +//================================================================================= +class joint_fixed extends RichJoint +{ + float anglimit + +//--------------------------------------------------------------------------------- + bool Create() + { + bool IntBlock = false + bool FixOnlyDist = false + bool AngularLimit = false + bool AngularSpring = false + + if(flags & 1) + IntBlock = true + + if(flags & 2) + FixOnlyDist = true + + if(flags & 4) + AngularLimit = true + + if(flags & 8) + AngularSpring = true + + if(FixOnlyDist) + { + handle = dJointCreateBall(Body1, Body2, coords, IntBlock, BreakThreshold) + + if(AngularLimit) + { + UpdateEntity(this) + vector Body1Pos = GetMatrix(Body1, 3) + vector Body2Pos = GetMatrix(Body2, 3) + vector axis = Body1Pos - Body2Pos + VectorNormalize(axis) + clamp anglimit<-360, 360> + AngLimitHandle = dJointCreateAngularLimit(Body1, axis, Body2, axis, anglimit * DEG2RAD, AngLimitThreshold) + } + + if(AngularSpring) + AngSpringHandle = dJointCreateAngularSpringDamper(Body1, axis, Body2, axis, angstiffness, angdamping, AngSpringThreshold) + } + else + handle = dJointCreateFixed(Body1, Body2, coords, IntBlock, BreakThreshold) + + return true + } + +//-------------------------------------------------------------------------------------- + void EOnLoaded(ExtClass other, int extra) + { + CallMethods(this, OnLoad) + } +} + +//================================================================================= +class joint_hinge extends RichJoint +{ + float anglimitmin, anglimitmax + float springangle + +//--------------------------------------------------------------------------------- + bool Create() + { + bool IntBlock = false + bool AngularLimit = false + bool AngularSpring = false + + if(flags & 1) + IntBlock = true + + if(flags & 2) + AngularLimit = true + + if(flags & 4) + AngularSpring = true + + UpdateEntity(this) + vector Body1Pos, Body2Pos + vector mat[4] + GetMatrix4(this, mat) + vector axis = mat[0] + + handle = dJointCreateHinge(Body1, Body2, coords, axis, IntBlock, BreakThreshold) + + vector AngAxis1 = mat[2] //prva osa vzdycky tato kolmica na hlavnu osu + vector AngAxis2 + + if(AngularLimit) + { + clamp anglimitmin<-360, 0> + clamp anglimitmax<0, 360> + clamp springangle //nema zmysel davat pruzinu mimo limit + + float rangeangle = fabs(anglimitmin) + anglimitmax //kolo stupov volnosti tam bude + float jointangle = rangeangle * 0.5 * DEG2RAD //polovicu dame do jointu + float offsetangle = 0 + + if(rangeangle > 0) + { + float angminrate = fabs(anglimitmin) / rangeangle //percentualne jedna strana voci celemu rozsahu + float angmaxrate = fabs(anglimitmax) / rangeangle //percentualne druha strana voci celemu rozsahu + float offsetrate = angmaxrate - angminrate + offsetangle = offsetrate * rangeangle + offsetangle *= 0.5 * DEG2RAD + } + + AngAxis2 = VectorMatrixMultiply3(mat, Vector(0,sin(offsetangle),cos(offsetangle))) + AngLimitHandle = dJointCreateAngularLimit(Body1, AngAxis1, Body2, AngAxis2, jointangle, AngLimitThreshold) + } + + if(AngularSpring) + { + float radangle = springangle * DEG2RAD + AngAxis2 = VectorMatrixMultiply3(mat, Vector(0,sin(radangle),cos(radangle))) + AngSpringHandle = dJointCreateAngularSpringDamper(Body1, AngAxis1, Body2, AngAxis2, angstiffness, angdamping, AngSpringThreshold) + } + + return true + } + +//-------------------------------------------------------------------------------------- + void EOnLoaded(ExtClass other, int extra) + { + CallMethods(this, OnLoad) + } +} + +//================================================================================= +class joint_sliding extends RichJoint +{ + float linstiffness + float lindamping + float linlimitmin, linlimitmax + float springoffset + float springlength + float anglimitmin, anglimitmax + float springangle + float LinLimitThreshold, LinSpringThreshold + string OnBreakLinLimit, OnBreakLinSpring + + + dJoint LinLimitHandle + dJoint LinSpringHandle + +//--------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------- + void OnBreak(dJoint JointHandle) + { + bool IsMyJoint = false + + if(JointHandle == handle) //ak sa uthne hlavny joint tak s nim rusime aj limity + { + if(AngSpringHandle) + { + dJointDestroy(AngSpringHandle) + AngSpringHandle = 0 + CallMethods(this, OnBreakAngSpring) + } + + if(AngLimitHandle) + { + dJointDestroy(AngLimitHandle) + AngLimitHandle = 0 + CallMethods(this, OnBreakAngLimit) + } + + if(LinSpringHandle) + { + dJointDestroy(LinSpringHandle) + LinSpringHandle = 0 + CallMethods(this, OnBreakLinSpring) + } + + if(LinLimitHandle) + { + dJointDestroy(LinLimitHandle) + LinLimitHandle = 0 + CallMethods(this, OnBreakLinLimit) + } + + handle = 0 + IsMyJoint = true + CallMethods(this, OnBreak) + } + else + { + if(JointHandle == AngLimitHandle) + { + AngLimitHandle = 0 + IsMyJoint = true + CallMethods(this, OnBreakAngLimit) + } + else + { + if(JointHandle == AngSpringHandle) + { + AngSpringHandle = 0 + IsMyJoint = true + CallMethods(this, OnBreakAngSpring) + } + else + { + if(JointHandle == LinLimitHandle) + { + LinLimitHandle = 0 + IsMyJoint = true + CallMethods(this, OnBreakLinLimit) + } + else + { + if(JointHandle == LinSpringHandle) + { + LinSpringHandle = 0 + IsMyJoint = true + CallMethods(this, OnBreakLinSpring) + } + } + } + } + } + + if(!IsMyJoint && NextJoint) + NextJoint.OnBreak(JointHandle) + } + +//--------------------------------------------------------------------------------- + void M_BreakLinearLimit(ExtClass other) + { + if(LinLimitHandle) + { + dJointDestroy(LinLimitHandle) + LinLimitHandle = 0 + } + } + +//--------------------------------------------------------------------------------- + void M_BreakLinearSpring(ExtClass other) + { + if(LinSpringHandle) + { + dJointDestroy(LinSpringHandle) + LinSpringHandle = 0 + } + } + +//--------------------------------------------------------------------------------- + bool Create() + { + bool IntBlock = false + bool LinearLimit = false + bool LinearSpring = false + bool AngularLimit = false + bool AngularSpring = false + + if(flags & 1) + IntBlock = true + + if(flags & 2) + LinearLimit = true + + if(flags & 4) + LinearSpring = true + + if(flags & 8) + AngularLimit = true + + if(flags & 16) + AngularSpring = true + + UpdateEntity(this) + vector mat[4] + GetMatrix4(this, mat) + vector axis = mat[0] + + handle = dJointCreateSliding(Body1, Body2, coords, axis, IntBlock, BreakThreshold) + + vector point1, point2 + + if(Body1 == World) + point1 = GetMatrix(Body2, 3) + else + { + if(Body2 == World) + point1 = GetMatrix(Body1, 3) + else + point1 = GetMatrix(Body2, 3) + } + + if(LinearLimit) + { + clamp linlimitmin<-999999, 0> + clamp linlimitmax<0, 999999> + + float distance = linlimitmax + fabs(linlimitmin) + + vector off1 = axis * -linlimitmax * 0.5 + point2 = point1 + off1 + + vector off2 = axis * linlimitmin * 0.5 + point1 = point1 + off2 + + LinLimitHandle = dJointCreateLinearLimit(Body1, point1, Body2, point2, distance * 0.5, LinLimitThreshold) + } + + if(LinearSpring) + { + float halfoffset = springoffset * 0.5 + vector off = axis * halfoffset + vector p1 = point1 + off + vector p2 = point1 - off + LinSpringHandle = dJointCreateSpringDamper(Body1, p1, Body2, p2, linstiffness, lindamping, springlength, LinSpringThreshold) + } + + vector AngAxis1 = mat[2] //prva osa vzdycky tato kolmica na hlavnu osu + vector AngAxis2 + + if(AngularLimit) + { + clamp anglimitmin<-360, 0> + clamp anglimitmax<0, 360> + clamp springangle //nema zmysel davat pruzinu mimo limit + + float rangeangle = fabs(anglimitmin) + anglimitmax //kolo stupov volnosti tam bude + float jointangle = rangeangle * 0.5 * DEG2RAD //polovicu dame do jointu + float offsetangle = 0 + + if(rangeangle > 0) + { + float angminrate = fabs(anglimitmin) / rangeangle //percentualne jedna strana voci celemu rozsahu + float angmaxrate = fabs(anglimitmax) / rangeangle //percentualne druha strana voci celemu rozsahu + float offsetrate = angmaxrate - angminrate + offsetangle = offsetrate * rangeangle + offsetangle *= 0.5 * DEG2RAD + } + + AngAxis2 = VectorMatrixMultiply3(mat, Vector(0,sin(offsetangle),cos(offsetangle))) + AngLimitHandle = dJointCreateAngularLimit(Body1, AngAxis1, Body2, AngAxis2, jointangle, AngLimitThreshold) + } + + if(AngularSpring) + { + float radangle = springangle * DEG2RAD + AngAxis2 = VectorMatrixMultiply3(mat, Vector(0,sin(radangle),cos(radangle))) + AngSpringHandle = dJointCreateAngularSpringDamper(Body1, AngAxis1, Body2, AngAxis2, angstiffness, angdamping, AngSpringThreshold) + } + + return true + } + +//--------------------------------------------------------------------------------- + void Destroy() + { + if(handle) + { + dJointDestroy(handle) + handle = 0 + } + + if(LinLimitHandle) + { + dJointDestroy(LinLimitHandle) + LinLimitHandle = 0 + } + + if(LinSpringHandle) + { + dJointDestroy(LinSpringHandle) + LinSpringHandle = 0 + } + + if(AngLimitHandle) + { + dJointDestroy(AngLimitHandle) + AngLimitHandle = 0 + } + + if(AngSpringHandle) + { + dJointDestroy(AngSpringHandle) + AngSpringHandle = 0 + } + } + +//-------------------------------------------------------------------------------------- + void EOnLoaded(ExtClass other, int extra) + { + CallMethods(this, OnLoad) + } +} + +//====================================================================================== +class joint_motor extends JointClass +{ + dJoint AngularMotorHandle + float MoveVel, RotVel + float MoveAccel, RotAccel + +//-------------------------------------------------------------------------------------- + void WakeUpBodies(); + +//-------------------------------------------------------------------------------------- + void M_SetMoving(ExtClass other) + { + if(!handle) + return + + string Parms[8] + int NumParms = ParseString(other._value, Parms) + + if(NumParms >= 1) + MoveVel = atof(Parms[0]) + + if(NumParms >= 2) + MoveAccel = atof(Parms[2]) + + dJointSetMotor(handle, MoveVel, MoveAccel) + WakeUpBodies() + } + +//-------------------------------------------------------------------------------------- + void M_SwitchMoveDir(ExtClass other) + { + if(!handle) + return + + MoveVel = -MoveVel + dJointSetMotor(handle, MoveVel, MoveAccel) + WakeUpBodies() + } + +//-------------------------------------------------------------------------------------- + void M_SetRotating(ExtClass other) + { + if(!AngularMotorHandle) + return + + string Parms[8] + int NumParms = ParseString(other._value, Parms) + + if(NumParms >= 1) + RotVel = atof(Parms[0]) + + if(NumParms >= 2) + RotAccel = atof(Parms[2]) + + dJointSetMotor(AngularMotorHandle, RotVel, RotAccel) + WakeUpBodies() + } + +//-------------------------------------------------------------------------------------- + void M_SwitchRotateDir(ExtClass other) + { + if(!AngularMotorHandle) + return + + RotVel = -RotVel + dJointSetMotor(AngularMotorHandle, RotVel, RotAccel) + WakeUpBodies() + } + +//-------------------------------------------------------------------------------------- + bool Create() + { + bool IsLinear = false + bool IsAngular = false + + if(flags & 1) + IsLinear = true + + if(flags & 2) + IsAngular = true + + UpdateEntity(this) + vector axis = GetMatrix(this, 0) + + vector v1 = GetMatrix(this, 3) + vector v2 = axis * 100 + v2 = v1 + v2 + + if(IsLinear) + handle = dJointCreateLinearMotor(Body1, Body2, axis, 0, 0) + + if(IsAngular) + AngularMotorHandle = dJointCreateAngularMotor(Body1, Body2, axis, 0, 0) + } + +//-------------------------------------------------------------------------------------- + void Destroy() + { + if(handle) + { + dJointDestroy(handle) + handle = 0 + } + + if(AngularMotorHandle) + { + dJointDestroy(AngularMotorHandle) + AngularMotorHandle = 0 + } + } + +//-------------------------------------------------------------------------------------- + void EOnLoaded(ExtClass other, int extra) + { + CallMethods(this, OnLoad) + } +} + +//====================================================================================== +class RigidBodyClass extends ExtClass +{ + float mass + int InterLayer + int impactsounds + float weaponscale + //float impactdamage //kolko to ma uberat + ShotStorage PhysHurtInfo + bool pickable + float _pathblock //-1 znamena zadna prekazka pri pathfindingu. + // 0 znamena "tvrdou" prekazkou + // Pokud >0, je to mekka prekazka, ktera se muze dat prekonat + + string _materialremap + + dGeom geom + bool rb //geom pro identifikaci Rigidbody nemuzeme pouzit, protoze geometrie muze byt interni z modelu + + vector Matrix[4] + int LastSoundFrame + float LastNotifyTime //kdy jsme naposledy informovali AI o hluku + JointClass FirstJoint + + int NumContacts + +//--------------------------------------------------------------------------------- + void AddJointDependence(JointClass joint) + { + if(!FirstJoint) + FirstJoint = joint + else + { + JointClass CurrentJoint = FirstJoint + JointClass LastJoint = NULL + + while(CurrentJoint) + { + if(CurrentJoint == joint) //tento joint uz je v retazci. pridalo ho tam druhe body + return + + LastJoint = CurrentJoint + CurrentJoint = CurrentJoint.NextJoint + } + LastJoint.NextJoint = joint + } + } + +//--------------------------------------------------------------------------------- + void EOnJointBreak(class other, int extra) //ked sa utrhne joint. volane obidvom spojenym body + { + if(FirstJoint) //informujeme jointy ktore ovladaju toto body + FirstJoint.OnBreak(extra) + } + +//----------------------------------------------------------------- + void OnParent(ExtClass parent) //boli sme naparenteni z ingame scriptu + { + vector Angles = GetAngles(this) + ClearFlags(this, TFL_FULLMATRIX) //ked chceme parentit tak tento flag v ziadnom pripade + + if(rb) + { + dBodyActive(this, true, false) //Musime vypnut dynamiku. engine bude robit neustale SetFrame na body. kolidovat sice poriadne nebude ale stale je to uzitocne na trasovanie do phys geometrie + dBodyInteractionLayer(this, ET_NOCOLLISION) + } + + UpdateEntity(parent) + } + +//--------------------------------------------------------------------------------- + void SetMass(float Mass) + { + mass = Mass + + if(rb) + dBodySetMass(this, ZeroVec, mass) + } + +//--------------------------------------------------------------------------------- + void SetWeaponScale(float WeaponScale) + { + weaponscale = WeaponScale + } + +//--------------------------------------------------------------------------------- + void SetPickable(bool val) + { + pickable = val + } + +//--------------------------------------------------------------------------------- + bool GetPickable() + { + if(rb && dBodyIsDynamic(this) == false) + return false + + return pickable + } + +//--------------------------------------------------------------------------------- + void OnPickedPhysicaly(bool droped) + { + } + +//--------------------------------------------------------------------------------- + void SetTransform(vector mat[4]) + { + SetFlags(this, TFL_FULLMATRIX) + Matrix[0] = mat[0] + Matrix[1] = mat[1] + Matrix[2] = mat[2] + Matrix[3] = mat[3] + SetMatrix(this, Matrix) + //UpdateEntity(this) + } + +//--------------------------------------------------------------------------------- + void SetTransformEx(vector Angs, vector Pos) + { + SetFlags(this, TFL_FULLMATRIX) + RollPitchYawMatrix2(Angs, Matrix) + Matrix[3] = Pos + SetMatrix(this, Matrix) + //UpdateEntity(this) + } + +//--------------------------------------------------------------------------------- + int Shoot(ShotStorage shot) //MinClass other, vector pos, vector dir, float power, int bone + { + float ImpactPower + + if(shot.HurtType == HT_SHOT) + { + ImpactPower = shot.power * ShootImpactScale + + if(rb) + { + ImpactPower *= weaponscale + float ke = dBodyGetKineticEnergy(this) + + if(ke > 10) //aby sa nic nepohybovalo extremnymi rychlostami + ImpactPower *= 0.1 + + if(World.ManipEntity == this) + ImpactPower *= 0.01 + + vector vec = shot.dir * ImpactPower + dBodyApplyImpulseAt(this, vec, shot.to) + } + return 1 + } + + if(shot.HurtType == HT_EXPLOSION) + { + ImpactPower = shot.power * ExplosionImpactScale + + if(rb) + { + vector Org = GetCenterOfEntity(this) + vector ForceDir = Org - shot.from + float dist = VectorNormalize(ForceDir) + float scale = dist / shot.radius + clamp scale<0, 1> + scale = 1 -scale + ImpactPower += ImpactPower * scale + float MassScale = mass / 30 + + if(MassScale > 2) + MassScale = 2 + + ImpactPower *= MassScale //lahsie telesa musia dostat mensiu silu inac su velmi velke rozdiely + + if(World.ManipEntity == this) + ImpactPower *= 0.1 + + vector Force = ForceDir * ImpactPower + dBodyApplyImpulseAt(this, Force, Org + "0 0 10") + } + return true + } + + if(shot.HurtType == HT_FLAME) + { + dBodyApplyForce(this, shot.dir * shot.power) + return true + } + return true + } + +//--------------------------------------------------------------------------------- + bool CreateRigidBody(int GeomType, string Material, string Model) + { + if(rb) + return false + + //UpdateEntity(this) + + if(mass == 0) + mass = 1 //s nulovym mass to pekelne zblbne + + //defaultne zkusime interni kolizni model + if(GeomType == GEOMTYPE_NONE) + { + if(dBodyCreate(this, ZeroVec, BC_MODEL)) + { + //spocitej defaultni mass & inertia +/* if(Model == "obj/vehicles/buggy_wheel.xob") + { + dBodySetMass(this, "1000 1000 1000", mass) + Print("je tam") + } + else*/ + dBodySetMass(this, ZeroVec, mass) + + SetFlags(this, TFL_SOLID | TFL_OBBCOLLISION | TFL_TOUCHTRIGGERS) + SetEventMask(this, EV_JOINTBREAK) + dBodyInteractionLayer(this, ET_DEFAULT) + rb = true + return true + } + else + { + SetPickable(false) + + //DPrint(String("collision geometry for " + Model) + " not found") + return false + } + } + + if(GeomType == GEOMTYPE_NULL) //ziadna geometria. null body + { + dBodyCreate(this, ZeroVec, BC_NONE) + dBodySetMass(this, ComputeInertiaForNullBody(mass), mass) + dBodyInteractionLayer(this, ET_NOCOLLISION) + rb = true + return true + } + + vector mins, maxs, size + GetBoundBox(this, mins, maxs) + + size = maxs - mins + + if(size[0] == 0 || size[1] == 0 || size[2] == 0) + { + DPrint(String("Entity " + _name + " has zero extents. CreateRigidBody failed!")) + ErrorNum++ + return false + } + + //nepovedlo se, vytvor body s definovanyma primitivama + + if(!Material) + { + DPrint(String("Physics material for body " + _name + " not found !")) + ErrorNum++ + Material = "material/default" + } + + vector offset = mins + maxs * (float)0.5 + dBodyCreate(this, offset, BC_NONE) + + switch(GeomType) + { + case GEOMTYPE_BOX: + geom = dGeomCreateBox(size) + break + + case GEOMTYPE_SPHERE: + geom = dGeomCreateSphere(size[0] * 0.5) + break + + case GEOMTYPE_CAPSULE: + int ExtAxis = 0 + int RadiusAxis + if(size[1] > size[ExtAxis]) + ExtAxis = 1 + + if(size[2] > size[ExtAxis]) + ExtAxis = 2 + + RadiusAxis = ExtAxis + 1 + + if(RadiusAxis > 2) + RadiusAxis = 0 + + float radius = size[RadiusAxis] * 0.5 + float ext = size[ExtAxis] - radius - radius * 0.5 + + if(ext <= 0) + { + ext = 0 + DPrint(String("Capsule geometry in " + _name + " is not optimal. Sensible solution is switch to GEOMTYPE_SPHERE")) + ErrorNum++ + } + + geom = dGeomCreateCapsule(radius, Vector(0, 0, ext)) + break + + default: + geom = dGeomCreateBox(size) + } + + + dBodyAddGeom(this, geom, g_vIdentMatrix, Material) + dBodySetMass(this, ZeroVec, mass) + dBodyInteractionLayer(this, ET_DEFAULT) //defaultne musi byt nastaveny tento typ pre pripad zeby sa neskor uz nic nenastavilo. + + SetFlags(this, TFL_SOLID | TFL_OBBCOLLISION | TFL_TOUCHTRIGGERS) + SetEventMask(this, EV_JOINTBREAK) + rb = true + return true + } + +//--------------------------------------------------------------------------------- + void Show(bool stat) + { + if(stat) + SetFlags(this, TFL_VISIBLE) + else + ClearFlags(this, TFL_VISIBLE) + } + +//--------------------------------------------------------------------------------- + void ActivateBody(bool stat) + { + if(!rb) + return + + if(stat) + { + dBodyActive(this, true, true) + SetEventMask(this, EV_CONTACT) + + if(impactsounds) + SetEventMask(this, EV_SOUNDEND) //koli zvukom + } + else + { + dBodyActive(this, false, false) + ClearEventMask(this, EV_CONTACT) + ClearEventMask(this, EV_SOUNDEND) //koli zvukom + } + } + +//----------------------------------------------------------------- + void M_PhysicsOn(ExtClass other) + { + ActivateBody(true) + } + +//----------------------------------------------------------------- + void M_PhysicsOff(ExtClass other) + { + ActivateBody(false) + } + +//----------------------------------------------------------------- + void M_Solid(ExtClass other) + { + SetFlags(this, TFL_SOLID) + + if(rb) + { + if(dBodyGetInteractionLayer(this) == ET_NOCOLLISION) + dBodyInteractionLayer(this, InterLayer) + } + } +//----------------------------------------------------------------- + void M_NonSolid(ExtClass other) + { + ClearFlags(this, TFL_SOLID) + + if(rb) + { + InterLayer = dBodyGetInteractionLayer(this) + dBodyInteractionLayer(this, ET_NOCOLLISION) + } + } + +//----------------------------------------------------------------- + void M_Impulse(ExtClass other) + { + string Parms[4] + int NumParms = ParseString(other._value, Parms) + + if(NumParms != 3) + { + string Err = "wrong num of parameters " + _name + ".Impulse" + Print(Err) + return + } + + MinClass ent + if(Parms[0] == _name) + ent = this + else + ent = FindClass(Parms[0]) + + if(!ent) + return + + float pow = atof(Parms[2]) + vector pos = GetMatrix(ent, 3) + vector force = GetMatrix(ent, 0) + force = force * pow + dBodyApplyImpulseAt(this, force, pos) + } + +//----------------------------------------------------------------- + void EnableHurting(bool enable, float maxtime, float damage) + { + if(enable) + { + if(!PhysHurtInfo) + { + PhysHurtInfo = new ShotStorage + PhysHurtInfo.HurtType = HT_IMPACT + } + PhysHurtInfo.damage = damage + PhysHurtInfo.timer2 = maxtime //cas po ktory budeme schopni zranovat + SetEventMask(this, EV_TICK) + PhysHurtInfo.flags = ClearFlags(this, TFL_PATHBLOCK) //toto musime zrusit po dobu zranovania + } + else + { + if(PhysHurtInfo) + { + SetFlags(this, PhysHurtInfo.flags) + delete PhysHurtInfo + PhysHurtInfo = NULL + } + ClearEventMask(this, EV_TICK) + } + } + +//----------------------------------------------------------------- + void HurtEnemy(ShotStorage PhysHurtInfo); + +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + NumContacts++ + if(PhysHurtInfo && World.ManipEntity != this) //zranuje + { + if(PhysHurtInfo.timer == 0) + { + if(other.ClassType == ClassTypeCreature) + { + vector Vel = dBodyGetLastVelocity(this) //rychlost ziskana v tomto evente je nepresna pretoze to uz je po naraze! + float VelLengthSq = VectorLengthSq(Vel) + + if(VelLengthSq > 39.0625) //zaujimaju nas iba silne narazy s ohladom na hmotnost. 6.25 to je pri pouziti VectorLength() + { + PhysHurtInfo.target = other + PhysHurtInfo.shooter = this + PhysHurtInfo.from = c.Position + PhysHurtInfo.timer = 1 + PhysHurtInfo.power = 10//HurtIndex / 100 + SetEventMask(this, EV_TICK) //budeme zranovat iba urcitych intervaloch + } + } + } + } + + if(impactsounds) //zvuky + { + if(other == World.Player) + return + + float TargetFrame = g_FPS * MinImpactSoundsDelay //zvuky nesmu hrat kratko po sebe + int TF = LastSoundFrame + TargetFrame + + if(g_iViewFrame <= TF) + return + + vector ImpNorm = c.GetNormalImpulse() + vector VelBefore, VelAfter + float VelLngBefore = c.GetRelativeVelocityBefore(VelBefore) + + float ImpNormLng = VectorLength(ImpNorm) + ImpNormLng /= (float)mass + + float KE = dBodyGetLastKineticEnergy(this) + float ke = dBodyGetKineticEnergy(this) + int KinDiff = KE - ke + + if(VelLngBefore < 0) + VelLngBefore = -VelLngBefore + + float MinNormLng = mass * 0.002 + float MinVelLngBefore = mass * 0.00675 + + if(ImpNormLng > MinNormLng && VelLngBefore > MinVelLngBefore && KinDiff != 0/* && VelLng > 15*/) + { + int Mat1 = Surf2Mat(c.Flags1) //material tohto body + int Mat2 = Surf2Mat(c.Flags2) //material body s ktorym sme sa zrazili. + + hsound ImpSnd = GetImpactSound(Mat1, Mat2) + + if(ImpSnd) + { + int ps = PlaySound(this, ImpSnd, SF_ONCE) + float vol = VelLngBefore + clamp vol<0, 1> + LastSoundFrame = g_iViewFrame + vol = LinearVol(vol) + SetSoundVolume(ps, vol) + + if(other.ClassType != ClassTypeCreature) + { + //teoreticky by se to melo limitovat jen od urcite hlasitosti, ale z hlediska gameplaye + //chce proste player odlakat potvoru hozenym predmetem a ne spekulovat, jak velky ramus + //musi udelat, aby potvora zareagovala + float diff = currenttime - LastNotifyTime + if(diff > 2.0) + { + LastNotifyTime = currenttime + NotifyNoises(this, GetMatrix(this, 3), NOISERANGE_PHYSICS, NOISE_PHYSICS) + } + } + } + } + } + } + +//--------------------------------------------------------------------------------- + void EOnTick(class other, int extra) + { + if(PhysHurtInfo) //iba entity ktore maju zranovat + { + if(PhysHurtInfo.timer > 0) //odpocitavame delay pocas ktoreho nebudeme znovu zranovat + { + if(PhysHurtInfo.timer == 1) //z contact eventu neni mozne zranovat potvoru pretoze ona by mohla zmenit svoje rigidbody a viedlo by to k padu + { + HurtEnemy(PhysHurtInfo) + } + + PhysHurtInfo.timer -= TICK_PERIOD + + if(PhysHurtInfo.timer <= 0) + PhysHurtInfo.timer = 0 + } + + PhysHurtInfo.timer2 -= TICK_PERIOD + + if(PhysHurtInfo.timer2 <= 0) + { + PhysHurtInfo.timer2 = 0 + EnableHurting(false, 0, 0) //zmaze sa PhysHurtInfo! + } + } + } + +//--------------------------------------------------------------------------------- + void EOnInit(class other, int extra) + { + if(weaponscale == 0) + SetWeaponScale(1) + + if(impactsounds == 0) //defaultne zvuky zapiname ale dedenym entitam nechavame moznost tento default zmenit (misc_model) + impactsounds = 3 //znamena zapnuto defaultom takze podedena entita to ma moznost menit + + if(impactsounds == 2) //user to chce touto hodnotou vypnut + impactsounds = 0 + } + +//--------------------------------------------------------------------------------- + void RigidBodyClass() + { + SetEventMask(this, EV_INIT) + SetPickable(true) //defaultne sa da zobrat vsetko + } + +//--------------------------------------------------------------------------------- + void ~RigidBodyClass() + { + if(PhysHurtInfo) + { + delete PhysHurtInfo + PhysHurtInfo = NULL + } + } + +//--------------------------------------------------------------------------------- + void RemoveBodyAndGeom() + { + if(rb) + { + dBodyDestroy(this) + rb = false + } + + if(geom) + { + dGeomDestroy(geom) + geom = 0 + } + } +} + + +//--------------------------------------------------------------------------------- +bool JointClass::FindBodies() +{ + if(!body1 && body2) + { + DPrint("Missing body1 parameter for joint named " + _name) + ErrorNum++ + return false + } + + if(body1 && !body2) + { + DPrint("Missing body2 parameter for joint named " + _name) + ErrorNum++ + return false + } + + Body1 = FindClass(body1) + Body2 = FindClass(body2) + + if(!Body1) + { + DPrint("Missing entity from parameter body1 in joint named " + _name) + ErrorNum++ + return false + } + + if(!Body2) + { + DPrint("Missing entity from parameter body2 in joint named " + _name) + ErrorNum++ + return false + } + + if(Body1 == Body2) + { + DPrint("the same entities in parameter body1 and body2 in joint named " + _name) + ErrorNum++ + return false + } + + if(Body1 != World && !IsInherited(Body1, CRigidBodyClass)) + { + DPrint("Bad entity type in parameter body1 in joint named " + _name) + ErrorNum++ + return false + } + + if(Body2 != World && !IsInherited(Body2, CRigidBodyClass)) + { + DPrint("Bad entity type in parameter body2 in joint named " + _name) + ErrorNum++ + return false + } + + if(Body1 != World && !Body1.rb) + { + DPrint("missing physics body in entity from parameter body1 in joint named " + _name) + ErrorNum++ + return false + } + + if(Body2 != World && !Body2.rb) + { + DPrint("missing physics body in entity from parameter body2 in joint named " + _name) + ErrorNum++ + return false + } + return true +} + +//--------------------------------------------------------------------------------- + void JointClass::EOnLoaded(ExtClass other, int extra) + { +#ifdef EDITOR + if(!World.EditorActive) //v editore vytvarame jointy iba v playmode + { +#endif + if(FindBodies()) + { + if(Create()) + { + if(Body1 != World) //staci jednemu body ale nie worldu + Body1.AddJointDependence(this) + else + Body2.AddJointDependence(this) + } + } +#ifdef EDITOR + } +#endif + } + +//-------------------------------------------------------------------------------------- + void joint_motor::WakeUpBodies() + { + if(Body1 != World && dBodyIsDynamic(Body1)) + Body1.ActivateBody(true) + + if(Body2 != World && dBodyIsDynamic(Body2)) + Body2.ActivateBody(true) + } + + +//================================================================================= +class FuncClass extends RigidBodyClass +{ + string model + int flags + int status + float angle + vector coords + vector mins, maxs + vobject MainObject + +//---------------------------------------------------------------------------- + void SetStatus(int stat) + { + status = stat + } + +//----------------------------------------------------------------- + int CanActivate(int fl, ExtClass other) + { + if(other.ClassType != ClassTypeCreature || status != 0) + return ACT_DISABLE + + if(flags & DisableFuncFlag) + return ACT_BLOCKED + + if(Display && Display.CanActivate(0, this) != ACT_ENABLE) + return ACT_DISABLE + + return ACT_ENABLE + } + +//----------------------------------------------------------------- + void M_Disable(ExtClass other) + { + flags |= DisableFuncFlag + } + +//----------------------------------------------------------------- + void M_Enable(ExtClass other) + { + flags &= 0xffffffff - DisableFuncFlag + } + +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + ExtClass pl = World.Player + + if(!pl) + return 0 + + if(Owner == NULL) + pl.AddItem(this) + return 0 + } + +//----------------------------------------------------------------- + void FuncClass() + { + ClassType = ClassTypeFunc + SetEventMask(this, EV_LOADED | EV_INIT/* | EV_ONGROUND*/) + } +} + + +//================================================================================= +class ItemClass extends RigidBodyClass +{ + int flags + string name + vector coords + float angle + float angle2 + float angle3 + float pickdelay + string OnPick + int Material //pre secne zbrane + vobject MainObject + ItemDef Definition + +#ifdef EDITOR + void EditorOpened() + { + ActivateBody(false) + coords = atov(GetKeyValue("coords")) + angle = atof(GetKeyValue("angle")) + angle2 = atof(GetKeyValue("angle2")) + angle3 = atof(GetKeyValue("angle3")) + SetTransformEx(Vector(angle3, angle, angle2), coords) + } + + void OnPositionChangingInEditor(vector Pos, vector Angs) + { + SetTransformEx(Angs, Pos) + UpdateMainVisualizer() + + ExtClass root = FindParentRoot() //musime updatovat zhora + + if(root) + root.RefreshInEditor() //namiesto UpdateEntity(this) + else + RefreshInEditor() + } +#endif + +//--------------------------------------------------------------------------------------------------------- + void PlayFlySound() + { + } + +//----------------------------------------------------------------- + int Pick(MinClass owner) + { + ClearFlags(this, TFL_VISIBLE) + Owner = owner + } + +//----------------------------------------------------------------- + void Select() + { + SetFlags(this, TFL_VISIBLE) + } + +//----------------------------------------------------------------- + void Unselect() + { + ClearFlags(this, TFL_VISIBLE) + } + +//----------------------------------------------------------------- +//virtualni, implementovano az v konkretnich classech +//vraci true pokud item akci povoli + int Action(int act, vector target) + { + return false + } + +//----------------------------------------------------------------- + void Activate(int fl, MinClass other) + { + Pick(other) + } + +//----------------------------------------------------------------- + void EOnContact(MinClass other, Contact c) + { + if(other == World.Player) + { + if(CanActivate(0, other) == ACT_ENABLE) //predmety zbierame aj dotykom + { + if(Owner == NULL && Definition.pickable) //Definition.pickable znamena ze sa ma rozletiet k playerovi. + { + ExtClass pl = World.Player + pl.AddItem(this) + } + } + } + } + +//----------------------------------------------------------------- + int EOnVisible(MinClass other, int extra) + { + ExtClass pl = World.Player + + if(!pl) + return 0 + + //don't add owned items + if(Owner == NULL && Definition.pickable) //Definition.pickable znamena ze sa ma rozletiet k playerovi. + pl.AddItem(this) + + return 0 + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(rb) + return + + if(status == 1) //delay pred rozbehom k playerovi + { + pickdelay -= ftime * 100 + + if(pickdelay <= 0) + { + status = 2 + PlayFlySound() + } + else + return + } + + if(status == 2) + { + vector PlaPos = GetMatrix(World.Player, 3) + vector pos = GetMatrix(this, 3) + vector dir = PlaPos - pos + float lng = VectorNormalize(dir) + float step = lng * 20 * ftime + float PlaVelFactor = VectorLength(GetVelocity(World.Player)) * 0.01 + + if(PlaVelFactor < 1) + PlaVelFactor = 1 + + step *= PlaVelFactor + vector NewPos = dir * step + NewPos = pos + NewPos + + vector mat[4] + GetMatrix4(this, mat) + mat[3] = NewPos + SetTransform(mat) + // SetOrigin(this, NewPos) + + if(lng < 5 || step > lng) + { + ClearEventMask(this, EV_FRAME) + status = 3 + + if(IsInherited(this, CWeaponClass)) + { + PlaySound(NULL, g_sCommonSounds[33], SF_ONCE|SF_AMBIENT) + + if(Definition) + World.InfDialog.ShowMessage("#You_picked " + Definition.name) + } + + World.NumFlyingItems-- + Pick(World.Player) //FIXME nejaky bug. jakykolvek kod za volanim tohto sa uz nevykona + } + } + } + +//----------------------------------------------------------------- + void M_Pick(ExtClass other) + { + if(!Owner && status == 0) + { + if(CanActivate(0, World.Player)) + Activate(0, World.Player) + } + } + +//----------------------------------------------------------------- + void EOnLoaded(MinClass other, int extra) + { + CallMethods(this, OnLoad) + } + +//----------------------------------------------------------------- + void ItemClass() + { + ClassType = ClassTypeItem + + if(ActivateMethod == ACT_ENTITY_DEFAULT) + ActivateMethod = ACT_DISTANCE_ONLY + + SetEventMask(this, EV_VISIBLE|EV_ANIMEND|EV_LOADED|EV_ONLOAD) + } + +//----------------------------------------------------------------- + void ~ItemClass() + { + RemoveBodyAndGeom() + + if(MainObject) //objekty itemov sa mazu v ItemsColletion (s vynimkou zbrani) + { + if(IsInherited(this, CWeaponClass) == true) + ReleaseObject(MainObject, 0) + + MainObject = VNULL + } + } +} + diff --git a/Alpha Prime/Mod/scripts/super2.h b/Alpha Prime/Mod/scripts/super2.h new file mode 100644 index 0000000..2a617d2 --- /dev/null +++ b/Alpha Prime/Mod/scripts/super2.h @@ -0,0 +1,1282 @@ +int g_LMb +int g_MMb +int g_RMb + +//================================================================================= +void UpdateMouseStatus() +{ + for(int n = 0; n < 8; n++) + { + if(g_JoyButtons[n] != -1) + { + g_JoyButtons[n] = JoyButtons[n] + } + else + { + if(JoyButtons[n] == 0) + g_JoyButtons[n] = 0 + } + } + + if(g_LMb != -1) + { + g_LMb = LMB + } + else + { + if(LMB == 0) + g_LMb = 0 + } + + if(g_MMb != -1) + { + g_MMb = MMB + } + else + { + if(MMB == 0) + g_MMb = 0 + } + + if(g_RMb != -1) + { + g_RMb = RMB + } + else + { + if(RMB == 0) + g_RMb = 0 + } +} + +//================================================================================= +int ClearMousePress(int button) +{ + if(button == 0) + { + g_LMb = -1 + g_JoyButtons[0] = -1 + } + + if(button == 1) + { + g_MMb = -1 + g_JoyButtons[1] = -1 + } + + if(button == 2) + { + g_RMb = -1 + g_JoyButtons[2] = -1 + } +} + +//================================================================================= +int MousePress(int button) +{ + switch(button) + { + case 0: + if(g_LMb == 1) + return 1 + if(g_JoyButtons[0] == 1) + return 1 + break + + case 1: + if(g_MMb == 1) + return 1 + if(g_JoyButtons[1] == 1) + return 1 + break + + case 2: + if(g_RMb == 1) + return 1 + if(g_JoyButtons[2] == 1) + return 1 + break + } + return 0 +} + +//================================================================================= +int MouseUp(int button) +{ + switch(button) + { + case 0: + if(g_LMb != 0 && LMB == 0) + return 1 + break + + case 1: + if(g_MMb != 0 && MMB == 0) + return 1 + break + + case 2: + if(g_RMb != 0 && RMB == 0) + return 1 + break + } + return 0 +} + + + + + + +vector OptimalCross(vector vec) +{ + const vector tmp[3] = {"1 0 0", "0 1 0", "0 0 1"} + float dot + float BestDot = 10000000000 + int result + + for(int n = 0; n < 3; n++) + { + vector v = tmp[n] + dot = vec * v + dot = dot * dot //tim se zbavime znaminka. Je to daleko rychlejsi, nez podminene vetveni + + if(dot < BestDot) + { + BestDot = dot + result = n + } + } + return tmp[result] +} + + +float Degrees2Radians(float degrees) +{ + return degrees / 57.29578 +} + + +float AkcelMovement(float actPos, float endpos, float startpos, float speed, float akcel) +{ + float hh, gg, mm + + hh = endpos - startpos //zaciatok + gg = endpos - actPos //do konca + gg = hh - gg //od zaciatku + + if(hh == 0) + hh = 0.00001 + + mm = gg / hh //percentualne prejdena cast od 0 do 1 + speed = speed + (akcel * sin(mm * 3.14)) * (ftime * 35) + + if(endpos >= actPos) + { + actPos = actPos + speed + if(actPos > endpos) + { + actPos = endpos + return actPos + } + } + + if(endpos <= actPos) + { + actPos = actPos - speed + if(actPos < endpos) + { + actPos = endpos + return actPos + } + } + + return actPos +} + +/* +//----------------------------------------------------------------------------------------------------------- +float SinusIncrement(float ActTime, float speed1, float speed2, float StartTime, float EndTime) +{ + if(ActTime <= 0.5) + ActTime += speed1 * ftime + else + ActTime += speed2 * ftime + + if(ActTime >= EndTime) + ActTime = EndTime + + float Rate = ActTime / 1//FlashTime + float ToAng = Rate * 180 + float res = sin(ToAng * DEG2RAD) + + if(res < 0) + res = -res + + return res +} +*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + +//================================================================================= +const int UV_Wrap = 0 //UV sa opakuje +const int UV_Stretch = 1 //UV sa natiahne na celu dlzku vzniknuteho modelu +int g_DynObjNumVert //sem si ulozime pocet vertexov. budu sa potom hodit pri replacovani v inych classoch + +vector g_TempVerts[4096] //iba pre temp pouzitie +int g_TempIndices[6144] +float g_TempUVs[8192] + +float GlassMaskUV[4][128] //[4][16][8] + +//---------------------------------------------------------------------------------------------- +void CalculateGlassMaskUV() +{ +// int CurMaskBox = 0 + float orgU, orgV + + int CurUVPos = 0 + int rot + float tolerance = 0.005//0.002 + + for(int v = 0; v < 2; v++) + { + for(int h = 0; h < 4; h++) + { + rot = 0 + orgU = h / 4 + orgV = v / 2 + + GlassMaskUV[rot][CurUVPos++] = orgU + 0 + tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0 + tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0.25 - tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0 + tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0.25 - tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0.5 - tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0 + tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0.5 - tolerance + + rot++ + CurUVPos -= 8 + +//-------------- + GlassMaskUV[rot][CurUVPos++] = orgU + 0 + tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0.5 - tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0 + tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0 + tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0.25 - tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0 + tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0.25 - tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0.5 - tolerance + + rot++ + CurUVPos -= 8 + +//-------------- + GlassMaskUV[rot][CurUVPos++] = orgU + 0.25 - tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0.5 - tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0 + tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0.5 - tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0 + tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0 + tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0.25 - tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0 + tolerance + + rot++ + CurUVPos -= 8 + +//-------------- + GlassMaskUV[rot][CurUVPos++] = orgU + 0.25 - tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0 + tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0.25 - tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0.5 - tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0 + tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0.5 - tolerance + + GlassMaskUV[rot][CurUVPos++] = orgU + 0 + tolerance + GlassMaskUV[rot][CurUVPos++] = orgV + 0 + tolerance + } + } +} + + + + +//SegNum = pocet segmentov +//size = rozmer jednej strany boxu +//SegLength = dlzka segmentu + +vobject DynamicSprite(MinClass owner, vector Verts[], int Indices[], float UVs[], float width, float height, string shader) +{ + int NumVert = 4 + g_DynObjNumVert = NumVert + int NumFaces = 2 + int NumInd = NumFaces * 3 //pocet indexov + vector vertex + float HalfWidth = width * 0.5 + float HalfHeight = height * 0.5 + + vertex[0] = -HalfWidth + vertex[1] = 0 + vertex[2] = -HalfHeight + Verts[0] = vertex + + vertex[0] = -HalfWidth + vertex[1] = 0 + vertex[2] = HalfHeight + Verts[1] = vertex + + vertex[0] = HalfWidth + vertex[1] = 0 + vertex[2] = HalfHeight + Verts[2] = vertex + + vertex[0] = HalfWidth + vertex[1] = 0 + vertex[2] = -HalfHeight + Verts[3] = vertex + + Indices[0] = 0 + Indices[1] = 1 + Indices[2] = 3 + + Indices[3] = 1 + Indices[4] = 2 + Indices[5] = 3 + + UVs[0] = 1 //0 + UVs[1] = 1 //0 + + UVs[2] = 1 //0 + UVs[3] = 0 //1 + + UVs[4] = 0 //1 + UVs[5] = 0 //1 + + UVs[6] = 0 //1 + UVs[7] = 1 //0 + + int nverts[1] + int numindices[1] + string shaders[1] + nverts[0] = NumVert + numindices[0] = NumInd + shaders[0] = shader + + vobject Obj = CreateXOB(1, nverts, numindices, shaders) + SelectObject(owner, Obj) + UpdateIndices(Obj, 0, Indices) //najprv sa musia updatovat indexy! + UpdateVertsEx(owner, 0, Verts, UVs) + return Obj +} + +const int IndexTable0[8] = {5, 5, 6, 6, 7, 7, 4, 4} +const int IndexTable1[8] = {4, 0, 5, 1, 6, 2, 7, 3} +const int IndexTable2[8] = {0, 1, 1, 2, 2, 3, 3, 0} +const float UVTable[4] = {0, 0.5, 1, 0.5} + +vobject SegmentedBox(MinClass owner, vector Verts[], int Indices[], float UVs[], float size, float Length, int SegNum, int UV_Type, string shader) +{ + float SegLength = Length / SegNum + float offset = size * 0.5 + int n + int NumVert = SegNum + 1 + NumVert *= 4 //pocet vertexov + g_DynObjNumVert = NumVert + int NumFaces = SegNum * 4 * 2 + int NumInd = NumFaces * 3 //pocet indexov + vector vertex + float lng + int nseg = 0 + + for(n = 0; n < NumVert; n += 4) //naplnime vertexy + { + lng = SegLength * (float)nseg++ + + vertex[0] = offset + vertex[1] = -offset + vertex[2] = lng + Verts[n] = vertex + + vertex[0] = -offset + vertex[1] = -offset + vertex[2] = lng + Verts[n + 1] = vertex + + vertex[0] = -offset + vertex[1] = offset + vertex[2] = lng + Verts[n + 2] = vertex + + vertex[0] = offset + vertex[1] = offset + vertex[2] = lng + Verts[n + 3] = vertex + } + + nseg = 0 + int nfac = 0 + int tmp + + for(n = 0; n < NumInd; n += 3) + { + if(nfac > 7) + { + nfac = 0 + nseg++ + } + + tmp = 4 * nseg + Indices[n] = IndexTable0[nfac] + tmp + Indices[n + 1] = IndexTable1[nfac] + tmp + Indices[n + 2] = IndexTable2[nfac] + tmp + nfac++ + } + + int nvert = 0 + nseg = 0 + float UVrate + tmp = NumVert * 2 //na kazdy vertex dva parametre na UV + + for(n = 0; n < tmp; n += 2) + { + if(nvert > 3) + { + nvert = 0 + nseg++ + } + + if(UV_Type == UV_Wrap) + { + float width = size * 2 + UVrate = SegLength * (float)nseg + UVrate = UVrate / width + } + + if(UV_Type == UV_Stretch) + { + UVrate = nseg //ktory segment prave robime + UVrate = UVrate * SegLength //jak je to daleko od zaciatku + UVrate = UVrate / Length //percentualna cast z celej dlzky + } + + UVrate -= 0.005 //natvrdo to skratime pretoze za UV zacinalo wrapovat + UVs[n] = UVTable[nvert] + UVs[n + 1] = UVrate + nvert++ + } + + int nverts[1] + int numindices[1] + string shaders[1] + nverts[0] = NumVert + numindices[0] = NumInd + shaders[0] = shader + + vobject Obj = CreateXOB(1, nverts, numindices, shaders) + SelectObject(owner, Obj) + UpdateIndices(Obj, 0, Indices) //najprv sa musia updatovat indexy! + UpdateVertsEx(owner, 0, Verts, UVs) + return Obj +} + + +const int TrailIndexTable0[4] = {6, 6, 5, 5} +const int TrailIndexTable1[4] = {4, 0, 7, 3} +const int TrailIndexTable2[4] = {0, 2, 3, 1} +const float TrailUVTable[4] = {0, 0, 1, 1} + +//----------------------------------------------------------------- +vobject SegmentedCrossPlanes(MinClass owner, vector Verts[], int Indices[], float UVs[], float size, float Length, int SegNum, int UV_Type, string shader) +{ + float SegLength = Length / SegNum + float offset = size * 0.5 + int n + int NumVert = SegNum + 1 + NumVert *= 4 //pocet vertexov + g_DynObjNumVert = NumVert + int NumFaces = SegNum * 2 * 2 + int NumInd = NumFaces * 3 //pocet indexov + vector vertex + float lng + int nseg = 0 + + for(n = 0; n < NumVert; n += 4) //naplnime vertexy + { + lng = SegLength * (float)nseg++ + + vertex[0] = offset + vertex[1] = 0 + vertex[2] = lng + Verts[n] = vertex + + vertex[0] = 0 + vertex[1] = -offset + vertex[2] = lng + Verts[n + 1] = vertex + + vertex[0] = -offset + vertex[1] = 0 + vertex[2] = lng + Verts[n + 2] = vertex + + vertex[0] = 0 + vertex[1] = offset + vertex[2] = lng + Verts[n + 3] = vertex + } + + nseg = 0 + int nfac = 0 + int tmp + + for(n = 0; n < NumInd; n += 3) + { + if(nfac > 3) //mame jeden segment (4 faces) + { + nfac = 0 + nseg++ + } + + tmp = 4 * nseg + Indices[n] = TrailIndexTable0[nfac] + tmp + Indices[n + 1] = TrailIndexTable1[nfac] + tmp + Indices[n + 2] = TrailIndexTable2[nfac] + tmp + nfac++ + } + + int nvert = 0 + nseg = 0 + float UVrate + tmp = NumVert * 2 //na kazdy vertex dva parametre na UV + + for(n = 0; n < tmp; n += 2) + { + if(nvert > 3) + { + nvert = 0 + nseg++ + } + + if(UV_Type == UV_Wrap) + { + UVrate = SegLength * (float)nseg + UVrate = UVrate / size + } + + if(UV_Type == UV_Stretch) + { + UVrate = nseg //ktory segment prave robime + UVrate = UVrate * SegLength //jak je to daleko od zaciatku + UVrate = UVrate / Length //percentualna cast z celej dlzky + } + + UVrate -= 0.005 //natvrdo to skratime pretoze za UV zacinalo wrapovat + UVs[n] = TrailUVTable[nvert] + UVs[n + 1] = UVrate + nvert++ + } + + int nverts[1] + int numindices[1] + string shaders[1] + nverts[0] = NumVert + numindices[0] = NumInd + shaders[0] = shader + + vobject Obj = CreateXOB(1, nverts, numindices, shaders) + SelectObject(owner, Obj) + UpdateIndices(Obj, 0, Indices) //najprv sa musia updatovat indexy! + UpdateVertsEx(owner, 0, Verts, UVs) +} + +vobject StreakModel(string shader) +{ + const int indices[18] = {0, 3, 2, 2, 1, 0, 1, 2, 7, 7, 4, 1, 4, 7, 6, 6, 5, 4} + const int numindices[1] = {18} + const int nverts[1] = {8} + + string shaders[1] + shaders[0] = shader + + vobject Obj = CreateXOB(1, nverts, numindices, shaders) + UpdateIndices(Obj, 0, indices) //najprv sa musia updatovat indexy! + return Obj +} + +vobject SimpleSpriteModel(string shader) +{ + const int indices[18] = {0, 1, 2, 2, 3, 0} + const int numindices[1] = {6} + const int nverts[1] = {4} + + string shaders[1] + shaders[0] = shader + + vobject Obj = CreateXOB(1, nverts, numindices, shaders) + UpdateIndices(Obj, 0, indices) //najprv sa musia updatovat indexy! + return Obj +} + +//================================================================================= +class ShotStreak extends MinClass +{ + vobject MainObject + vector Start, End + vector dir + float WayLength + float VirtualLength + float FullLength + float HalfWidth + float Speed + float CurPos + int snd + int ShaderNum +// MinClass SoundBase + + void Update() + { + vector vec1 = dir * World.CameraNorm + VectorNormalize(vec1) + vector off = vec1 * HalfWidth + vector spos, epos + float tmpf + + if(CurPos >= VirtualLength) //cele to skoncilo. mazeme + delete this + + if(CurPos <= FullLength) //zaciatok. iba roztiahneme streak na plnu velkost + { + spos = Start + epos = dir * CurPos + epos = Start + epos + tmpf = CurPos / FullLength + } + else + { + if(CurPos >= WayLength) //koniec. postupne stiahneme dlzku na nulu + { + tmpf = VirtualLength - CurPos + spos = dir * tmpf + spos = End - spos + epos = End + } + else //normalny stav + { + epos = dir * CurPos + epos = Start + epos + spos = epos - (dir * FullLength) + } + } + + vector v + +// epos - zaciatok streaku (leti ako prvy) +// spos - koniec streaku (leti ako druhy) + v = World.CameraPos + float SPosLng = VectorLength(epos - v) //dlzka k prvemu bodu + vector SposDir = spos - v //vector k druhemu bodu + VectorNormalize(SposDir) + vector spos2 = v + (SposDir * SPosLng) //akoby druhy bod ale posunieme ho do rovnakej vzdialenosti ako je ten prvy + + vector axis1 = spos2 - epos + VectorNormalize(axis1) + vector ToCameraDir = v - epos + VectorNormalize(ToCameraDir) + vector axis2 = axis1 * ToCameraDir //osa kolma na axis1 + + float FullWidth = HalfWidth * 2 + axis1 = axis1 * FullWidth + axis2 = axis2 * HalfWidth + vector vrt[8] + + v = epos + axis2 + vrt[0] = v - axis1 + vrt[1] = v + v = epos - axis2 + vrt[2] = v + vrt[3] = v - axis1 + v = spos + axis2 + vrt[4] = v + vrt[5] = v + axis1 + v = spos - axis2 + vrt[6] = v + axis1 + vrt[7] = v + + const float StreakUVs[16] = {0, 0, 0, 0.5, 1, 0.5, 1, 0, 0, 0.5, 0, 1, 1, 1, 1, 0.5} + + UpdateVertsEx(this, 0, vrt, StreakUVs) + } + + void EOnFrame(MinClass other, int extra) + { + CurPos += ftime * Speed + Update() + } + + void ShotStreak(vector start, vector end, float width, float length, float speed, int Shader) + { + if(width == 0) + width = 1 + + if(length == 0) + length = 80 + + Shader-- + ShaderNum = Shader + + int num = World.NumStreaks[Shader] + if(num) + { + MainObject = World.Streaks[Shader][--num] + World.NumStreaks[Shader] = num + } + else + MainObject = StreakModel(StreakShaderNames[Shader]) + + SelectObject(this, MainObject) + + SetFlags(this, TFL_VISIBLE) + SetEventMask(this, EV_FRAME) + +// AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, start, end) + + dir = end - start + WayLength = VectorNormalize(dir) + FullLength = length + + if(FullLength > WayLength) + FullLength = WayLength + + VirtualLength = WayLength + FullLength + Start = start + End = end + HalfWidth = width * 0.5 + CurPos = 0 + Speed = speed + + Update() +// SoundBase = new MinClass + } + + void ~ShotStreak() + { + int num = World.NumStreaks[ShaderNum] + if(num < 32) + { + World.Streaks[ShaderNum][num++] = MainObject + World.NumStreaks[ShaderNum] = num + } + else + { + SetObject(VNULL) + ReleaseObject(MainObject, true) + } + + if(snd) + EndSound(snd) + +// delete SoundBase + } +} + +//================================================================================= +class LaserStreak extends MinClass +{ + vector pos1, pos2 + float HalfWidth + vobject MainObject + +//--------------------------------------------------------------------------------- + void Show(bool show) + { + if(show) + SetFlags(this, TFL_VISIBLE) + else + ClearFlags(this, TFL_VISIBLE) + } + +//--------------------------------------------------------------------------------- + void SetPos(vector p1, vector p2) + { + pos1 = p1 + pos2 = p2 + } + +//--------------------------------------------------------------------------------- + void Update() + { + vector v = World.CameraPos + float SPosLng = VectorLength(pos1 - v) //dlzka k prvemu bodu + vector SposDir = pos2 - v //vector k druhemu bodu + VectorNormalize(SposDir) + vector spos2 = v + (SposDir * SPosLng) //akoby druhy bod ale posunieme ho do rovnakej vzdialenosti ako je ten prvy + + vector axis1 = spos2 - pos1 + VectorNormalize(axis1) + vector ToCameraDir = v - pos1 + VectorNormalize(ToCameraDir) + vector axis2 = axis1 * ToCameraDir //osa kolma na axis1 + + float FullWidth = HalfWidth * 2 + axis1 = axis1 * FullWidth + axis2 = axis2 * HalfWidth + vector vrt[8] + + v = pos1 + axis2 + vrt[0] = v - axis1 + vrt[1] = v + v = pos1 - axis2 + vrt[2] = v + vrt[3] = v - axis1 + v = pos2 + axis2 + vrt[4] = v + vrt[5] = v + axis1 + v = pos2 - axis2 + vrt[6] = v + axis1 + vrt[7] = v + + const float StreakUVs[16] = {0, 0, 0, 0.5, 1, 0.5, 1, 0, 0, 0.5, 0, 1, 1, 1, 1, 0.5} + UpdateVertsEx(this, 0, vrt, StreakUVs) + } + +//--------------------------------------------------------------------------------- + void LaserStreak(vector p1, vector p2, float width, string Shader) + { + pos1 = p1 + pos2 = p2 + + if(width == 0) + width = 1 + + HalfWidth = width * 0.5 + + if(!Shader) + Shader = "spr/shotstreak" + + MainObject = StreakModel(Shader) + SelectObject(this, MainObject) + SetFlags(this, TFL_VISIBLE) + Update() + } + +//--------------------------------------------------------------------------------- + void ~LaserStreak() + { + SetObject(VNULL) + ReleaseObject(MainObject, 0) + } +} + + + + +const float FlameThrowerRefract = 0.008 + +//================================================================================= +class DynamicOverlaySprite extends MinClass +{ + vector pos1, pos2 + float HalfWidth, Width + vobject MainObject + float row0[4] + float row1[4] + float Scale, DistanceScale + +//--------------------------------------------------------------------------------- + void Show(bool show) + { + if(show) + SetFlags(this, TFL_VISIBLE) + else + ClearFlags(this, TFL_VISIBLE) + } + +//--------------------------------------------------------------------------------- + void SetPos(vector p1, vector p2) + { + pos1 = p1 + pos2 = p2 + } + +//--------------------------------------------------------------------------------- + void ScaleRefract(float scale) + { + Scale = scale + row0[0] = FlameThrowerRefract * scale * DistanceScale + row1[1] = row0[0] + } + +//--------------------------------------------------------------------------------- + void Update() + { + vector OrginalDir = pos2 - pos1 //pos2 je dalej od kamery + float OrginalDist = VectorNormalize(OrginalDir) + float LookScale = World.CameraNorm * OrginalDir + float LookScale2 = fabs(LookScale) + LookScale2 = 1 - LookScale2 + LookScale += 1 + LookScale = 2 - LookScale * 0.5 + + vector v = World.CameraPos + float SPosLng = VectorLength(pos1 - v) //dlzka k prvemu bodu + vector SposDir = pos2 - v //vector k druhemu bodu + float SPos2Lng = VectorNormalize(SposDir) + vector vpos2 = v + (SposDir * SPosLng) + +/* AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, pos1, spos2) + AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, pos1 - "0.5 0.5 0.5", pos1 + "0.5 0.5 0.5") + AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, spos2 - "0.5 0.5 0.5", spos2 + "0.5 0.5 0.5") +*/ + vector axis1 = vpos2 - pos1 + VectorNormalize(axis1) + vector ToCameraDir = v - pos1 + VectorNormalize(ToCameraDir) + vector axis2 = axis1 * ToCameraDir //osa kolma na axis1 + + float LookOff2 = LookScale2 * HalfWidth + float LookOff = LookScale * Width +// Print(LookScale) + +// float LookScale3 = LookScale + + float wd1 = 5 + LookOff //dozadu + float wd2 = 10 + LookOff2 + LookOff //do stran + float wd3 = 10 + LookOff2 + LookOff //dopredu + + vector off0 = axis1 * wd1 //dozadu + vector off1 = axis2 * wd2 //do stran + vector off2 = axis1 * wd3 //dopreru +/* AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, pos2, pos2 + off0) + AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, pos2, pos2 + off1) + + AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, pos1, pos1 + off0) + AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, pos1, pos1 + off1)*/ +// axis1 = axis1 * HalfWidth +// axis2 = axis2 * HalfWidth + + vector vrt[4] + vrt[0] = pos1 + off1 - off0 + vrt[1] = pos1 - off1 - off0 + vrt[2] = vpos2 - off1 + off2 + vrt[3] = vpos2 + off1 + off2 + + const float StreakUVs[8] = {1,1, 1,0, 0,0, 0,1} + UpdateVertsEx(this, 0, vrt, StreakUVs) + + clamp SPosLng<0, 1024> + float DistFactor = 1 - (SPosLng / 1024) + DistanceScale = 0.2 + (0.8 * DistFactor) + + row0[0] = FlameThrowerRefract * Scale * DistanceScale + row1[1] = row0[0] + } + +//--------------------------------------------------------------------------------- + void SetParms(vector p1, vector p2, float width) + { + pos1 = p1 + pos2 = p2 + + if(width == 0) + width = 1 + + Width = width + HalfWidth = width * 0.5 + } + + +//--------------------------------------------------------------------------------- + void DynamicOverlaySprite(vector p1, vector p2, float width, string Shader) + { + SetParms(p1, p2, width) + + if(!Shader) + Shader = "spr/shotstreak" + + MainObject = SimpleSpriteModel(Shader) + SelectObject(this, MainObject) + SetFlags(this, TFL_VISIBLE) + Update() + + row0[0] = FlameThrowerRefract + row0[1] = 0.0 + row0[2] = 0.0 + row0[3] = 0.0 + + row1[0] = 0.0 + row1[1] = FlameThrowerRefract + row1[2] = 0.0 + row1[3] = 0.0 + + Scale = 1.0 + + // m00 m01 m02 0 + // m10 m11 m12 0 + } + +//--------------------------------------------------------------------------------- + void ~DynamicOverlaySprite() + { + SetObject(VNULL) + ReleaseObject(MainObject, 0) + } +} + + + + + +vector GetTracPos(MinClass ent, vector from, vector dir) +{ + vector mins, maxs + vector start = from + vector end = from + dir + float Plane[4] + ExtClass TargEnt = NULL + + if(ent) + GetBoundBox(ent, mins, maxs) + else + { + mins = ZeroVec + maxs = ZeroVec + } + + TraceLineEx(PLAYER, start, end, mins, maxs, TargEnt, Plane, NULL, NULL, TRACE_WORLD, NULL) +// AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, start, end) + return end +} + +bool IsBrushEntity(ExtClass ent) +{ + string mdl + if(GetValue(ent, "model", 0, mdl)) + { + if(strlen(mdl) > 1 && substr(mdl, 0, 1) == "*") + { + return true + } + } + + return false +} + +//------------------------------------------------------------------------ +//spravi maticu z uhlov a pozicie z LW +//vstup v metroch(LW) vystup v enforce units +vector LWmat[4] +void MakeMatrixFromLWParms(vector angles, vector pos) +{ + float H = angles[2] + float P = angles[1] + float B = angles[0] + B = -B + + float ch = cos(H * DEG2RAD) + float sh = sin(H * DEG2RAD) + float cp = cos(P * DEG2RAD) + float sp = sin(P * DEG2RAD) + float cb = cos(B * DEG2RAD) + float sb = sin(B * DEG2RAD) + + vector mh[3] + vector mp[3] + vector mb[3] + + mh[0] = Vector(ch, 0, sh) + mh[1] = Vector(0, 1, 0) + mh[2] = Vector(-sh, 0, ch) + + mp[0] = Vector(1, 0, 0) + mp[1] = Vector(0, cp, -sp) + mp[2] = Vector(0, sp, cp) + + mb[0] = Vector(cb, sb, 0) + mb[1] = Vector(-sb, cb, 0) + mb[2] = Vector(0, 0, 1) + + vector mat[3] + vector res[3] + MatrixMultiply3(mb, mp, mat) + MatrixMultiply3(mat, mh, res) + + pos = pos * 32 + + LWmat[0] = res[0] + LWmat[1] = res[1] + LWmat[2] = res[2] + LWmat[3] = pos +} + + +int Modulo(int a, int b) //zbytok po deleni +{ + float c = b + int d = a / b + float e = a / c + float f = e - d + float g = c * f + int h = g + return h +} + +//---------------------------------------------------------------------------- +vector GetDirectionFromAngle(float ang) +{ + if(ang == -1) + return UpVec + + if(ang == -2) + return "0 0 -1" + + return Angles2Vector(Vector(0, ang, 0)) +} + +//---------------------------------------------------------------------------- +vector FixAngles(vector vec) +{ + vec[0] = FixAngle(vec[0]) + vec[1] = FixAngle(vec[1]) + vec[2] = FixAngle(vec[2]) + + return vec +} + +float LinearBlend(float CurValue, float TargetValue, float speed) +{ + if(CurValue != TargetValue) + { + if(TargetValue == 1) + CurValue += ftime * speed + else + CurValue -= ftime * speed + + clamp CurValue<0, 1> + } + return CurValue +} + +//--------------------------------------------------------------------------------- +float GetAngularOffset(float TargAngle, float CurAngle) +{ + TargAngle = FixAngle(TargAngle) + CurAngle = FixAngle(CurAngle) + float off, dir + + if(TargAngle > CurAngle) + { + off = TargAngle - CurAngle + dir = 1 + } + else + { + off = CurAngle - TargAngle + dir = -1 + } + + if(off <= 180) + return off * dir + else + return 360 - off * -dir +} + +//--------------------------------------------------------------------------------- +vector EntityAnglesToCameraAngles(vector angles) +{ + vector CamAngs = angles + float flip = CamAngs[0] + CamAngs[0] = -flip + return CamAngs +} + +void ShowMatrixRich(vector mat[4], int ShapeFlags) +{ + vector start = mat[3] + vector end + + end = mat[0] * 10 + end = start + end + AddDShape(SHAPE_LINE, 0xffff0000, ShapeFlags, start, end) + end = mat[1] * 10 + end = start + end + AddDShape(SHAPE_LINE, 0xff00ff00, ShapeFlags, start, end) + end = mat[2] * 10 + end = start + end + AddDShape(SHAPE_LINE, 0xff0000ff, ShapeFlags, start, end) +} + +void ShowMatrix(vector mat[4]) +{ + ShowMatrixRich(mat, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP) +} + +void ShowMatrixOnce(vector mat[4]) +{ + ShowMatrixRich(mat, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE) +} + +void GetAroundMatrixOfDir(vector dir, vector mat[3]) +{ + vector up = "0 0 1" + vector left = "1 0 0" + vector pvec + + float UpDot = fabs(dir * up) + float LeftDot = fabs(dir * left) + + if(UpDot < LeftDot) + pvec = dir * up + else + pvec = dir * left + + mat[0] = dir + mat[1] = dir * pvec + mat[2] = dir * mat[1] +} + +vector GetRandPosInAABB(MinClass ent) +{ + vector mins, maxs + GetCBoundBox(ent, mins, maxs) + float off0 = frand(mins[0], maxs[0]) + float off1 = frand(mins[1], maxs[1]) + float off2 = frand(mins[2], maxs[2]) + return Vector(off0, off1, off2) +} \ No newline at end of file diff --git a/Alpha Prime/Mod/scripts/super_actor.h b/Alpha Prime/Mod/scripts/super_actor.h new file mode 100644 index 0000000..865ecc1 --- /dev/null +++ b/Alpha Prime/Mod/scripts/super_actor.h @@ -0,0 +1,1914 @@ +const string AIStatusNames[32] = { + "NONE", + "WALK", + "IDLE", + "OBSERVE", + "SCRIPT", + "GUARD", + "RETURN", + "LOST_TARGET", + "1STSIGHT", + "CHASE", + "LR_ATTACK", + "ATTACK", + "CLOSECOMBAT", + "COVER", + "ROAMING", + "BORN", + "COVERFROMDANGER", + "DIE", + "DEAD", + "ERROR"} + + +class WeaponClass; + +const int GROUP_PLAYER = 1 +const int GROUP_NPC = 2 +const int GROUP_1 = 3 +const int GROUP_2 = 4 +const int GROUP_3 = 5 +const int GROUP_4 = 6 +const int GROUP_5 = 7 +const int GROUP_6 = 8 +const int GROUP_7 = 9 + +//================================================================================= +class Actor extends ExtClass +{ +//keys + vector coords + int angle + int flags + string _materialremap + +//visual + vobject MainObject + + int MaterialType //because of ragdolls + + vector facevec + float faceyaw +/// + +//sounds + hsound CSounds[128] + int ASoundID[128] + int CSoundID[128] + + string SoundSetName + +//puppet anims + string PAnimNames[64] + vobject PAnims[64] + int NumPAnims + int MotionAnim + + +//----------------------------------------------------------------- +//Common Animhook sounds +void ASound(int n) +{ + hsound hs = g_sCommonSounds[n] + if(!hs) + { + ASoundID[n] = 0 + return + } + ASoundID[n] = PlaySound(this, hs, SF_3D|SF_ONCE) +} + +//----------------------------------------------------------------- +void ASoundLoop(int n) +{ + hsound hs = g_sCommonSounds[n] + if(!hs) + { + ASoundID[n] = 0 + return + } + ASoundID[n] = PlaySound(this, hs, SF_3D) +} + +//----------------------------------------------------------------- +void ASoundEnd(int n) +{ + EndSound(ASoundID[n]) +} + +//----------------------------------------------------------------- +//concreete animhook sounds +void CSound(int n) +{ + hsound hs = CSounds[n] + if(!hs) + { + CSoundID[n] = 0 + return + } + + CSoundID[n] = PlaySound(this, CSounds[n], SF_3D|SF_ONCE) +} + +//----------------------------------------------------------------- +void CSoundLoop(int n) +{ + CSoundID[n] = PlaySound(this, CSounds[n], SF_3D) +} + +//----------------------------------------------------------------- +void CSoundEnd(int n) +{ + EndSound(CSoundID[n]) +} + +//----------------------------------------------------------------- +vobject AddPAnim(string name) +{ + strlower(name) + + for(int n = 0; n < NumPAnims; n++) + { + if(PAnimNames[n] == name) + return PAnims[n] + } + + PAnimNames[n] = name + PAnims[n] = GetObject(name) + if(PAnims[n] == VNULL) + Print(String(_name + ".AddPAnim: can't open " + name)) + + NumPAnims++ + return PAnims[n] +} + +//----------------------------------------------------------------- +void M_Show(ExtClass other) +{ + Show(true) +} +//----------------------------------------------------------------- +void M_Hide(ExtClass other) +{ + Show(false) +} + +//----------------------------------------------------------------- +void SetYaw(float yaw) +{ + faceyaw = yaw + + SetAngles(this, Vector(0, yaw, 0)) + yaw *= DEG2RAD + facevec = Vector(cos(yaw), sin(yaw), 0) +} + +//----------------------------------------------------------------- +void SetOrientation(vector pos, float angle) +{ + SetOrigin(this, pos) + SetYaw(angle) +} + +//----------------------------------------------------------------- +void M_TurnToTarget(ExtClass other) +{ + other = FindClass(other._value) + + if(other) + { + vector vec = GetOrigin(other) + vec = vec - GetOrigin(this) + vec[2] = 0 + + SetOrientation(GetOrigin(this), Vector2Yaw(vec)) + } +} + +//----------------------------------------------------------------- +void M_SetOrientation(ExtClass other) +{ + ExtClass targ = FindClass(other._value) + + if(targ == NULL) + { + Print(String(_name + ".SetOrientation() can't found target" + other._value)) + return + } + + vector org = GetOrigin(targ) + + int pfl = ClearFlags(this, TFL_SOLID) + + vector mins,maxs + GetBoundBox(this, mins, maxs) + + //when waypoint is on the ground, we have to adjust position + if(!TestPosition(this, org, mins, maxs, TRACE_DEFAULT)) + { + vector from = org + Vector(0, 0, maxs[2] - mins[2]) + float plane[4] + + SetFlags(this, pfl) + TraceLine(this, from, org, NULL, plane, NULL, NULL) + } + + SetFlags(this, pfl) + + org = org + "0 0 0.03125" + + SetOrientation(org, Yaw(GetAngles(targ))) +} + +//----------------------------------------------------------------- +/* +uz jednou je v misc_anim_object. Vyresit +void M_SeekAnim(ExtClass other) +{ + string val = other._value + + int p = strstr(val, ",") + if(p == -1) + return + + int slot = atoi(substr(val, 0, p)) + int frame = atoi(substr(val, p + 1, strlen(val) - p - 1)) + + SetFrame(this, slot, frame) +} +*/ +//----------------------------------------------------------------- +void M_SetAnim(ExtClass other) +{ + string val = other._value + + int slot = 0, n = 0, p + float blendout = 0, blend = 0, fps = 30 + string name + BoneMask bmask = NULL + int af = 0 + string parm + +loop: + p = strstr(val, ",") + if(p == -1) + parm = val + else + { + parm = substr(val, 0, p) + val = substr(val, p + 1, strlen(val) - p - 1) + } + + triminplace(parm) + triminplace(val) + + if(n < 2) + { + switch(n) + { + case 0: + slot = atoi(parm) + break + + case 1: + name = parm + break + } + } + else + { + strlower(parm) + + if(strstr(parm, "group") == 0) + { + parm = substr(parm, 5, strlen(parm) - 5) + triminplace(parm) + + int grp + if(!GetValue(NULL, parm, 0, grp) || grp < 0 || grp >= 32) + Print("SetAnim: wrong group number") + else + { + bmask = BoneMasks[grp] + } + } + else + { + if(strstr(parm, "blendout") == 0) + { + blendout = atof(substr(parm, 8, strlen(parm) - 8)) + } + else + { + if(strstr(parm, "blend") == 0) + { + blend = atof(substr(parm, 5, strlen(parm) - 5)) + } + else + { + if(strstr(parm, "fps") == 0) + { + fps = atof(substr(parm, 3, strlen(parm) - 3)) + af |= AF_FORCEFPS + } + else + { + switch(parm) + { + case "wrap": + af |= AF_WRAP + break + + case "motion": + MotionAnim = -2 + break + + case "once": + af |= AF_ONCE + break + + case "reset": + af |= AF_RESET + break + + default: + Print(String("SetAnim: wrong parameter - " + parm)) + break + } + } + } + } + } + } + n++ + if(p != -1) + goto loop + + if(n < 2) + { + Print("SetAnim: not enough parameters") + return + } + + vobject anm + if(name == "NULL" || name == "null") + anm = VNULL + else + { + anm = AddPAnim(name) + } + + slot += s_cutscene + clamp slot + + if(blendout >= 0) + af |= AF_BLENDOUT + else + blendout = 0 + + SetAnimSlot(this, slot, anm, blend, blendout, bmask, fps, af|AF_RESET) +} + +//----------------------------------------------------------------- +void Sound(int sound, int flags) +{ + if(!CSounds[sound]) + return + + PlaySound(this, CSounds[sound], flags) +} + +//----------------------------------------------------------------- +int RDSndCount +float RagdollMass +float RagdollTimeout +int NRDSounds + + +void WakeupRagdoll() +{ +#ifdef GERMAN + if(RagdollTimeout <= 0) + { + dBodyActive(this, true, true) + dBodyInteractionLayer(this, ET_RAGDOLL) + } + RagdollTimeout = RAGDOLL_TIMEOUT +#endif +} + +void Actor() +{ + NRDSounds = 10 +} + +void ~Actor() +{ + ReleaseObject(MainObject, 0) + + for(int n = 0; n < NumPAnims; n++) + ReleaseObject(PAnims[n], 0) +} +} + + + +//================================================================================= +class RBone extends MinClass +{ + Actor Owner + int NSounds + + void EOnSoundEnd(MinClass other, int extra) + { + SetEventMask(this, EV_TOUCH) + Owner.RDSndCount-- + } + + void EOnTouch(MinClass other, int extra) + { + if(Owner.RDSndCount > 1) + return + + int impact = extra >> 8 & 255 + + float relimpact = impact / 70//Owner.RagdollMass + + if(relimpact > 2.5) + { + hsound hs = RagdollPhysicsSounds[Owner.MaterialType] + if(hs) + { + int isound = PlaySound(this, hs, SF_ONCE) + + if(isound == 0) + return + + float v = relimpact * 0.15 + clamp v<0.05, 1> + + SetSoundVolume(isound, LinearVol(v)) + Owner.RDSndCount++ + NSounds-- + if(NSounds <= 0) + { + ClearEventMask(this, EV_TOUCH|EV_SOUNDEND) + return + } + } + ClearEventMask(this, EV_TOUCH) + } + } + + void Init(MinClass owner, int nsounds) + { + Owner = owner + SetEventMask(this, EV_TOUCH|EV_SOUNDEND) + SetFlags(this, TFL_COLLIDEONLYWORLD) + NSounds = nsounds + } + + void RBone() + { + ClassType = ClassTypeRBone + } +} + +vobject GetParticleObject(int Mat, int RPartType); +hshader GetDecalShader(int Mat, int RDecalType); + + + +//================================================================================= +class Projectile extends RigidBodyClass +{ + Projectile NextProjectile + string model + vobject MainObject + vector from + vector target + vector dir + float length + float size + float speed + bool dynamic + float damage + hsound Sound1, Sound2 + ShotStorage SStorage + dBlock block + CreatureClass ColBlockOtherBody + +//----------------------------------------------------------------- + void RemoveColBlock(bool RemoveDependencies); + +//----------------------------------------------------------------- + void OnShooterBodyRemove() + { + RemoveColBlock(false) + } +//----------------------------------------------------------------- + bool CreateBody(); +//----------------------------------------------------------------- + void Fire(ShotStorage ShotStor); +//----------------------------------------------------------------- + void BeforeFire() + { + } +//----------------------------------------------------------------- + void ModifyParms(int version) + { + } +//----------------------------------------------------------------- + void InitStorage() + { + } +//----------------------------------------------------------------- + void Projectile(int version); +} + + +//================================================================================= +class CreatureClass extends Actor +{ + int Color2 + float UVAnim + +///// + float stepwidth + + vector CurrentPos + + float fZDamper + float fADamper + float LastZ + + float fYawLimit + + int LookAxis, LookBone + + int iTransitionAnim //jump over, crawl under and so on + +//align to ground + float aang1, aang2 + float aprevz + +//Bounding info + float Height, HHeight, Radius + vector Mins, Maxs, HHVec + + ItemClass CurrentWeapon + + int GroupID + +///// + string model + +//Global parameters + float Health,MaxHealth + + bool bAlignOnGround + bool Humanoid //we need to know if creature has ordinary head and so on... + +//Runtime + int atype,otype + int astate,ostate + int aextra,oextra + + int Noises + + MinClass Hands //playerove ruky + + //items + int Ammo[10] + int AmmoType + +//for AIChase/AIMeleeAttack + +//attacking us + CreatureClass Attackers[10] + int NumAttackers + +//we are attacking + CreatureClass EnemyEnt + int AttackerNum + + bool Immortality + + AnimSet ASet + + //bool DisabledAnim + bool Disabled + + CreatureClass Attacker + + widget WAI + bool ShowAI + int Tactics + + int astatus + + RBone RBones[64] + bool ragdollActive + + float HurtFactor[64] + + int ShapeIndex + float AgentCost + + int FSType + + float LastSayTime + + int viewframe +//LookAt +float LAddAngle //Angular displacement for look at +CreatureClass LookTarget +float LookTimeout +float PLookQuat[4] +float PLookQuat2[4] //some creatures has separate bone for pitch/yaw + +Projectile FirstProjectile + +//----------------------------------------------------------------- +void M_SetHealth(ExtClass other) +{ +} + +//----------------------------------------------------------------- +void M_SetOrientation(ExtClass other) +{ + ExtClass targ = FindClass(other._value) + + if(targ == NULL) + { + Print(String(_name + ".SetOrientation() can't found target" + other._value)) + return + } + + vector org = GetOrigin(targ) + + org = org + HHVec + "0 0 1" + + SetOrientation(org, Yaw(GetAngles(targ))) +} + +//----------------------------------------------------------------- +void AddProjectileDependence(Projectile proj) +{ + proj.NextProjectile = FirstProjectile + FirstProjectile = proj +} + +//----------------------------------------------------------------- +void RemoveProjectileDependence(Projectile proj) +{ + Projectile cur = FirstProjectile + Projectile next = NULL + Projectile last = NULL + + while(cur) + { + next = cur.NextProjectile + + if(cur == proj) + { + if(last) + last.NextProjectile = next + else + FirstProjectile = next + + return + } + last = cur + cur = next + } +} + +//----------------------------------------------------------------- +void M_SetGroup(ExtClass other) +{ + string grp = other._value + strlower(grp) + + switch(grp) + { + case "player": + GroupID = GROUP_PLAYER + break + case "npc": + GroupID = GROUP_NPC + break + case "group1": + GroupID = GROUP_1 + break + case "group2": + GroupID = GROUP_2 + break + case "group3": + GroupID = GROUP_3 + break + case "group4": + GroupID = GROUP_4 + break + case "group5": + GroupID = GROUP_5 + break + case "group6": + GroupID = GROUP_6 + break + case "group7": + GroupID = GROUP_7 + break + default: + DPrint("Unknown group ID: " + grp) + ErrorNum++ + } +} + +//----------------------------------------------------------------- +void Show(bool show) +{ + if(show) + { + SetFlags(this, TFL_VISIBLE) + } + else + { + ClearFlags(this, TFL_VISIBLE) + } + + if(CurrentWeapon) + CurrentWeapon.Show(show) +} + +//----------------------------------------------------------------- +void M_ShowWeapon(ExtClass other) +{ + if(CurrentWeapon) + CurrentWeapon.Show(true) +} +//----------------------------------------------------------------- +void M_HideWeapon(ExtClass other) +{ + if(CurrentWeapon) + CurrentWeapon.Show(false) +} + +//----------------------------------------------------------------- +void M_Hurt(ExtClass other) +{ + string tokens[8] + int nt = ParseString(other._value, tokens) + + if(nt < 1) + return + + int bone = B_Spine + + if(!GetValue(NULL, "B_" + tokens[0], 0, bone)) + { + DPrint(_name + ".Hurt() has undefined bone " + tokens[0]) + return + } + + UpdateEntity(this) + vector mat[4] + float plane[4] + GetBoneMatrix(this, bone, mat) + vector norm = mat[1] * -1 + vector to = mat[3] + vector pos = norm * 12 + to + norm = -norm + + if(TraceLineEx(DEFAULT, pos, to, ZeroVec, ZeroVec, other, plane, NULL, NULL, TRACE_RAGDOLLS|TRACE_DEFAULT|TRACE_BONES, NULL) >= 1) + return + +//AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos, to) +//AddDShape(SHAPE_BBOX, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos-"1 1 1", pos+"1 1 1") + + misc_particle_effector eff = NULL + /* + vobject ParticlesObj = GetParticleObject(MATERIAL_FLESH, PE_BULLET) + + if(ParticlesObj) + { + eff = new misc_particle_effector + eff.SetParmsEx(ParticlesObj, to, true, 2) + vector BounceVec = norm //spravime si "odrazeny" vector + float backoff = norm * BounceVec + backoff *= 2 //2 = odraz presne podla uhla dopadu + vector change = norm * backoff + BounceVec -= change + + vector vec1 + vector vec2 + vec1[0] = BounceVec[1] //spravime si kolmy vektor + vec1[1] = BounceVec[2] + vec1[2] = BounceVec[0] + vec2 = BounceVec * vec1 + vec1 = vec2 * BounceVec + VectorNormalize(vec1) + VectorNormalize(vec2) + + mat[0] = vec1 + mat[1] = vec2 + mat[2] = BounceVec + mat[3] = to + SetFlags(eff, TFL_FULLMATRIX) + SetMatrix(eff, mat) + UpdateEntity(eff) + } +*/ + CreateDecal(this, to, norm * 8.0, 6.0, 0, 8, GetDecalShader(MATERIAL_FLESH, DE_BULLET), -1, 0) + + //add bloody spurts + for(int n = 0; n < 2; n++) + { +// vector v = Vector(norm[0] + frand(-0.3, 0.3), norm[1] + frand(-0.3, 0.3), -1) + vector v = Vector(frand(-0.3, 0.3), frand(-0.3, 0.3), -1) + VectorNormalize(v) + + vector dto = v * 75.3 + to + + if(TraceLineEx(DEFAULT, to, dto, ZeroVec, ZeroVec, other, plane, NULL, NULL, TRACE_WORLD, NULL) < 1) + { +//AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP, pos, to) + + CreateDecal(other, dto, Vector(plane[0], plane[1], plane[2]) * -8, 3.0, 0, 32, BloodDecalShaders[rand(0,4)], -1, 0) + } + } + +} + +//----------------------------------------------------------------- +void UpdateAgent(bool set) +{ + //HACK - don't block pathfinder by NPCs +// if(this != World.Player || status > STATE_DIE) + if(status > STATE_DIE) + { + if(agent) + { + agent.Destroy() + agent = NULL + } + return + } + + if(!set) + { + if(agent) + { + agent.Destroy() + agent = NULL + } + } + else + { + if(!GetFlags(this) & TFL_SOLID) + return + + agent = World.pPathFinder.AgentFromID(agent, CurrentPos, ShapeIndex, AgentCost) + + if(agent) + { + agent.SetOwner(this) + } + } +} + +//----------------------------------------------------------------- +void SetBBoxInfo() +{ + GetBoundBox(this, Mins, Maxs) + + vector vec = Maxs - Mins + + Height = vec[2] + HHeight = Height * 0.5 + HHVec = Vector(0, 0, HHeight) + Radius = vec[0] * 0.5 +} + +//----------------------------------------------------------------- +void SetOrientation(vector pos, float angle) +{ + CurrentPos = pos + LastZ = pos[2] + aprevz = LastZ + SetOrigin(this, pos) + SetYaw(angle) +} + +//----------------------------------------------------------------- +//pass anim exceptions to weapons +//----------------------------------------------------------------- +void EOnAnimEnd(MinClass other, int extra) +{ + if(extra == s_weapon && CurrentWeapon) + Throw(CurrentWeapon, this, EV_ANIMEND, extra) +} + +//----------------------------------------------------------------- + void ApplyExplosionOnRagdoll(vector pos, float radius, float power) + { + vector mins, maxs + GetCBoundBox(this, mins, maxs) + + vector Org = mins + maxs * 0.5 + vector ForceDir = Org - pos + float dist = VectorNormalize(ForceDir) + ForceDir = ForceDir + "0 0 1" //maly fake aby ich to hadzalo viac do vysky + ForceDir = ForceDir * 0.5 + float scale = dist / radius + scale = 1 -scale + power += power * scale + vector Force = ForceDir * power + RBone CurBone + + for(int n = 0; n < sizeof(RBones); n++) + { + CurBone = RBones[n] + if(CurBone) + dBodyApplyImpulse(RBones[n], Force) + } + } + +//----------------------------------------------------------------- + int Shoot(ShotStorage shot) + { + if(shot.HurtType == HT_EXPLOSION) + { + float pow = shot.power * ExplosionImpactScale + + if(ragdollActive) + { + ApplyExplosionOnRagdoll(shot.from, shot.radius, pow) + return true + } + } + return false + } + +vector lastart +//----------------------------------------------------------------- + CPosition GetWPos() + { + if(WAFrame == g_iViewFrame) + return WPosition + + if(WPosition == NULL) + WPosition = new CPosition + + //and after some decent distance + vector start = GetMatrix(this, 3) + if(VectorLengthSq(start - lastart) > 2) + { + lastart = start + + if(!World.pPathFinder.PositionForPoint(start + "0 0 20", WPosition)) + { + delete WPosition + WPosition = NULL + } + } + WAFrame = g_iViewFrame + + return WPosition + } + + +//----------------------------------------------------------------- + void M_Solid(ExtClass other) + { + SetFlags(this, TFL_SOLID) + } +//----------------------------------------------------------------- + void M_NonSolid(ExtClass other) + { + ClearFlags(this, TFL_SOLID) + } + +//----------------------------------------------------------------- + bool UseAmmoType(int Atype) + { + if(AmmoType == Atype) + return true + + return false + } + +//----------------------------------------------------------------- + bool InitRagdoll(string rdef, float mass, string mat) + { + MaterialType = dMaterialGetType(mat) + + UpdateEntity(this) + RagdollMass = mass + + //reset all custom transformations + for(int n = 0; n < 64; n++) + { + SetBone(this, n, ZeroVec, ZeroVec, 1.0) + SetBoneMatrix(this, n, g_vIdentMatrix) + SetBoneGlobal(this, n, g_vIdentMatrix) + } + + if(dRagdollCreate(this, rdef, mass, mat, CRBone, RBones)) + { + ragdollActive = true + + SetFlags(this, TFL_SOLID|TFL_FULLMATRIX|TFL_DYNAMICBBOX|TFL_COLLIDEONLYWORLD) + + for(n = 0; n < 64; n++) + { + RBone bone = RBones[n] + + if(bone) + bone.Init(this, NRDSounds) + } + + if(rdef == "heavyspider") + dBodyInteractionLayer(this, ET_DEFAULT) + else + dBodyInteractionLayer(this, ET_RAGDOLL) + + RagdollTimeout = RAGDOLL_TIMEOUT + return true + } + return false + } + +int SlotFlags[12] +/* +void AssertAnim(int anm) +{ + if(!ASet.Anims[anm]) + { + Print(String(_name + " trying to play NULL anim " + itoa(anm))) + DumpStack() + } +} +*/ +//----------------------------------------------------------------- +// Play anim from AnimSet +//----------------------------------------------------------------- +bool PlayAnim(int slot, int anm, float blend, int grp, int fps, int flags) +{ + if(ASet == NULL) + return false + + //AssertAnim(anm) + + //topmost priority exception + if(fps < 0) + { + fps = -fps + flags |= AF_FORCEFPS + } + else + { + //2nd priority - AnimSet + if(ASet.FPS[anm]) + { + fps = ASet.FPS[anm] + + flags |= AF_FORCEFPS + } + + //3rd - from animdef, if present. Otherwise 'fps' value + } +/* +if(!ASet.Anims[anm]) +{ + DPrint(_name + " has undefined anim " + itoa(anm)) +} +*/ + SlotFlags[slot] = ASet.Flags[anm] + + SetAnimSlot(this, slot, ASet.Anims[anm], blend, blend, BoneMasks[grp], fps, flags) + + if(!ASet.Anims[anm]) + return false + + return true +} + +/* +string Int2Hexa(int in) +{ + const string num[16] = { + "0", "1", "2", "3", + "4", "5", "6", "7", + "8", "9", "a", "b", + "c", "d", "e", "f"} + + string out = "" + for(int n = 0; n < 8 && in != 0; n++) + { + out = num[in & 0x0f] + out + in = in >> 4 + } + + return "0x0" + out + +} +*/ +//----------------------------------------------------------------- +vobject DustFootRun, DustFootWalk + +//----------------------------------------------------------------- +void Footstep(float f) +{ + int ground = GetGroundFlags(this) + + if(ground == -1) + ground = MATERIAL_METAL << SURF_MATERIAL_SHIFT + + if(ground & SURF_DUST) + { + vector pos = GetMatrix(this, 1) * stepwidth * 0.5 * f + CurrentPos - "0 0 26" + + if(IsBoxVisible(pos - "10 10 4", pos + "10 10 16", true)) + { + misc_particle_effector childparticles + + childparticles = new misc_particle_effector + + if(atype == t_run) + childparticles.SetParmsEx(DustFootRun, pos, true, 2) + else + childparticles.SetParmsEx(DustFootWalk, pos, true, 2) + } + } + + hsound hs + + int surf = Surf2Mat(ground) & 31 + + if(f < 0) + hs = LFootstepSounds[FSType][surf] + else + hs = RFootstepSounds[FSType][surf] + + if(hs) + { + int ph = PlaySound(this, hs, SF_ONCE|SF_QUARTERRANGE) + + if(atype == t_walk && ph) + SetSoundVolume(ph, 0.87) + } +} + +//----------------------------------------------------------------- +void RFootstep() +{ + Footstep(-1) +} + +//----------------------------------------------------------------- +void LFootstep() +{ + Footstep(1) +} + +//----------------------------------------------------------------- + //for proper FSM switching + int StateCount, CurrentStateCount + +//----------------------------------------------------------------- +// some creatures (player) can crouch +//----------------------------------------------------------------- + vector GetCenterOfBody() + { + return GetMatrix(this, 3) + } + +//----------------------------------------------------------------- + int StartBurn(bool DynLight) + { + return 0 + } + +//----------------------------------------------------------------- + void RemoveAttacker(int att) + { + if(Attackers[att]) + { + Attackers[att] = NULL + NumAttackers-- + } + } + +//----------------------------------------------------------------- + void EndAttack() + { + if(AttackerNum >= 0) + { + EnemyEnt.RemoveAttacker(AttackerNum) + AttackerNum = -1 + } + } + +//----------------------------------------------------------------- + void AddAttacker(CreatureClass attacker) + { + //if attacker already has target + if(attacker.AttackerNum >= 0) + { + //it's me!! :-) + if(attacker.EnemyEnt == this) + { + //use quicker way + return + } + + attacker.EnemyEnt.RemoveAttacker(attacker.AttackerNum) + attacker.AttackerNum = -1 + attacker.EnemyEnt = NULL + } + + for(int n = 0; n < sizeof(Attackers); n++) + { + if(Attackers[n] == NULL) + { + NumAttackers++ + Attackers[n] = attacker + + attacker.EnemyEnt = this + attacker.AttackerNum = n + return + } + } + return //shouldn't happen + } + +//----------------------------------------------------------------- + void ChangeYaw(float yaw) + { + } + +//----------------------------------------------------------------- + void NotifyNoise(MinClass actor, vector origin, int noises) + { + } + +//----------------------------------------------------------------- + vector EyesPos() + { + vector mat[4] + + if(!GetBoneMatrix(this, B_Hlava, mat)) + { + return GetOrigin(this) + } + + return mat[3] + } + +//----------------------------------------------------------------- +//hit to: +//back - 0 +//left - 1 +//front - 2 +//right - 3 +int HitDirection(vector dir) +{ + float dyaw = FixAngle(atan2(dir[1], dir[0]) * RAD2DEG) + return FixAngle(faceyaw - dyaw + 45) / 90 +} + +int HitDirection2(vector dir) +{ + float dyaw = FixAngle(atan2(dir[1], dir[0]) * RAD2DEG) + return FixAngle(faceyaw - dyaw + 90) / 180 +} + +//----------------------------------------------------------------- + void SetXYVelocity(vector vel) + { + vector v = GetVelocity(this) + vel[2] = v[2] + SetVelocity(this, vel) + } + +//----------------------------------------------------------------- + void SetZVelocity(float zvel) + { + vector v = GetVelocity(this) + v[2] = zvel + SetVelocity(this, v) + } + +//----------------------------------------------------------------- + bool TraceFilter(ExtClass other, vector pos, vector dir) + { + if(other == this || other.ClassType == ClassTypeCreature || other.ClassType == ClassTypeFunc) + return false + + return true + } + +//----------------------------------------------------------------- + void M_EnableImmortality(ExtClass other) + { + Immortality = true + } + + void M_DisableImmortality(ExtClass other) + { + Immortality = false + } + + void M_Disable(ExtClass other) + { + Disabled = true + } + + void M_Enable(ExtClass other) + { + Disabled = false + } + +//----------------------------------------------------------------- +// default implementation. Suitable for humanoids +//----------------------------------------------------------------- + void SetHeadOrientation(float pitch, float yaw) + { + float lquat[4], quat[4] + vector mat[4] + + if(pitch || yaw) + { + clamp yaw<-70, 70> + clamp pitch<-15, 15> + + //prepare quaternion for head rotation. Transform is in local space of object, + //so axes are always the same + QuatRotationRollPitchYaw(quat, Vector(-yaw, 0, -pitch)) + } + else + { + QuatIdentity(quat) + } + + QuatLerp(lquat, PLookQuat, quat, ftime * 9) + + if(PLookQuat[0] != lquat[0] || PLookQuat[1] != lquat[1] || PLookQuat[2] != lquat[2] || PLookQuat[3] != lquat[3]) + { + QuatMatrix(lquat, mat) + SetBoneGlobal(this, B_Common_Head, mat) + QuatCopy(lquat, PLookQuat) + } + } + +Shape wshape + +//----------------------------------------------------------------- + bool WTraceFilter(CreatureClass other, vector raypos, vector raydir) + { + if(other.ClassType == ClassTypeMiscPhysicsGlass || other.ClassType == ClassTypeMiscShootDetector || other.ClassType == ClassTypeMiscShootingShield) + return other.IsShot(raypos, raydir) + + if(other == this || !IsInherited(other, CExtClass)) + return false + + if(other.ClassType == ClassTypeCreature) + { + if(other.Disabled) + return false + + //if(GroupID != other.GroupID) + //return true + } + + return true + } + +//----------------------------------------------------------------- +//!!!!!!!!!!!!!!Just for player!!!!!!!!!!!!!!!!!! + void DropManipEntity(bool ChangeWeap) + { + } + + void RemoveHackAdept(ExtClass ent) + { + } + + void InterruptHacking(bool HackModeOff) + { + } + + void RemoveInteractionAdept(ExtClass adept) + { + } + + WeaponClass CreateWeapon(int ClNum, int ammo, int MagazineAmmo) + { + return NULL + } + + bool PickWeapon(ItemClass item) + { + //allow monsters to pickup any weapons + return true + } + + void PickAmmo(int type, int quantity) + { + } + + bool WeaponChange(int WeaponIndex, bool RequestToWeapon) + { + } + + int GetBestAvailableWeapon() + { + } + + void UpdateHUD(int id) + { + } + + void SetThrowBar(float PosRate, bool show) + { + } + + float GetOxygen() + { + return 0 + } + + float GetBulletTime() + { + return 0 + } + + void AddOxygen(float quantity) + { + } + + void AddHealth(float quantity) + { + } + + bool GetImmortality() + { + return Immortality + } + + int GetDifficultyLevel() + { + return 0 + } + + MinClass GetWeaponPointer(int Windex) + { + return NULL + } + + void SetWeaponPointer(int Windex, MinClass ptr) + { + } + +//----------------------------------------------------------------- + int SetState(int st) + { + if(st != astate) + { + astate = st + return false + } + return true + } + + float StateTime[32] + +//----------------------------------------------------------------- + float StateAge(int st) + { + return currenttime - StateTime[st] + } + +//----------------------------------------------------------------- + void SwitchFSM(int st) + { + StateTime[st] = currenttime + StateTime[status] = currenttime + + if(status != st) + { + +//na testovani zahadnych stavu v AI +/* +if(_name == "heavyTrooper0") +{ + Print(String(_name + ".SwitchFSM: OldStatus " + AIStatusNames[status] + " NewStatus " + AIStatusNames[st])) + if(StateCount != CurrentStateCount) + { + Print(String(_name + "Missed one or more state changes")) + } + DumpStack() +} +*/ + //HACK: avoid accidental change when dying + if(status >= STATE_DIE && st < status) + return + + status = st + + if(st |= STATE_1STSIGHT && st != STATE_CHASE && st != STATE_LR_ATTACK && st != STATE_ATTACK) + EndAttack() + } + StateCount++ + } + +//----------------------------------------------------------------- + bool IsState(int st) + { + if(st != status || StateCount != CurrentStateCount) + return false + + return true + } + +//----------------------------------------------------------------- + void SelectItem(ItemClass item, int hand) + { + //vypni aktualni item + RemoveChild(this, CurrentWeapon) + + if(CurrentWeapon != NULL) + CurrentWeapon.Unselect() + + //a zapni novy + item.Select() + + CurrentWeapon = item + + SetOrigin(item, ZeroVec) + AddChild(this, item, hand) + + //vynut update animace + otype = -1 + } + +//----------------------------------------------------------------- + void AlignToGround() + { + if(iTransitionAnim) + return + + if(bAlignOnGround) + { + int fl = ClearFlags(this, TFL_SOLID) + + vector head, ltail, rtail + vector head2, ltail2, rtail2 + vector height + + float plane[4] + vector vec = facevec * Radius + + vector center = CurrentPos + "0 0 10" //for very steep angles + head = Maxs + + //Based on radius * tan(60') + epsilon? + height[2] = Radius * 1.732 + HHeight + + head = center + vec + + head2 = head - height + if(TraceLineEx(MONSTER, head, head2, ZeroVec, ZeroVec, NULL, plane, NULL, NULL, TRACE_WORLD|TRACE_ENTS, NULL) >= 1) + { + SetFlags(this, fl) + return + } + + // AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, head, head2) + + ltail = center - vec + rtail = ltail + ltail[0] = ltail[0] - vec[1] + ltail[1] = ltail[1] + vec[0] + ltail2 = ltail - height + float ltailfrac = TraceLineEx(MONSTER, ltail, ltail2, ZeroVec, ZeroVec, NULL, plane, NULL, NULL, TRACE_WORLD|TRACE_ENTS, NULL) + + // AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, ltail, ltail2) + + rtail[0] = rtail[0] + vec[1] + rtail[1] = rtail[1] - vec[0] + rtail2 = rtail - height + float rtailfrac = TraceLineEx(MONSTER, rtail, rtail2, ZeroVec, ZeroVec, NULL, plane, NULL, NULL, TRACE_WORLD|TRACE_ENTS, NULL) + + // AddDShape(SHAPE_LINE, 0xffffffff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, rtail, rtail2) + + SetFlags(this, fl) + + //fix case when we have one leg in the air + if(ltailfrac >= 1) + { + ltailfrac = rtailfrac + ltail2[2] = rtail2[2] + } + + if(rtailfrac >= 1) + { + rtailfrac = ltailfrac + rtail2[2] = ltail2[2] + } + + float a1, a2 + + if(ltailfrac >= 1 || ltailfrac >= 1) + { + //that's bad + + a1 = 0 + a2 = 0 + } + else + { + vector e0, e1 + + e0 = head2 - ltail2 + e1 = head2 - rtail2 + + vector normal = e0 * e1 + VectorNormalize(normal) + + e1 = normal * facevec + e0 = e1 * normal + +// AddDShape(SHAPE_LINE, 0xff0000ff, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, center, e0 * (float)64 + center) +// AddDShape(SHAPE_LINE, 0xff00ff00, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, center, e1 * (float)64 + center) +// AddDShape(SHAPE_LINE, 0xffff0000, SS_NOZUPDATE|SS_DOUBLESIDE|SS_TRANSP|SS_ONCE, center, normal * (float)64 + center) + + const vector up = "0 0 1" + a1 = asin(e0 * up) * RAD2DEG + a2 = asin(e1 * up) * RAD2DEG + } + + aang1 = CorrectAngle(aang1, a1, fADamper) + aang2 = CorrectAngle(aang2, a2, fADamper) + } + else + { + aang1 = 0 + aang2 = 0 + } + + float f = CurrentPos[2] + float d = ftime * fZDamper + clamp d<0, 1> + f = f - aprevz * d + aprevz = aprevz + f + + vector vv + vv[1] = aprevz - CurrentPos[2] + + //FIXME: odstrasujici ukazka extremniho programovani :-) + if(ClassName(this) == "creature_dron") + SetBone(this, B_Layer1, Vector(0, aang2, aang1), vv + "0 16 0", 1.0) + else + SetBone(this, B_Layer1, Vector(0, aang2, aang1), vv, 1.0) + } + + vector LastAlignPos + vector LastAgentPos +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + CurrentPos = GetOrigin(this) + + if(status < STATE_DIE) + { + //someone removed us. Update it! + if(agent == NULL) + { + LastAgentPos = CurrentPos + UpdateAgent(true) + } + else + { + vector dist = LastAgentPos - CurrentPos + float f = dist * dist + if(f > 4) + { + LastAgentPos = CurrentPos + UpdateAgent(true) + } + } + } + + //controlled AI's - player + if(astatus != 0) + { + return + } + + Noises = 0 + + if(status != STATE_BORN && status < STATE_DIE) + { + if(VectorLengthSq(LastAlignPos - CurrentPos) > 0.0) + { + LastAlignPos = CurrentPos + AlignToGround() + } + } + } + +//----------------------------------------------------------------- + void EOnLoad(MinClass other, int extra) + { + ShowAI = false + } + +//----------------------------------------------------------------- + void EOnSave(MinClass other, int extra) + { + ShowAI = false + } + +//----------------------------------------------------------------- + void BeforeInit() + { + //protoze v creature_puppet musime pridat zbran az v Initu, + //jinak to samozrejme nefunguje ve workbenchi + } + +//----------------------------------------------------------------- + void EOnInit(MinClass other, int extra) + { + SetEventMask(this, EV_ONSAVE) + + BeforeInit() + float plane[4] + vector vec + + SetBBoxInfo() //nastavi Mins a Max + + SetOrientation(coords, angle) + UpdateEntity(this) + } + +//----------------------------------------------------------------- + void TraceStart() + { + } + +//----------------------------------------------------------------- + void TraceEnd() + { + } + +//----------------------------------------------------------------- + void AddBleedSource(ShotStorage shot) + { + } +//----------------------------------------------------------------- + void AddSSource(ShotStorage shot) + { + } + +//----------------------------------------------------------------- + bool GetAnimSet(string name, bool fromload = false) + { + for(int n = 0; n < World.NumAnimSets; n++) + { + ASet = World.AnimSets[n] + + if(ASet.Name == name) + { + ASet.Load() + + if(!fromload) + { + //HACK: Nastav prvni frame nejake normalni pozy + if(ASet.Anims[a_relax_idle]) + { + SetAnimSlot(this, s_walk, ASet.Anims[a_relax_idle], 0.0, 0, NULL, 30, 0) + BumpFrame(this, 0, 0) + } + } + return true + } + } + ASet = NULL + DPrint("AnimSet '" + name + "' doesn't exist") + return false + } + +//----------------------------------------------------------------- + void ~CreatureClass() + { + if(WAI) + DestroyWidget(WAI) + + if(ragdollActive) + { + dRagdollDestroy(this) + for(int n = 0; n < sizeof(RBones); n++) + { + RBones[n] = NULL + } + } + } + +//----------------------------------------------------------------- + void CreatureClass() + { + ClassType = ClassTypeCreature + + if(angle < 0) + angle = 0 + + SetFlags(this, TFL_USER6|TFL_DYNAMICBBOX) + + Color2 = 0xffffffff + + otype = -1 + ostate = -1 + oextra = -1 + + stepwidth = 8.5 + + fZDamper = 10 + fADamper = 20 + + fYawLimit = 114 + + SetEventMask(this, EV_ANIMEND|EV_ONLOAD) + + AttackerNum = -1 + + Humanoid = true + + QuatIdentity(PLookQuat) + QuatIdentity(PLookQuat2) + + DustFootRun = GetObject("particle/dustfootrun.ptc") + DustFootWalk = GetObject("particle/dustfootwalk.ptc") + + GroupID = GROUP_PLAYER + FSType = FSNone + + AgentCost = -1 + + for(int n = 0; n < sizeof(HurtFactor); n++) + HurtFactor[n] = 1.0 + } +} + +//----------------------------------------------------------------- +void Projectile::RemoveColBlock(bool RemoveDependencies) +{ + if(RemoveDependencies) + { + if(ColBlockOtherBody.ClassType == ClassTypeCreature) + ColBlockOtherBody.RemoveProjectileDependence(this) + } + + if(block) + { + dBodyRemoveBlock(block) + block = 0 + } +} + +//----------------------------------------------------------------- +void RigidBodyClass::HurtEnemy(ShotStorage PhysHurtInfo) +{ + PhysHurtInfo.target.Shoot(PhysHurtInfo) +} + +//================================================================================= +void DisableEnemies(bool player) +{ + /* + for(CreatureClass cl = GetNextEntity(NULL, CAICreatureClass); cl != NULL; cl = GetNextEntity(cl, CAICreatureClass)) + { + if(ClassName(cl) == "creature_player_puppet") + continue + + if(cl.flags & FL_NODISABLE) + continue + + cl.PlayAnim(0, a_relax_idle, 10.0, g_all, 30, 0) + } + */ +} + +//----------------------------------------------------------------- +void EnableEnemies() +{ + /* + for(CreatureClass cl = GetNextEntity(NULL, CAICreatureClass); cl != NULL; cl = GetNextEntity(cl, CAICreatureClass)) + { + if(cl) + SetAnimSlot(cl, 0, VNULL, 10.0, 1, NULL, 0, 0) + } + */ +} + diff --git a/Alpha Prime/Mod/scripts/viewer.h b/Alpha Prime/Mod/scripts/viewer.h new file mode 100644 index 0000000..5df4d99 --- /dev/null +++ b/Alpha Prime/Mod/scripts/viewer.h @@ -0,0 +1,870 @@ + +#ifdef _XBOX +void ShowCursor(bool show) +{ +} +#endif + + +string gTOBView +int gOBJType +string tobname +string gDisplayProgram +func_display TestDisplay +ctype gCreatureType + +class HelpModelClass extends MinClass +{ + vobject HelpObject + + void HelpModelClass() + { + HelpObject = GetObject("obj/creatures/arnold/arnold.xob") + SetObject(HelpObject, "") + SetFlags(this, TFL_VISIBLE) + SetOrigin(this, "0 32 29") + SetAngles(this, "0 270 0") + } + + void ~HelpModelClass() + { + if(HelpObject) + { + ReleaseObject(HelpObject, 0) + HelpObject = VNULL + } + } +} + +class viewer extends MinClass +{ + widget ParticleStat +vector coords,angles + +string path, file +string opath, ofile +vobject anm +widget wtext +float fps + +int PAnim + +string animname +bool body + + +AICreatureClass CEntity +vobject CEntityAnims[256] +vobject NullAnims[256] + +MinClass StaticObjectOwner +vobject PObject +HelpModelClass HelpModel + + + MiscTestDialogue m_Object + bool m_bRenderReady + + + //----------------------------------------------------------------- + MinClass LoadTestObject(string objectname, string morphname, string soundname) + { +/* if (CEntity) + { + delete CEntity + CEntity = NULL + } +*/ + m_bRenderReady = false + + if (m_Object) + { + delete m_Object + m_Object = NULL + } + + m_Object = new MiscTestDialogue(objectname, morphname, soundname) + + if (m_Object.m_bReady) + { + m_bRenderReady = true + CEntity = m_Object + + angles = "0 0 0" + SetAngles(this, angles) + } else + { + delete m_Object + m_Object = NULL + } + + return m_Object + } + + //----------------------------------------------------------------- + void PlayTestObject() + { + if (m_Object) + { + m_Object.StartAnim() + } + } + + + + //----------------------------------------------------------------- + void LoadOtherStaticObject(string file) + { + vobject sobj = GetObject(file) + + if(sobj) + { + if(!StaticObjectOwner) + { + StaticObjectOwner = new MinClass() + SetOrigin(StaticObjectOwner, coords + "0 0 1") + SetFlags(StaticObjectOwner, TFL_VISIBLE|TFL_DYNAMICBBOX) + } + + SelectObject(StaticObjectOwner, sobj) + } + } + +//----------------------------------------------------------------- + MinClass GetObjectPointer() + { + return CEntity + } + +//----------------------------------------------------------------- + void SetOrientation(vector pos, vector angles) + { + if(CEntity) + { + SetAngles(CEntity, angles) + coords = pos + } + } + +//----------------------------------------------------------------- + void MorphObject(class ent, string morph, float value) + { + SetMorphState(ent, morph, value); + } + +//----------------------------------------------------------------- + void LoadObject(string file) + { + m_bRenderReady = false + + if (m_Object) + { + delete m_Object + m_Object = NULL + CEntity = NULL + } + + vobject nobj = GetObject(file) + + if(nobj) + { + if(strstr(file, ".xob") != -1) + gOBJType = 0 + else + { + if(strstr(file, ".ptc") != -1) + gOBJType = 2 + else + gOBJType = 1 + } + + if(body) + { + dBodyDestroy(this) + body = false + } + +#ifndef EDITOR + SetWidgetText(wtext, 0, file) +#endif + SelectObject(this, nobj) + + SetFlags(this, TFL_DYNAMICBBOX) + vector mins, maxs + GetBoundBox(this, mins, maxs) +#ifndef EDITOR + SetWidgetText(wtext, 4, "Box size: " + Vector2String(mins) + " - " + Vector2String(maxs)) +#endif + + if(gOBJType == 0) + { + if(dBodyCreate(this, ZeroVec, BC_MODEL)) + { + dBodyActive(this, true, false) + body = true +// dBodyCreate(this, ZeroVec, BC_OBB) + } + + //spocitej defaultni mass & inertia + + } + + m_bRenderReady = true + CEntity = this + + + if(anm) + SetAnimSlot(CEntity, 0, anm, 4.0, 0, NULL, fps, AF_FORCEFPS) + } + } + +//----------------------------------------------------------------- + void DrawGrid(int show, int grid, vector end) + { + if(show == 0) + return + + int ncolor, fcolor + + if(show == 1) + { + ncolor = 0x4f000000 + fcolor = 0xff000000 + } + else + { + ncolor = 0x4fffffff + fcolor = 0xffffffff + } + + const float tsize = 512, tsize2 = 256 + + int lnum = tsize / grid + int color + + float sx = end[0] - tsize2 + + int mid = lnum / 2 + + vector v1, v2 + + v1[2] = end[2] + 0.5 + v2[2] = v1[2] + + v1[1] = end[1] - tsize2 + v2[1] = end[1] + tsize2 + + for(int x = 0; x < lnum; x++) + { + v1[0] = sx + v2[0] = sx + + color = ncolor + + if(x == mid) + color = fcolor + + AddDShape(SHAPE_LINE, color, SS_NOZBUFFER|SS_ONCE|SS_NOZUPDATE|SS_TRANSP|SS_NOCULL, v1, v2) + sx = sx + grid + } + + float sy = end[1] - tsize2 + + v1[0] = end[0] - tsize2 + v2[0] = end[0] + tsize2 + + for(int y = 0; y < lnum; y++) + { + v1[1] = sy + v2[1] = sy + + color = ncolor + + if(y == mid) + color = fcolor + + AddDShape(SHAPE_LINE, color, SS_NOZBUFFER|SS_ONCE|SS_NOZUPDATE|SS_TRANSP|SS_NOCULL, v1, v2) + + sy = sy + grid + } + + } + +//----------------------------------------------------------------- + void EOnFrame(MinClass other, int extra) + { + if(ParticleStat) + { + string particles = "Particles: " + itoa(GetEffectorParticleCount(this)) + SetWidgetText(ParticleStat, 0, particles) + } + + //LipsSync viewer + if (m_Object) + { + SetOrigin(this, ZeroVec) + SetCamera(coords, angles) + + BumpFrame (m_Object.m_AnimObject, ftime, 0) + m_Object.SetBonesSetup() + return + } + +// if (!m_bRenderReady) +// return + + + if(TestDisplay) //iba pre display viewer + { + if(KeyState(KC_NUMPAD1)) + { + ClearKey(KC_NUMPAD1) + TestDisplay.RunActionFromIndex(0) + } + + if(KeyState(KC_NUMPAD2)) + { + ClearKey(KC_NUMPAD2) + TestDisplay.RunActionFromIndex(1) + } + + if(KeyState(KC_NUMPAD3)) + { + ClearKey(KC_NUMPAD3) + TestDisplay.RunActionFromIndex(2) + } + + if(KeyState(KC_NUMPAD4)) + { + ClearKey(KC_NUMPAD4) + TestDisplay.RunActionFromIndex(3) + } + + if(KeyState(KC_NUMPAD5)) + { + ClearKey(KC_NUMPAD5) + TestDisplay.RunActionFromIndex(4) + } + + if(KeyState(KC_NUMPAD6)) + { + ClearKey(KC_NUMPAD6) + TestDisplay.RunActionFromIndex(5) + } + + if(KeyState(KC_NUMPAD7)) + { + ClearKey(KC_NUMPAD7) + TestDisplay.RunActionFromIndex(6) + } + + if(KeyState(KC_NUMPAD8)) + { + ClearKey(KC_NUMPAD8) + TestDisplay.RunActionFromIndex(7) + } + + if(KeyState(KC_NUMPAD9)) + { + ClearKey(KC_NUMPAD9) + TestDisplay.RunActionFromIndex(8) + } + + TestDisplay.UpdateTime() + TestDisplay.UpdateElements() + return + } + + vector v + int n, z + + if(gOBJType == 4) + { + if(CEntity == NULL) + { + CEntity = Spawn(gCreatureType) + if(CEntity) + { + CEntity.flags = FL_PUPPET + CEntity.coords = ZeroVec + SetOrigin(CEntity, CEntity.coords) + SetAngles(CEntity, "0 90 0") + + Throw(CEntity, this, EV_INIT, 0) + Throw(CEntity, this, EV_LOADED, 0) + ClearEventMask(CEntity, EV_FRAME) + } + + if(CEntity.ASet) + CEntityAnims = CEntity.ASet.Anims + else + CEntityAnims = NullAnims + + CompileAnims("anm/anim.def") + for(z = 0; z < sizeof(CEntityAnims); z++) + { + PAnim++ + if(PAnim >= sizeof(CEntityAnims)) + PAnim = 0 + + if(CEntityAnims[PAnim]) + { + anm = CEntityAnims[PAnim] + + SetAnimSlot(CEntity, 0, anm, 4.0, 0, NULL, fps, AF_FORCEFPS) + animname = "" + break + } + } + } + + SetVelocity(CEntity, ZeroVec) + SetOrigin(CEntity, "0 0 48") + SetWeight(CEntity, 0) + //SetFlags(CEntity, TFL_NOMPIVOT) + + if(KeyState(KC_N)) + { + ClearKey(KC_N) + + CEntity.CAmbientSoundEnd() + CompileAnims("anm/anim.def") + + vobject prev = CEntityAnims[PAnim] + for(z = 0; z < sizeof(CEntityAnims); z++) + { + PAnim-- + if(PAnim < 0) + PAnim = sizeof(CEntityAnims) - 1 + + if(CEntityAnims[PAnim] && CEntityAnims[PAnim] != prev) + { + anm = CEntityAnims[PAnim] + + SetAnimSlot(CEntity, 0, anm, 4.0, 0, NULL, fps, AF_FORCEFPS) + break + } + } + } + + if(KeyState(KC_M)) + { + ClearKey(KC_M) + + CEntity.CAmbientSoundEnd() + CompileAnims("anm/anim.def") + prev = CEntityAnims[PAnim] + for(z = 0; z < sizeof(CEntityAnims); z++) + { + PAnim++ + if(PAnim >= sizeof(CEntityAnims)) + PAnim = 0 + + if(CEntityAnims[PAnim] && CEntityAnims[PAnim] != prev) + { + anm = CEntityAnims[PAnim] + + SetAnimSlot(CEntity, 0, anm, 4.0, 0, NULL, fps, AF_FORCEFPS) + break + } + } + } + } + + + if(CEntity == NULL) + CEntity = this + + + if(gOBJType == 2) + { + int frm = BumpFrame(CEntity, ftime, 0) + } + else + { + if(KeyState(KC_R)) + { + ClearKey(KC_R) + + //FIXME prasacky sposob s temp animackou. nudzovo + CompileAnims("anm/anim.def") + vobject nanim2 = GetObject(animname) + vobject tempanim = GetObject("anm/player/hands/Pistol_idle.anm") + + if(nanim2) + { + if(anm) + ReleaseObject(anm, true) + + SetAnimSlot(CEntity, 0, tempanim, 4.0, 0, NULL, fps, AF_FORCEFPS) + + if(tempanim) + ReleaseObject(tempanim, true) + + anm = nanim2 + SetAnimSlot(CEntity, 0, anm, 4.0, 0, NULL, fps, AF_FORCEFPS) + } + } + + if(KeyState(KC_SPACE)) + { + ClearKey(KC_SPACE) + + ShowCursor(true) + if(OpenFileName(path, file, "Anims", "*.anm")) + { + animname = path + "/" + file + vobject nanim = GetObject(animname) + + if(nanim) + { +#ifndef EDITOR + SetWidgetText(wtext, 1, animname) + SetWidgetText(wtext, 2, ftoa(fps) + " fps") +#endif + if(anm) + ReleaseObject(anm, true) + + anm = nanim + SetAnimSlot(CEntity, 0, anm, 4.0, 0, NULL, fps, AF_FORCEFPS) + } + } + ShowCursor(false) + } + + + if(KeyState(KC_RETURN)) + { + ClearKey(KC_RETURN) + + ShowCursor(true) + if(OpenFileName(opath, ofile, "Objects", "*.x;*.tob;*.xob")) + { + LoadObject(opath + "/" + ofile) + } + ShowCursor(false) + } + + if(KeyState(KC_UP)) + { + ClearKey(KC_UP) + fps = fps + 5 + clamp fps<0, 100> + if(anm) + ChangeAnimSlotFPS(CEntity, 0, fps) + } + + if(KeyState(KC_DOWN)) + { + ClearKey(KC_DOWN) + fps = fps - 5 + clamp fps<0, 100> + if(anm) + ChangeAnimSlotFPS(CEntity, 0, fps) + } + + frm = BumpFrame(CEntity, ftime, 0) + } + + v = ZeroVec + +#ifndef EDITOR + SetWidgetText(wtext, 3, "frame: " + itoa(frm)) + + SetWidgetText(wtext, 2, ftoa(fps) + " fps") + if(anm) + SetWidgetText(wtext, 1, vtoa(anm)) + else + SetWidgetText(wtext, 1, "no anim") + + if(LMB) + { + v[0] = 0 + v[1] = (float)MouseDeltaX * 0.5 + v[2] = 0 + SetAngles(CEntity, GetAngles(CEntity) + v) + } + + if(RMB) + { + v[0] = (float)MouseDeltaY * 0.5 + v[1] = 0 + v[2] = 0 + SetAngles(CEntity, GetAngles(CEntity) + v) + } + + float m, k, scale = 100, scale2 = 100 + + if(gOBJType == 2) + scale = 200 + + m = (float)MouseWheel * 32 + k = m + + if(KeyState(KC_W)) + m = ftime * -scale + + if(KeyState(KC_S)) + m = ftime * scale + + if(KeyState(KC_A)) + k = ftime * -scale2 + + if(KeyState(KC_D)) + k = ftime * scale2 + + coords[0] = coords[0] - m + coords[2] = coords[2] - k + + if(coords[0] > -16) + coords[0] = -16 + + if(coords[0] < -1000) + coords[0] = -1000 +#endif +/* World.CameraPos = coords + World.CameraAngs = angles + World.CameraNorm = Angles2Vector(World.CameraAngs)*/ + SetCamera(coords, angles) + + int gshow + if(KeyState(KC_G)) + { + ClearKey(KC_G) + + if(++gshow > 2) + gshow = 0 + } + DrawGrid(gshow, 8, "0 0 0") + } + +#ifdef EDITOR + void OnKeyDownFromGUI(int KeyCode) + { + float step = 2 + float vert = 0 + float horz = 0 + + switch(KeyCode) + { + case wx_W: + horz += step + break + case wx_S: + horz -= step + break + case wx_A: + vert += step + break + case wx_D: + vert -= step + break + } + + coords[0] = coords[0] - vert + coords[2] = coords[2] - horz + + if(coords[0] > -16) + coords[0] = -16 + + if(coords[0] < -1000) + coords[0] = -1000 + } +#endif + + + + void viewer() + { + m_Object = NULL + CEntity = NULL + m_bRenderReady = false + + if(gDisplayProgram) + { + if(!World.DispColPtr) + World.DispColPtr = new DisplayCollection + + TestDisplay = new func_display(this, gDisplayProgram, true) + TestDisplay.M_Play(this) + SetEventMask(this, EV_FRAME) + return + } + +#ifndef EDITOR + wtext = CreateWidget(WTYPE_TEXT, 0, 200, 600, 600, WF_SOURCEALPHA | WF_BLEND|WF_VISIBLE, 0xe0ffffff, 255) +#endif + LoadObject(gTOBView) + SetFlags(this, TFL_VISIBLE|TFL_DYNAMICBBOX) + SetEventMask(this, EV_FRAME) + + fps = 30 + + SetOrigin(this, ZeroVec) + + vector mins, maxs, size + GetBoundBox(this, mins, maxs) + + size = mins + maxs + size = size * 0.5 + float lng = VectorLength(maxs - mins) + lng = -lng + coords[0] = lng + coords[1] = size[0] + coords[2] = size[2] + + if(coords[0] < -500) + coords[0] = -500 + + if(coords[0] > 500) + coords[0] = 500 + + if(coords[1] < -500) + coords[1] = -500 + + if(coords[1] > 500) + coords[1] = 500 + + if(coords[2] < -500) + coords[2] = -500 + + if(coords[2] > 500) + coords[2] = 500 + + angles = "0 0 0" + + SetAngles(this, "0 90 0") + path = "anm" + opath = "obj" + +#ifndef EDITOR + SetWidgetText(wtext, 0, tobname) +#endif + + World.ViewerClass = this + Color = 0xffffffff + } + +//================================================================================= + void PViewerRefresh(string ParticleFile) + { + SelectObject(this, VNULL) + + if(PObject) + ReleaseObject(PObject, true) + + PObject = GetObject(ParticleFile/*"particle_temp.ptc"*/) + SelectObject(this, PObject) + + if(!HelpModel) + HelpModel = new HelpModelClass() + + if(!ParticleStat) + ParticleStat = CreateWidget(WTYPE_TEXT, 400, 0, 100, 10, WF_VISIBLE | WF_SOURCEALPHA|WF_BLEND, 0xffffffff, 5) + } + + void ~viewer() + { + if(HelpModel) + { + delete HelpModel + HelpModel = NULL + } + + if (m_Object) + delete m_Object + + if(PObject) + { + ReleaseObject(PObject, true) + PObject = VNULL + } + + if(body) + { + dBodyDestroy(this) + body = false + } + + if(wtext) + DestroyWidget(wtext) + + if(ParticleStat) + { + DestroyWidget(ParticleStat) + ParticleStat = NULL + } + } +} + +string wrlpath + +bool TOBViewer(string objname) +{ + gTOBView = objname + + globalmap = LoadMap("worlds/viewer.wrl", true) + + if( globalmap == NULL) + return false + + return true +} + +bool CreatureViewer(string parms) +{ + gCreatureType = Type(parms) + + globalmap = LoadMap("worlds/viewer.wrl", true) + if( globalmap == NULL) + return false + + return true +} + +bool DPLViewer(string parms) +{ + gDisplayProgram = parms + globalmap = LoadMap("worlds/viewer.wrl", true) + + if( globalmap == NULL) + return false + + return true +} + +bool WRLViewer(string name) +{ + wrlpath = "worlds/" + + int p = strstr(name, ".map") + if(p > 0) + name = substr(name, 0, p) + ".wrl" + + if(strstr(name, ".wrl") == -1) + name = name + ".wrl" + + if(strstr(name, wrlpath) == -1) + name = wrlpath + name + + string tname = name + + int ln = strlen(wrlpath) + + if(strstr(tname, ".wrl") != -1) + tname = substr(tname, 0, strlen(tname) - 4) + + if(strstr(tname, wrlpath) != -1) + tname = substr(tname, ln, strlen(tname) - ln) + + if(strstr(tname, wrlpath) != -1) + tname = substr(tname, ln, strlen(tname) - ln) + + BeforeRunFromCommandLine(DIFFICULTY_NORMAL) + globalmap = LoadMapEx(tname) + + if( globalmap == NULL) + return false + + return true +} diff --git a/Alpha Prime/Mod/scripts/vssver.scc b/Alpha Prime/Mod/scripts/vssver.scc new file mode 100644 index 0000000..7f862bc Binary files /dev/null and b/Alpha Prime/Mod/scripts/vssver.scc differ diff --git a/Alpha Prime/Mod/shaders/common.h b/Alpha Prime/Mod/shaders/common.h new file mode 100644 index 0000000..845e072 --- /dev/null +++ b/Alpha Prime/Mod/shaders/common.h @@ -0,0 +1,354 @@ +//**************************************************************************** +//* COMMON SHADERS * +//**************************************************************************** +//NEMAZAT! Testovaci objekt pro cubemapy! +shader "DebugSphere" +{ + //specular 1.0 + reflection 1.0 + //fresnel 0.501 + //reflection $nmapalpha + + diffusemap "gfx/black" + //diffusemap "textures/nr_test/mriz_02_C" + //normalmap "textures/nr_test/mriz_02_N" alpha + envmap $nearestcube +} + +shader "textures/common/mirror" +{ + map nolight + mirror + + diffusemap "gfx/black" +} + +shader "debugportals" +{ + sort near + cull none + +#ifndef _XBOX + effect "debug_portal" +#endif +} + +shader "null" +{ +} + +shader "textures/REGION" +{ + surfparm nolightmap +} + + +shader "textures/common/alpha" +{ + qer_nocarve + surfparm nonsolid + effect "nolightmap" +} + +shader "textures/common/pivot1" +{ + qer_nocarve + surfparm nonsolid + surfparm pivot + value 0 +} + +shader "textures/common/pivot2" +{ + qer_nocarve + surfparm nonsolid + surfparm pivot + value 1 +} + +shader "textures/common/pivot3" +{ + qer_nocarve + surfparm nonsolid + surfparm pivot + value 2 +} + +shader "textures/common/pivot4" +{ + qer_nocarve + surfparm nonsolid + surfparm pivot + value 3 +} + +shader "textures/common/nodrawnonsolid" +{ + surfparm nonsolid + surfparm nodraw +} + + +shader "textures/common/nodraw" +{ + surfparm nodraw +} + + +shader "textures/common/clipsolid" +{ + qer_trans 0.40 + surfparm trans + surfparm nomarks + surfparm nodraw +} + +shader "textures/common/clipcamera" +{ + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm cameraclip + surfparm noimpact +} + +shader "textures/common/clip" +{ + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm playerclip + surfparm monsterclip + surfparm noimpact + surfparm detail +} + +shader "textures/common/clip_playeronly" +{ + qer_editorimage "textures/common/clip" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm playerclip + //surfparm monsterclip + surfparm noimpact + surfparm detail +} + +shader "textures/common/climbclip" +{ + qer_trans 0.40 + surfparm trans + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm solid + surfparm noimpact + surfparm detail +} + +shader "textures/common/clip_metal" +{ +castshadow + qer_editorimage "textures/common/clip" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm playerclip + surfparm monsterclip + surfparm noimpact + surfparm detail + surfparm metal +} + +shader "textures/common/clip_stone" +{ + qer_editorimage "textures/common/clip" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm playerclip + surfparm monsterclip + surfparm noimpact + surfparm detail + surfparm beton +} + +shader "textures/common/clipall" +{ + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm cameraclip + surfparm nodraw + surfparm playerclip + surfparm monsterclip + surfparm noimpact + surfparm detail + surfparm trans +} + +shader "textures/common/ladder" +{ + qer_editorimage "textures/common/slick" + qer_trans 0.4 + surfparm nodraw + surfparm nomarks + surfparm nolightmap + surfparm nonsolid + surfparm trans + surfparm ladder +} + +shader "textures/common/monsterclip" +{ + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm monsterclip + surfparm noimpact + surfparm detail + surfparm trans +} + +shader "textures/common/missileclip" +{ +castshadow + qer_trans 0.40 + surfparm nodamage + surfparm nomarks + surfparm nodraw + surfparm playerclip +} + +shader "textures/common/cushion" +{ + qer_nocarve + qer_trans 0.50 + surfparm nodraw + surfparm nomarks + surfparm nodamage + surfparm trans +} + +shader "textures/common/hint" +{ + qer_nocarve + qer_trans 0.30 + surfparm nodraw + surfparm hint + surfparm nonsolid + surfparm structural + surfparm trans + surfparm noimpact +} + +shader "textures/common/skip" +{ + qer_nocarve + qer_trans 0.40 + surfparm nodraw + surfparm nonsolid + surfparm structural + surfparm trans +} + +shader "textures/common/origin" +{ + qer_nocarve + surfparm nodraw + surfparm nonsolid + surfparm origin +} + +shader "textures/common/noimpact" +{ + surfparm noimpact +} + +shader "textures/common/areaportal" +{ + qer_trans 0.50 + surfparm nodraw + surfparm nonsolid + surfparm structural + surfparm trans + surfparm nomarks + surfparm areaportal +} + +shader "textures/common/antiportal" +{ + qer_trans 0.50 + surfparm nodraw + surfparm nonsolid + surfparm structural + surfparm nomarks + surfparm antiportal +} + +shader "textures/common/trigger" +{ + qer_trans 0.50 + qer_nocarve + surfparm nodraw + surfparm trans + surfparm nocastshadow +} + +shader "textures/common/caulk" +{ + surfparm nodraw + surfparm nomarks + surfparm nolightmap + surfparm nocastshadow +} + +shader "textures/efx/cloth" +{ + surfparm nonsolid + surfparm trans + surfparm nomarks + cull none + + pass 0 + vcmod cloth 0.0 0.0 -24.0 + + layer "textures/misc/gob_04" + layer $lightmap + tex0 = layer 0 + tex1 = layer 1 + effect "lightmapped" +} + +/* +Smazat +*/ +shader "textures/nr_test/mriz_02" +{ + specular $alpha + tesssize 64 + + diffusemap "textures/nr_test/mriz_02_C" + normalmap "textures/nr_test/mriz_02_N" +} + +shader "textures/nr_test/chodba_00_C" +{ + specular $alpha + tesssize 64 + + diffusemap "textures/nr_test/chodba_00_C" + normalmap "textures/nr_test/chodba_00_N" +} diff --git a/Alpha Prime/Mod/shaders/decals.h b/Alpha Prime/Mod/shaders/decals.h new file mode 100644 index 0000000..6a11bff --- /dev/null +++ b/Alpha Prime/Mod/shaders/decals.h @@ -0,0 +1,297 @@ +shader "decals/blood" +{ + sort decal + zwrite false + + map noambient + + blend srccolor zero + diffusemap "textures/decals/blood1" alpha + + material GenericVertexlit +} + +shader "decals/blood1" +{ + sort decal + zwrite false + + map noambient + specular $alpha + + blend srccolor zero + diffusemap "textures/decals/blood1" alpha + + material GenericVertexlit +} + +shader "decals/blood2" +{ + sort decal + zwrite false + + map noambient + specular $alpha + + blend srccolor zero + diffusemap "textures/decals/blood2" alpha + + material GenericVertexlit +} + +shader "decals/blood3" +{ + sort decal + zwrite false + + map noambient + specular $alpha + + blend srccolor zero + diffusemap "textures/decals/blood3" alpha + + material GenericVertexlit +} + +shader "decals/blood4" +{ + sort decal + zwrite false + + map noambient + specular $alpha + + blend srccolor zero + diffusemap "textures/decals/blood3" alpha + //diffusemap "textures/decals/blood4" alpha + + material GenericVertexlit +} + + +//-------------------------------- +shader "decals/decalmetal" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.23 + + blend srccolor zero + map noambient + alphatest 1 + + diffusemap "textures/decals/hit_metal_c" clamp alpha + normalmap "textures/decals/hit_metal_n" clamp alpha + + material GenericVertexlit +} + +shader "decals/decaliron" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.23 + + blend srccolor zero + map noambient + alphatest 1 + + diffusemap "textures/decals/hit_iron_c" clamp alpha + normalmap "textures/decals/hit_iron_n" clamp alpha + + material GenericVertexlit +} + +shader "decals/decalbeton" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.23 + + blend srccolor zero + map noambient + alphatest 1 + + diffusemap "textures/decals/hit_beton_c" clamp alpha + normalmap "textures/decals/hit_beton_n" clamp alpha + + material GenericVertexlit +} + +shader "decals/decalrubber" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.22 + + blend srccolor zero + map noambient + alphatest 1 + + diffusemap "textures/decals/hit_rubber_c" clamp alpha + normalmap "textures/decals/hit_rubber_n" clamp alpha + + material GenericVertexlit +} + +shader "decals/decalplastic" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.22 + + blend srccolor zero + map noambient + alphatest 1 + + diffusemap "textures/decals/hit_plastic_c" clamp alpha + normalmap "textures/decals/hit_plastic_n" clamp alpha + + material GenericVertexlit +} + +shader "decals/decalflesh" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.233 + + blend srccolor zero + map noambient + alphatest 1 + + diffusemap "textures/decals/hit_flesh_c" clamp alpha + normalmap "textures/decals/hit_flesh_n" clamp alpha + + material GenericVertexlit +} + +shader "decals/decalglass" +{ + sort decal + zwrite false + cull none + + specular 0 //$alpha + specularpower 0.522 + + blend one srcalpha + map noambient + + diffusemap "textures/decals/hit_glass_c" clamp alpha + + material GenericVertexlit +} + +// todo + +shader "decals/decalliquid" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.503 + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/steel1_c" clamp alpha + normalmap "textures/decals/steel1_n" clamp alpha + + material GenericVertexlit +} + +shader "decals/decalslime" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.512 + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/steel1_c" clamp alpha + normalmap "textures/decals/steel1_n" clamp alpha + + material GenericVertexlit +} + + + +shader "decals/decalstone" +{ + sort decal + zwrite false + + specular $nmapalpha + specularpower 0.51 + + blend srccolor zero + map noambient + alphatest 1 + + diffusemap "textures/decals/hit_stone_c" clamp alpha + normalmap "textures/decals/hit_stone_n" clamp alpha + + material GenericVertexlit +} +/* +//--------------------- +shader "decals/test" +{ + sort decal + zwrite false + //alphatest 1 + + specular $nmapalpha + specularpower 0.52 + + //map nolight + + //blend invsrcalpha srcalpha + //diffusemap "decals/burn" alpha + + //blend srccolor zero + //diffusemap "textures/decals/scorch" clampu clampv + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/hit_iron_c" clamp alpha + normalmap "textures/decals/hit_iron_n" clamp alpha +// diffusemap "textures/decals/test00_c" clamp alpha +// normalmap "textures/decals/test00_n" clamp alpha + + material GenericVertexlit +} +*/ + +shader "decals/burn" +{ + sort decal + zwrite false + //alphatest 1 + + map nolight + + //blend invsrcalpha srcalpha + //diffusemap "decals/burn" alpha + + blend srccolor zero + diffusemap "textures/decals/scorch" clamp alpha + + material GenericVertexlit +} + diff --git a/Alpha Prime/Mod/shaders/door.h b/Alpha Prime/Mod/shaders/door.h new file mode 100644 index 0000000..633a2c9 --- /dev/null +++ b/Alpha Prime/Mod/shaders/door.h @@ -0,0 +1,310 @@ +shader "obj/doors/airlockdoor04_frame" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/airlockdoor04_frame_c" alpha + normalmap "obj/doors/airlockdoor04_frame_n" alpha +} + +shader "obj/doors/airlockdoor04" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/airlockdoor04_c" alpha + normalmap "obj/doors/airlockdoor04_n" alpha +} + +shader "obj/doors/safedoor_01_frame" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/safedoor_01_frame_c" alpha + normalmap "obj/doors/safedoor_01_frame_n" alpha +} + +shader "obj/doors/safedoor_01" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/safedoor_01_c" alpha + normalmap "obj/doors/safedoor_01_n" alpha +} + +shader "obj/doors/halldoor_01_frame" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/halldoor_01_frame_c" alpha + normalmap "obj/doors/halldoor_01_frame_n" alpha +} + +shader "obj/doors/bardoor_01" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/bardoor_01_c" alpha + normalmap "obj/doors/halldoor_01_n" alpha +} + +shader "obj/doors/halldoor_01" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/halldoor_01_c" alpha + normalmap "obj/doors/halldoor_01_n" alpha +} + +shader "obj/doors/FridgeDoor" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/FridgeDoor_c" alpha + normalmap "obj/doors/FridgeDoor_n" alpha +} + +shader "obj/doors/FridgeDoor_01" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/FridgeDoor_01_c" alpha + normalmap "obj/doors/FridgeDoor_01_n" alpha +} + +shader "obj/doors/FridgeDoor_02" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/FridgeDoor_02_c" alpha + normalmap "obj/doors/FridgeDoor_02_n" alpha +} + +shader "obj/doors/FridgeDoor_Ram" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/FridgeDoor_Ram_c" alpha + normalmap "obj/doors/FridgeDoor_Ram_n" alpha +} + +shader "obj/doors/FridgeDoor_Ram01" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/doors/FridgeDoor_Ram_01_c" alpha + normalmap "obj/doors/FridgeDoor_Ram_01_n" alpha +} + +shader "obj/doors/airlockdoor02_frame" +{ +// + specular $nmapalpha + + diffusemap "obj/doors/airlockdoor02a_frame_c" + normalmap "obj/doors/airlockdoor02_frame_n" alpha +} + + +shader "obj/doors/airlockdoor02" +{ +// castshadow + specular $nmapalpha + + diffusemap "obj/doors/airlockdoor02a_c" + normalmap "obj/doors/airlockdoor02_n" alpha +} + + + +shader "airlockdoor01" +{ +// castshadow + specular $nmapalpha + + diffusemap "obj/doors/airlockdoor01_c" + normalmap "obj/doors/airlockdoor01_n" alpha +} + +shader "airlockdoor01a" +{ +// castshadow + specular $nmapalpha + + diffusemap "obj/doors/airlockdoor01a_c" + normalmap "obj/doors/airlockdoor01_n" alpha +} + +shader "door01" +{ +// castshadow + specular $nmapalpha + + diffusemap "obj/doors/door01_c" + qer_editorimage "obj/doors/door01_c" + normalmap "obj/doors/door01_n" alpha +} + +shader "textures/door/door01" +{ + specular $nmapalpha + + diffusemap "obj/doors/door01_c" + qer_editorimage "obj/doors/door01_c" + normalmap "obj/doors/door01_n" alpha +} + + +shader "obj/doors/shipDoor_01_Ram_Light" +{ + map nolight + specular $alpha + specularpower 0.22 + + //blend one one + diffusemap "obj/doors/shipDoor_01_Ram_Light_c" +} + +shader "obj/doors/shipDoor_01_Ram_Display" +{ + map nolight + specular $alpha + specularpower 0.22 + + //blend one one + diffusemap $gui0//"obj/doors/shipDoor_01_Ram_Display_c" + normalmap "obj/doors/shipDoor_01_Ram_Display_n" +} + +shader "obj/doors/shipDoor_01_Ram" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/shipDoor_01_Ram_c" + normalmap "obj/doors/shipDoor_01_Ram_n" alpha +} + +shader "obj/doors/shipDoor_01" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/shipDoor_01_c" + normalmap "obj/doors/shipDoor_01_n" alpha +} + +shader "obj/doors/ShipDoor_01a" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/ShipDoor_01a_c" + normalmap "obj/doors/ShipDoor_01a_n" alpha +} + +shader "obj/doors/shipDoor_01a_Ram" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/shipDoor_01a_Ram_c" + normalmap "obj/doors/shipDoor_01a_Ram_n" alpha +} + +shader "obj/doors/ShipDoor_02" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/ShipDoor_02_c" + normalmap "obj/doors/ShipDoor_02_n" alpha +} + +shader "obj/doors/ShipDoor_03" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/ShipDoor_03_c" + normalmap "obj/doors/ShipDoor_03_n" alpha +} + +shader "obj/doors/shipDoor_04" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/shipDoor_04_c" + normalmap "obj/doors/shipDoor_04_n" alpha +} + +shader "obj/doors/shipDoor_04_Ram" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/shipDoor_04_Ram_c" + normalmap "obj/doors/shipDoor_04_Ram_n" alpha +} + +shader "obj/doors/shipDoor_04a" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/shipDoor_04a_c" + normalmap "obj/doors/shipDoor_04a_n" alpha +} + +shader "obj/doors/shipDoor_02_Ram" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/shipDoor_02_Ram_c" + normalmap "obj/doors/shipDoor_02_Ram_n" alpha +} + +shader "obj/doors/shipDoor_03_Ram" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/doors/ShipDoor_03_Ram_c" + normalmap "obj/doors/ShipDoor_03_Ram_n" alpha +} diff --git a/Alpha Prime/Mod/shaders/efx.h b/Alpha Prime/Mod/shaders/efx.h new file mode 100644 index 0000000..733a383 --- /dev/null +++ b/Alpha Prime/Mod/shaders/efx.h @@ -0,0 +1,363 @@ +shader "RefractWave" +{ + surfparm trans + cull none + zwrite false + sort overlay + + sort overlay + + diffusemap $renderview clampu clampv + refractmap "textures/efx/Ref03dxt" + + parm0 (DynamicOverlaySprite row0) //float[4] + parm1 (DynamicOverlaySprite row1) //float[4] + + material haze +} + + +shader "flameheat" +{ + surfparm trans + cull none + zwrite false + sort overlay + + diffusemap $renderview clampu clampv + refractmap + anim 30 + "textures/efx/Refract_Heat_N_000" + "textures/efx/Refract_Heat_N_001" + "textures/efx/Refract_Heat_N_002" + "textures/efx/Refract_Heat_N_003" + "textures/efx/Refract_Heat_N_004" + "textures/efx/Refract_Heat_N_005" + "textures/efx/Refract_Heat_N_006" + "textures/efx/Refract_Heat_N_007" + "textures/efx/Refract_Heat_N_008" + "textures/efx/Refract_Heat_N_009" + "textures/efx/Refract_Heat_N_010" + "textures/efx/Refract_Heat_N_011" + "textures/efx/Refract_Heat_N_012" + "textures/efx/Refract_Heat_N_013" + "textures/efx/Refract_Heat_N_014" + "textures/efx/Refract_Heat_N_015" + "textures/efx/Refract_Heat_N_016" + "textures/efx/Refract_Heat_N_017" + "textures/efx/Refract_Heat_N_018" + "textures/efx/Refract_Heat_N_019" + "textures/efx/Refract_Heat_N_020" + "textures/efx/Refract_Heat_N_021" + "textures/efx/Refract_Heat_N_022" + "textures/efx/Refract_Heat_N_023" + "textures/efx/Refract_Heat_N_024" + "textures/efx/Refract_Heat_N_025" + "textures/efx/Refract_Heat_N_026" + "textures/efx/Refract_Heat_N_027" + "textures/efx/Refract_Heat_N_028" + "textures/efx/Refract_Heat_N_029" + "textures/efx/Refract_Heat_N_030" + "textures/efx/Refract_Heat_N_031" + "textures/efx/Refract_Heat_N_032" + "textures/efx/Refract_Heat_N_033" + "textures/efx/Refract_Heat_N_034" + "textures/efx/Refract_Heat_N_035" + "textures/efx/Refract_Heat_N_036" + "textures/efx/Refract_Heat_N_037" + "textures/efx/Refract_Heat_N_038" + "textures/efx/Refract_Heat_N_039" + "textures/efx/Refract_Heat_N_040" + "textures/efx/Refract_Heat_N_041" + "textures/efx/Refract_Heat_N_042" + "textures/efx/Refract_Heat_N_043" + "textures/efx/Refract_Heat_N_044" + "textures/efx/Refract_Heat_N_045" + "textures/efx/Refract_Heat_N_046" + "textures/efx/Refract_Heat_N_047" + "textures/efx/Refract_Heat_N_048" + "textures/efx/Refract_Heat_N_049" + "textures/efx/Refract_Heat_N_050" + "textures/efx/Refract_Heat_N_051" + "textures/efx/Refract_Heat_N_052" + "textures/efx/Refract_Heat_N_053" + "textures/efx/Refract_Heat_N_054" + "textures/efx/Refract_Heat_N_055" + "textures/efx/Refract_Heat_N_056" + "textures/efx/Refract_Heat_N_057" + "textures/efx/Refract_Heat_N_058" + "textures/efx/Refract_Heat_N_059" + "textures/efx/Refract_Heat_N_060" + + parm0 (DynamicOverlaySprite row0) //float[4] + parm1 (DynamicOverlaySprite row1) //float[4] + + //diffusemap2 "gfx/black" alpha nomipmap + + material haze +} + + +shader "particle/test" +{ + sort translucent + cull none + + layer "spr/corona1" alpha +// layer "spr/corona6" alpha +// layer "spr/ruka" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/test2" +{ + sort translucent + cull none + + layer "spr/corona1" alpha + + tex0 = layer 0 + effect "effect_particle" +} + + +// *** MISC *** + + +shader "textures/efx/gradient" +{ + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap + sort translucent + cull ccw + + layer "textures/efx/gradient" alpha + + tex0 = layer 0 + + effect "default_flame" + + //qer_trans 1.0 + qer_editorimage "textures/common/grid" +} + + +shader "textures/efx/gradient_doubleside" +{ + //qer_trans 0.60 + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap + sort translucent + cull none + + layer "textures/efx/gradient" alpha + + tex0 = layer 0 + + effect "default_flame" + qer_editorimage "textures/common/grid" +} + +shader "textures/efx/gradientgreen" +{ + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap + sort translucent + cull none + subdivsize 64 + + + pass 0 + tcmod SHIFT 0 g_fTime01 + + layer "textures/efx/gradientgreen" alpha + + tex0 = layer 0 + + effect "default_flame" + //effect "nolightmap_trans" + + //qer_trans 1.0 + qer_editorimage "textures/common/grid" +} + + +shader "textures/efx/gradient2" +{ + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap + sort translucent + //cull none + subdivsize 64 + + layer "textures/efx/gradient2" alpha + + tex0 = layer 0 + + effect "default_flame" + //effect "nolightmap_trans" + + //qer_trans 1.0 + qer_editorimage "textures/common/grid" +} + + +shader "textures/efx/gradient2_doubleside" +{ + //qer_trans 0.60 + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap + sort translucent + cull none + subdivsize 64 + + layer "textures/efx/gradient2" alpha + + tex0 = layer 0 + + //effect "default_flame" + effect "nolightmap_trans" + qer_editorimage "textures/common/grid" +} + +shader "textures/efx/gradientyellow" +{ + //qer_trans 0.60 + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap + sort translucent + cull none + subdivsize 64 + + layer "textures/efx/gradientyellow" alpha + + tex0 = layer 0 + + effect "default_flame" + //effect "nolightmap_trans" + qer_editorimage "textures/common/grid" +} + +shader "textures/efx/gradientyellow_doubleside" +{ + //qer_trans 0.60 + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap + sort translucent + cull none + subdivsize 64 + + layer "textures/efx/gradientyellow" alpha + + tex0 = layer 0 + + effect "default_flame" + //effect "nolightmap_trans" + qer_editorimage "textures/common/grid" +} + +shader "textures/efx/lightstreak0" +{ + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap +sort overlay + sort translucent + //cull none + subdivsize 64 + + + layer "textures/efx/gradient" alpha + + tex0 = layer 0 + + effect "default_flame" + //effect "nolightmap_trans" + + //qer_trans 1.0 + qer_editorimage "textures/common/grid" + + material haze +} + +shader "textures/efx/lightstreak1" +{ + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap +sort overlay + sort translucent + //cull none + subdivsize 64 + + + layer "textures/efx/gradient2" alpha + + tex0 = layer 0 + + effect "default_flame" + //effect "nolightmap_trans" + + //qer_trans 1.0 + qer_editorimage "textures/common/grid" + +material haze + +} + +shader "textures/efx/lightstreak2" +{ + surfparm nocastshadow + surfparm nonsolid + surfparm trans + surfparm nodrop + surfparm nolightmap +sort overlay + sort translucent + //cull none + subdivsize 64 + + + layer "textures/efx/gradient3" alpha + + tex0 = layer 0 + + effect "default_flame" + //effect "nolightmap_trans" + + //qer_trans 1.0 + qer_editorimage "textures/common/grid" + + + +material haze + +} + diff --git a/Alpha Prime/Mod/shaders/floor.h b/Alpha Prime/Mod/shaders/floor.h new file mode 100644 index 0000000..94e7b57 --- /dev/null +++ b/Alpha Prime/Mod/shaders/floor.h @@ -0,0 +1,305 @@ + +shader "textures/floor/wireclip" +{ + specular 1.0 + + cull none + alphatest 128 + + diffusemap "textures/floor/wireclip_c" + normalmap "textures/floor/wireclip_n" +} + +shader "textures/floor/wiretrans" +{ + specular 1.0 + + cull none + alphatest 128 + + diffusemap "textures/floor/wiretrans_c" + normalmap "textures/floor/wiretrans_n" +} + +//FIDO pokusy. Nemazat +shader "textures/floor/floorX" +{ + specular 1.0 + specularpower 0.483 + heightscale 0.104 + qer_editorimage "textures/floor/floor1" + + diffusemap "textures/heighttest/brickwall01_d" + normalmap "textures/heighttest/brickwall01_n" alpha + heightmap "textures/heighttest/brickwall01_h" +} + +shader "textures/floor/floor1" +{ + specular $nmapalpha + specularpower 0.483 + qer_editorimage "textures/floor/floor1" + diffusemap "textures/floor/floor1_c" + normalmap "textures/floor/floor1_n" alpha +} + +shader "textures/floor/floor1b" +{ + specular $nmapalpha + specularpower 0.482 + diffusemap "textures/floor/floor1b_c" + qer_editorimage "textures/floor/floor1b" + normalmap "textures/floor/floor1b_n" alpha +} + +shader "textures/floor/floor1c" +{ + specular $nmapalpha + specularpower 0.483 + diffusemap "textures/floor/floor1c_c" + qer_editorimage "textures/floor/floor1c" + normalmap "textures/floor/floor1c_n" alpha +} + +shader "textures/floor/floor1c_a" +{ + specular $nmapalpha + specularpower 0.483 + diffusemap "textures/floor/floor1c_a_c" + qer_editorimage "textures/floor/floor1c_a" + normalmap "textures/floor/floor1c_n" alpha +} + +shader "textures/floor/floor2" +{ + specular $nmapalpha + specularpower 0.533 + surfparm plastic + + diffusemap "textures/floor/floor2_c" + qer_editorimage "textures/floor/floor2" + normalmap "textures/floor/floor2_n" alpha +} + +shader "textures/floor/floor2a" +{ + specular $nmapalpha + specularpower 0.533 + diffusemap "textures/floor/floor2a_c" + qer_editorimage "textures/floor/floor2" + normalmap "textures/floor/floor2_n" alpha +} + +shader "textures/floor/floor2b" +{ + specular $nmapalpha + specularpower 0.533 + diffusemap "textures/floor/floor2b_c" + qer_editorimage "textures/floor/floor2b" + normalmap "textures/floor/floor2b_n" alpha +} + +shader "textures/floor/floor2c" +{ + specular $nmapalpha + specularpower 0.533 + surfparm rubber + + diffusemap "textures/floor/floor2c_c" + qer_editorimage "textures/floor/floor2c" + normalmap "textures/floor/floor2c_n" alpha +} + +shader "textures/floor/floor2d" +{ + specular $nmapalpha + specularpower 0.533 + diffusemap "textures/floor/floor2d_c" + qer_editorimage "textures/floor/floor2d_c" + normalmap "textures/floor/floor2_n" alpha +} + +shader "textures/floor/floor3" +{ + specular $nmapalpha + specularpower 0.533 + diffusemap "textures/floor/floor3_c" + normalmap "textures/floor/floor3_n" alpha +} + +shader "textures/floor/floor3a" +{ + specular $nmapalpha + specularpower 0.533 + diffusemap "textures/floor/floor3a_c" + normalmap "textures/floor/floor3_n" alpha +} + +shader "textures/floor/ConcreteFloor_01" +{ + surfparm beton + specular $nmapalpha + diffusemap "textures/floor/ConcreteFloor_01_c" + qer_editorimage "textures/floor/ConcreteFloor_01_c" + normalmap "textures/floor/ConcreteFloor_01_n" alpha +} + +// for debrises only!!! +shader "textures/floor/ConcreteFloor_02_pieces" +{ +//castshadow + surfparm beton + surfparm castshadow + specular $nmapalpha + diffusemap "textures/floor/ConcreteFloor_02_c" + qer_editorimage "textures/floor/ConcreteFloor_02_c" + normalmap "textures/floor/ConcreteFloor_02_n" alpha +} + +shader "textures/floor/ConcreteFloor_02" +{ + surfparm beton + specular $nmapalpha + diffusemap "textures/floor/ConcreteFloor_02_c" + qer_editorimage "textures/floor/ConcreteFloor_02_c" + normalmap "textures/floor/ConcreteFloor_02_n" alpha +} + +shader "textures/floor/ConcreteFloor_03" +{ + surfparm beton + specular $nmapalpha + diffusemap "textures/floor/ConcreteFloor_03_c" + normalmap "textures/floor/ConcreteFloor_03_n" alpha +} + +shader "textures/floor/MetalFloor_01" +{ + specular $nmapalpha + specularpower 0.534 + diffusemap "textures/floor/MetalFloor_01_c" + normalmap "textures/floor/MetalFloor_01_n" alpha +} + +shader "textures/floor/MetalFloor_02" +{ + specular $nmapalpha + specularpower 0.534 + diffusemap "textures/floor/MetalFloor_02_c" + normalmap "textures/floor/MetalFloor_02_n" alpha +} + +shader "textures/floor/MetalFloor_02a" +{ + specular $nmapalpha + specularpower 0.534 + diffusemap "textures/floor/MetalFloor_02a_c" + normalmap "textures/floor/MetalFloor_02a_n" alpha +} + +shader "textures/floor/MetalFloor_03" +{ + specular $nmapalpha + specularpower 0.534 + diffusemap "textures/floor/MetalFloor_03_c" + normalmap "textures/floor/MetalFloor_03_n" alpha +} + +shader "textures/floor/MetalFloor_03a" +{ + specular $nmapalpha + specularpower 0.534 + diffusemap "textures/floor/MetalFloor_03a_c" + normalmap "textures/floor/MetalFloor_03_n" alpha +} + +shader "textures/floor/E_ConcreteFloor_01" +{ + specular $nmapalpha + specularpower 0.51 + surfparm beton + + diffusemap "textures/floor/E_ConcreteFloor_01_c" + normalmap "textures/floor/ConcreteFloor_02_n" alpha +} + +shader "textures/floor/E_MetalFloor_01" +{ + specular $nmapalpha + specularpower 0.534 + diffusemap "textures/floor/E_MetalFloor_01_c" + normalmap "textures/floor/E_MetalFloor_01_n" alpha +} + +shader "textures/floor/E_MetalFloor_02" +{ + specular $nmapalpha + specularpower 0.534 + tesssize 128 + + diffusemap "textures/floor/E_MetalFloor_02_c" + normalmap "textures/floor/E_MetalFloor_02_n" alpha +} + + + +shader "textures/floor/H_MetalFloor_01" +{ + specular $nmapalpha + tesssize 144 + + diffusemap "textures/floor/H_MetalFloor_01_c" + normalmap "textures/floor/H_MetalFloor_01_n" alpha + +} + +shader "textures/floor/H_MetalFloor_01a" +{ + specular $nmapalpha + reflection 0.13 + tesssize 144 + + diffusemap "textures/floor/H_MetalFloor_01a_c" + normalmap "textures/floor/H_MetalFloor_01_n" alpha + envmap $nearestcube +} + +shader "textures/floor/H_MetalFloor_01a_withspec" +{ + specular $nmapalpha + reflection 0.13 + + diffusemap "textures/floor/H_MetalFloor_01a_c" + normalmap "textures/floor/H_MetalFloor_01_n" alpha + envmap $nearestcube +} + +shader "textures/floor/Trash" +{ + specular $nmapalpha + specularpower 0.51 + tesssize 256 + + diffusemap "textures/floor/Trash_01_c" + normalmap "textures/floor/Trash_01_n" alpha +} + +shader "textures/floor/new_floor01" +{ + specular $nmapalpha + specularpower 0.53 + tesssize 144 + + diffusemap "textures/floor/new_floor01_c" + normalmap "textures/floor/new_floor01_n" alpha +} + +shader "textures/floor/new_floor02" +{ + specular $nmapalpha + specularpower 0.53 + tesssize 144 + + diffusemap "textures/floor/new_floor02_c" + normalmap "textures/floor/new_floor02_n" alpha +} diff --git a/Alpha Prime/Mod/shaders/glass.h b/Alpha Prime/Mod/shaders/glass.h new file mode 100644 index 0000000..faec932 --- /dev/null +++ b/Alpha Prime/Mod/shaders/glass.h @@ -0,0 +1,444 @@ +shader "textures/glass/brokenglass1" +{ + surfparm trans + surfparm glass + + cull none + + zwrite false + + alphatest 2 + +#ifdef _XBOX + blend invsrcalpha srcalpha + sort translucent + diffusemap "textures/glass/brokenglass1" alpha nomipmap + +#else + sort overlay + + diffusemap $renderview clampu clampv + refractmap "textures/glass/brokenglass1_n" alpha + diffusemap2 "textures/glass/brokenglass1" alpha nomipmap + + parm0 g_RefractGlassMat0 + parm1 g_RefractGlassMat1 + + material haze +#endif +} + +shader "textures/glass/brokenglass2" +{ + surfparm trans + surfparm glass + + cull none + + zwrite false + + alphatest 1 + map nolight + +#ifdef _XBOX + blend invsrcalpha srcalpha + sort translucent + diffusemap "textures/glass/brokenglass2" alpha nomipmap + +#else + + sort overlay + + diffusemap $renderview clampu clampv + refractmap "textures/glass/brokenglass2_n" alpha + diffusemap2 "textures/glass/brokenglass2" alpha nomipmap + + parm0 g_RefractGlassMat0 + parm1 g_RefractGlassMat1 + + material haze +#endif +} + + +shader "textures/glass/brokenglass3" +{ + surfparm trans + surfparm glass + cull none + zwrite false + + blend invsrcalpha srcalpha + sort translucent + diffusemap "textures/glass/brokenglass1a" alpha +} + + +shader "textures/glass/brokenglass4" +{ + surfparm trans + surfparm glass + cull none + zwrite false + + blend invsrcalpha srcalpha + //sort translucent + diffusemap2 "textures/glass/brokenglass3" alpha + sort overlay + + diffusemap $renderview clampu clampv + refractmap "textures/glass/brokenglass2_n" alpha + //diffusemap2 "textures/glass/brokenglass2" alpha nomipmap + + parm0 g_RefractGlassMat0 + parm1 g_RefractGlassMat1 + + material haze +} + + + +// test +shader "textures/glass/mirror" +{ + surfparm glass + mirror + map nolight + alphatest 1 + + diffusemap "textures/glass/brokenglass1" clampu clampv nofilter alpha +} + + +shader "textures/glass/glass0" +{ + surfparm trans + surfparm glass + specular 1 + specularpower 0.41 + + zwrite false + cull none + blend one srcalpha + sort translucent + + diffusemap "textures/glass/glass1_c" alpha + //normalmap "textures/glass/glass1_n" +} + +shader "textures/glass/glasstrain" +{ + surfparm trans + surfparm glass + specular 1 + specularpower 0.41 + reflection 1.0 + + zwrite false + cull none + blend one one + sort translucent + + diffusemap "textures/glass/glass1_c" alpha + envmap $nearestcube +} + +/* +shader "textures/glass/glass0" +{ + specular 1 + specularpower 0.41 + diffusemap "textures/glass/glass1_c"// alpha +}*/ + +shader "textures/glass/glass0_nospec" +{ + surfparm trans + surfparm glass + specular 0.5 + specularpower 0.41 + + zwrite false + cull none + //blend invsrcalpha srcalpha + blend one srcalpha + sort translucent + + diffusemap "textures/glass/glass1_c" alpha + //normalmap "textures/glass/glass1_n" +} + +shader "textures/glass/glass1" +{ + surfparm trans + surfparm glass + specular 1 + specularpower 0.41 + + zwrite false + cull none + //blend invsrcalpha srcalpha + blend one srcalpha + sort translucent + + diffusemap "textures/glass/glass1_c" alpha + //normalmap "textures/glass/glass1_n" +} + +shader "textures/glass/glass2" +{ + surfparm trans + surfparm nocastshadow + surfparm glass + tesssize 64 + + specular 1 + specularpower 0.61 + reflection 0.4 + + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + map nolight + + diffusemap "textures/glass/glass2_c" alpha + envmap $nearestcube +} + + +shader "textures/glass/glass2_ref" +{ + surfparm trans + surfparm nocastshadow + surfparm glass + tesssize 64 + + specular 1 + specularpower 0.61 + + zwrite false + cull none + blend invsrcalpha srcalpha + map nolight + sort overlay + + diffusemap $renderview clampu clampv + refractmap "textures/glass/glass_ref_n" alpha + + parm0 g_RefractGlassMat0 + parm1 g_RefractGlassMat1 +} + + + + + + + + + + + + + + + + + +shader "textures/glass/glass2lowspec" +{ + surfparm trans + surfparm nocastshadow + surfparm glass + tesssize 64 + + specular 0.5 + specularpower 0.61 + reflection 0.4 + + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + map nolight + + diffusemap "textures/glass/glass2_c" alpha + envmap $nearestcube +} + +shader "textures/glass/glassblack" +{ +//castshadow + surfparm trans + surfparm castshadow + tesssize 64 + + specular 1 + specularpower 0.41 + reflection 0.2 + + diffusemap "textures/glass/glassblack_c" alpha + envmap $nearestcube +} + + +shader "textures/glass/lcd_disconnect" +{ + surfparm glass +castshadow + specular $alpha + specularpower 0.72 + + map nolight + + pass + tcmod shift g_fNoiseU g_fNoiseV + + diffusemap "gfx/remotecontrol/noise" +} + +shader "textures/glass/lcd1" +{ + surfparm glass +castshadow + specular $alpha + specularpower 0.72 + + map nolight + //blend one one //co je to za demenci? Proc to bylo pruhledny?? + //sort translucent + + diffusemap $renderview clampu clampv +} + +shader "textures/glass/lcd1notrans" +{ + surfparm glass + //castshadow + specular $alpha + specularpower 0.72 + + map nolight + //blend one one + // sort translucent + + diffusemap $renderview clampu clampv +} + + +shader "textures/glass/lcd2" +{ + surfparm glass +castshadow + surfparm trans + surfparm detail + surfparm nomarks + + specular 0.2 //$alpha + specularpower 0.32 + + zwrite false + //cull none + //blend invsrcalpha srcalpha + blend one one + sort translucent + + map nolight + + pass + tcmod shift 0.0 g_fTime10 + +#ifdef _XBOX + diffusemap "textures/glass/lcd1_c" +#else + diffusemap $gui0 //$renderview +#endif +} + +shader "textures/glass/monitor1" +{ + surfparm glass + surfparm trans + surfparm detail + surfparm nomarks +castshadow + specular 0.2 //$alpha + specularpower 0.32 + + //zwrite false + //cull none + //blend invsrcalpha srcalpha + //blend one one + //sort translucent + + map nolight + +#ifdef _XBOX + pass + tcmod shift 0.0 g_fTime10 + + diffusemap "textures/glass/lcd1_c" +#else + diffusemap $gui0 //$renderview +#endif +} + +shader "textures/glass/haze1" +{ + zwrite false + + //blend one one + sort overlay + + map nolight + +// pass + // tcmod shift g_fTime g_fTime + + diffusemap $renderview clampu clampv + refractmap "textures/vp1" + + parm0 g_RefractGlassMat0 + parm1 g_RefractGlassMat1 + + material haze +} + +shader "textures/glass/hazetwirl1" +{ + +#ifdef _XBOX + surfparm trans + specular 1 + specularpower 0.42 + + zwrite false + cull none + //blend invsrcalpha srcalpha + blend one srcalpha + sort translucent + + diffusemap "textures/glass/glass1_c" alpha + +#else + zwrite false + + //blend one one + sort overlay + + map nolight + + pass + tcmod shift g_fTime g_fTime + + diffusemap $renderview clampu clampv + refractmap "textures/vp1" +// refractmap "textures/common/bump" bump + + parm0 g_RefractGlassMat0 + parm1 g_RefractGlassMat1 + + material haze +#endif +} diff --git a/Alpha Prime/Mod/shaders/light.h b/Alpha Prime/Mod/shaders/light.h new file mode 100644 index 0000000..7dbf86a --- /dev/null +++ b/Alpha Prime/Mod/shaders/light.h @@ -0,0 +1,624 @@ + + +shader "textures/misc/barstreaks" +{ + zwrite false + sort translucent + // cull none + blend one one + specular 0 + map nolight + + diffusemap "textures/misc/barstreaks" +} + +shader "MediScreen01b" +{ + surfparm nolightmap + surfparm nomarks + + map nolight + + diffusemap "obj/static/mediscreen01b" +} + +shader "EnemyLights1" //default// +{ + surfparm nomarks + surfparm impact + + zwrite false + sort translucent + cull none + blend one one + specular 0 + map nolight + + diffusemap "textures/light/enemylights1_orange" + color CreatureClass Color2 +} + +shader "EnemyLights2" //default// +{ + surfparm nomarks + surfparm impact + + zwrite false + sort translucent + cull none + blend one one + specular 0 + map nolight + + diffusemap "textures/light/enemylights2_orange" + color CreatureClass Color2 + + pass 0 +// tcmod SCALE 0 0 1 0.25 + tcmod SHIFT 0 (CreatureClass UVAnim) +} + +shader "EnemyLights1_blue" +{ + surfparm nomarks + surfparm impact + + zwrite false + sort translucent + cull none + blend one one + specular 0 + map nolight + + diffusemap "textures/light/enemylights1_blue" + color CreatureClass Color2 +} + +shader "EnemyLights2_blue" +{ + surfparm nomarks + surfparm impact + + zwrite false + sort translucent + cull none + blend one one + specular 0 + map nolight + + diffusemap "textures/light/enemylights2_blue" + color CreatureClass Color2 + + pass 0 + tcmod SHIFT 0 (CreatureClass UVAnim) +} + +shader "EnemyLights1_red" +{ + surfparm nomarks + surfparm impact + + zwrite false + sort translucent + cull none + blend one one + specular 0 + map nolight + + diffusemap "textures/light/enemylights1_red" + color CreatureClass Color2 +} + +shader "EnemyLights2_red" +{ + surfparm nomarks + surfparm impact + + zwrite false + sort translucent + cull none + blend one one + specular 0 + map nolight + + diffusemap "textures/light/enemylights2_red" + color CreatureClass Color2 + + pass 0 + tcmod SHIFT 0 (CreatureClass UVAnim) +} + +shader "textures/light/control_lights01_valve_02" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nodrop + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + pass + tcmod rotate g_fTime 0.25 0.75 + + blend one one//invsrcalpha srcalpha + diffusemap + anim 8 + "textures/light/control_lights01a" + "textures/light/control_lights01b" + "textures/light/control_lights01c" + "textures/light/control_lights01d" + + qer_editorimage "textures/light/control_table_lights_01" +} + +shader "textures/light/control_lights01" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nodrop + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + diffusemap + anim 8 + "textures/light/control_lights01a" + "textures/light/control_lights01b" + "textures/light/control_lights01c" + "textures/light/control_lights01d" + + qer_editorimage "textures/light/control_table_lights_01" +} + +shader "textures/light/batterysign1" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/batterysign1" +} + +shader "obj/lights/lightning" +{ + map nolight + zwrite false + cull none + sort translucent + blend one one + + pass + tcmod shift g_lightningU g_lightningV + diffusemap "obj/lights/lightning" +} + +shader "beacon01" +{ + specular $nmapalpha + + diffusemap "obj/static/beacon01_c" + normalmap "obj/static/beacon01_n" alpha +} + +shader "beacon01_bright" +{ + map nolight + specular 1 + + pass + tcmod rotate g_fTime10 0 0 + + diffusemap "obj/static/beacon01_c" alpha +} + + +shader "obj/lights/Light_3" +{ + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/lights/Light_3_c" + normalmap "obj/lights/Light_3_n" alpha +} + +shader "obj/lights/Light_1" +{ + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/lights/Light_1_c" + normalmap "obj/lights/Light_1_n" alpha +} + +shader "textures/light/lightsolid1" +{ + surfparm nolightmap + surfparm nomarks + + map nolight + + diffusemap "textures/light/lightsolid1" +} + +shader "textures/light/lightline1" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + tesssize 144 + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightline1" +} + +shader "textures/light/lightline2" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightline2" +} + +shader "textures/light/lightline2b" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightline2b" +} + +shader "textures/light/lightline2c" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightline2c" +} + +shader "textures/light/lightcircle1" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightcircle1" +} + +shader "textures/light/lightsquare1" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightsquare1" +} + +shader "textures/light/lightconcrete_white" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightconcrete_white" +} + +shader "obj/lights/lightconcrete_orange" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightconcrete_orange" +} + +shader "obj/lights/lightconcrete_green" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightconcrete_green" +} + +shader "obj/lights/lightconcrete_red" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightconcrete_red" +} + +shader "textures/light/containerLight" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/containerLight" +} + +shader "textures/light/lightceil_light2" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightceil_light2" +} + +shader "textures/light/lightceil_light2red" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightceil_light2red" +} + +shader "textures/light/lightceil_light2yellow" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightceil_light2yellow" +} + +shader "textures/light/lightceil_light2yellowshut" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightceil_light2yellowshut" +} + +shader "textures/light/lightceil_light" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightceil_light" +} + +shader "textures/light/lightconcrete_orange" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightconcrete_orange" +} + + +shader "textures/light/lightpanel1" +{ + qer_editorimage "textures/light/lightpanel1" + surfparm nolightmap + + specular $alpha + + map nolight + + diffusemap "textures/light/lightpanel1_c" +} + +shader "textures/light/lightpanel1b" +{ + qer_editorimage "textures/light/lightpanel1b" + surfparm nolightmap + + specular $alpha + + map nolight + + diffusemap "textures/light/lightpanel1b_c" +} + + +shader "textures/light/control_table_lights" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nodrop + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + diffusemap + anim 1 + "textures/light/control_table_lights_01" + "textures/light/control_table_lights_02" + "textures/light/control_table_lights_03" + + qer_editorimage "textures/light/control_table_lights_01" +} + +shader "textures/light/control_table_lights2" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nodrop + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + diffusemap + anim 3 + "textures/light/control_table_lights_01" + "textures/light/control_table_lights_02" + "textures/light/control_table_lights_03" + + qer_editorimage "textures/light/control_table_lights_01" +} diff --git a/Alpha Prime/Mod/shaders/misc.h b/Alpha Prime/Mod/shaders/misc.h new file mode 100644 index 0000000..bde87ce --- /dev/null +++ b/Alpha Prime/Mod/shaders/misc.h @@ -0,0 +1,1331 @@ +shader "textures/misc/bar_tabledesk" +{ + specular $nmapalpha +castshadow + diffusemap "textures/misc/bar_tabledesk_c" + normalmap "textures/misc/bar_tabledesk_n" alpha +} + +shader "obj/misc/welldrill_01_top" +{ + specular $nmapalpha + + diffusemap "obj/misc/welldrill_01_top_c" + normalmap "obj/misc/welldrill_01_top_n" alpha +} + +shader "obj/misc/welldrill_01" +{ + specular $nmapalpha + + diffusemap "obj/misc/welldrill_01_c" + normalmap "obj/misc/welldrill_01_n" alpha +} + +shader "obj/misc/decoration_01" +{ + surfparm trans + surfparm nomarks + surfparm metal + +// castshadow + cull none + specular $nmapalpha + specularpower 0.42 + + alphatest 126 + + diffusemap "obj/misc/decoration_01_c" alpha + normalmap "obj/misc/decoration_01_n" alpha +} + +shader "textures/misc/pipe_inside01" +{ + specular $nmapalpha + specularpower 0.78 + + diffusemap "textures/misc/pipe_inside01_c" + normalmap "textures/misc/pipe_inside01_n" alpha +} + +shader "textures/misc/metal_burn" +{ + specular $nmapalpha + specularpower 0.78 + + diffusemap "textures/misc/metal_burn_c" + normalmap "textures/misc/metal_burn_n" alpha +} + +shader "obj/misc/bottle_01_opaque" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/misc/bottle_01_c" + normalmap "obj/misc/bottle_01_n" alpha +} + +shader "obj/misc/bottle_01_s0" +{ +// surfparm trans +// surfparm nomarks +castshadow + cull none + specular $nmapalpha + specularpower 0.42 + + alphatest 126 + + diffusemap "obj/misc/bottle_01_s0_c" alpha + normalmap "obj/misc/bottle_01_s0_n" alpha +} + +shader "obj/misc/bottle_01_s1" +{ + cull none + specular $nmapalpha + specularpower 0.42 +castshadow + alphatest 126 + + diffusemap "obj/misc/bottle_01_s1_c" alpha + normalmap "obj/misc/bottle_01_s1_n" alpha +} + +shader "obj/misc/bottle_01_s2" +{ + cull none + specular $nmapalpha + specularpower 0.42 +castshadow + alphatest 126 + + diffusemap "obj/misc/bottle_01_s2_c" alpha + normalmap "obj/misc/bottle_01_s2_n" alpha +} + +shader "obj/misc/bottle_02_s3" +{ + cull none + specular $nmapalpha + specularpower 0.42 +castshadow + alphatest 126 + + diffusemap "obj/misc/bottle_02_s3_c" alpha + normalmap "obj/misc/bottle_02_s3_n" alpha +} + +shader "obj/misc/bottle_02_s6" +{ + cull none + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/misc/bottle_02_s6_c" + normalmap "obj/misc/bottle_02_s6_n" alpha +} + +shader "obj/misc/bottle_01_l0" +{ + surfparm trans + specular 1 + specularpower 0.63 + reflection 1 + fresnel 1.0 + color 0xff0096ff +castshadow + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/bottle_01_c" alpha + normalmap "obj/misc/bottle_01_n" alpha + envmap $nearestcube +} + +shader "obj/misc/bottle_01_l1" +{ + surfparm trans + specular 1 + specularpower 0.63 + reflection 1 + fresnel 1.0 + color 0xff0018ff +castshadow + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/bottle_01_c" alpha + normalmap "obj/misc/bottle_01_n" alpha + envmap $nearestcube +} + +shader "obj/misc/bottle_01_l2" +{ + surfparm trans + specular 1 + specularpower 0.63 + reflection 1 + fresnel 1.0 + color 0xffc343ff +castshadow + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/bottle_01_c" alpha + normalmap "obj/misc/bottle_01_n" alpha + envmap $nearestcube +} + +shader "obj/misc/bottle_01_l3" +{ + surfparm trans + specular 1 + specularpower 0.63 + reflection 1 + fresnel 1.0 + color 0xffff4e00 +castshadow + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/bottle_01_c" alpha + normalmap "obj/misc/bottle_01_n" alpha + envmap $nearestcube +} + +shader "obj/misc/bottle_01_l4" +{ + surfparm trans + specular 1 + specularpower 0.63 + reflection 1 + fresnel 1.0 + color 0xff00ff00 +castshadow + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/bottle_01_c" alpha + normalmap "obj/misc/bottle_01_n" alpha + envmap $nearestcube +} + +shader "obj/misc/bottle_01" +{ + surfparm trans + specular 1 + specularpower 0.63 + reflection 1 + fresnel 1.0 +castshadow + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/bottle_01_c" alpha + normalmap "obj/misc/bottle_01_n" alpha + envmap $nearestcube +} + +shader "obj/misc/glass_04" +{ + surfparm trans + specular 1 + specularpower 0.63 + reflection 1 + fresnel 1.0 + + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/glass_04_c" alpha + normalmap "obj/misc/glass_04_n" alpha + envmap $nearestcube +} + +shader "obj/misc/glass_02a" +{ + surfparm trans + specular 1 + specularpower 0.63 + reflection 1 + fresnel 1.0 + + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/glass_02_c" alpha + normalmap "obj/misc/glass_02_n" alpha + envmap $nearestcube +} + +shader "obj/misc/glass_02b" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/misc/glass_02_c" + normalmap "obj/misc/glass_02_n" alpha +} + +shader "obj/misc/glass_01" +{ + surfparm trans + specular 1 + specularpower 0.62 + reflection 1 + fresnel 1.0 + + zwrite false + cull none + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/misc/glass_01_c" alpha + normalmap "obj/misc/glass_01_n" alpha + envmap $nearestcube +} + +shader "obj/items/item_box" +{ + specular $nmapalpha + specularpower 0.77 +castshadow + diffusemap "obj/items/item_box_c" + normalmap "obj/items/item_box_n" alpha +} + +shader "obj/misc/valve_01" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/misc/valve_01_c" + normalmap "obj/misc/valve_01_n" alpha +} + +shader "obj/misc/hall_loader" +{ + specular $nmapalpha + specularpower 0.77 + + diffusemap "obj/misc/hall_loader_c" + normalmap "obj/misc/hall_loader_n" alpha +} + +shader "heavyTurret_light" +{ + map nolight + pass + tcmod shift g_fTime 0 + diffusemap "obj/weapons/grenadelights" +} + +shader "heavyTurret" +{ + specular $nmapalpha + specularpower 0.78 +castshadow + diffusemap "obj/misc/heavyTurret_c" + normalmap "obj/misc/heavyTurret_n" alpha +} + +shader "textures/misc/ballcounter" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + alphatest 1 // zatim + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap + anim func_image image_frame + "textures/misc/bball_00" + "textures/misc/bball_01" + "textures/misc/bball_02" + "textures/misc/bball_03" + "textures/misc/bball_04" + "textures/misc/bball_05" +} +shader "Gate01" +{ + // castshadow + specular $nmapalpha + specularpower 0.82 + + diffusemap "obj/misc/Gate01_c" + normalmap "obj/misc/Gate01_n" alpha +} + +shader "s-debna_00_C" +{ + castshadow + specular $alpha + + diffusemap "obj/fps/debna_00_C" + normalmap "obj/fps/debna_00_N" +} + +shader "meqon" +{ + castshadow + specular $alpha + + diffusemap "textures/nr_test/mriz_02_C" + normalmap "textures/nr_test/mriz_02_N" +} + +shader "vl-bigdoors" +{ + specular $alpha + + diffusemap "textures/d3test/bigdoors_c" + normalmap "textures/d3test/bigdoors_n" +} + +shader "vl-trimsteelb" +{ + specular $alpha +castshadow + diffusemap "textures/d3test/bigdoors_c" + normalmap "textures/d3test/bigdoors_n" +} + +shader "s-bigdoors" +{ + specular $alpha + + diffusemap "textures/d3test/bigdoors_c" + normalmap "textures/d3test/bigdoors_n" +} + +shader "s-trimsteelb" +{ + specular $alpha +castshadow + diffusemap "textures/d3test/bigdoors_c" + normalmap "textures/d3test/bigdoors_n" +} + + +shader "obj/misc/analyst_head" +{ + castshadow + specular $alpha + + diffusemap "obj/misc/analyst_head" + normalmap "obj/misc/analyst1_body_N" +} +shader "obj/misc/analyst_view" +{ + specular $alpha + + diffusemap "obj/misc/analyst_view" + normalmap "obj/misc/analyst1_body_N" +} +shader "obj/misc/analyst1_body" +{ + castshadow + specular $alpha + + diffusemap "obj/misc/analyst1_body_C" + normalmap "obj/misc/analyst1_body_N" +} + +shader "textures/common/bluescreen" +{ + surfparm nolightmap + effect "bluescreen" +} + + +shader "obj/misc/DvereTest" +{ + specular $alpha + + diffusemap "obj/misc/DvereTest" + normalmap "obj/parts/pvc00_n" +} + +shader "obj/editarrow" +{ + layer "obj/weapons/streak" + tex0 = layer 0 + effect "nolightmap" +} + +// *** STATIC DISPLAYS + +shader "textures/misc/display01static" +{ +//castshadow + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm castshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap "textures/misc/display01_bcg" alpha +} + +shader "textures/misc/display02static" +{ +//castshadow + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm castshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap "textures/misc/display02_bcg" alpha +} + +shader "textures/misc/display03static" +{ +//castshadow + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm castshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap "textures/misc/display03_bcg" alpha +} + +shader "textures/misc/display04static" +{ +//castshadow + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm castshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap "textures/misc/display04_bcg" alpha +} + +shader "textures/misc/display05static" +{ +//castshadow + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm castshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap "textures/misc/display05_bcg" alpha +} + + +// *** STATIC DECALS *** + +shader "textures/decals/blood01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + tesssize 72 + + sort mark + alphatest 1 + map noambient + + blend srccolor zero + diffusemap "textures/decals/blood1" alpha +} + +shader "textures/decals/blood02" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + tesssize 72 + + sort mark + alphatest 1 + map noambient + + blend srccolor zero + diffusemap "textures/decals/blood2" alpha +} + +shader "textures/decals/blood03" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + tesssize 72 + + sort mark + alphatest 1 + map noambient + + blend srccolor zero + diffusemap "textures/decals/blood3" alpha +} + +shader "textures/decals/blood04" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + tesssize 72 + + sort mark + alphatest 1 + map noambient + + blend srccolor zero + diffusemap "textures/decals/blood4" alpha +} + +shader "textures/decals/DecDirt_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + tesssize 72 + + sort mark + alphatest 1 + blend invsrcalpha srcalpha + + diffusemap "textures/decals/DecDirt_01_c" alpha +} + +shader "textures/decals/DecDirt_02" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + tesssize 72 + + sort mark + alphatest 1 + blend invsrcalpha srcalpha + + diffusemap "textures/decals/DecDirt_02_c" alpha +} + +shader "textures/decals/DecDirt_03" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + tesssize 72 + + sort mark + alphatest 1 + //specular $alpha + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/DecDirt_03_c" alpha + normalmap "textures/decals/DecDirt_03_n" alpha +} + +shader "textures/decals/DecDirt_04" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + tesssize 36 + + sort mark + alphatest 1 + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/DecDirt_04_c" alpha +} + +shader "textures/decals/DecOil_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + tesssize 72 + + sort mark + specular $alpha + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/DecOil_01_c" alpha + normalmap "textures/decals/DecOil_01_n" alpha +} + + +// *** SIGNS *** + +shader "textures/misc/sign_storagea" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/sign_storagea" alpha +} + +shader "textures/misc/sign_storageb" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/sign_storageb" alpha +} + +shader "textures/misc/sign_quartersa" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/sign_quartersa" alpha +} + +shader "textures/misc/sign_freightcontrola" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/sign_freightcontrola" alpha +} + + +shader "textures/misc/sign_fridge1" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/sign_fridge1" alpha +} + +shader "textures/misc/sign_fridge2" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/sign_fridge2" alpha +} + +shader "textures/misc/sign_relaxa" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/sign_relaxa" alpha +} + + +shader "textures/misc/sign_keepout" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + surfparm nolightmap + +sort mark + + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap "textures/misc/sign_keepout" +} + +shader "textures/misc/sign_keepoutcross" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + surfparm nolightmap + +sort mark + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap "textures/misc/sign_keepoutcross" +} + + + +shader "textures/misc/stripe_white" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/stripe_white" alpha +} + +shader "textures/misc/stripe_blue" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/stripe_blue" alpha +} + +shader "textures/decals/papers1" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/papers_01_c" alpha +} + +shader "textures/decals/papers2" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/papers_02_c" alpha +} + +shader "textures/misc/posters1" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/posters1" alpha +} + +shader "textures/misc/posters2" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/posters2" alpha +} + +shader "textures/misc/posters3" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/posters3" alpha +} + +shader "textures/decals/Num_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/Num_01_c" alpha +} + +shader "textures/decals/Num_01a" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/Num_01a_c" alpha +} + +shader "textures/decals/Num_02" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/Num_02_c" alpha +} + +shader "textures/decals/Num_02a" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +sort mark + + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/Num_02a_c" alpha +} + +shader "textures/decals/SignCaution_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/SignCaution_01_c" alpha +} + +shader "textures/decals/SignCaution_02" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/SignCaution_02_c" alpha +} + +shader "textures/decals/SignStep_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/SignStep_01_c" alpha +} + +shader "textures/decals/SignStep_02" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/SignStep_02_c" alpha +} + +shader "textures/decals/TrimYellow_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/TrimYellow_01_c" alpha +} + +shader "textures/decals/TrimYellow_02" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/TrimYellow_02_c" alpha +} + +shader "textures/decals/TrimRed_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + sort mark + blend invsrcalpha srcalpha + diffusemap "textures/decals/TrimRed_01_c" alpha +} + +shader "textures/decals/TrimBlue_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + sort mark + blend invsrcalpha srcalpha + diffusemap "textures/decals/TrimBlue_01_c" alpha +} + +shader "textures/decals/TrimGreen_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + sort mark + blend invsrcalpha srcalpha + diffusemap "textures/decals/TrimGreen_01_c" alpha +} + +shader "textures/decals/TrimBlack_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + sort mark + blend invsrcalpha srcalpha + diffusemap "textures/decals/TrimBlack_01_c" alpha +} + +shader "textures/decals/TrimWhite_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/TrimWhite_01_c" alpha +} + + +shader "textures/decals/Blood_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +tesssize 72 + +sort mark + + //specular $alpha + + blend invsrcalpha srcalpha + + //diffusemap "textures/decals/blood1" alpha + diffusemap "textures/decals/DecBlood_01_c" alpha + //normalmap "textures/decals/DecBlood_01_n" alpha +} + +shader "textures/decals/Blood_02" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +tesssize 72 + +sort mark + //specular $alpha + + blend invsrcalpha srcalpha + //diffusemap "textures/decals/blood2" alpha + diffusemap "textures/decals/DecBlood_02_c" alpha + //normalmap "textures/decals/DecBlood_02_n" alpha +} + +shader "textures/decals/Waste_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +tesssize 72 + +sort mark + //specular $alpha + + blend invsrcalpha srcalpha + diffusemap "textures/decals/Waste_01_c" alpha + //normalmap "textures/decals/Waste_01_n" alpha +} + +shader "textures/decals/Waste_02" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + +tesssize 72 + +sort mark + //specular $alpha + + blend invsrcalpha srcalpha + diffusemap "textures/decals/Waste_02_c" alpha + normalmap "textures/decals/Waste_02_n" alpha +} + +shader "textures/misc/warnlight_pressure" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + diffusemap + anim 1 + "textures/misc/warnlight_pressurea" + "textures/misc/warnlight_pressureb" + + qer_editorimage "textures/misc/warnlight_pressurea" +} + + + +shader "textures/backgrounds/Industry01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + tesssize 72 + + sort translucent + //specular $alpha + + blend invsrcalpha srcalpha + map nolight + alphatest 24 + + diffusemap "textures/backgrounds/Industry01_c" alpha +// normalmap "textures/backgrounds/Industry01_n" alpha +} + +shader "textures/misc/font01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + sort mark + + blend invsrcalpha srcalpha + + diffusemap "textures/misc/font01" alpha +} + +shader "textures/decals/SignDoNotBlock_01" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + + blend invsrcalpha srcalpha + + diffusemap "textures/decals/SignDoNotBlock_01_c" alpha +} diff --git a/Alpha Prime/Mod/shaders/mudgore.h b/Alpha Prime/Mod/shaders/mudgore.h new file mode 100644 index 0000000..e69de29 diff --git a/Alpha Prime/Mod/shaders/obj.h b/Alpha Prime/Mod/shaders/obj.h new file mode 100644 index 0000000..2e35556 --- /dev/null +++ b/Alpha Prime/Mod/shaders/obj.h @@ -0,0 +1,156 @@ +shader "obj/hackbox" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nodrop + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + + diffusemap "obj/hackbox" +} + +//UNIVERZALNI SHADER ( POUZE PRO TESTOVACI UCELY!!!!!!!!!!) +shader "kov" +{ + layer "textures/steel/kov" + tex0 = layer 0 + effect "nolightmap" +} + + +// efx - vybuch granatometu + +shader "obj/fx/explo" +{ + cull none + layer "obj/fx/explo" + + //pass 0 + //vcmod SCALE g_iScaleTcMod + + tex0 = layer 0 + tfac = (_eclass TFactor) + effect "effect_glow" + +} +shader "obj/weapons/future/future" +{ + + layer "obj/weapons/future/future" + tex0 = layer 0 + effect "nolightmap" +} + + + +// vehicles + +shader "obj/vehicles/buggy_01" +{ + castshadow + specular $nmapalpha + specularpower 0.23 + diffusemap "obj/vehicles/buggy_01_c" + normalmap "obj/vehicles/buggy_01_n" alpha +} + +shader "obj/vehicles/truck_01" +{ + castshadow + specular $nmapalpha + specularpower 0.23 + diffusemap "obj/vehicles/truck_01_c" + normalmap "obj/vehicles/truck_01_n" alpha +} + +shader "obj/vehicles/dropship_01a" +{ + specular $nmapalpha + specularpower 0.23 + diffusemap "obj/vehicles/dropship_01a_c" + normalmap "obj/vehicles/dropship_01a_n" alpha +} + +shader "obj/vehicles/dropship_01b" +{ + specular $nmapalpha + specularpower 0.53 + diffusemap "obj/vehicles/dropship_01b_c" + normalmap "obj/vehicles/dropship_01b_n" alpha +} + +shader "obj/vehicles/plates" +{ +castshadow + specular $nmapalpha + specularpower 0.53 + diffusemap "obj/vehicles/dropship_plate_c" + normalmap "obj/vehicles/dropship_plate_n" alpha +} + +shader "obj/vehicles/transporter_01" +{ +// castshadow + specular $nmapalpha + specularpower 0.53 + diffusemap "obj/vehicles/transporter_01_c" + normalmap "obj/vehicles/transporter_01_n" alpha +} + +shader "obj/vehicles/transporter_02" +{ +// castshadow + specular $nmapalpha + specularpower 0.53 + diffusemap "obj/vehicles/transporter_02_c" + normalmap "obj/vehicles/transporter_02_n" alpha +} + +shader "obj/vehicles/transporter_03" +{ + castshadow + specular $nmapalpha + specularpower 0.53 + diffusemap "obj/vehicles/transporter_03_c" + normalmap "obj/vehicles/transporter_03_n" alpha +} + +shader "obj/vehicles/loader" +{ + castshadow + specular $nmapalpha + specularpower 0.53 + diffusemap "obj/vehicles/loader_c" + normalmap "obj/vehicles/loader_n" alpha +} + +shader "obj/vehicles/capsule_01" +{ + specular $nmapalpha + specularpower 0.53 + diffusemap "obj/vehicles/capsule_01_c" + normalmap "obj/vehicles/capsule_01_n" alpha +} + +shader "obj/vehicles/capsule_decal" +{ + surfparm trans + surfparm nonsolid + surfparm nocastshadow + surfparm detail + + +sort mark + + blend invsrcalpha srcalpha + + diffusemap "obj/vehicles/capsule_decal" alpha +} diff --git a/Alpha Prime/Mod/shaders/obj_creatures.h b/Alpha Prime/Mod/shaders/obj_creatures.h new file mode 100644 index 0000000..457765d --- /dev/null +++ b/Alpha Prime/Mod/shaders/obj_creatures.h @@ -0,0 +1,1098 @@ +shader "WarenEye" +{ + surfparm flesh + surfparm nomarks + + diffusemap "obj/creatures/waren/WarenEye" +} + +shader "OlivierEye" +{ + surfparm flesh + surfparm nomarks + + diffusemap "obj/creatures/commander/OlivierEye" +} + +shader "LiviaEye" +{ + surfparm flesh + surfparm nomarks + + diffusemap "obj/creatures/livia/LiviaEye" +} + +shader "Eye" +{ + surfparm flesh + surfparm nomarks + + diffusemap "obj/creatures/arnold/eye" +} + +shader "EyeHubb" +{ + map nolight + + surfparm flesh + surfparm nomarks + + diffusemap "obj/creatures/arnold/eyehubb" +} + +shader "EyeShadowHubb" +{ + surfparm flesh + surfparm trans + surfparm nomarks + + specular 1 + specularpower 0.81 + + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/creatures/arnold/EyeShadowHubb" alpha +} + +shader "EyeShadow" +{ + surfparm flesh + surfparm trans + surfparm nomarks + + specular 1 + specularpower 0.8 + + blend invsrcalpha srcalpha + sort translucent + + diffusemap "obj/creatures/arnold/EyeShadow" alpha +} + +shader "boss" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.512 + + diffusemap "obj/creatures/boss/boss_c" + normalmap "obj/creatures/boss/boss_n" alpha +} + +shader "deaddown" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.51 + + diffusemap "obj/creatures/Deaddown/deaddown_c" + normalmap "obj/creatures/Deaddown/deaddown_n" alpha +} + +shader "deadupper" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.51 + + diffusemap "obj/creatures/DeadUpper/DeadUpper_c" + normalmap "obj/creatures/DeadUpper/DeadUpper_n" alpha +} + +shader "dead02_head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/dead02/dead02_head_c" + normalmap "obj/creatures/dead02/dead02_head_n" alpha +} + +shader "dead02" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.51 + + diffusemap "obj/creatures/dead02/dead02_c" + normalmap "obj/creatures/dead02/dead02_n" alpha +} + +shader "prospector_head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/prospector/prospector_head_c" + normalmap "obj/creatures/prospector/prospector_head_n" alpha +} + +shader "prospector" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.51 + + diffusemap "obj/creatures/prospector/prospector_c" + normalmap "obj/creatures/prospector/prospector_n" alpha +} + +shader "guard_helmet_visor" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.512 + + reflection $nmapalpha +// fresnel 0.501 + envmap $nearestcube + + diffusemap "obj/creatures/guard/guard_helmet_c" + normalmap "obj/creatures/guard/guard_helmet_n" alpha +} + +shader "guard_helmet" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.512 + reflection $nmapalpha + fresnel 0.501 + envmap $nearestcube + + diffusemap "obj/creatures/guard/guard_helmet_c" + normalmap "obj/creatures/guard/guard_helmet_n" alpha +} +shader "Guard_NpcHead" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.512 + + diffusemap "obj/creatures/guard/Guard_NpcHead_c" + normalmap "obj/creatures/guard/Guard_NpcHead_n" alpha +} + +shader "guard" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.51 + reflection $nmapalpha + reflectiontint "90 90 90" + + fresnel 0.5 + envmap $nearestcube + + diffusemap "obj/creatures/guard/guard_c" + normalmap "obj/creatures/guard/guard_n" alpha +} + +shader "guard2" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.51 + reflection $nmapalpha + fresnel 0.5 + reflectiontint "90 90 90" + envmap $nearestcube + + diffusemap "obj/creatures/guard/guard2_c" + normalmap "obj/creatures/guard/guard_n" alpha +} + +shader "guard2_intro" +{ + surfparm flesh + castshadow + noselfshadow + + cull none + specular $nmapalpha + specularpower 0.51 + reflection $nmapalpha + fresnel 0.5 + reflectiontint "90 90 90" + envmap $nearestcube + + diffusemap "obj/creatures/guard/guard2_c" + normalmap "obj/creatures/guard/guard_n" alpha +} + + +shader "warenHead" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/waren/waren_Head_c" + normalmap "obj/creatures/waren/waren_Head_n" alpha +} + +shader "waren" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.411 + + diffusemap "obj/creatures/waren/waren_c" + normalmap "obj/creatures/waren/waren_n" alpha +} + +shader "arnold" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.411 + + diffusemap "obj/creatures/arnold/arnold_c" + normalmap "obj/creatures/arnold/arnold_n" alpha +} +shader "arnoldHead" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/arnold/arnold_Head_c" + normalmap "obj/creatures/arnold/arnold_Head_n" alpha +} + +shader "liv" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.41 + + reflection $nmapalpha + reflectiontint "90 90 90" + fresnel 0.5 + envmap $nearestcube + + diffusemap "obj/creatures/Livia/Liv_C" + normalmap "obj/creatures/Livia/Liv_N" alpha +} + +shader "liv_head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.4 + + diffusemap "obj/creatures/Livia/Liv_Head_C" + normalmap "obj/creatures/Livia/Liv_Head_N" alpha +} + +shader "liv_rohovina" +{ + surfparm flesh + + cull none + specular 0 + blend invsrcalpha srcalpha + sort translucent + + + diffusemap "obj/creatures/Livia/Liv_Head_C" alpha + normalmap "obj/creatures/Livia/Liv_Head_N" +} + +shader "Technicist" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.51 + + diffusemap "obj/creatures/Technicist/Technicist_c" + normalmap "obj/creatures/Technicist/Technicist_n" alpha +} + +shader "Technicist2" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.51 + + diffusemap "obj/creatures/Technicist/Technicist_a_c" + normalmap "obj/creatures/Technicist/Technicist_n" alpha +} + +shader "Technicist_Head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/Technicist/Technicist_Head_c" + normalmap "obj/creatures/Technicist/Technicist_Head_n" alpha +} + +shader "Technicist2Head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/Technicist2/Technicist2Head_c" + normalmap "obj/creatures/Technicist2/Technicist2Head_n" alpha +} + +shader "Technicist3Head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/Technicist3/Technicist3Head_c" + normalmap "obj/creatures/Technicist3/Technicist3Head_n" alpha +} + +shader "Technicist4Head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/Technicist4/Technicist4Head_c" + normalmap "obj/creatures/Technicist4/Technicist4Head_n" alpha +} + +shader "LightTrooperHelmet" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.511 + + diffusemap "obj/creatures/lighttrooper/helmet_c" + normalmap "obj/creatures/lighttrooper/helmet_n" alpha +} + +//TODO: je tento suface pouzit, kdyz ma na hlave helmu? +shader "LightTrooperHead" +{ + surfparm flesh + castshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/lighttrooper/lighttrooperHead_c" + normalmap "obj/creatures/lighttrooper/lighttrooperHead_n" alpha +} + +shader "LightTrooper" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.512 + + diffusemap "obj/creatures/lighttrooper/lighttrooper_c" + normalmap "obj/creatures/lighttrooper/lighttrooper_n" alpha +} + +shader "LightTrooper2" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.512 + +// reflection $nmapalpha +// fresnel 0.501 +// envmap $nearestcube + + diffusemap "obj/creatures/lighttrooper/lighttrooper2_c" + normalmap "obj/creatures/lighttrooper/lighttrooper_n" alpha +} + +shader "LightTrooperHelmet2" +{ + surfparm metal + //castshadow + //noselfshadow + specular $nmapalpha + specularpower 0.511 + +// reflection $nmapalpha +// fresnel 0.501 +// envmap $nearestcube + + diffusemap "obj/creatures/lighttrooper/helmet2_c" + normalmap "obj/creatures/lighttrooper/helmet_n" alpha +} + +shader "LightTrooper3" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.512 + + diffusemap "obj/creatures/lighttrooper/lighttrooper3_c" + normalmap "obj/creatures/lighttrooper/lighttrooper3_n" alpha +} + +shader "LightTrooperHelmet3" +{ + surfparm metal + //castshadow + //noselfshadow + specular $nmapalpha + specularpower 0.512 + + diffusemap "obj/creatures/lighttrooper/helmet3_c" + normalmap "obj/creatures/lighttrooper/helmet3_n" alpha +} +shader "heavycommander" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.37 + +// reflection 0.251 +// fresnel 0.501 +// envmap $nearestcube + + diffusemap "obj/creatures/heavycommander/heavycommander_c" + normalmap "obj/creatures/heavycommander/heavycommander_n" alpha +} + +shader "heavycommander2" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.511 + +// reflection 0.251 +// fresnel 0.501 +// envmap $nearestcube + + diffusemap "obj/creatures/heavycommander/heavycommander_c" + normalmap "obj/creatures/heavycommander/heavycommander_n" alpha +} + +shader "heavycommanderHead" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/heavycommander/heavycommanderHead_c" + normalmap "obj/creatures/heavycommander/heavycommanderHead_n" alpha +} + +shader "heavycommander2Head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/heavycommander2/heavycommander2Head_c" + normalmap "obj/creatures/heavycommander2/heavycommander2Head_n" alpha +} + +shader "CommanderHead" +{ + surfparm flesh + castshadow + noselfshadow + specular $nmapalpha + specularpower 0.75 + +// reflection 0.25 +// fresnel 0.5 +// envmap $nearestcube + + diffusemap "obj/creatures/commander/commanderHead_c" + normalmap "obj/creatures/commander/commanderHead_n" alpha +} + +shader "Commander" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.37 + + // reflection 0.25 + // fresnel 0.501 + // envmap $nearestcube + + diffusemap "obj/creatures/commander/commander_c" + normalmap "obj/creatures/commander/commander_n" alpha +} + +shader "HeavyTrooper" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.37 + +// reflection 0.251 +// fresnel 0.501 +// envmap $nearestcube + + diffusemap "obj/creatures/Heavytrooper/Heavytrooper_c" + normalmap "obj/creatures/Heavytrooper/Heavytrooper_n" alpha +} + +shader "HeavyTrooper2" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.37 + +// reflection 0.251 +// fresnel 0.501 +// envmap $nearestcube + + diffusemap "obj/creatures/Heavytrooper/Heavytrooper_a_c" + normalmap "obj/creatures/Heavytrooper/Heavytrooper_n" alpha +} + +shader "HeavyTrooperHelmet" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.511 + +// reflection $nmapalpha +// fresnel 0.501 +// envmap $nearestcube + + diffusemap "obj/creatures/lighttrooper/helmet_c" + normalmap "obj/creatures/lighttrooper/helmet_n" alpha +} + +shader "HeavyTrooperHelmet2" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.511 + + diffusemap "obj/creatures/lighttrooper/helmet2_c" + normalmap "obj/creatures/lighttrooper/helmet_n" alpha +} + +shader "player_eyeR" +{ + specular $nmapalpha + specularpower 0.8 + surfparm nomarks + + diffusemap "obj/creatures/morphhead/eye_c" + normalmap "obj/creatures/morphhead/eye_n" alpha +} +shader "player_eyeL" +{ + specular $nmapalpha + specularpower 0.8 + surfparm nomarks + + diffusemap "obj/creatures/morphhead/eye_c" + normalmap "obj/creatures/morphhead/eye_n" alpha +} +shader "player_body" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.511 + + diffusemap "obj/creatures/player/player_body_c" + normalmap "obj/creatures/player/player_body_n" alpha +} +shader "player_head" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.5 + + diffusemap "obj/creatures/player/player_head_c" + normalmap "obj/creatures/player/player_head_n" alpha +} +shader "player_hand" +{ + surfparm flesh + specular $nmapalpha + specularpower 0.51 + + diffusemap "obj/creatures/player/player_hand_c" + normalmap "obj/creatures/player/player_hand_n" alpha +} + +shader "servicebot_01" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.53 + + diffusemap "obj/creatures/servicebot01/servicebot_01_c" alpha + normalmap "obj/creatures/servicebot01/servicebot_01_n" alpha +} + +shader "servicebot_01_Wire" +{ + surfparm metal + surfparm nomarks + + specular $nmapalpha + cull none + alphatest 126 + specularpower 0.52 + + diffusemap "obj/creatures/servicebot01/servicebot_01_c" alpha + normalmap "obj/creatures/servicebot01/servicebot_01_n" alpha +} + +shader "servicebot_02" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + specularpower 0.531 + + diffusemap "obj/creatures/servicebot01/servicebot_01b_c" alpha + normalmap "obj/creatures/servicebot01/servicebot_01b_n" alpha +} + +shader "servicebot_02_Wire" +{ + surfparm metal + surfparm nomarks + + specular $nmapalpha + cull none + alphatest 126 + specularpower 0.52 + + diffusemap "obj/creatures/servicebot01/servicebot_01b_c" alpha + normalmap "obj/creatures/servicebot01/servicebot_01b_n" alpha +} + + +shader "obj/creatures/corpses/pants" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + + diffusemap "obj/creatures/corpses/pants_c" + normalmap "obj/creatures/corpses/pants_n" alpha +} +shader "obj/creatures/corpses/shirt" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + + diffusemap "obj/creatures/corpses/shirt_c" + normalmap "obj/creatures/corpses/shirt_n" alpha +} +shader "obj/creatures/corpses/skin" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + + diffusemap "obj/creatures/corpses/skin_c" + normalmap "obj/creatures/corpses/skin_n" alpha + +} +shader "obj/creatures/corpses/pants_service" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + + diffusemap "obj/creatures/corpses/pants_service_c" + normalmap "obj/creatures/corpses/pants_service_n" alpha +} + +shader "obj/creatures/corpses/shirt_service" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + + diffusemap "obj/creatures/corpses/shirt_service_c" + normalmap "obj/creatures/corpses/shirt_service_n" alpha +} + +shader "obj/creatures/corpses/hat_service" +{ + surfparm flesh + castshadow + noselfshadow + + specular $nmapalpha + + diffusemap "obj/creatures/corpses/hat_service_c" + normalmap "obj/creatures/corpses/hat_service_n" alpha +} + + +shader "SecuritySpider01" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + + diffusemap "obj/creatures/securityspider01/securityspider01_c" + normalmap "obj/creatures/securityspider01/securityspider01_n" alpha +} + + +shader "dron01" +{ + surfparm metal + castshadow //zatim, nez se opravi geometrie + //noselfshadow + specular $nmapalpha + + specularpower 0.54 + + diffusemap "obj/creatures/dron01/dron01_c" alpha + normalmap "obj/creatures/dron01/dron01_n" alpha +} + +shader "dron01_bright" +{ + surfparm nomarks + map nolight + color creature_dron iColorBright + + diffusemap "obj/creatures/dron01/dron01_c" alpha +} + +shader "dron01_flare1" +{ + zwrite false + sort translucent + cull none + blend one srcalpha + map nolight + color creature_dron iColorFlare1 + diffusemap "textures/efx/coronalens" alpha +} +shader "dron01_flare2" +{ + zwrite false + sort translucent + cull none + blend one srcalpha + map nolight + color creature_dron iColorFlare2 + + diffusemap "textures/efx/coronalens" alpha +} +shader "dron01_flare3" +{ + zwrite false + sort translucent + cull none + blend one srcalpha + map nolight + color creature_dron iColorFlare3 + + diffusemap "textures/efx/coronalens" alpha +} +shader "dron01_eye" +{ + zwrite false + sort translucent + cull none + blend one srcalpha + map nolight + color creature_dron iColorEye + + pass + tcmod rotate g_fTime 0 0 + + diffusemap "textures/efx/coronalens" alpha +} +shader "dron01_engine" +{ + zwrite false + sort translucent + cull none + blend one srcalpha + + map nolight + + color creature_dron iColorEngine + + diffusemap "textures/efx/coronalens" alpha +} + +shader "dron01_wires" +{ + surfparm nomarks + cull none + alphatest 128 + + diffusemap "obj/creatures/dron01/dron01_c" alpha +} + +shader "dron01_hit" +{ + surfparm nomarks + zwrite false + sort translucent + cull none + blend one one + color _eclass Color + + map nolight + diffusemap "obj/creatures/dron01/hitglare" +} + +shader "heavyspider01_hit" +{ + surfparm nomarks + zwrite false + sort translucent + cull none + blend one one + color _eclass Color + + map nolight + diffusemap "obj/creatures/heavyspider01/hitglare" +} + + +shader "baldur_head" +{ + surfparm flesh + specular $alpha +castshadow + diffusemap "obj/creatures/baldur/baldur_head_c" alpha +} + +shader "baldur_shirt" +{ + surfparm flesh + specular $nmapalpha + diffusemap "obj/creatures/baldur/baldur_shirt_c" + normalmap "obj/creatures/baldur/baldur_shirt_n" alpha +} + +shader "analyst2" +{ + castshadow + noselfshadow + + specular $nmapalpha + + diffusemap "obj/creatures/analyst2/analyst2_c" alpha + normalmap "obj/creatures/analyst2/analyst2_n" alpha +} +shader "analyst2_view" +{ + surfparm trans + specular 1 + specularpower 0.9 + + zwrite false + cull none + blend invsrcalpha srcalpha + //blend one srcalpha + sort translucent + + diffusemap "obj/creatures/analyst2/analyst2_c" alpha + //normalmap "textures/glass/glass1_n" +} + + + +shader "heavyspider01head" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + + specularpower 0.301 + diffusemap "obj/creatures/heavyspider01/heavyspider01head_c" + normalmap "obj/creatures/heavyspider01/heavyspider01head_n" +} + + + +shader "heavyspider01legs" +{ + surfparm metal + castshadow + noselfshadow + + specular $alpha + specularpower 0.321 + + diffusemap "obj/creatures/heavyspider01/heavyspider01legs_c" + normalmap "obj/creatures/heavyspider01/heavyspider01legs_n" +} + +shader "robotheadtest" +{ + surfparm metal + castshadow + noselfshadow + + specular $nmapalpha + + specularpower 0.30 + diffusemap "obj/creatures/robot/robothead_c" +// diffusemap "obj/creatures/robot/grey" + normalmap "obj/creatures/robot/robothead_n" +} + + +shader "spacesuit" +{ + surfparm flesh + castshadow + noselfshadow + + specular $alpha + specularpower 0.33 + + diffusemap "obj/creatures/spacesuit/spacesuit_c" + normalmap "obj/creatures/spacesuit/spacesuit_n" +} + diff --git a/Alpha Prime/Mod/shaders/obj_physics.h b/Alpha Prime/Mod/shaders/obj_physics.h new file mode 100644 index 0000000..f50873a --- /dev/null +++ b/Alpha Prime/Mod/shaders/obj_physics.h @@ -0,0 +1,641 @@ +shader "obj/physics/barrier_01" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/barrier_01_c" + normalmap "obj/physics/barrier_01_n" alpha +} + +shader "obj/physics/chair_03" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/chair_03_c" + normalmap "obj/physics/chair_03_n" alpha +} + +shader "obj/physics/chair_02" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/chair_02_c" + normalmap "obj/physics/chair_02_n" alpha +} + +shader "tin" +{ +castshadow + specular 1.0 + reflection 0.8 + fresnel 0.301 + + diffusemap "obj/physics/tinsphere" + envmap $nearestcube + normalmap "textures/trim/trimgrating1_n" alpha + //diffusemap "TEXTURES/misc/tin_c" +} + +shader "buggy" +{ + castshadow + specular $nmapalpha + specularpower 0.53 + diffusemap "obj/vehicles/transporter_02_c" + normalmap "obj/vehicles/transporter_02_n" alpha +} + + +shader "obj/physics/pack_01" +{ + castshadow + specular 0.2 + specularpower 0.92 + + diffusemap "obj/physics/pack_01_c" +} + +shader "obj/physics/offc_01" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/offc_01_c" + normalmap "obj/physics/offc_01_n" alpha +} + +shader "obj/physics/cooling_fan_01" +{ +// surfparm trans +// surfparm nomarks +// surfparm metal + + castshadow + specular $nmapalpha + specularpower 0.42 + + alphatest 126 + + diffusemap "obj/physics/cooling_fan_01_c" alpha + normalmap "obj/physics/cooling_fan_01_n" alpha +} + +shader "obj/physics/block_01" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/block_01_c" + normalmap "obj/physics/block_01_n" alpha +} + +shader "obj/physics/notebook_01" +{ + castshadow + specular $nmapalpha + specularpower 0.41 + + diffusemap "obj/physics/notebook_01_c" + normalmap "obj/physics/notebook_01_n" alpha +} + +shader "obj/physics/folder01a" +{ + castshadow + specular $nmapalpha + specularpower 0.41 + + diffusemap "obj/physics/folder01a_c" + normalmap "obj/physics/folder01_n" alpha +} + +shader "obj/physics/tool_c" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/tool_c_c" + normalmap "obj/physics/tool_c_n" alpha +} + +shader "obj/physics/tool_b" +{ + surfparm trans + surfparm nomarks + surfparm metal + + castshadow + specular $nmapalpha + specularpower 0.42 + + alphatest 126 + + diffusemap "obj/physics/tool_b_c" alpha + normalmap "obj/physics/tool_b_n" alpha +} + +shader "obj/physics/tool_a" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/tool_a_c" + normalmap "obj/physics/tool_a_n" alpha +} + +shader "obj/physics/barrel01" +{ + castshadow + specular $nmapalpha + specularpower 0.43 + + diffusemap "obj/physics/barrel01_c" + normalmap "obj/physics/barrel01_n" alpha +} + +shader "obj/physics/gas_bottle01" +{ + castshadow + specular $nmapalpha + specularpower 0.43 + + diffusemap "obj/physics/gas_bottle01_c" + normalmap "obj/physics/gas_bottle01_n" alpha +} + +shader "obj/physics/case2" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/physics/case2_c" + normalmap "obj/physics/case2_n" alpha +} + +shader "obj/physics/case1" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/physics/case01_c" + normalmap "obj/physics/case01_n" alpha +} + +shader "obj/physics/case1b" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/physics/case01a_c" + normalmap "obj/physics/case01_n" alpha +} + +//PhysX thousands debrises - cheapest as possible! +shader "debris" +{ + castshadow + //specular $nmapalpha + //cull none + + color (_eclass Color) + blend invsrcalpha srcalpha + + diffusemap "obj/physics/debris_c" +// normalmap "obj/physics/debris_n" alpha +} + +shader "obj/physics/debris" +{ + castshadow + specular $nmapalpha + cull none + + diffusemap "obj/physics/debris_c" + normalmap "obj/physics/debris_n" alpha +} + +shader "obj/physics/exstbox" +{ + specular $nmapalpha +castshadow + diffusemap "obj/physics/exstbox_c" + normalmap "obj/physics/exstbox_n" alpha +} + +shader "obj/physics/exstinquisher" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/physics/exstinquisher_c" + normalmap "obj/physics/exstinquisher_n" alpha +} + +shader "obj/physics/turbine_a" +{ + surfparm trans + surfparm nomarks + surfparm metal + + castshadow + specular $nmapalpha + specularpower 0.42 + + alphatest 126 + + diffusemap "obj/physics/turbine_a_c" alpha + normalmap "obj/physics/turbine_a_n" alpha +} + +shader "obj/physics/pillar1" +{ + castshadow + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal01_c" + normalmap "textures/trim/TrimMetal01_n" alpha +} + +shader "obj/physics/turbine_b" +{ + surfparm trans + surfparm nomarks + surfparm metal + + castshadow + specular $nmapalpha + specularpower 0.42 + + alphatest 126 + + diffusemap "obj/physics/turbine_b_c" alpha + normalmap "obj/physics/turbine_b_n" alpha +} + +shader "obj/physics/turbine_c" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/turbine_c_c" + normalmap "obj/physics/turbine_c_n" alpha +} + +shader "obj/physics/barbell2" +{ + surfparm trans + surfparm nomarks + surfparm metal + + castshadow + specular $nmapalpha + specularpower 0.42 + + alphatest 1 + + diffusemap "obj/physics/barbell2_c" + normalmap "obj/physics/barbell2_n" alpha +} + +shader "obj/physics/barbell1" +{ + surfparm trans + surfparm nomarks + surfparm metal + + castshadow + specular $nmapalpha + specularpower 0.42 + + alphatest 1 + + diffusemap "obj/physics/barbell1_c" + normalmap "obj/physics/barbell1_n" alpha +} + +shader "obj/physics/trashb_2" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/trashb_2_c" + normalmap "obj/physics/trashb_2_n" alpha +} + +shader "obj/physics/t_lamp" +{ + castshadow + specular $nmapalpha + specularpower 0.43 + + diffusemap "obj/physics/t_lamp_c" + normalmap "obj/physics/t_lamp_n" alpha +} + +shader "obj/physics/aplayer" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/aplayer_c" + normalmap "obj/physics/aplayer_n" alpha +} + +shader "obj/physics/enterance_panel1" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/enterance_panel1_c" + normalmap "obj/physics/enterance_panel1_n" alpha +} + +shader "obj/physics/enterance_panel2" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/enterance_panel2_c" + normalmap "obj/physics/enterance_panel2_n" alpha +} + +shader "obj/physics/thermos" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/thermos_c" + normalmap "obj/physics/thermos_n" alpha +} + +shader "obj/physics/plate" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/plate_c" + normalmap "obj/physics/plate_n" alpha +} + +shader "obj/physics/knife" +{ + surfparm trans + surfparm nomarks + surfparm metal + + specular $nmapalpha + specularpower 0.43 + + alphatest 16 +castshadow + diffusemap "obj/physics/knife_c" + normalmap "obj/physics/knife_n" alpha +} + +shader "obj/physics/fork" +{ + surfparm trans + surfparm nomarks + surfparm metal + + specular $nmapalpha + specularpower 0.43 + + alphatest 16 +castshadow + diffusemap "obj/physics/fork_c" + normalmap "obj/physics/fork_n" alpha +} + +shader "obj/physics/spoon" +{ + surfparm trans + surfparm nomarks + surfparm metal + + specular $nmapalpha + specularpower 0.43 + + alphatest 16 +castshadow + diffusemap "obj/physics/spoon_c" + normalmap "obj/physics/spoon_n" alpha +} + +shader "obj/physics/trashb_1" +{ + castshadow + specular $nmapalpha + specularpower 0.43 + + diffusemap "obj/physics/trashb_1_c" + normalmap "obj/physics/trashb_1_n" alpha +} + +shader "obj/physics/ash-cup" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/ash-cup_c" + normalmap "obj/physics/ash-cup_n" alpha +} + +shader "obj/physics/cigarettes" +{ + castshadow + specular $alpha + specularpower 0.77 + + diffusemap "obj/physics/cigarettes" alpha +} + +shader "obj/physics/boxik_2" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/boxik_2_c" + normalmap "obj/physics/boxik_2_n" alpha +} + +shader "obj/physics/boxik_2a" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/boxik_2a_c" + normalmap "obj/physics/boxik_2_n" alpha +} + +shader "obj/physics/boxik_2b" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/boxik_2b_c" + normalmap "obj/physics/boxik_2_n" alpha +} + +shader "obj/physics/k_table" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/k_table_c" + normalmap "obj/physics/k_table_n" alpha +} + +shader "obj/physics/boxik" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/boxik_a_c" + normalmap "obj/physics/boxik_a_n" alpha +} + +shader "obj/physics/boxik_b" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/boxik_b_c" + normalmap "obj/physics/boxik_b_n" alpha +} + +shader "obj/physics/boxik_c" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/boxik_c_c" + normalmap "obj/physics/boxik_c_n" alpha +} + +shader "obj/physics/rack1" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/rack1_c" + normalmap "obj/physics/rack1_n" alpha +} + +shader "obj/static/bkos" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/bkos_c" + normalmap "obj/static/bkos_n" alpha +} + +shader "obj/physics/bmic" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/physics/bmic_c" + normalmap "obj/physics/bmic_n" alpha +} + +shader "obj/sharedtextures/box" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/sharedtextures/box_c" + normalmap "obj/sharedtextures/box_n" alpha +} + +shader "obj/sharedtextures/can" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/sharedtextures/can_c" + normalmap "obj/sharedtextures/can_n" alpha +} + +shader "obj/sharedtextures/can2" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/sharedtextures/can2_c" + normalmap "obj/sharedtextures/can2_n" alpha +} + +shader "obj/sharedtextures/can2b" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/sharedtextures/can2b_c" + normalmap "obj/sharedtextures/can2_n" alpha +} + +shader "obj/sharedtextures/chair_01" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/sharedtextures/chair_01_c" + normalmap "obj/sharedtextures/chair_01_n" alpha +} + + +shader "obj/sharedtextures/fluidblue" +{ + map nolight + specular 1.0 + specularpower 0.23 + + //blend one one + diffusemap "obj/sharedtextures/fluidblue" +} + +shader "obj/sharedtextures/fluidorange" +{ + map nolight + specular 1.0 + specularpower 0.23 + + //blend one one + diffusemap "obj/sharedtextures/fluidorange" +} + +shader "obj/sharedtextures/lightwhite" +{ + map nolight + + diffusemap "obj/sharedtextures/lightwhite" +} + diff --git a/Alpha Prime/Mod/shaders/obj_physicsparts.h b/Alpha Prime/Mod/shaders/obj_physicsparts.h new file mode 100644 index 0000000..8dd06d1 --- /dev/null +++ b/Alpha Prime/Mod/shaders/obj_physicsparts.h @@ -0,0 +1,197 @@ +shader "obj/physicsparts/dipper_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/physicsparts/dipper_01_c" + normalmap "obj/physicsparts/dipper_01_n" alpha +} + +shader "obj/physicsparts/poster_01" +{ + + specular $nmapalpha + specularpower 0.41 + + diffusemap "obj/physicsparts/poster01_c" +} + +shader "obj/physicsparts/poster_01a" +{ + + specular $nmapalpha + specularpower 0.41 + + diffusemap "obj/physicsparts/poster01a_c" +} + +shader "obj/physicsparts/poster_01b" +{ + + specular $nmapalpha + specularpower 0.41 + + diffusemap "obj/physicsparts/poster01b_c" +} + +shader "obj/physicsparts/greenhouse_01" +{ + surfparm trans + surfparm nomarks + surfparm metal + cull none + castshadow + specular $nmapalpha + specularpower 0.42 + + alphatest 126 + + diffusemap "obj/physicsparts/greenhouse_01_c" alpha + normalmap "obj/physicsparts/greenhouse_01_n" alpha +} + +shader "obj/physicsparts/folder01" +{ + castshadow + specular $alpha + specularpower 0.41 + surfparm plastic + + diffusemap "obj/physicsparts/folder01_c" alpha +} + +shader "obj/physicsparts/folder01a" +{ + castshadow + specular $alpha + specularpower 0.41 + surfparm plastic + + diffusemap "obj/physicsparts/folder01a_c" alpha +} + +shader "obj/physicsparts/camera02" +{ + specular $nmapalpha + specularpower 0.42 + surfparm plastic +castshadow + diffusemap "obj/physicsparts/camera02_c" + normalmap "obj/physicsparts/camera02_n" alpha +} + +shader "obj/physicsparts/pipeventil" +{ + specular $nmapalpha + specularpower 0.42 + surfparm plastic +castshadow + diffusemap "obj/physicsparts/pipeventil_c" + normalmap "obj/physicsparts/pipeventil_n" alpha +} + +shader "camera01" +{ + specular $nmapalpha + surfparm plastic +castshadow + diffusemap "obj/physicsparts/camera01_c" + normalmap "obj/physicsparts/camera01_n" alpha +} + +shader "camera01_optika" +{ + map nolight + alphatest 128 + specular $nmapalpha + surfparm glass +castshadow + diffusemap "obj/physicsparts/optika_red_c" + normalmap "obj/physicsparts/optika_n" alpha +} + + +shader "robot_part" +{ + castshadow + specular $alpha + specularpower 0.33 + + diffusemap "obj/creatures/robot/robot_c" alpha + normalmap "obj/creatures/robot/robot_n" +} + + +shader "glassdebris" +{ + surfparm trans + surfparm glass + cull none + sort translucent + + specular 1.0 + zwrite false + blend invsrcalpha srcalpha + + diffusemap "textures/glass/brokenglass2" alpha +} + +shader "obj/physicsparts/DeviceDoor01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/physicsparts/DeviceDoor01_c" + normalmap "obj/physicsparts/DeviceDoor01_n" alpha +} + +shader "obj/physicsparts/DeviceDoor02" +{ + specular $nmapalpha +castshadow + diffusemap "obj/physicsparts/DeviceDoor02_c" + normalmap "obj/physicsparts/DeviceDoor02_n" alpha +} + +shader "obj/physicsparts/DeviceDoor03" +{ + specular $nmapalpha +castshadow + diffusemap "obj/physicsparts/DeviceDoor03_c" + normalmap "obj/physicsparts/DeviceDoor03_n" alpha +} + +shader "textures/wire/DeviceDoor04" +{ + surfparm trans + surfparm nomarks + surfparm metal +castshadow + specular $nmapalpha + specularpower 0.42 + + alphatest 16 + + diffusemap "obj/physicsparts/DeviceDoor04_c" + normalmap "obj/physicsparts/DeviceDoor04_n" alpha +} + +shader "obj/physicsparts/Board01" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + surfparm plastic + + diffusemap "obj/physicsparts/Board01_c" + normalmap "obj/physicsparts/Board01_n" alpha +} + +shader "obj/physicsparts/Board01a" +{ + castshadow + specular $nmapalpha + specularpower 0.42 + surfparm plastic + + diffusemap "obj/physicsparts/Board01a_c" + normalmap "obj/physicsparts/Board01_n" alpha +} diff --git a/Alpha Prime/Mod/shaders/obj_static.h b/Alpha Prime/Mod/shaders/obj_static.h new file mode 100644 index 0000000..cd8fb27 --- /dev/null +++ b/Alpha Prime/Mod/shaders/obj_static.h @@ -0,0 +1,1206 @@ + +shader "Medifurniture01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/Medifurniture01_c" + normalmap "obj/static/Medifurniture01_n" alpha + +} + +shader "MediScreen01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/MediScreen01_c" + normalmap "obj/static/MediScreen01_n" alpha + +} + +shader "MortuaryFridge01b" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/MortuaryFridge01b_c" + normalmap "obj/static/MortuaryFridge01b_n" alpha + +} + +shader "MortuaryFridge01a" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/MortuaryFridge01a_c" + normalmap "obj/static/MortuaryFridge01a_n" alpha + +} + + +shader "MortuaryTable01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/MortuaryTable01_c" + normalmap "obj/static/MortuaryTable01_n" alpha + +} + +shader "HospitalLight01" +{ + specular $nmapalpha + + diffusemap "obj/static/HospitalLight01_c" + normalmap "obj/static/HospitalLight01_n" alpha + +} + + +shader "HospitalBed01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/HospitalBed01_c" + normalmap "obj/static/HospitalBed01_n" alpha + +} + +shader "obj/static/tower01" +{ + specularpower 0.52 +castshadow + diffusemap "obj/static/tower01_c" + +} + + +shader "obj/static/AutomatCookies2" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/AutomatCookies2_c" + normalmap "obj/static/AutomatCookies2_n" alpha +} + +shader "obj/static/AutomatCookies1" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/AutomatCookies1_c" + normalmap "obj/static/AutomatCookies1_n" alpha +} + +shader "obj/static/WaterTank01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/WaterTank01_c" + normalmap "obj/static/WaterTank01_n" alpha +} + +shader "obj/static/LightTrooperHelmet" +{ + surfparm flesh + castshadow + specular $nmapalpha + specularpower 0.52 + surfparm nomarks + + diffusemap "obj/creatures/lighttrooper/helmet_c" + normalmap "obj/creatures/lighttrooper/helmet_n" alpha +} + +shader "obj/static/boot_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/boot_01_c" + normalmap "obj/static/boot_01_n" alpha +} +shader "obj/static/shoe_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/shoe_01_c" + normalmap "obj/static/shoe_01_n" alpha +} + +shader "obj/static/guard_helmet_visor" +{ + surfparm flesh + specular $nmapalpha + specularpower 0.52 +// surfparm nomarks +castshadow + reflection $nmapalpha + fresnel 0.5 + envmap $nearestcube + + diffusemap "obj/creatures/guard/guard_helmet_c" + normalmap "obj/creatures/guard/guard_helmet_n" alpha +} + + + + + +shader "obj/static/bar_stool_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/bar_stool_01_c" + normalmap "obj/static/bar_stool_01_n" alpha +} + +shader "obj/static/bed_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/bed_01_c" + normalmap "obj/static/bed_01_n" alpha +} + +shader "obj/static/deadLeg" +{ + surfparm flesh + castshadow + specular $nmapalpha + specularpower 0.52 + surfparm nomarks + + diffusemap "obj/static/DeadLeg_c" + normalmap "obj/static/DeadLeg_n" alpha +} + +shader "obj/static/valve_02" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/valve_02_c" + normalmap "obj/static/valve_02_n" alpha +} + +shader "deadhead" +{ + surfparm flesh + castshadow + specular $nmapalpha + specularpower 0.52 + surfparm nomarks + + diffusemap "obj/static/deadhead_c" + normalmap "obj/static/deadhead_n" alpha +} + + +shader "obj/static/t_table" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/t_table_c" + normalmap "obj/static/t_table_n" alpha +} + +shader "obj/static/device_04" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/device_04_c" + normalmap "obj/static/device_04_n" alpha +} + +shader "obj/static/generator2" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/generator2_c" + normalmap "obj/static/generator2_n" alpha +} + +shader "obj/static/HealthDevice" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/HealthDevice_c" + normalmap "obj/static/HealthDevice_n" alpha +} + +shader "obj/static/OxygenDevice" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/OxygenDevice_c" + normalmap "obj/static/OxygenDevice_n" alpha +} + +shader "obj/static/target_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/target_01_c" + normalmap "obj/static/target_01_n" alpha +} + +shader "obj/static/automat_01_light" +{ + specular 0.5 + map nolight + + diffusemap "obj/static/automat_01_c" +} + +shader "obj/static/automat_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/automat_01_c" + normalmap "obj/static/automat_01_n" alpha +} + +shader "obj/static/automat_01a_light" +{ + specular 0.5 + map nolight + + diffusemap "obj/static/automat_01a_c" +} + +shader "obj/static/automat_01a" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/automat_01a_c" + normalmap "obj/static/automat_01_n" alpha +} + +shader "obj/static/cdisplay_01_light" +{ + specular 0.5 + map nolight + + diffusemap "obj/static/cdisplay_01_c" +} + +shader "obj/static/cdisplay_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/cdisplay_01_c" + normalmap "obj/static/cdisplay_01_n" alpha +} + +shader "obj/static/casing_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/casing_01_c" + normalmap "obj/static/casing_01_n" alpha +} + +shader "obj/static/diagscanner_02" +{ + specular $nmapalpha + + diffusemap "obj/static/diagscanner_02_c" + normalmap "obj/static/diagscanner_02_n" alpha +} + +shader "obj/static/locker1" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/locker1_c" + normalmap "obj/static/locker1_n" alpha +} + +shader "obj/static/locker1a" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/locker1a_c" + normalmap "obj/static/locker1_n" alpha +} + +shader "obj/static/rack3" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/rack3_c" + normalmap "obj/static/rack3_n" alpha +} + +shader "obj/static/forge_low_cabels" +{ + surfparm trans + surfparm detail + surfparm nomarks + surfparm rubber +castshadow + specular $alpha + + cull none + alphatest 16 + + + diffusemap "obj/static/Forge_low_cabels_c" alpha + normalmap "obj/static/Forge_low_cabels_n" +} + +shader "obj/static/forge_low03" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/Forge_low03_c" + normalmap "obj/static/Forge_low03_n" alpha +} + +shader "obj/static/forge_low02" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/Forge_low02_c" + normalmap "obj/static/Forge_low02_n" alpha +} + +shader "obj/static/forge_low" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/Forge_low01_c" + normalmap "obj/static/Forge_low01_n" alpha +} + + +shader "obj/static/engine3" +{ + specular $nmapalpha + + diffusemap "obj/static/engine3_c" + normalmap "obj/static/engine3_n" alpha +} + +shader "obj/static/engine3a" +{ + specular $nmapalpha + + diffusemap "obj/static/engine3a_c" + normalmap "obj/static/engine3_n" alpha +} + +shader "obj/static/devices_01-03" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/devices_01-03_c" + normalmap "obj/static/devices_01-03_n" alpha +} + +shader "obj/static/electro_case02_lights" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + diffusemap + anim 1 + "obj/static/electro_case02_lights01_c" + "obj/static/electro_case02_lights02_c" + "obj/static/electro_case02_lights03_c" + + qer_editorimage "obj/static/electro_case02_lights" +} + +shader "obj/static/electro_case02" +{ + +castshadow + diffusemap "obj/static/electro_case02_c" + normalmap "obj/static/electro_case02_n" alpha +} + + +shader "obj/static/electro_case01_lights" +{ + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nocastshadow + surfparm detail + surfparm nolightmap + + sort translucent + map nolight + + blend one one//invsrcalpha srcalpha + diffusemap + anim 1 + "obj/static/electro_case01_lights01_c" + "obj/static/electro_case01_lights02_c" + "obj/static/electro_case01_lights03_c" + "obj/static/electro_case01_lights04_c" + + qer_editorimage "obj/static/electro_case01_lights" +} + + +shader "obj/static/electro_case01" +{ +castshadow + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/static/electro_case01_c" + normalmap "obj/static/electro_case01_n" alpha +} + +shader "obj/static/data_case" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/data_case_c" + normalmap "obj/static/data_case_n" alpha +} + + + +shader "obj/static/canister" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/canister_c" + normalmap "obj/static/canister_n" alpha +} + + + + +shader "obj/static/control_board_02" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/control_board_02_c" + normalmap "obj/static/control_board_02_n" alpha +} + +shader "obj/static/control_board_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/control_board_01_c" + normalmap "obj/static/control_board_01_n" alpha +} + +shader "obj/static/control_board_map" +{ + specular $nmapalpha + + diffusemap "obj/static/control_board_map_c" + normalmap "obj/static/control_board_map_n" alpha +} + +shader "obj/static/seat_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/seat_01_c" + normalmap "obj/static/seat_01_n" alpha +} + +shader "obj/static/armchair_01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/armchair_01_c" + normalmap "obj/static/armchair_01_n" alpha +} + +shader "obj/static/armchair_01a" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/armchair_01a_c" + normalmap "obj/static/armchair_01_n" alpha +} + +shader "obj/static/rlg" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/Railing_c" + normalmap "obj/static/Railing_n" alpha +} + +shader "obj/static/holder_hscreen_01" +{ + specular $nmapalpha + specularpower 0.41 + + diffusemap "obj/static/holder_hscreen_01_c" + normalmap "obj/static/holder_hscreen_01_n" alpha +} + +shader "obj/static/holder_01" +{ + specular $nmapalpha + specularpower 0.41 +castshadow + diffusemap "obj/static/holder_01_c" + normalmap "obj/static/holder_01_n" alpha +} + +shader "obj/static/control_table_04" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/control_table_04_c" + normalmap "obj/static/control_table_04_n" alpha +} + +shader "obj/static/control_table_04a" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/control_table_04a_c" + normalmap "obj/static/control_table_04a_n" alpha +} + +shader "obj/static/control_table_03" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/control_table_03_c" + normalmap "obj/static/control_table_03_n" alpha +} + + +shader "obj/static/control_table_01" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/control_table_01_c" + normalmap "obj/static/control_table_01_n" alpha +} + +shader "obj/static/washing_stand_01" +{ + specular $nmapalpha + specularpower 0.41 +castshadow + diffusemap "obj/static/washing_stand_01_c" + normalmap "obj/static/washing_stand_01_n" alpha +} + +shader "obj/static/urinal_01" +{ + specular $nmapalpha + specularpower 0.41 +castshadow + diffusemap "obj/static/urinal_01_c" + normalmap "obj/static/urinal_01_n" alpha +} + +shader "obj/static/health_box" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/health_box_c" + normalmap "obj/static/health_box_n" alpha +} + +shader "obj/static/crane01" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/crane01_c" + normalmap "obj/static/crane01_n" alpha +} + +shader "obj/static/emergency_kit_1" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/emergency_kit_1_c" + normalmap "obj/static/emergency_kit_1_n" alpha +} + +shader "obj/static/Venting4" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/Venting4_c" + normalmap "obj/static/Venting4_n" alpha +} + +shader "obj/static/Venting3" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/Venting3_c" + normalmap "obj/static/Venting3_n" alpha +} + +shader "obj/static/console01" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/console01_c" + normalmap "obj/static/console01_n" alpha +} + +shader "obj/static/engine1" +{ + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/static/engine01_c" + normalmap "obj/static/engine01_n" alpha +} + +shader "obj/columns/column_04" +{ + specular $nmapalpha + specularpower 0.41 + + diffusemap "obj/columns/column_04_c" + normalmap "obj/columns/column_04_n" alpha +} + +shader "obj/static/switch_device_1" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/switch_device_1_c" + normalmap "obj/static/switch_device_1_n" alpha +} + +shader "obj/static/fire_alarm" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/Alarm01_c" + normalmap "obj/static/Alarm01_n" alpha +} + +shader "obj/static/Control1" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/Control01_c" + normalmap "obj/static/Control01_n" alpha +} + +shader "obj/static/Control1a" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/Control01a_c" + normalmap "obj/static/Control01a_n" alpha +} + +shader "obj/static/Switch01" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/Switch01_c" + normalmap "obj/static/Switch01_n" alpha +} + +shader "obj/lights/Light_2" +{ + specular $nmapalpha + specularpower 0.42 + + diffusemap "obj/lights/Light_2_c" + normalmap "obj/lights/Light_2_n" alpha +} + +shader "obj/static/grideriron1" +{ + specular $nmapalpha + specularpower 0.43 +castshadow + diffusemap "obj/static/grideriron1_c" + normalmap "obj/static/grideriron1_n" alpha +} + +shader "obj/static/generdevice" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/generdevice01_c" + normalmap "obj/static/generdevice01_n" alpha +} + +shader "obj/static/generdevice_a" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/static/generdevice01a_c" + normalmap "obj/static/generdevice01a_n" alpha +} + +// meteorites!! +shader "obj/misc/meteorite" +{ + specular $nmapalpha + + surfparm nocastshadow + + map nolight + + diffusemap "obj/misc/meteorite_c" + normalmap "obj/misc/meteorite_n" alpha +} + + +// meteorites!! +shader "obj/misc/meteorite_NORM" +{ + specular $nmapalpha + specularpower 0.11 + + diffusemap "obj/misc/meteorite_c" + normalmap "obj/misc/meteorite_n" alpha +} + + +shader "obj/misc/meteorite_terrain" +{ + castshadow + specular $nmapalpha + specularpower 0.41 + + diffusemap "textures/misc/meteorite_terrain_c" + normalmap "obj/misc/meteorite_n" alpha +} + + + +shader "obj/static/rock1" +{ + specular $nmapalpha + + surfparm nocastshadow + + map nolight + + diffusemap "obj/misc/meteorite_c" + normalmap "obj/misc/meteorite_n" alpha +} + + +/* +shader "obj/static/rock1" +{ + specular $nmapalpha + specularpower 0.41 + + diffusemap "obj/static/rock1_c" + normalmap "obj/static/rock1_n" alpha +} +*/ + +shader "obj/static/fitness2" +{ + surfparm trans + surfparm nomarks + surfparm metal + + castshadow + specular $nmapalpha + specularpower 0.41 +castshadow + alphatest 1 + + diffusemap "obj/static/fitness2_c" + normalmap "obj/static/fitness2_n" alpha +} + +shader "obj/static/fitness1" +{ + castshadow + specular $nmapalpha + specularpower 0.41 +castshadow + diffusemap "obj/static/fitness1_c" + normalmap "obj/static/fitness1_n" alpha +} + +shader "obj/static/generator1" +{ + specular $nmapalpha + specularpower 0.41 +castshadow + diffusemap "obj/static/Generator01_c" + normalmap "obj/static/Generator01_n" alpha +} + +shader "obj/static/generator1a" +{ + specular $nmapalpha + specularpower 0.41 +castshadow + diffusemap "obj/static/Generator01a_c" + normalmap "obj/static/Generator01a_n" alpha +} + +shader "obj/static/generator1b" +{ + specular $nmapalpha + specularpower 0.41 +castshadow + diffusemap "obj/static/Generator01b_c" + normalmap "obj/static/Generator01_n" alpha +} + +shader "usable_display01" +{ + specular $nmapalpha + + diffusemap "obj/static/usedisp01_c" + normalmap "obj/static/usedisp01_n" alpha +} + +shader "usable_display01_display" +{ + surfparm detail + surfparm nomarks + + specular 0.2 + specularpower 0.32 + + map nolight + +#ifdef _XBOX + pass + tcmod shift 0.0 g_fTime10 + + diffusemap "obj/static/usedisp01_c" +#else + diffusemap $gui0 +#endif +} + + +shader "obj/static/cigamach" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/cigamach_c" + normalmap "obj/static/cigamach_n" alpha +} + +shader "obj/static/cigamach_light" +{ + specular 0.5 + map nolight + + diffusemap "obj/static/cigamach_c" +} + +shader "controltable01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/controltable01_c" + normalmap "obj/static/controltable01_n" alpha +} + +shader "obj/static/girder1a" +{ + specular $nmapalpha + specularpower 0.41 +castshadow + diffusemap "obj/static/girder1a_c" + normalmap "obj/static/girder1a_n" alpha +} + +shader "obj/physics/floorpanel1" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "TEXTURES/floor/floor1c_c" + normalmap "TEXTURES/floor/floor1c_n" alpha +} + +shader "display_ram01" +{ + specular $nmapalpha + + diffusemap "obj/static/display01_c" + normalmap "obj/static/display01_n" alpha +} + +shader "ceilgirder01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/ceilgirder01_c" + normalmap "obj/static/ceilgirder01_n" alpha +} + +shader "window01" +{ + specular $nmapalpha + + diffusemap "obj/static/window01_c" + normalmap "obj/static/window01_n" alpha +} + +shader "window01a" +{ + specular $nmapalpha + + diffusemap "obj/static/window01a_c" + normalmap "obj/static/window01_n" alpha +} + +shader "window01b" +{ + specular $nmapalpha + + diffusemap "obj/static/window01b_c" + normalmap "obj/static/window01_n" alpha +} + +shader "obj/sharedtextures/panels" +{ + specular $nmapalpha +castshadow + diffusemap "obj/sharedtextures/panels_c" + normalmap "obj/sharedtextures/panels_n" alpha +} + +shader "obj/static/venting" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/venting_c" + normalmap "obj/static/venting_n" alpha +} + +shader "obj/static/ventingfan" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/ventingfan_c" + normalmap "obj/static/ventingfan_n" alpha +} + +shader "obj/static/hatch_b" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/hatch_b_c" + normalmap "obj/static/hatch_n" alpha +} + +shader "obj/static/hatch" +{ + specular $nmapalpha +castshadow + diffusemap "obj/static/hatch_c" + normalmap "obj/static/hatch_n" alpha +} + +// *** LIGHTS *** + +shader "obj/Lights/LightCeil_01" +{ + specular $alpha + specularpower 0.623 + + diffusemap "obj/Lights/LightCeil_01_c" + normalmap "obj/Lights/LightCeil_01_n" +} + +shader "obj/Lights/LightCeil_02" +{ + specular $alpha + specularpower 0.623 + + diffusemap "obj/Lights/LightCeil_02_c" + normalmap "obj/Lights/LightCeil_02_n" +} + +shader "obj/Lights/LightCeil_03" +{ + specular $alpha + specularpower 0.623 + + diffusemap "obj/Lights/LightCeil_03_c" + normalmap "obj/Lights/LightCeil_03_n" +} + +shader "obj/lights/LightCeil_04" +{ + specular $nmapalpha + + specularpower 0.623 + + diffusemap "obj/lights/LightCeil_04_c" alpha + normalmap "obj/lights/LightCeil_04_n" alpha +} + + +// *** STATIC *** +shader "obj/static/container02b" +{ + specular $nmapalpha +castshadow + specularpower 0.42 + + diffusemap "obj/static/container02b_c" alpha + normalmap "obj/static/container02b_n" alpha +} + +shader "obj/static/container02a" +{ + specular $nmapalpha +castshadow + specularpower 0.42 + + diffusemap "obj/static/container02a_c" alpha + normalmap "obj/static/container02a_n" alpha +} + +// *** COLUMNS *** + +shader "obj/columns/column_01" +{ + + specular $nmapalpha + //specularpower 0.76 + specularpower 0.62 + diffusemap "obj/columns/column_01_c" + normalmap "obj/columns/column_01_n" +} + +shader "obj/columns/column_01b" +{ + + specular $nmapalpha + //specularpower 0.76 + specularpower 0.62 + diffusemap "obj/columns/column_01b_c" + normalmap "obj/columns/column_01_n" +} + +shader "obj/columns/column_02" +{ + + specular $nmapalpha + //specularpower 0.76 + specularpower 0.62 + diffusemap "obj/columns/column_02_c" + normalmap "obj/columns/column_02_n" +} + +shader "obj/columns/column_02a" +{ + + specular $nmapalpha + //specularpower 0.76 + specularpower 0.62 + diffusemap "obj/columns/column_02a_c" + normalmap "obj/columns/column_02_n" +} + +shader "obj/columns/column_03" +{ + + specular $nmapalpha + //specularpower 0.76 + specularpower 0.62 + diffusemap "obj/columns/column_03_c" + normalmap "obj/columns/column_03_n" +} + +shader "obj/columns/column_03_wire" +{ +castshadow + surfparm trans + surfparm detail + surfparm nomarks + surfparm metal + + specular $nmapalpha + + cull none + alphatest 2 + + diffusemap "textures/wire/fencing_c" + normalmap "textures/wire/fencing_n" alpha +} + +shader "obj/columns/Column_05" +{ + + specular $nmapalpha + //specularpower 0.76 + specularpower 0.62 + diffusemap "obj/columns/Column_05_c" + normalmap "obj/columns/Column_05_n" +} + +shader "obj/columns/Column_05a" +{ + + specular $nmapalpha + //specularpower 0.76 + specularpower 0.62 + diffusemap "obj/columns/Column_05a_c" + normalmap "obj/columns/Column_05_n" +} + + +shader "obj/sharedtextures/hose" +{ +castshadow + specular 0.504 + + diffusemap "obj/sharedtextures/hose_c" +} + +shader "obj/sharedtextures/rail" +{ + specular 0.504 + + diffusemap "obj/sharedtextures/rail_c" +} + +shader "obj/sharedtextures/rail2" +{ + specular 0.504 + + diffusemap "obj/sharedtextures/rail2_c" +} + + + + diff --git a/Alpha Prime/Mod/shaders/obj_terrain.h b/Alpha Prime/Mod/shaders/obj_terrain.h new file mode 100644 index 0000000..1ead532 --- /dev/null +++ b/Alpha Prime/Mod/shaders/obj_terrain.h @@ -0,0 +1,132 @@ +//basic default texture +shader "terrain/default" +{ + surfparm stone + + diffusemap "textures/terrain/default" +} + + +//kvuli radiantu +shader "textures/terrain/default" +{ + surfparm stone + + diffusemap "textures/terrain/default" +} + +shader "textures/terrain/rockbig1" +{ + tesssize 512 + surfparm stone + specular $nmapalpha + //parallaxscale 0.028 + specularpower 0.6 + + diffusemap "textures/terrain/RockBig_c" + normalmap "textures/terrain/RockBig_N" alpha + //heightmap "textures/terrain/RockBig_h" +} + +//big rocks +shader "terrain/rockbig1" +{ + tesssize 512 + surfparm stone + specular $nmapalpha + //parallaxscale 0.027 + specularpower 0.6 + + diffusemap "textures/terrain/RockBig_c" + normalmap "textures/terrain/RockBig_N" alpha +} + + +//small rocks +shader "terrain/ground01" +{ + surfparm beton + + specular $nmapalpha + specularpower 0.5 + parallaxscale 0.036 + + diffusemap "textures/terrain/ground01_c" + normalmap "textures/terrain/ground01_n" alpha + heightmap "textures/terrain/ground01_h" + +} + + + +//sand +shader "terrain/ground02" +{ + surfparm gravel + surfparm dust + + specular $nmapalpha + specularpower 0.08 +// parallaxscale 0.0053 + + diffusemap "textures/terrain/ground02_c" + normalmap "textures/terrain/ground02_n" alpha +// heightmap "textures/terrain/ground02_h" +} + + +//dirty rocks? +shader "terrain/rock02" +{ + surfparm stone + + specular $nmapalpha + specularpower 0.63 + parallaxscale 0.015 + + + diffusemap "textures/terrain/rock02_c" + normalmap "textures/terrain/rock02_n" + heightmap "textures/terrain/rock02_h" alpha +} + + +//large rocks +shader "terrain/rock03" +{ + surfparm stone + + specular $nmapalpha + specularpower 0.8 + parallaxscale 0.035 + + + diffusemap "textures/terrain/rock03_c" + normalmap "textures/terrain/rock03_n" alpha + heightmap "textures/terrain/rock03_h" +} + + +//road, need different +shader "terrain/rock_road" +{ + surfparm beton + + specular $nmapalpha + specularpower 0.75 + + parallaxscale 0.0193 + + diffusemap "textures/terrain/road_c" + normalmap "textures/terrain/road_n" alpha + heightmap "textures/terrain/road_h" +} + + + +shader "terrain/hubbardium01" +{ + surfparm slime + + diffusemap "textures/terrain/hubbardium01_c" +} \ No newline at end of file diff --git a/Alpha Prime/Mod/shaders/obj_weapons.h b/Alpha Prime/Mod/shaders/obj_weapons.h new file mode 100644 index 0000000..d0722b1 --- /dev/null +++ b/Alpha Prime/Mod/shaders/obj_weapons.h @@ -0,0 +1,781 @@ +shader "hammer_fps" +{ +fresnel 0.007 +reflection 0.01 + specular $nmapalpha + specularpower 0.46 + + sort overall + + diffusemap "obj/weapons/hammer_fps_c" + normalmap "obj/weapons/hammer_fps_n" alpha +} + +shader "hammer" +{ +fresnel 0.007 +reflection 0.01 + specular $nmapalpha + specularpower 0.45 +castshadow + diffusemap "obj/weapons/hammer_fps_c" + normalmap "obj/weapons/hammer_fps_n" alpha +} + +shader "obj/weapons/energy_wall" +{ + +reflection 0.01 + surfparm trans + cull none + zwrite false + sort overlay 2 + + color _eclass Color +// color 0x7f7fff20 + + diffusemap $renderview clampu clampv + refractmap "textures/vp1" + diffusemap2 "obj/weapons/ewallshield" alpha + + parm0 (misc_shooting_shield row0) + parm1 (misc_shooting_shield row1) + + pass 0 + tcmod SCALE 0 0 20 20 + tcmod SHIFT (misc_shooting_shield UVShift) 0 +// vcmod SIN g_fTime 3.0 3.0 1.0 +} + +shader "obj/weapons/energy_wall_stand" +{ + + specular $nmapalpha + specularpower 0.55 + castshadow + + diffusemap "obj/weapons/energy_wall_stand_c" + normalmap "obj/weapons/energy_wall_stand_n" alpha +} + +shader "obj/items/battery_01" +{ + specular $nmapalpha +castshadow + + diffusemap "obj/items/battery_01_c" + normalmap "obj/items/battery_01_n" alpha +} + +shader "obj/items/hubb" +{ +fresnel 0.008 + specular $nmapalpha +castshadow + + diffusemap "obj/items/hubb_c" + normalmap "obj/items/hubb_n" alpha +} + +shader "mossberg590" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.52 + sort overall +castshadow + + diffusemap "obj/weapons/mossberg590_c" + normalmap "obj/weapons/mossberg590_n" alpha +} + + +shader "rocketlauncher" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.55 + castshadow + + diffusemap "obj/weapons/rocketlauncher_c" + normalmap "obj/weapons/rocketlauncher_n" alpha +} + +shader "rocketlauncher_fps" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.55 + sort overall + + diffusemap "obj/weapons/rocketlauncher_c" + normalmap "obj/weapons/rocketlauncher_n" alpha +} + +shader "flamethrower" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.55 + castshadow + + diffusemap "obj/weapons/flamethrower_c" + normalmap "obj/weapons/flamethrower_n" alpha +} + +shader "flamethrower_fps" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.6 + sort overall + + diffusemap "obj/weapons/flamethrower_c" + normalmap "obj/weapons/flamethrower_n" alpha +} + +shader "gatlingLE" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.56 + castshadow + + diffusemap "obj/weapons/gatlingLE_c" + normalmap "obj/weapons/gatlingLE_n" alpha +} + +shader "gatlingLE_fps" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.56 + sort overall + + diffusemap "obj/weapons/gatlingLE_c" + normalmap "obj/weapons/gatlingLE_n" alpha +} + +shader "player_fps_hands" +{ + specular $nmapalpha + specularpower 0.548 + sort overall + //reflection 0.502 + //fresnel 0.7015 + + diffusemap "obj/weapons/hands_c" + normalmap "obj/weapons/hands_n" alpha + envmap $nearestcube +} + +shader "obj/weapons/shell" +{ + specular $nmapalpha +castshadow +fresnel 0.008 +reflection 0.02 + diffusemap "obj/weapons/shell_c" + normalmap "obj/weapons/shell_n" alpha +} + +shader "obj/weapons/weaflash1_fps" +{ + zwrite false + map nolight + cull none + sort overall 1 + + color _eclass Color + + blend one srcalpha + diffusemap "obj/weapons/weaflash1" alpha +} + +shader "obj/weapons/weaflash1" +{ + zwrite false + map nolight + cull none + sort translucent + + color _eclass Color + + blend one srcalpha + diffusemap "obj/weapons/weaflash1" alpha +} + +/* +Shadery pro zbrane jako itemy. Tj. neobsahuji depthhack +*/ +shader "mineLight2" +{ + map nolight + pass + tcmod shift g_fTime 0 + diffusemap "obj/weapons/grenadelights" +} + +shader "mineLight" +{ + map nolight + pass + color _eclass Color + tcmod shift g_fTime 0 + diffusemap "obj/weapons/mineLight" +} + +shader "mine" +{ +fresnel 0.008 + specular $nmapalpha + specularpower 0.55 +castshadow + diffusemap "obj/weapons/mine_c" + normalmap "obj/weapons/mine_n" alpha +} + +shader "obj/items/grenade" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.555 + castshadow + diffusemap "obj/weapons/grenade_c" + normalmap "obj/weapons/grenade_n" alpha +} + +shader "obj/items/grenadeLights" +{ + map nolight + pass + tcmod shift g_fTime 0 + diffusemap "obj/weapons/grenadelights" +} + +shader "obj/weapons/machinegun_service" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.55 + castshadow + + diffusemap "obj/weapons/machinegun_service_c" + normalmap "obj/weapons/machinegun_service_n" alpha +} + +shader "obj/weapons/machinegun" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.56 + castshadow + + diffusemap "obj/weapons/machinegun_c" + normalmap "obj/weapons/machinegun_n" alpha +} + +shader "obj/weapons/machinegun_effect" +{ + zwrite false + alphatest 1 // zatim + sort translucent + map nolight + + blend one one + diffusemap "obj/weapons/machinegun_effect" + +} + +shader "pistol" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.17 +castshadow + diffusemap "obj/weapons/pistol_c" + normalmap "obj/weapons/pistol_n" alpha +} + + +shader "pistol_ammo" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha +castshadow + diffusemap "obj/weapons/pistol_ammo_c" + normalmap "obj/weapons/pistol_ammo_n" alpha +} + +shader "pistol_ammo_bright" +{ +fresnel 0.008 +reflection 0.01 + zwrite false + sort translucent + map nolight + + diffusemap "obj/weapons/pistol_ammo_c" + normalmap "obj/weapons/pistol_ammo_n" alpha +} + +shader "pistol_effect" +{ + alphatest 1 + sort translucent + zwrite false + map nolight + + blend one one + diffusemap "obj/weapons/pistol_effect" +} + +shader "obj/items/recon" +{ +fresnel 0.007 + specular $nmapalpha + specularpower 0.55 +castshadow + diffusemap "obj/items/recon_c" + normalmap "obj/items/recon_n" alpha +} + + +/* +Shadery pro zbrane do ruky. Tj. obsahuji depthhack +*/ + +//JackHammer body +shader "obj/weapons/JackHammer_fps" +{ + + specular $nmapalpha + specularpower 0.56 + + sort overall + + diffusemap "obj/weapons/JackHammer_c" + normalmap "obj/weapons/JackHammer_n" alpha +} + +//JackHammer hroty +shader "obj/weapons/JackHammer_Hroty_Fps" +{ +fresnel 0.007 +reflection 0.01 +// specular $nmapalpha +// specularpower 0.56 + sort overall + +// zwrite false + blend zero srcalpha + color _eclass Color + map nolight + + diffusemap "obj/weapons/JackHammer_c" +// normalmap "obj/weapons/JackHammer_n" alpha +} + +/* +shader "obj/weapons/JackHammer_Hroty_Fps" +{ +fresnel 0.007 +reflection 0.01 + sort overall +// map nolight + + layer "obj/weapons/JackHammer_c" alpha + tex0 = layer 0 + tfac = _eclass TFactor + effect "JackHammerHroty" +} +*/ +//JackHammer effectobject1 - (velky blesk) +shader "textures/light/lights_01" +{ + surfparm lightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + cull none + zwrite false + sort overall 1 + + blend one srcalpha + map nolight + + diffusemap "textures/light/lights_01" +} + +//JackHammer effectobject2 (maly blesk) +shader "textures/light/lights_02" +{ + surfparm lightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + cull none + zwrite false + sort overall 1 + + blend one srcalpha + map nolight + + diffusemap "textures/light/lights_02" +} + +//JackHammer corona +shader "sprites/corona/JackHammer" +{ +fresnel 0.007 +reflection 0.01 + sort overall + cull none +castshadow + layer "obj/weapons/hammerflare" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + +/* +shader "obj/weapons/JackHammer_Hroty_Fps" +{ +fresnel 0.007 +reflection 0.01 + sort overall +// cull none + + layer "obj/weapons/JackHammer_c" + tex0 = layer 0 + tfac = _eclass TFactor + effect "JackHammerHroty" +} +*/ +shader "obj/weapons/grenade" +{ +fresnel 0.007 +reflection 0.01 + specular $nmapalpha + specularpower 0.555 + sort overall + + diffusemap "obj/weapons/grenade_c" + normalmap "obj/weapons/grenade_n" alpha +} + +shader "obj/weapons/grenadeLights" +{ + map nolight + sort overall + pass + tcmod shift g_fTime 0 + diffusemap "obj/weapons/grenadelights" +} + +shader "obj/weapons/grenade_NoFPS" +{ +fresnel 0.007 +reflection 0.01 + specular $nmapalpha + specularpower 0.555 + castshadow + diffusemap "obj/weapons/grenade_c" + normalmap "obj/weapons/grenade_n" alpha +} + +shader "obj/weapons/grenadeLights_NoFPS" +{ + map nolight + pass + tcmod shift g_fTime 0 + diffusemap "obj/weapons/grenadelights" +} + +shader "obj/weapons/machinegun_fps" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.56 + sort overall + + diffusemap "obj/weapons/machinegun_c" + normalmap "obj/weapons/machinegun_n" alpha +} + +shader "obj/weapons/machinegun_effect_fps" +{ + zwrite false + sort overall 1 + map nolight + + blend one one + diffusemap "obj/weapons/machinegun_effect" +} + +shader "pistol_fps" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.17 + sort overall + + diffusemap "obj/weapons/pistol_c" + normalmap "obj/weapons/pistol_n" alpha +} + +shader "pistol_ammo_fps" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + + diffusemap "obj/weapons/pistol_ammo_c" + normalmap "obj/weapons/pistol_ammo_n" alpha +} + +shader "pistol_effect_fps" +{ + zwrite false + map nolight + sort overall 1 + + blend one one + diffusemap "obj/weapons/pistol_effect" +} + +shader "obj/weapons/Shotgun" +{ +fresnel 0.0073 +reflection 0.01 + specular $nmapalpha + specularpower 0.55 + castshadow + diffusemap "obj/weapons/ShotGun_c" + normalmap "obj/weapons/ShotGun_n" alpha +} + +shader "obj/weapons/Shotgun_fps" +{ +fresnel 0.0073 +reflection 0.01 + specular $nmapalpha + specularpower 0.55 + sort overall + diffusemap "obj/weapons/ShotGun_c" + normalmap "obj/weapons/ShotGun_n" alpha +} + +// SNIPER RIFLE ------------------------ +shader "obj/weapons/SniperRifle_fps" +{ +fresnel 0.008 +reflection 0.01 + specular $nmapalpha + specularpower 0.554 + sort overall + diffusemap "obj/weapons/SniperRifle_c" + normalmap "obj/weapons/SniperRifle_n" alpha +} + +shader "obj/weapons/SniperRifle_Display" +{ +fresnel 0.008 +reflection 0.01 + map nolight + sort overall + diffusemap $renderview clampu clampv +} + +shader "obj/weapons/SniperRifle_CrossEff_fps" +{ + map nolight + sort overall + blend one srcalpha + pass + tcmod rotate g_fTime01 0 0 + diffusemap "obj/weapons/SniperRifle_crosseff" clampu clampv +} + +shader "obj/weapons/SniperRifle_Cross_fps" +{ +fresnel 0.008 + map nolight + sort overall + blend one srcalpha + diffusemap "obj/weapons/SniperRifle_cross" +} + +shader "obj/weapons/SniperRifle" +{ +fresnel 0.008 +reflection 0.01 +castshadow + specular $nmapalpha + specularpower 0.554 + diffusemap "obj/weapons/SniperRifle_c" + normalmap "obj/weapons/SniperRifle_n" alpha +} + +shader "obj/weapons/SniperRifle_CrossEff" +{ + map nolight + blend one srcalpha + pass + tcmod rotate g_fTime01 0 0 + diffusemap "obj/weapons/SniperRifle_crosseff" clampu clampv +} + +shader "obj/weapons/SniperRifle_Cross" +{ + map nolight + blend one srcalpha + diffusemap "obj/weapons/SniperRifle_cross" +} + +// SNIPER RIFLE ITEM ------------------- +shader "obj/items/SniperRifle" +{ +fresnel 0.008 +reflection 0.01 +castshadow + specular $nmapalpha + specularpower 0.554 + diffusemap "obj/weapons/SniperRifle_c" + normalmap "obj/weapons/SniperRifle_n" alpha +} + +shader "obj/weapons/Shotgun_effect" +{ + zwrite false + alphatest 1 // zatim + sort translucent + map nolight + + blend one one + diffusemap "obj/weapons/machinegun_effect" +} + +shader "obj/weapons/Shotgun_effect_fps" +{ + zwrite false + sort overall 1 + map nolight + + blend one one + diffusemap "obj/weapons/machinegun_effect" +} + + +//---------------------- + +shader "health01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/items/health01_c" + normalmap "obj/items/health01_n" alpha +} + +shader "health01_bright" +{ + specular 0.5 + + + diffusemap "obj/items/health01_c" +} + + + +shader "hubb" +{ +fresnel 0.007 + specular $nmapalpha +castshadow + diffusemap "obj/items/hubb_c" + normalmap "obj/items/hubb_n" alpha +} + +shader "hubb_bright" +{ + specular $nmapalpha + map nolight + +fresnel 0.007 + diffusemap "obj/items/hubb_c" + normalmap "obj/items/hubb_n" alpha +} + +shader "hubb_empty" +{ + surfparm trans + specular 1 + specularpower 0.45 + reflection 0.3 + fresnel 1.001 +castshadow + zwrite false + cull none + blend invsrcalpha srcalpha + //blend one srcalpha + sort translucent + + diffusemap "textures/glass/glass1_c" alpha + envmap $nearestcube +} + + + +shader "rcdevice" +{ +fresnel 0.008 + specular $nmapalpha + sort overall +castshadow + diffusemap "obj/static/usedisp01_c" + normalmap "obj/static/usedisp01_n" alpha +} + + +shader "rcdevice_display" +{ + surfparm trans + surfparm detail + surfparm nomarks + + specular 0.2 + specularpower 0.35 + zwrite false + sort overall 1 + + blend invsrcalpha srcalpha + map nolight + +#ifdef _XBOX + pass + tcmod shift 0.0 g_fTime10 + + diffusemap "obj/static/usedisp01_c" +#else + diffusemap $gui0 alpha +#endif +} diff --git a/Alpha Prime/Mod/shaders/scrapbook.h b/Alpha Prime/Mod/shaders/scrapbook.h new file mode 100644 index 0000000..3fd54e3 --- /dev/null +++ b/Alpha Prime/Mod/shaders/scrapbook.h @@ -0,0 +1,2691 @@ +/* +effect "height_fog_lmap" +{ + VertexShader vs = asm + { + vs.1.1 + + dcl_position v0 + dcl_texcoord v1 + + def c0, 0, 0, 0, 0 + def c1, 1, 1, 1, 1 + + ; Transform position to clip space and output it + dp4 oPos.x, v0, c2 + dp4 oPos.y, v0, c3 + dp4 oPos.z, v0, c4 + dp4 oPos.w, v0, c5 + + mov oT0.xy, v1 + + dp4 r9.x, v0, c22 + dp4 r9.y, v0, c23 + dp4 r9.z, v0, c24 + dp4 r9.w, v0, c25 + + ; Get height from floor + add r10.y, r9.y, c26.x + mul r10.y, r10.y, c26.y + mov oT1.y, r10.y + + ; Get range + mov r9.y, c0.y + add r9, r9, -c21 + dp3 r9, r9, r9 + rsq r9.w, r9.w + rcp r9.w, r9.w + mul oT1.x, r9.w, c26.z + }; + + technique t0 + { + pass p0 + { + VertexShader = ; + } + } +} +*/ + +/* +effect "g_addglow" +{ + texture tex; + + technique t0 + { + pass p0 + { + VertexShader = XYZRHW|TEX4; + ShadeMode = Flat; + FillMode = Solid; + Lighting = False; + + ZEnable = False; + ZWriteEnable = False; + FogEnable = False; + + ColorWriteEnable = RED|GREEN|BLUE|ALPHA; + + TextureFactor = 0x40404040; + StencilEnable = False; + AlphaBlendEnable = True; + AlphaTestEnable = False; + + BlendOp = Add; + //SrcBlend = DestColor;//Alpha; + SrcBlend = One; + DestBlend = One; + + + TexCoordIndex[0] = 0; + TexCoordIndex[1] = 1; + TexCoordIndex[2] = 2; + TexCoordIndex[3] = 3; + + Texture[0] = ; + Texture[1] = ; + Texture[2] = ; + Texture[3] = ; + + ColorArg1[0] = Texture; + ColorArg1[1] = Texture; + ColorArg1[2] = Texture; + ColorArg1[3] = Texture; + + ColorArg2[1] = Current; + ColorArg2[2] = Current; + ColorArg2[3] = Current; + + ColorOp[0] = SelectArg1; +// ColorOp[1] = AddSmooth; + // ColorOp[2] = AddSmooth; + // ColorOp[3] = AddSmooth; + ColorOp[1] = Add; + ColorOp[2] = Add; + ColorOp[3] = Add; + + ColorArg1[4] = Current; + ColorArg2[4] = TFactor; + ColorOp[4] = Modulate; + + ColorOp[5] = Disable; + AlphaOp[0] = Disable; + + CullMode = None; + } + } +} + +effect "g_glow" +{ + float4 col; + + technique t0 + { + pass p0 + { + + AlphaBlendEnable = False; + AlphaTestEnable = False; + + TextureFactor = ; + ColorArg1[0] = TFactor; + ColorOp[0] = SelectArg1; + AlphaArg1[0] = TFactor; + AlphaOp[0] = SelectArg1; + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } +} + +effect "g_glowl" +{ + float4 col; + texture tex0; + + technique t0 + { + pass p0 + { + AlphaBlendEnable = False; + AlphaTestEnable = False; + + AddressU[0] = Clamp; + AddressV[0] = Clamp; + + TexCoordIndex[0] = 1; + + Texture[0]= ; + TextureFactor = ; + ColorArg1[0] = Texture; + ColorOp[0] = SelectArg1; + ColorArg1[1] = TFactor; + ColorArg2[1] = Current; + ColorOp[0] = Modulate; + ColorOp[2] = Disable; + AlphaOp[0] = Disable; + } + } +} + +effect "g_softshadow" +{ + dword pow; + + technique t0 + { + pass p0 + { + VertexShader = XYZRHW; + ShadeMode = Flat; + FillMode = Solid; + Lighting = False; + + ZEnable = False; + ZWriteEnable = False; + FogEnable = False; + + ColorWriteEnable = RED|GREEN|BLUE|ALPHA; + + TextureFactor = ; + StencilEnable = True; + AlphaBlendEnable = True; + AlphaTestEnable = False; + + BlendOp = RevSubtract; + SrcBlend = SrcAlpha; + DestBlend = One; + + ColorArg1[0] = TFactor; + ColorOp[0] = SelectArg1; + AlphaArg1[0] = TFactor; + AlphaOp[0] = SelectArg1; + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + + StencilRef = 1; + StencilFunc = LessEqual; + StencilPass = DecrSat; + StencilFail = Keep; + StencilZFail = Keep; + CullMode = None; + } + + pass p1 + { + StencilPass = Zero; + } + } +} +*/ + + +/* +shader "textures/efx/gradient" +{ +// qer_trans 0.60 +// surfparm nocastshadow + surfparm nonsolid + surfparm trans +// surfparm nolightmap +// sort 30 + cull ccw + + pass 0 + + pass 1 + tcmod TURB 0.2 g_fTime 0.13 + tcmod SCALE 1.0 0.8 1.0 0.8 + tcmod SHIFT g_fTime01 -8 + + layer "textures/efx/gradient" alpha + layer "obj/lamp/lampbeamnoise" alpha + + tex0 = layer 0 + tex1 = layer 1 + effect "effect_lampbeams" +} +*/ + +/* +shader "textures/efx/watermud1" +{ + qer_trans 0.40 + surfparm water + surfparm trans + surfparm nonsolid + surfparm nodrop + tesssize 32 + sort 1 + +// cull none + + + pass 0 + vcmod SIN g_fTime 3.0 3.0 1.0 + vcmod SIN g_fTime 1.0 1.0 0.5 +// tcmod SHIFT g_fTime01 0 + tcmod SCALE 2.0 2.0 2.0 2.0 + + pass 1 + vcmod SIN g_fTime 3.0 3.0 1.0 + vcmod SIN g_fTime 1.0 1.0 0.5 + tcmod turb 0.5 g_fTime 0.08 +// tcmod SHIFT g_fTime01 0 + + + pass 2 + vcmod SIN g_fTime 3.0 3.0 1.0 + vcmod SIN g_fTime 1.0 1.0 0.5 + tcmod turb 0.5 g_fTime 0.15 +// tcmod SHIFT g_fTime01 0 + + pass 3 + vcmod SIN g_fTime 3.0 3.0 1.0 + vcmod SIN g_fTime 1.0 1.0 0.5 + tcmod turb 0.8 g_fTime01 0.06 +// tcmod SHIFT g_fTime01 0 + + + layer "textures/efx/watermud1" alpha + layer $lightmap + layer "textures/efx/caust" + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + + effect + { + texture tex0; + texture tex1; + texture tex2; + + technique l0 + { + pass p0 + { + ZWriteEnable = True; + AlphaBlendEnable = True; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + AddressU[1] = Clamp; + AddressV[1] = Clamp; + + Texture[0] = ; + Texture[1] = ; + + ColorArg1[0] = Texture; + AlphaArg1[0] = Texture; + ColorOp[0] = SelectArg1; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorArg1[1] = Texture; + ColorArg2[1] = Current; + ColorOp[1] = Modulate; + AlphaArg1[1] = Current; + AlphaOp[1] = SelectArg1; + TexCoordIndex[1] = 1; + + ColorOp[2] = Disable; + AlphaOp[2] = Disable; + } + + pass p1 + { + AlphaBlendEnable = True; + SrcBlend = InvSrcAlpha; + DestBlend = InvDestColor; + BlendOp = Add; + AlphaTestEnable = False; + + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + AddressU[1] = Clamp; + AddressV[1] = Clamp; + + Texture[0] = ; + Texture[1] = ; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = SelectArg1;//Modulate; + AlphaArg1[0] = Texture; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorArg1[1] = Texture; + ColorArg2[1] = Current; + ColorOp[1] = Modulate2x; + AlphaArg1[1] = Current; + AlphaOp[1] = SelectArg1; + TexCoordIndex[1] = 1; + ColorOp[2] = Disable; + AlphaOp[2] = Disable; + } + + pass p2 + { + AlphaBlendEnable = True; + SrcBlend = SrcColor; + DestBlend = One; + BlendOp = Add; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + AddressU[1] = Clamp; + AddressV[1] = Clamp; + + Texture[0] = ; + Texture[1] = ; + + ColorArg1[0] = Texture; + AlphaArg1[0] = Texture; + ColorOp[0] = SelectArg1; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorArg1[1] = Texture; + ColorArg2[1] = Current; + ColorOp[1] = Modulate; + AlphaArg1[1] = Current; + AlphaOp[1] = SelectArg1; + TexCoordIndex[1] = 1; + + ColorOp[2] = Disable; + AlphaOp[2] = Disable; + } + + pass p3 + { + AlphaBlendEnable = True; + SrcBlend = SrcColor; + DestBlend = One;//DestColor; + BlendOp = Add; + AlphaTestEnable = False; + + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + AddressU[1] = Clamp; + AddressV[1] = Clamp; + + Texture[0] = ; + Texture[1] = ; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = SelectArg1;//Modulate; + AlphaArg1[0] = Texture; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorArg1[1] = Texture; + ColorArg2[1] = Current; + ColorOp[1] = Modulate2x; + AlphaArg1[1] = Current; + AlphaOp[1] = SelectArg1; + TexCoordIndex[1] = 1; + + ColorOp[2] = Disable; + AlphaOp[2] = Disable; + } + + } +} +} +*/ + +/* +shader "textures/efx/mud" +{ + qer_trans 0.40 + surfparm water + surfparm trans + tesssize 32 + cull none + +//SIN casu Ux Vx amplituda + pass 0 + vcmod SIN g_fTime 1.0 1.0 2.0 +// tcmod SHIFT g_fTime01 0 +// tcmod turb g1 g_fTime01 g2 + + layer "textures/efx/mud" alpha + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + + effect + { + texture tex0; + texture tex1; + + technique l0 + { + pass p0 + { + AlphaBlendEnable = True; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + AddressU[1] = Clamp; + AddressV[1] = Clamp; + + Texture[0] = ; + Texture[1] = ; + + ColorArg1[0] = Texture; + AlphaArg1[0] = Texture; + ColorOp[0] = SelectArg1; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorArg1[1] = Texture; + ColorArg2[1] = Current; + ColorOp[1] = Modulate2x; + AlphaArg1[1] = Current; + AlphaOp[1] = SelectArg1; + TexCoordIndex[1] = 1; + + ColorOp[2] = Disable; + AlphaOp[2] = Disable; + } + } + } +} +*/ + +/* +shader "textures/efx/water001" +{ + surfparm water + surfparm trans + cull none +// tesssize 32 + +//SIN casu Ux Vx amplituda + pass 0 +// vcmod SIN g_fTime 1.0 1.0 9.0 + tcmod SHIFT g_fTime01 0 +// tcmod turb g1 g_fTime01 g2 + + layer "textures/efx/water001" alpha + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + + effect + { + texture tex0; + texture tex1; + + technique l0 + { + pass p0 + { + AlphaBlendEnable = True; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + AddressU[1] = Clamp; + AddressV[1] = Clamp; + + Texture[0] = ; + Texture[1] = ; + + ColorArg1[0] = Texture; + AlphaArg1[0] = Texture; + ColorOp[0] = SelectArg1; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorArg1[1] = Texture; + ColorArg2[1] = Current; + ColorOp[1] = Modulate2x; + AlphaArg1[1] = Current; + AlphaOp[1] = SelectArg1; + TexCoordIndex[1] = 1; + + ColorOp[2] = Disable; + AlphaOp[2] = Disable; + } + } + } +} +*/ + +// +/* +shader "obj/k4l4/bankaliq2" +{ +// surfparm nolightmap + surfparm trans + sort 10 + cull none + + layer alpha + anim 15 + "obj/fx/magic01_001" + "obj/fx/magic01_002" + "obj/fx/magic01_003" + "obj/fx/magic01_004" + "obj/fx/magic01_005" + "obj/fx/magic01_006" + "obj/fx/magic01_007" + "obj/fx/magic01_008" + "obj/fx/magic01_009" + "obj/fx/magic01_010" + "obj/fx/magic01_011" + "obj/fx/magic01_012" + "obj/fx/magic01_013" + "obj/fx/magic01_014" + "obj/fx/magic01_015" + + tex0 = layer 0 + effect "liquid_small" +} + + +shader "obj/decors/semafor_alpha" +{ + cull none + layer "obj/ldecors/semafor_schod" alpha + tex0 = layer 0 + effect "nolightmap_clip" +} + + + +shader "obj/k4l4/bankaliq1" +{ +// surfparm nolightmap + surfparm trans + sort 10 + cull none + + layer alpha + anim 15 + "obj/fx/magic01_001b" + "obj/fx/magic01_002b" + "obj/fx/magic01_003b" + "obj/fx/magic01_004b" + "obj/fx/magic01_005b" + "obj/fx/magic01_006b" + "obj/fx/magic01_007b" + "obj/fx/magic01_008b" + "obj/fx/magic01_009b" + "obj/fx/magic01_010b" + "obj/fx/magic01_011b" + "obj/fx/magic01_012b" + "obj/fx/magic01_013b" + "obj/fx/magic01_014b" + "obj/fx/magic01_015b" + + tex0 = layer 0 + effect "liquid_small_trans" +} + +shader "obj/k4l4/bankaliq3" +{ + + layer alpha + anim 15 + "obj/fx/magic01_001" + "obj/fx/magic01_002" + "obj/fx/magic01_003" + "obj/fx/magic01_004" + "obj/fx/magic01_005" + "obj/fx/magic01_006" + "obj/fx/magic01_007" + "obj/fx/magic01_008" + "obj/fx/magic01_009" + "obj/fx/magic01_010" + "obj/fx/magic01_011" + "obj/fx/magic01_012" + "obj/fx/magic01_013" + "obj/fx/magic01_014" + "obj/fx/magic01_015" + + layer "textures/env/water" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +// K3l2 +shader "obj/k3l6/labor_tank" +{ + layer "obj/k3l6/labor_tank.jpg" alpha + + tex0 = layer 0 + colr = int g_iKanystrColor + + effect + { + texture tex0; + dword colr; + + technique t0 + { + //nejdriv nepruhlednou cast kontejneru (nebude ovlivnena vstupni barvou) + pass p0 //prvni pruchod (polygon se kresli poprve) + { + ZWriteEnable = True; //zapisuj do zbufferu + AlphaBlendEnable = False; //neblenduj (kreslime nepruhlednou cast) + AlphaTestEnable = True; //a nastav test na hodnotu alfy + AlphaFunc = Greater; //alfa musi byt vetsi + AlphaRef = 250; //nez 250 + + AddressU[0] = Wrap; //textura se opakuje kolem dokola (Clamp) + AddressV[0] = Wrap; + Texture[0] = ; //priradime texturu kontejneru pro 1. stage + TexCoordIndex[0] = 0; //pouzijeme prvni par UV souradnic(pouziva se temer vzdy) + + ColorArg1[0] = Texture; //prvni vstupni argument je texel z textury + ColorArg2[0] = Diffuse; //druhy je svetlo dopadajici na objekt + ColorOp[0] = Modulate2x; //vynasob je (a jeste 2x navic) + + AlphaArg1[0] = Texture; //alfu jen propust skrz prvni stage (na vystupu se kontroluje) + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; //dalsi stage nepouzivame + AlphaOp[1] = Disable; + } + + //kreslime pruhlednou cast kontejneru, kterou navic nasobime barvou ze skriptu + pass p1 //druhy pruchod (polygon se kresli podruhe) + { + ZWriteEnable = False; //pruhledne body se NESMI zapisovat do zbufferu! + + AlphaBlendEnable = True; //zapni alfa blending + SrcBlend = SrcAlpha; //nastavime alfablending na P = T * SourceAlfa + P * (1 - SourceAlfa) + DestBlend = InvSrcAlpha; + BlendOp = Add; + + AlphaFunc = Lessequal; //alfa musi byt mensi nebo stejna nez 250 + TextureFactor = ; //nastav temporary register (TextureFactor) na RGB hodnotu ze skriptu + + //prvni stage je stejna jako v predchozim passu, tak ji neopakujem + + ColorArg1[1] = Current; //v dalsi stage vynasobime vysledny pixel jeste hodnotou ze skriptu + ColorArg2[1] = TFactor; //odkaz na (TextureFactor) register + ColorOp[1] = Modulate; //nasobeni + + ColorOp[2] = Disable; //ostatni stage nepouzijem + } + } + } +} + +shader "obj/k1l3/kohoutek" +{ + cull none + layer "obj/k1l3/kohoutek" + + tex0 = layer 0 + effect "nolightmap_clip" + +} + +shader "obj/k1l3/airradar" +{ + cull none + layer "obj/k1l3/airradar" + + tex0 = layer 0 + effect "nolightmap" + +} + +shader "obj/k1l3/radaralpha" +{ + cull none + layer "obj/k1l3/radaralpha" + + tex0 = layer 0 + effect "nolightmap_clip" + +} + + +//core k3l5 + +shader "textures/misc/server_box_01_vl" +{ + cull ccw + layer "textures/misc/server_box_01" + + tex0 = layer 0 + effect "nolightmap" + +} + +shader "textures/steel/nosnik_vl" +{ + cull ccw + layer "textures/steel/nosnik" + + tex0 = layer 0 + effect "nolightmap" + +} + + +shader "textures/steel/pas_stroj_05_vl" +{ + cull ccw + layer "textures/steel/pas_stroj_05" + + tex0 = layer 0 + effect "nolightmap" + +} + + +shader "textures/steel/trubka1c_vl" +{ + cull ccw + layer "textures/steel/trubka1c" + + tex0 = layer 0 + effect "nolightmap" + +} + + +shader "textures/wire/kanal_021_vl" +{ + cull ccw + layer "textures/wire/kanal_02" + + tex0 = layer 0 + effect "nolightmap" + +} + +*/ + +/* +//----------------------- + +shader "obj/misc/pneu" +{ + cull none + layer "obj/misc/pneu" + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/k3l4/vozik_pradlo" +{ + + layer "obj/k3l4/vozik_pradlo" alpha + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + + effect "nolightmap_clip" +} + +shader "obj/misc/ponk" +{ + + cull none + + layer "obj/misc/ponk" + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + + effect "nolightmap" +} + + + + +// monitory +effect "monitor_display" + { + + texture tex0; + texture tex1; + technique t2 + { + pass p0 + { + ZWriteEnable = False; + AlphaBlendEnable = False; + AlphaTestEnable = False; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + Texture[0] = ; + TexCoordIndex[0] = 0; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = SelectArg1;//Modulate2x; + + ColorOp[1] = Disable; + AlphaOp[0] = Disable; + } + + pass p1 + { + ZWriteEnable = True; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + AlphaBlendEnable = True; +// AlphaTestEnable = False; + + Texture[0] = ; + TexCoordIndex[0] = 0; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate2x; + AlphaArg1[0] = Texture; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } +} + +shader "obj/k3l4/monitor" +{ + + layer "obj/k3l4/monitor1disp" + layer "obj/k3l4/monitor" + + pass 0 + tcmod SHIFT g_fTime001 0 + tcmod SCALE 1.0 1.0 3.0 3.0 + pass 1 + + tex0 = layer 0 + tex1 = layer 1 + + effect "monitor_display" +} + +shader "obj/k3l4/monitor2" +{ + + layer "obj/k3l4/monitor2disp" + layer "obj/k3l4/monitor" + + pass 0 + tcmod SHIFT g_fTime01 g_fTime + tcmod SCALE 1.0 1.0 3.0 3.0 + pass 1 + + tex0 = layer 0 + tex1 = layer 1 + + effect "monitor_display" +} + +shader "obj/k3l4/monitor3" +{ + + layer "obj/k3l4/monitor3disp" + layer "obj/k3l4/monitor" + + pass 0 + tcmod SHIFT g_fTime g_fTime +// tcmod SCALE 1.0 1.0 3.0 3.0 + pass 1 + + tex0 = layer 0 + tex1 = layer 1 + + effect "monitor_display" +} + +//mechanismezecky + +shader "obj/misc/desta" +{ + cull none + layer "obj/misc/desta" + tex0 = layer 0 + effect "nolightmap_clip" +} + +shader "obj/k3l5a/cryo2rantl" +{ + cull none + layer "obj/k3l5a/cryo2panel" + tex0 = layer 0 + effect "nolightmap_clip" +} + +shader "obj/k3l5a/cryo2panel" +{ + + pass 0 + tcmod SHIFT g_fTime01 0.585 + pass 1 + + layer "obj/k3l5a/cryo2panel" + tex0 = layer 0 + + effect + { + + texture tex0; + technique t2 + { + pass p0 + { + ZWriteEnable = False; + AlphaBlendEnable = False; + AlphaTestEnable = False; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + Texture[0] = ; + TexCoordIndex[0] = 0; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = SelectArg1;//Modulate2x; + + ColorOp[1] = Disable; + AlphaOp[0] = Disable; + } + + pass p1 + { + ZWriteEnable = True; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + AlphaBlendEnable = True; +// AlphaTestEnable = False; + + Texture[0] = ; + TexCoordIndex[0] = 0; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate2x; + AlphaArg1[0] = Texture; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } + } + +} + +// armatury + +shader "obj/armatury/ar01_koleno" +{ + layer "textures/steel/kov" + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/armatury/ar01_kolenorez" +{ + layer "textures/steel/strojlidumil_02b" + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/armatury/ar01_koncovka" +{ + layer "textures/steel/kov" + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/armatury/ar01_koncovkarez" +{ + layer "textures/steel/strojlidumil_02b" + tex0 = layer 0 + effect "nolightmap" +} + +// ammo + +shader "obj/ammo/223rem50" +{ + layer "obj/ammo/223rem_50" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/308win50" +{ + layer "obj/ammo/308win_50" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/9mm25" +{ + layer "obj/ammo/9mm_25" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/9mm100" +{ + layer "obj/ammo/9mm_100" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/45acp25" +{ + layer "obj/ammo/45acp_25" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/45acp100" +{ + layer "obj/ammo/45acp_100" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/12brok25" +{ + layer "obj/ammo/12brok_25" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/12brokslug10" +{ + layer "obj/ammo/12brokslug_10" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/12brok100" +{ + layer "obj/ammo/12brok_100" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/ammo/clipsg55x30" +{ + layer "obj/ammo/clip_sg55x_30" + layer "textures/env/metal" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/ammo/9mmclip17" +{ + layer "obj/ammo/clip_9mm_17" + layer "textures/env/metal2" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/ammo/9mmclip30" +{ + layer "obj/ammo/clip_9mm_30" + layer "textures/env/metal2" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/ammo/p245clip6" +{ + layer "obj/ammo/clip_9mm_17" + layer "textures/env/metal2" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/ammo/223rem300" +{ + layer "obj/ammo/223rem_300" + layer "textures/env/metal" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_mask" +} + +shader "obj/ammo/ft_canyster" +{ + layer "obj/ammo/ft_canyster" + layer "textures/env/keram" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_mask" +} + +shader "obj/ammo/gl_grenade" +{ + layer "obj/ammo/gl_grenade" + layer "textures/env/keram" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_mask" +} + + + +// small things + + +shader "obj/k4l2/seno" +{ + cull none + layer "obj/k4l2/seno" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/misc/vetrak" +{ + cull none + layer "obj/misc/vetrak" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/misc/regal" +{ +// castshadow + cull none + layer "obj/misc/regal" + + tex0 = layer 0 + effect "nolightmap_clip" +} + +shader "obj/misc/popelnik" +{ + layer "obj/misc/popelnik" + layer "textures/env/dlazky" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/misc/umyvadlo" +{ + layer "obj/misc/umyvadlo" + layer "textures/env/dlazky" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/misc/bojler" +{ + layer "obj/misc/bojler" + layer "textures/env/dlazky" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + + +shader "obj/misc/musle" +{ + layer "obj/misc/musle" + layer "textures/env/dlazky" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/misc/musleble" +{ + layer "obj/misc/musleble" + layer "textures/env/dlazky" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/misc/zachod" +{ + layer "obj/misc/zachod" + layer "textures/env/dlazky" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/misc/zachodble" +{ + layer "obj/misc/zachodble" + layer "textures/env/dlazky" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + + + +shader "obj/misc/hasicak_mobilni" +{ + layer "obj/misc/hasicak_mobilni" + layer "textures/env/keram" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_mask" +} + +shader "obj/misc/hasicak_mensi" +{ + layer "obj/misc/hasicak_mensi" + layer "textures/env/keram" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_mask" +} + +shader "obj/misc/hasicak_vetsi" +{ + layer "obj/misc/hasicak_vetsi" + layer "textures/env/keram" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_mask" +} + +shader "obj/k4l2/stit" +{ + layer "obj/k4l2/stit" + layer "textures/env/metal" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_mask" +} + +shader "obj/k4l4/stit2" +{ + layer "obj/k4l4/stit2" + layer "textures/env/metal2" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_mask" + +} + + +shader "obj/k4l2/krutinoha" +{ + cull none + layer "obj/k4l2/krutinoha" + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/k4l4/nadoba" +{ + layer "obj/k4l4/nadoba" + layer "textures/env/metal" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" + +} + +shader "obj/k4l4/banka_krystal" +{ + surfparm alphashadow + surfparm trans + cull none + sort 10 + + layer "obj/k4l4/banka_krystal" + layer "textures/env/glass" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_trans" + +} + +shader "obj/k4l4/banka" +{ + surfparm alphashadow + surfparm trans + cull none + sort 10 + + layer "obj/k4l4/banka" + layer "textures/env/glass" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_trans" + +} + +shader "obj/k4l4/banka2" +{ + surfparm alphashadow + surfparm trans + cull none + sort 10 + + layer "obj/k4l4/banka2" + layer "textures/env/glass" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_trans" + +} + + +// furniture + +shader "obj/misc/lekarnicka_stara" +{ + cull none + layer "obj/misc/lekarnicka_stara" + + tex0 = layer 0 + effect "nolightmap" + +} + +shader "obj/misc/lekarnicka_stara_glass" +{ + surfparm trans + cull none + sort 10 + + layer "obj/misc/lekarnicka_stara" + layer "textures/env/glass2" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_trans" + +} + +shader "obj/k4l2/trun" +{ + surfparm alphashadow + surfparm trans + cull none + layer "obj/k4l2/trun" alpha + + tex0 = layer 0 + effect "nolightmap_clip" +} + +// mechanisms + +shader "obj/k4l4/picka" +{ + surfparm alphashadow + surfparm trans + cull none + + layer "obj/k4l4/picka" alpha + tex0 = layer 0 + + effect "nolightmap_clip" +} + + +// misc +shader "obj/k4l2/praporec_static" +{ + cull none + + layer "obj/k4l2/praporec" alpha + tex0 = layer 0 + effect "nolightmap_clip" +} + +shader "obj/k4l2/praporec" +{ + cull none + layer "obj/k4l2/praporec" alpha + tex0 = layer 0 + effect "nolightmap_clip" +} + +shader "obj/k4l4/vlajka" +{ + cull none + layer "obj/k4l4/vlajka" + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/k4l4/vlajka_static" +{ + cull none + layer "obj/k4l4/vlajka" + tex0 = layer 0 + effect "nolightmap" + +} + + + +shader "obj/creatures/vlajecka" +{ + surfparm trans + cull none + + layer "obj/creatures/vlajecka" alpha + tex0 = layer 0 + +// effect "nolightmap_trans_fullbright" + effect "nolightmap_clip" +} + +shader "obj/creatures/vlajecka1" +{ + surfparm trans + cull none + + layer "obj/creatures/vlajecka1" alpha + tex0 = layer 0 + +// effect "nolightmap_trans_fullbright" + effect "nolightmap_clip" + +} + +shader "obj/creatures/vlajecka2" +{ + surfparm trans + cull none + + layer "obj/creatures/vlajecka2" alpha + tex0 = layer 0 + +// effect "nolightmap_trans_fullbright" + effect "nolightmap_clip" + +} + +shader "obj/creatures/vlajecka3" +{ + surfparm trans + cull none + + layer "obj/creatures/vlajecka3" alpha + tex0 = layer 0 + +// effect "nolightmap_trans_fullbright" + effect "nolightmap_clip" + +} + + +shader "obj/misc/hodiny_vt" +{ +// surfparm trans + layer "obj/misc/hodinyhruc" + layer "obj/misc/hodinymruc" + layer "obj/misc/hodinyvruc" + + pass 0 // hours + tcmod rotate g_fHHRotate 0.5 0.5 + + pass 1 // mins + tcmod rotate g_fHMRotate 0.5 0.5 + + pass 2 // seconds + tcmod rotate g_fHSRotate 0.5 0.5 + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + + effect + { + texture tex0; + texture tex1; + texture tex2; + + technique t2 + { + pass p0 + { + ZWriteEnable = True; + AlphaBlendEnable = False; + AlphaFunc = Greater; + AlphaRef = 127; + AlphaTestEnable = True; + + Texture[0] = ; + TexCoordIndex[0] = 0; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate2x; + AlphaArg1[0] = Texture; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + + pass p1 + { + Texture[0] = ; + TexCoordIndex[0] = 0; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate2x; + AlphaArg1[0] = Texture; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + + pass p2 + { + Texture[0] = ; + TexCoordIndex[0] = 0; + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate2x; + AlphaArg1[0] = Texture; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } + } +} + +shader "obj/k1l3/fuel_tower_nadrz_vybuch" +{ + cull none + layer "obj/k1l3/fuel_tower_nadrz_vybuch" + + tex0 = layer 0 + effect "nolightmap" +} + +shader "obj/k1l3/fireaxe_glass" +{ + surfparm trans + sort 2 + + layer "obj/k1l3/fireaxe" alpha + layer "textures/env/glass" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env_trans_mask" +} + +shader "obj/k1l3/fuel_tower" +{ + cull none + surfparm alphashadow + surfparm trans + + layer "obj/k1l3/fuel_tower" alpha + + tex0 = layer 0 + effect "nolightmap_clip" +} + +// ************ +shader "obj/misc/hodiny_glass" +{ + layer "obj/misc/hodiny" + layer "textures/env/glass" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + +shader "obj/misc/lahev" +{ + cull none + layer "obj/misc/lahev" + layer "textures/env/glass" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + + +shader "obj/k5l0/chain" +{ + surfparm trans + cull none + + layer "obj/k5l0/chain" alpha + tex0 = layer 0 + +// effect "nolightmap_trans_fullbright" + effect "nolightmap_clip" + +} +*/ + +/* +// zombie civil---- prozatimni shader + +shader "obj/creatures/zombie_civil/kalhoty" +{ + castshadow + + layer + anim skin1 + "obj/creatures/zombie_civil/kalhoty" + "obj/creatures/zombie_civil/kalhoty2" + "obj/creatures/zombie_civil/kalhoty3" + + tex0 = layer 0 + + effect "creature" +} + +shader "obj/creatures/zombie_civil/kosile" +{ + castshadow + + layer + anim skin2 + "obj/creatures/zombie_civil/kosile" + "obj/creatures/zombie_civil/kosile2" + "obj/creatures/zombie_civil/kosile3" + + tex0 = layer 0 + + effect "creature" +} + +shader "obj/creatures/zombie_civil/kosile_pasek2" +{ + castshadow + + layer + anim skin2 + "obj/creatures/zombie_civil/kosile_pasek" + "obj/creatures/zombie_civil/kosile_pasek2" + "obj/creatures/zombie_civil/kosile_pasek3" + + tex0 = layer 0 + + effect "creature" +} + + +shader "obj/creatures/zombie_civil/kuze" +{ + castshadow + + layer + anim skin3 + "obj/creatures/zombie_civil/kuze" + "obj/creatures/zombie_civil/kuze2" + "obj/creatures/zombie_civil/kuze3" + "obj/creatures/zombie_civil/kuze4" + + tex0 = layer 0 + + effect "creature" +} +*/ + + + +/* +shader "obj/creatures/zombie/zombie_body" +{ + castshadow + layer "obj/creatures/zombie/zombie_body" + tex0 = layer 0 + + effect "creature" +} +*/ + +/* +//Miner zombie +shader "obj/creatures/miner_zombie/miner_zomb_legs" +{ + castshadow + layer "obj/creatures/miner_zombie/miner_zomb_legs" + tex0 = layer 0 + + effect "creature" +} + +shader "obj/creatures/miner_zombie/miner_zomb" +{ + castshadow + layer "obj/creatures/miner_zombie/miner_zomb" + tex0 = layer 0 + + effect "creature" +} + +shader "obj/creatures/miner_zombie/miner_brasna" +{ + castshadow + layer "obj/creatures/miner_zombie/miner_brasna" + tex0 = layer 0 + + effect "creature" +} + +shader "obj/creatures/miner_zombie/miner_cap" +{ + castshadow + cull none + + layer "obj/creatures/miner_zombie/miner_cap" + tex0 = layer 0 + + effect "creature" +} + +shader "obj/creatures/miner_zombie/miner_zomb_head1" +{ + castshadow + layer + anim skin3 + "obj/creatures/miner_zombie/miner_zomb_head1" + "obj/creatures/miner_zombie/miner_zomb_head2" + + tex0 = layer 0 + + effect "creature" +} + +// pro minera - zombii: zare oci +shader "obj/creatures/miner_zombie/miner_zombie_eyeshine" +{ + layer "obj/creatures/miner_zombie/miner_zombie_eyeshine" alpha + tex0 = layer 0 + +effect +{ + texture tex0; + + technique t0 + { + pass p0 + { + ZWriteEnable = True; + AlphaBlendEnable = True; + SrcBlend = SrcAlpha; + AlphaTestEnable = False; + DestBlend = One; + BlendOp = Add; + AlphaTestEnable = True; + AlphaRef = 127; + AlphaFunc = Greater; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + + Texture[0] = ; + + ColorArg1[0] = Texture; + ColorArg2[0] = Texture; + AlphaArg1[0] = Texture; + ColorOp[0] = Add; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } +} +} + +shader "obj/creatures/ghost/ghost" +{ + layer "obj/creatures/ghost/ghost" alpha + tex0 = layer 0 + + effect "creature" +} + +shader "obj/creatures/ghost/ghost_trans" +{ + sort 31 + layer "obj/creatures/ghost/ghost" alpha + layer "textures/env/metal" + layer "obj/creatures/ghost/ghost_gradient" alpha + tex0 = layer 0 + tenv = layer 1 + tex1 = layer 2 + + effect +{ + + texture tex0; + texture tenv; + texture tex1; + + technique e0 + { + + pass p0 + { + ZWriteEnable = False; + AlphaBlendEnable = True; + SrcBlend = SrcAlpha; + DestBlend = One; + BlendOp = Add; + + Texture[1] = ; + Texture[0] = ; + AddressU[0] = Wrap; + AddressV[0] = Wrap; + + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate4x; + TexCoordIndex[0] = CameraSpaceReflectionVector; + + ColorArg1[1] = Current; + AlphaArg1[1] = Texture; + AlphaOp[1] = SelectArg1; + ColorOp[1] = SelectArg1; + TexCoordIndex[1] = 0; + + ColorOp[2] = Disable; + AlphaOp[2] = Disable; + } + + pass p1 + { + AlphaBlendEnable = True; + AlphaTestEnable = False; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + + Texture[0] = ; + TexCoordIndex[0] = 0; + + + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + AlphaArg1[0] = Texture; + ColorOp[0] = Modulate2x; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } + } +} + +*/ + +/* +// darklord - zare oci +shader "obj/creatures/darklord/darklordeyes" +{ + + + layer "obj/creatures/darklord/darklordeyes" alpha + tex0 = layer 0 + +effect +{ + texture tex0; + + technique t0 + { + + pass p0 + { + ZWriteEnable = True; + AlphaBlendEnable = True; + SrcBlend = SrcAlpha; + AlphaTestEnable = False; + DestBlend = One; + BlendOp = Add; + AlphaTestEnable = False; + AlphaRef = 127; + AlphaFunc = Greater; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + + Texture[0] = ; + + ColorArg1[0] = Texture; + ColorArg2[0] = Texture; + AlphaArg1[0] = Texture; + ColorOp[0] = Add; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } +} +} +*/ + +/* + +//shader "obj/creatures/darklord/darklord" +effect +{ + texture tex0; + + technique t0 + { + //1st pass, render only depth + pass p0 + { + ZWriteEnable = True; + ColorWriteEnable = 0; + + ColorArg1[0] = Current; + ColorOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[0] = Disable; + } + + //2nd pass, render colors to the same depth + pass p1 + { + ZWriteEnable = False; + AlphaBlendEnable = True; + AlphaTestEnable = False; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + ColorWriteEnable = RED|GREEN|BLUE|ALPHA; + Texture[0] = ; + TexCoordIndex[0] = 0; + AlphaArg1[0] = Texture; + AlphaOp[0] = SelectArg1; + ColorArg1[0] = Texture; + ColorArg2[0] = Current; + ColorOp[0] = Modulate; // Modulate2x; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } +} +*/ + +/* + +shader "obj/lamp/redlight" +{ + cull none + + layer "obj/lamp/redlight" + + tex0 = layer 0 + effect "nolightmap_fullbright" + + +} + + +shader "obj/k4l4/vaza" +{ + layer "obj/k4l4/vaza" + layer "textures/env/keram" + + tex0 = layer 0 + tenv = layer 1 + effect "nolightmap_env" +} + + +shader "obj/lamp/lampa4_mrizka" +{ + sort 1 + surfparm nocastshadow + layer "obj/lamp/lampa4_mrizka" alpha + tex0 = layer 0 + effect "nolightmap_clip" +} + +*/ + +/* +shader "Gfx/hud/compass" +{ + sort 30 + emap_globaltexture + + layer "Gfx/hud/compass" alpha + layer "Gfx/hud/compass_arrow" alpha + layer "Gfx/hud/compass_quest1" alpha + layer "Gfx/hud/compass_quest2" alpha + layer "Gfx/hud/compass_quest3" alpha + layer "Gfx/hud/compass_quest4" alpha + layer "Gfx/hud/compass_quest5" alpha + layer "Gfx/hud/compass_quest0" alpha //Cil od demona + + pass 0 + tcmod rotate 3.14 0.5 0.5 + pass 1 + tcmod rotate g_fCompBack 0.5 0.5 + pass 2 + tcmod rotate g_fQuest0 0.5 0.5 + pass 3 + tcmod rotate g_fQuest1 0.5 0.5 + pass 4 + tcmod rotate g_fQuest2 0.5 0.5 + pass 5 + tcmod rotate g_fQuest3 0.5 0.5 + pass 6 + tcmod rotate g_fQuest4 0.5 0.5 + pass 7 + tcmod rotate g_fQuest5 0.5 0.5 + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + tex3 = layer 3 + tex4 = layer 4 + tex5 = layer 5 + tex6 = layer 6 + tex7 = layer 7 + + alph0 = int g_QuestAlpha0 + alph1 = int g_QuestAlpha1 + alph2 = int g_QuestAlpha2 + alph3 = int g_QuestAlpha3 + alph4 = int g_QuestAlpha4 + alph5 = int g_QuestAlpha5 + + effect + { + texture tex0; + texture tex1; + texture tex2; + texture tex3; + texture tex4; + texture tex5; + texture tex6; + texture tex7; + + dword alph0; + dword alph1; + dword alph2; + dword alph3; + dword alph4; + dword alph5; + + technique l0 + { + pass p0 + { + ZWriteEnable = False; + AlphaBlendEnable = True; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + + AddressU[0] = Clamp; + AddressV[0] = Clamp; + + AlphaTestEnable = True; + AlphaFunc = Greater; + AlphaRef = 0; + + Texture[0] = ; + TexCoordIndex[0] = 0; + TexCoordIndex[1] = 1; + + ColorArg1[0] = Texture; + AlphaArg1[0] = Texture; + ColorOp[0] = SelectArg1; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + pass p1 + { + Texture[0] = ; + AlphaRef = 0; + } + pass p2 + { + Texture[0] = ; + AlphaRef = ; + } + pass p3 + { + Texture[0] = ; + AlphaRef = ; + } + pass p4 + { + Texture[0] = ; + AlphaRef = ; + } + pass p5 + { + Texture[0] = ; + AlphaRef = ; + } + pass p6 + { + Texture[0] = ; + AlphaRef = ; + } + pass p7 + { + Texture[0] = ; + AlphaRef = ; + } + } + } +} +*/ + +/* +shader "OBJ/CREATURES/dcera/dcera_head" +{ + castshadow + cull ccw + + layer "OBJ/CREATURES/dcera/dcera_head" + + tex0 = layer 0 + tfac0 = int g_TransColor + + effect + { + texture tex0; + DWORD tfac0; + + technique t0 + { + pass p0 + { + ZWriteEnable = True; + AlphaBlendEnable = true; + SrcBlend = SrcAlpha; + AlphaTestEnable = False; + DestBlend = InvSrcAlpha; + BlendOp = Add; + TextureFactor = ; + + AddressU[0] = Clamp; + AddressV[0] = Clamp; + TexCoordIndex[0] = 0; + Texture[0] = ; + AlphaArg1[0] = TFactor; + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate2x; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } + } +} + +shader "OBJ/CREATURES/dcera/dcera_hair" +{ + castshadow + cull ccw + + layer "OBJ/CREATURES/dcera/dcera_hair" + + tex0 = layer 0 + tfac0 = int g_TransColor + + effect + { + texture tex0; + DWORD tfac0; + + technique t0 + { + pass p0 + { + ZWriteEnable = True; + AlphaBlendEnable = true; + SrcBlend = SrcAlpha; + AlphaTestEnable = False; + DestBlend = InvSrcAlpha; + BlendOp = Add; + TextureFactor = ; + + AddressU[0] = Clamp; + AddressV[0] = Clamp; + TexCoordIndex[0] = 0; + Texture[0] = ; + AlphaArg1[0] = TFactor; + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate2x; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } + } +} + +shader "OBJ/CREATURES/dcera/dcera_body" +{ + castshadow + cull ccw + + layer "OBJ/CREATURES/dcera/dcera_body" + + tex0 = layer 0 + tfac0 = int g_TransColor + + effect + { + texture tex0; + DWORD tfac0; + + technique t0 + { + pass p0 + { + ZWriteEnable = True; + AlphaBlendEnable = true; + SrcBlend = SrcAlpha; + AlphaTestEnable = False; + DestBlend = InvSrcAlpha; + BlendOp = Add; + TextureFactor = ; + + AddressU[0] = Clamp; + AddressV[0] = Clamp; + TexCoordIndex[0] = 0; + Texture[0] = ; + AlphaArg1[0] = TFactor; + ColorArg1[0] = Texture; + ColorArg2[0] = Diffuse; + ColorOp[0] = Modulate2x; + AlphaOp[0] = SelectArg1; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } + } +} +*/ + + +//oltar knezky v k2l2a +shader "textures/special/oltar1_1" +{ + cull ccw + + layer "textures/special/oltar1_1" alpha + layer "textures/special/oltar1_2" alpha + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + + tfac0 = _eclass TFactor + tfac1 = func_wall_morph TexFactor2 + + effect "effect_morph_lightmap" +} + + +/* +shader "textures/special/gates_teleport" +{ + layer "textures/special/gates_teleport" + layer $lightmap + layer "textures/special/gates_teleport_glow" alpha + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + tfac = int g_iShaderTFactor + + effect + { + texture tex0; + texture tex1; + texture tex2; + DWORD tfac; + + technique e4 + { + pass p0 + { + ZWriteEnable = True; + AlphaBlendEnable = False; + AlphaTestEnable = False; + + TextureTransformFlags[0] = Disable; + AddressU[0] = Wrap; + AddressV[0] = Wrap; + AddressU[1] = Clamp; + AddressV[1] = Clamp; + + Texture[0] = ; + Texture[1] = ; + TexCoordIndex[0] = 0; + TexCoordIndex[1] = 1; + + ColorArg1[0] = Texture; + ColorOp[0] = SelectArg1; + + ColorArg1[1] = Texture; + ColorArg2[1] = Current; + ColorOp[1] = Modulate2x; + + ColorOp[2] = Disable; + AlphaOp[0] = Disable; + } + + pass p1 + { + ZWriteEnable = False; + AlphaBlendEnable = True; + AlphaTestEnable = False; + SrcBlend = SrcAlpha; + DestBlend = One; + BlendOp = Add; + + AddressU[0] = Wrap; + AddressV[0] = Wrap; + + Texture[0] = ; + TextureFactor = ; + + ColorArg1[0] = Texture; + ColorArg1[0] = Texture; + AlphaArg1[0] = Texture; + AlphaArg2[0] = TFactor; + ColorOp[0] = SelectArg1; + AlphaOp[0] = Modulate2x; + TexCoordIndex[0] = 0; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + } + } +} +*/ + +// healthbar +/* +shader "spr/misc/enemy_healthbar" +{ + sort 2 + cull none + + layer "Spr/misc/enemy_healthbar" alpha + + tex0 = layer 0 + tfac = g_iHealthFactor + +effect +{ + texture tex0; + dword tfac; + + technique t0 + { + pass p0 + { + AlphaBlendEnable = True; + AlphaTestEnable = True; + SrcBlend = SrcAlpha; + DestBlend = InvSrcAlpha; + BlendOp = Add; + AlphaFunc = Greater; + AlphaRef = ; + + AddressU[0] = Clamp; + AddressV[0] = Clamp; + + MinFilter[0] = Point; + MagFilter[0] = Point; + + Texture[0] = ; + ColorArg1[0] = Texture; + AlphaArg1[0] = Texture; + ColorOp[0] = SelectArg1; + AlphaOp[0] = SelectArg1; + TexCoordIndex[0] = 0; + + ColorOp[1] = Disable; + AlphaOp[1] = Disable; + } + + pass _nodraw + { + MinFilter[0] = Linear; + MagFilter[0] = Linear; + } + } +} +} +*/ + + +/* +shader "textures/window/vit_tem" +{ + //surfparm alphashadow + surfparm glass + //emap_surfacelight 450 + + layer "textures/window/vit_tem" + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + effect "lightmapped" +} +*/ +/* +shader "textures/window/vit_pan" +{ + //surfparm alphashadow + surfparm glass + //emap_surfacelight 550 + + layer "textures/window/vit_pan" alpha + layer "textures/env/vitraglass" + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + effect "lightmapped_window" +} +*/ + + +// 5 shaderu pro zmenu obrazu v k2l2b +shader "textures/window/obraz1" +{ + cull ccw + qer_image textures/window/obraz1 + + layer "textures/window/obraz_ram" + layer "textures/window/obraz1" + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + + tfac0 = _eclass TFactor + tfac1 = func_wall_morph TexFactor2 + + effect "effect_morph_lightmap2" +} +/* +shader "textures/window/obraz2" +{ + cull ccw + qer_image textures/window/obraz2 + + layer "textures/window/obraz_ram" + layer "textures/window/obraz2" + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + + tfac0 = int g_MorphColor0 + tfac1 = int g_MorphColor1 + + effect "effect_morph_lightmap" +} + +shader "textures/window/obraz3" +{ + cull ccw + qer_image textures/window/obraz3 + + layer "textures/window/obraz_ram" + layer "textures/window/obraz3" + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + + tfac0 = int g_MorphColor0 + tfac1 = int g_MorphColor1 + + effect "effect_morph_lightmap" +} + +shader "textures/window/obraz4" +{ + cull ccw + qer_image textures/window/obraz4 + + layer "textures/window/obraz_ram" + layer "textures/window/obraz4" + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + + tfac0 = int g_MorphColor0 + tfac1 = int g_MorphColor1 + + effect "effect_morph_lightmap" +} + +shader "textures/window/obraz5" +{ + cull ccw + qer_image textures/window/obraz5 + + layer "textures/window/obraz_ram" + layer "textures/window/obraz5" + layer $lightmap + + tex0 = layer 0 + tex1 = layer 1 + tex2 = layer 2 + + tfac0 = int g_MorphColor0 + tfac1 = int g_MorphColor1 + + effect "effect_morph_lightmap" +} +*/ + diff --git a/Alpha Prime/Mod/shaders/shaders.s b/Alpha Prime/Mod/shaders/shaders.s new file mode 100644 index 0000000..ed41eac --- /dev/null +++ b/Alpha Prime/Mod/shaders/shaders.s @@ -0,0 +1,31 @@ +#include "shaders/common.h" + +#include "shaders/obj.h" +#include "shaders/obj_static.h" +#include "shaders/obj_physics.h" +#include "shaders/obj_physicsparts.h" +#include "shaders/obj_terrain.h" + +#include "shaders/obj_creatures.h" +#include "shaders/obj_weapons.h" + +#include "shaders/efx.h" +#include "shaders/sky.h" +#include "shaders/sprites.h" +#include "shaders/special.h" + +#include "shaders/misc.h" +#include "shaders/wire.h" +#include "shaders/mudgore.h" +#include "shaders/trim.h" +#include "shaders/light.h" +#include "shaders/floor.h" +#include "shaders/door.h" + +#include "shaders/wall.h" +#include "shaders/wall2.h" +#include "shaders/glass.h" + +#include "shaders/decals.h" +#include "shaders/soundenv.h" +#include "shaders/trash.h" diff --git a/Alpha Prime/Mod/shaders/sky.h b/Alpha Prime/Mod/shaders/sky.h new file mode 100644 index 0000000..46156a6 --- /dev/null +++ b/Alpha Prime/Mod/shaders/sky.h @@ -0,0 +1,230 @@ +//--------------------------------------- +//sky +//-------------------------------------- + +// emap_sun +// color will be normalized, so it doesn't matter what range you use +// intensity falls off with angle but not distance 100 is a fairly bright sun +// stupen 0 = from the east, 90 = north, etc. vyska 0 = svitani /zapad, 90 = poledne + + +// FINAL SKYBOX SHADERS + +shader "textures/sky/viewer" +{ + surfparm SKY + surfparm NOIMPACT + surfparm NOLIGHTMAP + qer_editorimage "textures/sky/viewer/sky-5" + + //emap_surfacelight 40 +// emap_lightsubdivide 1024 + + //emap_forcesunlight + + layer "textures/sky/viewer/sky" +} + + +shader "textures/sky/planet" +{ + surfparm SKY + surfparm NOIMPACT + surfparm NOLIGHTMAP + + emap_sun 0.32 0.28 0.1 1000 160 50 + emap_surfacelight 100 + emap_lightsubdivide 1024 + + emap_forcesunlight + + layer "textures/sky/planet/sky" + qer_editorimage "textures/sky/planet/sky-2" +} + +shader "textures/sky/afield" +{ + surfparm SKY + surfparm NOIMPACT + surfparm NOLIGHTMAP + + emap_sun 0.33 0.28 0.1 500 160 50 + emap_surfacelight 380 + emap_lightsubdivide 256 + //emap_globaltexture + + emap_forcesunlight + + layer "textures/sky/afield/sky" + qer_editorimage "textures/sky/afield/sky-5" +} + + +shader "textures/sky/afieldtop" +{ + surfparm SKY + surfparm NOIMPACT + surfparm NOLIGHTMAP + + emap_sun 0.28 0.32 0.05 250 40 85 + emap_surfacelight 380 + emap_lightsubdivide 256 + //emap_globaltexture + + emap_forcesunlight + + layer "textures/sky/afieldtop/sky" + qer_editorimage "textures/sky/afieldtop/sky-5" +} + +shader "textures/sky/l01" +{ + surfparm SKY + surfparm NOIMPACT + surfparm NOLIGHTMAP + + emap_sun 0.9 0.7 0.5 1150 80 40 + emap_surfacelight 380 + emap_lightsubdivide 256 + //emap_globaltexture + + emap_forcesunlight + + layer "textures/sky/afield/sky" + qer_editorimage "textures/sky/afield/sky-5" +} + + +shader "textures/sky/l04" +{ + surfparm SKY + surfparm NOIMPACT + surfparm NOLIGHTMAP + + emap_sun 0.28 0.32 0.05 250 40 85 + emap_surfacelight 550 + emap_lightsubdivide 256 + //emap_globaltexture + + emap_forcesunlight + + layer "textures/sky/afield/sky" + qer_editorimage "textures/sky/afield/sky-5" +} + +shader "textures/sky/l08" +{ + surfparm SKY + surfparm NOIMPACT + surfparm NOLIGHTMAP + + emap_sun 0.9 0.7 0.4 1600 320 28 + emap_surfacelight 380 + emap_lightsubdivide 256 + //emap_globaltexture + + emap_forcesunlight + + layer "textures/sky/afield/sky" + qer_editorimage "textures/sky/afield/sky-5" +} + + +//toto je dabelsky trik, jak zamezit zbytecnemu vykreslovani ostatnich fejsu skyboxu :-) +shader "textures/sky/afield/sky-6" +{ + surfparm NODRAW +} + +shader "textures/sky/afieldtop/sky-6" +{ + surfparm NODRAW +} + +// *** rotosky *** + +shader "textures/sky/space01" +{ + + surfparm NOIMPACT + surfparm NOLIGHTMAP + surfparm nonsolid + + map nolight + sort translucent + + blend one srcalpha + pass + tcmod rotate g_fTime001R 0.5 0.5 + + diffusemap "textures/sky/space01_c" alpha + +} + +shader "textures/sky/space02" +{ + + surfparm NOIMPACT + surfparm NOLIGHTMAP + surfparm nonsolid + + map nolight + + sort translucent + + blend one srcalpha + pass + tcmod rotate g_fTime01R 0.5 0.5 + + diffusemap "textures/sky/space02_c" alpha +} + +/* +shader "textures/sky/level01" +{ + surfparm SKY + surfparm NOIMPACT + surfparm NOLIGHTMAP + qer_editorimage "textures/sky/01/sky-5" + + //emap_sun 0.28 0.28 0.24 65 250 45 + emap_surfacelight 120 + emap_lightsubdivide 1024 + + emap_forcesunlight + + layer "textures/sky/32/sky" +} +*/ + + +// FINAL FOGS + +// worldspawn OnStart +//this.ChangeFog(R, G, B, Dist, 0) +// trigger +//world.ChangeFog(R, G, B, Dist, fadetime) + +/* +shader "textures/sky/foglevel_parameter" +{ + surfparm trans + surfparm nonsolid + surfparm nodrop + surfparm fog + + fogparms g_vFogRGB g_fFogDist +} + +shader "textures/sky/foglevel00" +{ + surfparm trans + surfparm nonsolid + surfparm nodrop + surfparm fog + + fogparms "0.15 0.15 0.2" 1.46 + +} +*/ + diff --git a/Alpha Prime/Mod/shaders/soundenv.h b/Alpha Prime/Mod/shaders/soundenv.h new file mode 100644 index 0000000..a7f0c0b --- /dev/null +++ b/Alpha Prime/Mod/shaders/soundenv.h @@ -0,0 +1,1196 @@ +//surfparm 'slime' is just placeholder for future 'soundenv' +shader "textures/soundenv/BetweenBuildings" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} +shader "textures/soundenv/Bullet" +{ + + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm impact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/MountainsII" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/PSIDome" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Generic" +{ + qer_editorimage "textures/common/clip" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Padded_Cell" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Bathroom" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Living_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Stone_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Auditorium" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Concert_Hall" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Cave" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Arena" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Hangar" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Carpetted_Hallway" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Hallway" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Stone_Corridor" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Alley" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Forest" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/City" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Mountains" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Quarry" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Plain" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Parking_Lot" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Sewer_Pipe" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Underwater" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Drugged" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Dizzy" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Psychotic" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Dusty_Box_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Chapel" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Small_Water_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Heaven" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Hell" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Memory" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/City_Streets" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Subway" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Museum" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Library" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Underpass" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Abandoned_City" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Backyard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Rolling_Plains" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Deep_Canyon" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Creek" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Valley" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Hall" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Large_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Medium_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Small_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Cupboard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Alcove" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Long_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Short_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Castle_Courtyard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Hall" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Large_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Medium_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Small_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Cupboard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Alcove" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Long_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Short_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/Factory_Courtyard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Hall" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Large_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Medium_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Small_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Cupboard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Alcove" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Long_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Short_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/IcePalace_Courtyard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Hall" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Large_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Medium_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Small_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Cupboard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Alcove" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Long_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Short_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/SpaceStation_Courtyard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Hall" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Large_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Medium_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Small_Room" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Cupboard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Alcove" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Long_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Short_Passage" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} + +shader "textures/soundenv/WoodenShip_Courtyard" +{ + qer_editorimage "textures/common/soundenv" + qer_trans 0.40 + surfparm nolightmap + surfparm nomarks + surfparm nodraw + surfparm nonsolid + surfparm noimpact + surfparm detail + surfparm slime +} diff --git a/Alpha Prime/Mod/shaders/special.h b/Alpha Prime/Mod/shaders/special.h new file mode 100644 index 0000000..7f70cda --- /dev/null +++ b/Alpha Prime/Mod/shaders/special.h @@ -0,0 +1,20 @@ + +shader "obj/misc/lano_segment1" +{ + //sort 1 + //specular 1.0 + //specularpower 0.42 + //map nolight +/* + zwrite false + blend invsrcalpha srcalpha + alphatest 2*/ + + diffusemap "obj/misc/lano_segment1" alpha +} + + + + + + diff --git a/Alpha Prime/Mod/shaders/sprites.h b/Alpha Prime/Mod/shaders/sprites.h new file mode 100644 index 0000000..438be64 --- /dev/null +++ b/Alpha Prime/Mod/shaders/sprites.h @@ -0,0 +1,750 @@ + +// FIRE ---------------------------------- +shader "particle/animfire_mask" +{ + sort translucent + layer "textures/efx/fire" alpha + tex0 = layer 0 + effect "effect_particlemask" +} +shader "particle/animfire" +{ + sort translucent + layer "textures/efx/fire" + tex0 = layer 0 + effect "effect_particle" +} + + +// EXPLOSION ---------------------------------- +shader "particle/animexplosion_mask" +{ + sort translucent + layer "textures/efx/fire_billowing" alpha + tex0 = layer 0 + effect "effect_particlemask" +} +shader "particle/animexplosion" +{ + sort translucent + layer "textures/efx/fire_billowing" + tex0 = layer 0 + effect "effect_particle" +} + + +// SMOKE ---------------------------------- +shader "particle/animsmoke" +{ + sort translucent + layer "textures/efx/fire" alpha + tex0 = layer 0 + effect "effect_particlemask" +} + +// OTHER --------------------------------------- +shader "particle/glow/angelflare" +{ + sort translucent +// cull none + + layer "particle/sprites/angelflare" alpha + + tex0 = layer 0 + effect "effect_particle" + +} + +shader "particle/terraindust" +{ + sort translucent + + layer "particle/sprites/dust" alpha + + tex0 = layer 0 + effect "effect_particlemask" +} + + +shader "particle/glow/angelflarenb" +{ + sort translucent +// cull none + + layer "particle/sprites/angelflare" alpha + + tex0 = layer 0 + effect "effect_particle_nobuff" + +} + +shader "particle/smoke/heavysmoke" +{ + sort translucent +// cull none + + layer "particle/sprites/heavysmoke" alpha + + tex0 = layer 0 + effect "effect_particlemask" +} + +// new particles +shader "particle/flash/electric" +{ + sort translucent + + layer "sprites/flash/images/electric" + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/fire/flame1" +{ + sort translucent + + layer "particle/sprites/flamesmall" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/fire/flame1nb" +{ + sort translucent + + layer "particle/sprites/flamesmall" alpha + + tex0 = layer 0 + effect "effect_particle_nobuff" +} + +shader "particle/fire/fire1" +{ + sort translucent + + layer "particle/sprites/firesmall" alpha + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/fire/fire1nb" +{ + sort translucent + + layer "particle/sprites/firesmall" alpha + tex0 = layer 0 + effect "effect_particle_nobuff" +} + +shader "particle/fire/glow1" +{ + sort translucent + + layer "particle/sprites/glow" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/fire/glow2" +{ + sort translucent + + layer "particle/sprites/glow2" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/fire/sparks1" +{ + sort translucent + + layer "particle/sprites/spark" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/fire/sparks1long" +{ + sort translucent + + layer "particle/sprites/sparklong" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/fire/sparks1glow" +{ + sort translucent + + layer "particle/sprites/spark2" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/fire/sparkcloud" +{ + sort translucent + + layer "particle/sprites/sparkcloud" alpha + + tex0 = layer 0 + effect "effect_particle" +} + + +shader "particle/fire/sparkdensecloud" +{ + sort translucent + + layer "particle/sprites/sparkdensecloud" alpha + + tex0 = layer 0 + + effect "effect_particlemaskclamp" +} + + +shader "particle/fire/sparks1nb" +{ + sort translucent + + layer "particle/sprites/spark" alpha + + tex0 = layer 0 + effect "effect_particle_nobuff" +} + + +shader "particle/fire/sparks2" +{ + sort translucent + + layer "particle/sprites/dot" alpha + + tex0 = layer 0 + effect "effect_particle" +} + + + +shader "particle/fire/drips1" +{ + sort translucent + + layer "particle/sprites/drip" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/smoke/smoke1" +{ + sort translucent + + layer "particle/sprites/smoke" alpha + + tex0 = layer 0 + effect "effect_particlemask" +} + + +shader "particle/animtest" +{ + sort translucent + + layer "textures/efx/fireball01_mid" alpha + + tex0 = layer 0 + effect "effect_particlemask" +} + +shader "particle/smoke/smoke1add" +{ + sort translucent + + layer "particle/sprites/smoke" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/smoke/smoke2" +{ + sort translucent + + layer "particle/sprites/smoke2" alpha + + tex0 = layer 0 + effect "effect_particlemask" + +} + + +shader "particle/smoke/smoke3" +{ + sort translucent + + layer "particle/sprites/smoke3" alpha + + tex0 = layer 0 + effect "effect_particlemask" + +} + +shader "particle/smoke/smoke2add" +{ + sort translucent + + layer "particle/sprites/smoke2" alpha + + tex0 = layer 0 + effect "effect_particle" + +} + +shader "particle/water/streamlong" +{ + sort translucent + + layer "particle/sprites/waterstreamlong" alpha + + tex0 = layer 0 + effect "effect_particlemask" +} + +shader "particle/water/streamlong2" +{ + sort translucent + + layer "particle/sprites/waterstreamlong" alpha + + tex0 = layer 0 + effect "effect_particle" +} + +shader "particle/misc/dot" +{ + sort translucent + + layer "particle/sprites/dot" alpha + + tex0 = layer 0 + effect "effect_particlemask" +} + +shader "particle/misc/dotclamp" +{ + sort translucent + + layer "particle/sprites/dot" alpha + + tex0 = layer 0 + effect "effect_particlemaskclamp" +} + + +shader "particle/misc/debris1" +{ + sort translucent + + layer "particle/sprites/debris1" alpha + + tex0 = layer 0 + effect "effect_particlemaskclamp" +} + + +shader "particle/misc/blood1" +{ + sort translucent + + layer "particle/sprites/blood1" alpha + + tex0 = layer 0 + effect "effect_particlemask" +} + +shader "particle/misc/blooddrop" +{ + sort translucent + + layer "particle/sprites/drop02" alpha + + tex0 = layer 0 + effect "effect_particlemodulate" +} + +shader "particle/misc/liquidrop" +{ + sort translucent + + layer "particle/sprites/drop01" alpha + + tex0 = layer 0 + effect "effect_particleadd" +} + +// *** Coronas, flares *** + +shader "spr/effects/flares/lens0" +{ + sort translucent + cull none + + layer "spr/effects/flares/lens0" + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + +shader "spr/effects/flares/lens1" +{ + sort translucent + cull none + + layer "spr/effects/flares/lens1" alpha + + tex0 = layer 0 + tfac = Particle TFactor + effect "effect_glow" +} + + +shader "sprites/corona/images/white" +{ + sort translucent + cull none + + layer "sprites/corona/images/white" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + +shader "sprites/corona/images/whitenb" +{ + sort translucent + cull none + + layer "sprites/corona/images/white" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow_nobuff" +} + + +shader "sprites/corona/images/orange" +{ + sort translucent + cull none + + layer "sprites/corona/images/orange" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + +shader "sprites/corona/images/orangenb" +{ + sort translucent + cull none + + layer "sprites/corona/images/orange" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow_nobuff" +} + +shader "sprites/corona/images/green" +{ + sort translucent + cull none + + layer "sprites/corona/images/green" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + +shader "sprites/corona/images/red" +{ + sort translucent + cull none + + layer "sprites/corona/images/red" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + +shader "sprites/corona/images/redflare" +{ + sort translucent + cull none + + layer "sprites/corona/images/redflare" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + + +shader "sprites/corona/images/blue" +{ + sort translucent + cull none + + layer "sprites/corona/images/blue" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + +shader "sprites/corona/images/bluenb" +{ + sort translucent + cull none + + layer "sprites/corona/images/blue" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow_nobuff" +} + +shader "sprites/shine/images/whitesmall" +{ + sort translucent + cull none + + layer "sprites/shine/images/whitesmall" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow_nobuff" +} + +shader "sprites/shine/images/whitemed" +{ + sort translucent + cull none + + layer "sprites/shine/images/whitemed" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow_nobuff" +} + +shader "sprites/shine/images/whitemed2" +{ + sort translucent + cull none + + layer "sprites/shine/images/white2med" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow_nobuff" +} + +shader "sprites/shine/images/whitemed3" +{ + sort translucent + cull none + + layer "sprites/shine/images/white3med" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow_nobuff" +} + +shader "sprites/shine/images/orangesmall" +{ + sort translucent + cull none + + layer "sprites/shine/images/orangesmall" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow_nobuff" +} + + + +shader "spr/effects/glow/corona4" +{ + sort translucent + cull none + + layer "spr/effects/glow/corona4" alpha + + tex0 = layer 0 + tfac = ExtClass TFactor + effect "effect_glow" +} + +//*** STREAKS *** +shader "sprites/streak/streak1" +{ + sort translucent + zwrite false + map nolight + cull none +sort overlay + + + parm0 (DynamicOverlaySprite row0) //float[4] + parm1 (DynamicOverlaySprite row1) //float[4] + // diffusemap2 $renderview clampu clampv + //diffusemap3 "gfx/black" alpha nomipmap + + blend one one + diffusemap "sprites/streak/streak1" + + material haze +} + +shader "sprites/streak/streak2" +{ + sort translucent + zwrite false + map nolight + cull none + + blend one one + diffusemap "sprites/streak/streak2" + +sort overlay + + + parm0 (DynamicOverlaySprite row0) //float[4] + parm1 (DynamicOverlaySprite row1) //float[4] + // diffusemap2 $renderview clampu clampv + //diffusemap3 "gfx/black" alpha nomipmap + + material haze +} + +shader "sprites/streak/streak3" +{ + sort translucent + zwrite false + map nolight + cull none + + blend one one + diffusemap "sprites/streak/streak3" + +sort overlay + + parm0 (DynamicOverlaySprite row0) //float[4] + parm1 (DynamicOverlaySprite row1) //float[4] + // diffusemap2 $renderview clampu clampv + //diffusemap3 "gfx/black" alpha nomipmap + + material haze +} + +shader "sprites/streak/streak4" +{ +castshadow + sort translucent + zwrite false + map nolight + cull none + + blend one one + diffusemap "sprites/streak/streak4" + +sort overlay + + + parm0 (DynamicOverlaySprite row0) //float[4] + parm1 (DynamicOverlaySprite row1) //float[4] + // diffusemap2 $renderview clampu clampv + //diffusemap3 "gfx/black" alpha nomipmap + + material haze +} + + +// streak tests below + +shader "obj/weapons/streak" +{ + cull none + sort translucent + + layer "obj/weapons/streak" alpha + + tex0 = layer 0 + effect "nolightmap_trans_fullbright" + + +sort overlay + parm0 (DynamicOverlaySprite row0) //float[4] + parm1 (DynamicOverlaySprite row1) //float[4] + // diffusemap2 $renderview clampu clampv + //diffusemap3 "gfx/black" alpha nomipmap + + + material haze +} + +shader "spr/shotstreak" +{ + sort translucent + zwrite false + map nolight + cull none + blend one srcalpha + diffusemap "obj/weapons/streak2" alpha //"obj/weapons/streakshot" + +sort overlay + + + parm0 (DynamicOverlaySprite row0) //float[4] + parm1 (DynamicOverlaySprite row1) //float[4] + // diffusemap2 $renderview clampu clampv + //diffusemap3 "gfx/black" alpha nomipmap + + material haze +} + +shader "spr/uv_debug" +{ + sort translucent + zwrite true + map nolight + cull none + diffusemap "textures/debug_UV" +} + +shader "spr/debug_glass" +{ + cull none + sort translucent + layer "textures/debug_glass" alpha + + tex0 = layer 0 + effect "nolightmap_trans" +} diff --git a/Alpha Prime/Mod/shaders/trash.h b/Alpha Prime/Mod/shaders/trash.h new file mode 100644 index 0000000..82f9fa2 --- /dev/null +++ b/Alpha Prime/Mod/shaders/trash.h @@ -0,0 +1,415 @@ +// pro pokusy a testovani + +shader "livia" +{ + surfparm flesh + //castshadow + specular $nmapalpha + specularpower 0.51 + surfparm nomarks + + diffusemap "obj/creatures/Liv_head_c" + normalmap "obj/creatures/Liv_head_n" alpha +} + + +shader "warenhead2" +{ + surfparm flesh + //castshadow + specular $nmapalpha + specularpower 0.52 + surfparm nomarks + + diffusemap "obj/creatures/warenhead_c" + normalmap "obj/creatures/warenhead_n" alpha +} + +shader "com1" +{ + surfparm flesh + //castshadow + specular $nmapalpha + specularpower 0.52 + surfparm nomarks + + diffusemap "obj/creatures/Com1_c" + normalmap "obj/creatures/Com1_n" alpha +} + + +shader "dead_head" +{ + surfparm flesh + castshadow + specular $nmapalpha + specularpower 0.52 + + diffusemap "obj/creatures/dead/dead_head_c" + normalmap "obj/creatures/dead/dead_head_n" alpha +} + + +shader "dead" +{ + surfparm flesh + castshadow + specular $nmapalpha + specularpower 0.52 + + diffusemap "obj/creatures/dead/dead_c" + normalmap "obj/creatures/dead/dead_n" alpha +} + +// !!@@## + +shader "lcd02" +{ + specular $nmapalpha +castshadow + diffusemap "obj/physics/lcd02_c" + normalmap "obj/physics/lcd02_n" alpha +} + +shader "lcd01" +{ + specular $nmapalpha +castshadow + diffusemap "obj/physics/lcd01_c" + normalmap "obj/physics/lcd01_n" alpha +} +shader "lcd_display" +{ + surfparm detail + surfparm nomarks +castshadow + specular 0.2 + specularpower 0.32 + + map nolight + +#ifdef _XBOX + pass + tcmod shift 0.0 g_fTime10 + + diffusemap "obj/static/usedisp01_c" +#else + diffusemap $gui0 +#endif +} + +shader "lcd_display2" +{ + surfparm detail + surfparm nomarks +castshadow + specular 0.2 + specularpower 0.32 + + map nolight + +#ifdef _XBOX + pass + tcmod shift 0.0 g_fTime10 + + diffusemap "obj/static/usedisp01_c" +#else + diffusemap $renderview +#endif +} + +shader "elevator-big-01" +{ + castshadow + specular $nmapalpha + + diffusemap "obj/elevators/e_big01_c" + normalmap "obj/elevators/e_big01_n" alpha +} +shader "elevator-big-01-lights1" +{ + //castshadow + map nolight + color g_iColorElevatorBig01_L1 + + diffusemap "obj/elevators/e_big01_c" + normalmap "obj/elevators/e_big01_n" alpha +} +shader "elevator-big-01-lights2" +{ + //castshadow + map nolight + color g_iColorElevatorBig01_L2 + + diffusemap "obj/elevators/e_big01_c" + normalmap "obj/elevators/e_big01_n" alpha +} +shader "elevator-big-01-display" +{ + surfparm detail + surfparm glass + + specular 0.2 + specularpower 0.32 + + map nolight + +#ifdef _XBOX + pass + tcmod shift 0.0 g_fTime10 + + diffusemap "textures/glass/lcd1_c" +#else + diffusemap $gui0 +#endif +} + +shader "obj/static/girder1ax" +{ + surfparm trans + surfparm nomarks + surfparm metal + castshadow + specular $nmapalpha + specularpower 0.42 + + cull none + alphatest 16 + + diffusemap "obj/static/girder1ax_c" + normalmap "obj/static/girder1ax_n" alpha +} + +shader "obj/physics/bota_1" +{ + specular $nmapalpha + specularpower 0.42 +castshadow + diffusemap "obj/physics/bota_1_c" + normalmap "obj/physics/bota_1_n" alpha +} + + +shader "container01" +{ + //castshadow + specular $nmapalpha + + specularpower 0.32 + diffusemap "obj/physics/container01_c" + normalmap "obj/physics/container01_n" +} + +shader "obj/physicsparts/TransCart" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/physicsparts/TransCart_c" alpha + normalmap "obj/physicsparts/TransCart_n" alpha +} + +shader "obj/lights/walltest" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/lights/walltest_c" alpha + normalmap "obj/lights/walltest_n" alpha +} + +shader "obj/lights/walltest2" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/lights/walltest_c" alpha + normalmap "obj/lights/walltest_n" alpha +} + +shader "obj/items/HeadSet_light" +{ + surfparm nolightmap + surfparm trans + surfparm nonsolid + surfparm detail + surfparm nomarks + + zwrite false + sort translucent + + blend one srcalpha + map nolight + + diffusemap "textures/light/lightconcrete_white" +} + +shader "obj/items/HeadSet" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/items/HeadSet_c" alpha + normalmap "obj/items/HeadSet_n" alpha +} + + + +shader "obj/misc/ZachrannyModul" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/misc/ZachrannyModul_c" alpha + normalmap "obj/misc/ZachrannyModul_n" alpha +} + +shader "obj/physicsparts/sentrygun" +{ + castshadow + specular $alpha + specularpower 0.77 + + diffusemap "obj/physicsparts/sentrygun_c" + normalmap "obj/physicsparts/sentrygun_n" +} + +shader "obj/static/cryodevice" +{ + surfparm metal + specular $alpha + specularpower 0.77 +castshadow + diffusemap "obj/static/cryodevice_c" + normalmap "obj/static/cryodevice_n" +} + +shader "obj/static/cryodevice_glass" +{ + surfparm glass + surfparm trans + surfparm nocastshadow + + specular 1 + specularpower 0.42 + reflection 0.8 + map nolight + + blend invsrcalpha srcalpha + + diffusemap "textures/glass/cryo1" alpha + envmap $nearestcube +} + +shader "obj/elevators/elevator_01" +{ + specular $alpha + specularpower 0.72 + + diffusemap "obj/elevators/elevator_01_c" + normalmap "obj/elevators/elevator_01_n" +} + + +shader "obj/elevators/elevator_01_Display" +{ + surfparm detail + surfparm glass + + specular 0.2 //$alpha + specularpower 0.32 + +// blend invsrcalpha srcalpha + + map nolight + +#ifdef _XBOX + pass + tcmod shift 0.0 g_fTime10 + + diffusemap "textures/glass/lcd1_c" +#else + diffusemap $gui0 +#endif +} + +shader "obj/misc/zabradli_01" +{ + specular $alpha +castshadow + diffusemap "obj/misc/zabradli_01_c" + normalmap "obj/misc/zabradli_01_n" +} + +shader "obj/columns/svetlosloup" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/columns/svetlosloup_c" alpha + normalmap "obj/columns/svetlosloup_n" alpha +} + + +/* ------------- + j_test + ------------- */ + +shader "obj/creatures/ruka" +{ + //castshadow + specular $nmapalpha + + specularpower 0.52 + + diffusemap "obj/creatures/ruka_c" alpha + normalmap "obj/creatures/ruka_n" alpha +} + +shader "technicist_01_head" +{ + surfparm flesh +// castshadow + specular $nmapalpha + specularpower 0.77 + surfparm nomarks + + diffusemap "obj/creatures/technicist_01_head_c" + normalmap "obj/creatures/technicist_01_head_n" alpha +} + +shader "romale" +{ + surfparm flesh +// castshadow + specular $nmapalpha + specularpower 0.77 + surfparm nomarks + + diffusemap "obj/creatures/prospector_head_c" + normalmap "obj/creatures/prospector_head_n" alpha +} + +shader "Technik2_head" +{ + surfparm flesh +// castshadow + specular $nmapalpha + specularpower 0.77 + surfparm nomarks + + diffusemap "obj/creatures/Technik2_head_c" + normalmap "obj/creatures/Technik2_head_n" alpha +} diff --git a/Alpha Prime/Mod/shaders/trim.h b/Alpha Prime/Mod/shaders/trim.h new file mode 100644 index 0000000..bd7c1da --- /dev/null +++ b/Alpha Prime/Mod/shaders/trim.h @@ -0,0 +1,648 @@ +shader "textures/trim/wirestep_02" +{ + surfparm iron + specular $nmapalpha +castshadow + + diffusemap "textures/trim/wirestep_02_c" + normalmap "textures/trim/wirestep_02_n" alpha +} + +shader "textures/trim/trimsteel" +{ + surfparm metal + specular $nmapalpha +castshadow + diffusemap "textures/trim/trimsteel_c" + qer_editorimage "textures/trim/trimsteel" + normalmap "textures/trim/trimsteel_n" alpha +} + + +shader "textures/trim/trimsteelb" +{ + surfparm metal + specular $nmapalpha +castshadow + diffusemap "textures/trim/trimsteelb_c" + qer_editorimage "textures/trim/trimsteelb" + normalmap "textures/trim/trimsteel_n" alpha +} + +shader "textures/trim/trimsteel2" +{ + surfparm metal + specular $nmapalpha +castshadow + diffusemap "textures/trim/trimsteel2_c" + qer_editorimage "textures/trim/trimsteel2" + normalmap "textures/trim/trimsteel2_n" alpha +} + +shader "textures/trim/yeltrim" +{ + surfparm metal + specular $nmapalpha +castshadow + diffusemap "textures/trim/yeltrim_c" + qer_editorimage "textures/trim/yeltrim" + normalmap "textures/trim/yeltrim_n" alpha +} + +shader "textures/trim/yeltrim_noN" +{ + surfparm metal + tesssize 144 +castshadow + diffusemap "textures/trim/yeltrim_c" + qer_editorimage "textures/trim/yeltrim" + +} + +shader "textures/trim/yeltrim_a" +{ + surfparm metal + specular $nmapalpha +castshadow + diffusemap "textures/trim/yeltrim_a_c" + qer_editorimage "textures/trim/yeltrim" + normalmap "textures/trim/yeltrim_n" alpha +} + +shader "textures/trim/trimgrating1" +{ + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/trimgrating1_c" + qer_editorimage "textures/trim/trimgrating1" + normalmap "textures/trim/trimgrating1_n" alpha +} + +shader "textures/trim/trimgrating2" +{ + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/trimgrating2_c" + qer_editorimage "textures/trim/trimgrating2" + normalmap "textures/trim/trimgrating2_n" alpha +} + +shader "textures/trim/cable1" +{ + tesssize 36 + surfparm rubber + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe1c_c" + qer_editorimage "textures/trim/pipe1" + normalmap "textures/trim/pipe1_n" alpha +} + + +shader "textures/trim/cable1_nonsolid" +{ + tesssize 36 + surfparm nonsolid + surfparm rubber + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe1c_c" + qer_editorimage "textures/trim/pipe1" + normalmap "textures/trim/pipe1_n" alpha +} + +shader "textures/trim/cable2" +{ + tesssize 36 + surfparm rubber + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_04_c" + normalmap "textures/trim/Pipe_04_n" alpha +} + + +shader "textures/trim/cable2_nonsolid" +{ + tesssize 32 + surfparm nonsolid + surfparm rubber + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_04_c" + normalmap "textures/trim/Pipe_04_n" alpha +} + +shader "textures/trim/rail" +{ + tesssize 64 + surfparm iron + specular 0.3 //$alpha +castshadow + diffusemap "textures/trim/rail_c" + +} + +shader "textures/trim/rail_16" +{ + tesssize 16 + surfparm iron + specular 0.3 //$alpha +castshadow + diffusemap "textures/trim/rail_c" + +} + +shader "textures/trim/pipe1" +{ + tesssize 32 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe1_c" + qer_editorimage "textures/trim/pipe1" + normalmap "textures/trim/pipe1_n" alpha +} + +shader "textures/trim/pipe1_t64" +{ + tesssize 64 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe1_c" + qer_editorimage "textures/trim/pipe1" + normalmap "textures/trim/pipe1_n" alpha +} + +shader "textures/trim/pipe1b" +{ + tesssize 32 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe1b_c" + qer_editorimage "textures/trim/pipe1b" + normalmap "textures/trim/pipe1b_n" alpha +} + +shader "textures/trim/pipe1b_t64" +{ + tesssize 64 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe1b_c" + qer_editorimage "textures/trim/pipe1b" + normalmap "textures/trim/pipe1b_n" alpha +} + +shader "textures/trim/pipe2" +{ + tesssize 128 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe2_c" + qer_editorimage "textures/trim/pipe2" + normalmap "textures/trim/pipe2_n" alpha +} + +shader "textures/trim/pipe2_t64" +{ + tesssize 64 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe2_c" + qer_editorimage "textures/trim/pipe2" + normalmap "textures/trim/pipe2_n" alpha +} + +shader "textures/trim/pipe2b" +{ + tesssize 128 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe2b_c" + qer_editorimage "textures/trim/pipe2b" + normalmap "textures/trim/pipe2b_n" alpha +} + +shader "textures/trim/pipe2b_t64" +{ + tesssize 64 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/pipe2b_c" + qer_editorimage "textures/trim/pipe2b" + normalmap "textures/trim/pipe2b_n" alpha +} + + +shader "textures/trim/Pipe_03" +{ + tesssize 32 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_03_c" + normalmap "textures/trim/Pipe_03_n" alpha +} + +// nekde nejaka demence v modelu s trubkama +shader "textures/trim/Pipe_03_c" +{ + tesssize 32 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_03_c" + normalmap "textures/trim/Pipe_03_n" alpha +} + +shader "textures/trim/Pipe_03_t64" +{ + tesssize 64 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_03_c" + normalmap "textures/trim/Pipe_03_n" alpha +} + +shader "textures/trim/Pipe_03_t12" +{ + tesssize 12 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_03_c" + normalmap "textures/trim/Pipe_03_n" alpha +} + +shader "textures/trim/Pipe_03_t40" +{ + tesssize 40 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_03_c" + normalmap "textures/trim/Pipe_03_n" alpha +} + +shader "textures/trim/Pipe_04" +{ + tesssize 32 + surfparm rubber + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_04_c" + normalmap "textures/trim/Pipe_04_n" alpha +} + +shader "textures/trim/Pipe_05" +{ + tesssize 32 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_05_c" + normalmap "textures/trim/Pipe_05_n" alpha +} + +shader "textures/trim/Pipe_06" +{ + tesssize 128 + surfparm iron + specular $nmapalpha +castshadow + diffusemap "textures/trim/Pipe_06_c" + normalmap "textures/trim/Pipe_06_n" alpha +} + +shader "textures/trim/TrimMetal01" +{ + surfparm metal + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal01_c" + normalmap "textures/trim/TrimMetal01_n" alpha +} + +shader "textures/trim/TrimMetal01a" +{ + surfparm metal + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal01a_c" + normalmap "textures/trim/TrimMetal01_n" alpha +} + +shader "textures/trim/TrimMetal02" +{ + surfparm iron + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal02_c" + normalmap "textures/trim/TrimMetal02_n" alpha +} + +shader "textures/trim/TrimMetal03" +{ + surfparm iron + specular $nmapalpha + + + diffusemap "textures/trim/TrimMetal03_c" + normalmap "textures/trim/TrimMetal03_n" alpha +} + +shader "textures/trim/TrimMetal03a" +{ + surfparm iron + specular $nmapalpha + + + diffusemap "textures/trim/TrimMetal03a_c" + normalmap "textures/trim/TrimMetal03_n" alpha +} + +shader "textures/trim/TrimMetal04" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal04_c" + normalmap "textures/trim/TrimMetal04_n" alpha +} + +shader "textures/trim/TrimMetal04a" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal04a_c" + normalmap "textures/trim/TrimMetal04_n" alpha +} + +shader "textures/trim/TrimMetal05" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal05_c" + normalmap "textures/trim/TrimMetal05_n" alpha +} + +shader "textures/trim/TrimMetal06" +{ + surfparm metal + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal06_c" + normalmap "textures/trim/TrimMetal06_n" alpha +} + +shader "textures/trim/TrimMetal06a" +{ + surfparm metal + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal06a_c" + normalmap "textures/trim/TrimMetal06_n" alpha +} + +shader "textures/trim/TrimMetal07" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal07_c" + normalmap "textures/trim/TrimMetal07_n" alpha +} + +shader "textures/trim/TrimMetal08" +{ + surfparm beton + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal08_c" + normalmap "textures/trim/TrimMetal08_n" alpha +} + +shader "textures/trim/TrimMetal09" +{ + surfparm iron + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal09_c" + normalmap "textures/trim/TrimMetal09_n" alpha +} + +shader "textures/trim/TrimMetal10" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal10_c" + normalmap "textures/trim/TrimMetal10_n" alpha +} + +shader "textures/trim/TrimMetal10a" +{ + surfparm iron + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal10a_c" + normalmap "textures/trim/TrimMetal10_n" alpha +} + +shader "textures/trim/TrimMetal10b" +{ + surfparm iron + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal10b_c" + normalmap "textures/trim/TrimMetal10b_n" alpha +} + +shader "textures/trim/TrimMetal10c" +{ + surfparm iron + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/TrimMetal10c_c" + normalmap "textures/trim/TrimMetal10b_n" alpha +} + +shader "textures/trim/TrimMetal11" +{ + surfparm iron + specular $nmapalpha + tesssize 64 + + diffusemap "textures/trim/TrimMetal11_c" + normalmap "textures/trim/TrimMetal11_n" alpha +} + +shader "textures/trim/TrimMetal12" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal12_c" + normalmap "textures/trim/TrimMetal12_n" alpha +} + +shader "textures/trim/TrimMetal13" +{ + + surfparm trans + surfparm detail + surfparm nomarks + surfparm metal + surfparm alphashadow + + specular $nmapalpha + specularpower 0.43 + alphatest 16 + + diffusemap "textures/trim/TrimMetal13_c" + normalmap "textures/trim/TrimMetal13_n" alpha +} + +shader "textures/trim/TrimMetal13a" +{ + + surfparm trans + surfparm detail + surfparm nomarks + surfparm metal + surfparm alphashadow + + specular $nmapalpha + specularpower 0.43 + alphatest 16 + + diffusemap "textures/trim/TrimMetal13a_c" + normalmap "textures/trim/TrimMetal13_n" alpha +} + +shader "textures/trim/TrimMetal14" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal14_c" + normalmap "textures/trim/TrimMetal14_n" alpha +} + +shader "textures/trim/TrimMetal14a" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal14a_c" + normalmap "textures/trim/TrimMetal14_n" alpha +} + +shader "textures/trim/TrimMetal1401" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/TrimMetal1401_c" + normalmap "textures/trim/TrimMetal1401_n" alpha +} + +shader "textures/trim/E_TrimMetal01" +{ + surfparm metal + specular $nmapalpha + + diffusemap "textures/trim/E_TrimMetal01_c" + normalmap "textures/trim/E_TrimMetal01_n" alpha +} + +shader "textures/trim/E_TrimMetal02" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/E_TrimMetal02_c" + normalmap "textures/trim/E_TrimMetal02_n" alpha +} + +shader "textures/trim/E_TrimMetal03" +{ + surfparm iron + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/E_TrimMetal03_c" + normalmap "textures/trim/E_TrimMetal03_n" alpha +} + +shader "textures/trim/H_MetalTrim_02" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/H_MetalTrim_02_c" + normalmap "textures/trim/H_MetalTrim_02_n" alpha +} + +shader "textures/trim/H_MetalTrim_02_envspec" +{ + + surfparm iron + specular $nmapalpha + reflection 0.0506 + diffusemap "textures/trim/H_MetalTrim_02_c" + normalmap "textures/trim/H_MetalTrim_02_n" alpha + envmap $nearestcube +} + + +shader "textures/trim/H_MetalTrim_02b" +{ + surfparm iron + specular $nmapalpha + + diffusemap "textures/trim/H_MetalTrim_02_c" + normalmap "textures/trim/H_MetalTrim_02b_n" alpha +} + +shader "textures/trim/H_MetalTrim_03" +{ + surfparm iron + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/H_MetalTrim_03_c" + normalmap "textures/trim/H_MetalTrim_03_n" alpha +} + +shader "textures/trim/H_MetalTrim_04" +{ + surfparm iron + specular $nmapalpha + tesssize 128 + + diffusemap "textures/trim/H_MetalTrim_04_c" + normalmap "textures/trim/H_MetalTrim_04_n" alpha +} diff --git a/Alpha Prime/Mod/shaders/wall.h b/Alpha Prime/Mod/shaders/wall.h new file mode 100644 index 0000000..b372c71 --- /dev/null +++ b/Alpha Prime/Mod/shaders/wall.h @@ -0,0 +1,250 @@ +shader "textures/default" +{ + specular $nmapalpha + + diffusemap "textures/default" + normalmap "textures/default_n" +} + +shader "textures/defaulttga" +{ + specular $nmapalpha + + diffusemap "textures/default" + normalmap "textures/defaulttga_n" +} + +shader "textures/defaultdds" +{ + specular $nmapalpha + + diffusemap "textures/default" + normalmap "textures/defaultdds_n" +} + + + + +shader "textures/wall/rock1" +{ + tesssize 512 + surfparm stone + specular $nmapalpha + //specularpower 0.61 + + diffusemap "textures/wall/rock1_c" + qer_editorimage "textures/wall/rock1_c" + + normalmap "textures/wall/rock1_n" alpha +} + +shader "textures/wall/rock1_nonm" +{ + tesssize 512 + surfparm stone + + diffusemap "textures/wall/rock1_c" + qer_editorimage "textures/wall/rock1_c" +} + + +shader "textures/wall/rock2" +{ + tesssize 512 + surfparm stone + specular $nmapalpha + //specularpower 0.61 + + diffusemap "textures/wall/rock2_c" + qer_editorimage "textures/wall/rock2_c" + + normalmap "textures/wall/rock2_n" alpha +} + +shader "textures/wall/rock2a" +{ + tesssize 512 + surfparm stone + specular $nmapalpha + //specularpower 0.61 + + diffusemap "textures/wall/rock2_c" + qer_editorimage "textures/wall/rock2a_c" + + normalmap "textures/wall/rock2_n" alpha +} + +shader "textures/wall/rock3" +{ + tesssize 512 + surfparm stone + specular $nmapalpha + //specularpower 0.61 + + diffusemap "textures/wall/rock3_c" + qer_editorimage "textures/wall/rock3_c" + + normalmap "textures/wall/rock1_n" alpha +} + + +shader "textures/wall/rock1_glow" +{ + tesssize 256 + + surfparm trans + surfparm nomarks + surfparm noimpact + surfparm nonsolid + surfparm nodrop + surfparm nocastshadow + surfparm detail + surfparm nolightmap + surfparm slime + +//alphatest 1 // zatim +sort translucent + specular 0 //$alpha + //specularpower 0.41 + map nolight + + blend one srcalpha + + diffusemap "textures/terrain/hubbardium01_c" alpha +} + + + +shader "textures/wall/PlastWall_04_c" +{ + specular $nmapalpha + specularpower 0.751 + diffusemap "textures/wall/PlastWall_04_c" + normalmap "textures/wall/PlastWall_04_n" alpha +} + +shader "textures/wall/PlastWall_03_c" +{ + specular $nmapalpha + specularpower 0.51 + diffusemap "textures/wall/PlastWall_03_c" + normalmap "textures/wall/PlastWall_03_n" alpha +} + +shader "textures/wall/PlastWall_02_c" +{ + specular $nmapalpha + specularpower 0.51 + diffusemap "textures/wall/PlastWall_02_c" + normalmap "textures/wall/PlastWall_02_n" alpha +} + +shader "textures/wall/PlastWall_01_c" +{ + specular $nmapalpha + specularpower 0.51 + diffusemap "textures/wall/PlastWall_01_c" + normalmap "textures/wall/PlastWall_01_n" alpha +} + +shader "textures/wall/MetalWall_03_c" +{ + specular $nmapalpha + specularpower 0.51 + diffusemap "textures/wall/MetalWall_03_c" + normalmap "textures/wall/MetalWall_03_n" alpha +} + +shader "textures/wall/MetalWall_02_c" +{ + tesssize 144 + specular $nmapalpha + specularpower 0.72 + diffusemap "textures/wall/MetalWall_02_c" + normalmap "textures/wall/MetalWall_02_n" alpha +} + +shader "textures/wall/MetalWall_01_c" +{ + specular $nmapalpha + specularpower 0.72 + diffusemap "textures/wall/MetalWall_01_c" + normalmap "textures/wall/MetalWall_01_n" alpha +} + +shader "textures/wall/MetalWall_01b_c" +{ + specular $nmapalpha + surfparm plastic + //specularpower 0.52 + reflection 0.091 + + diffusemap "textures/wall/MetalWall_01b_c" + normalmap "textures/wall/MetalWall_01_n" alpha + envmap $nearestcube +} + +shader "textures/wall/MetalWall_01c_c" +{ + specular $nmapalpha + specularpower 0.72 + diffusemap "textures/wall/MetalWall_01c_c" + normalmap "textures/wall/MetalWall_01c_n" alpha +} + +shader "textures/wall/H_Light_01" +{ + specular $nmapalpha + specularpower 0.52 + diffusemap "textures/wall01/H_Light_01_c" + normalmap "textures/wall01/H_Light_01_n" alpha +} + +shader "textures/wall/H_Light_01a" +{ + specular $nmapalpha + specularpower 0.52 + diffusemap "textures/wall01/H_Light_01a_c" + normalmap "textures/wall01/H_Light_01_n" alpha +} + +shader "textures/wall/H_MetalWall_05" +{ + specular 0.505 + + diffusemap "textures/wall01/H_MetalWall_05_c" + normalmap "textures/wall01/H_MetalWall_05_n" +} + + + +// some terrain for final level +shader "textures/terrain/ground01_256" +{ + tesssize 256 + surfparm stone + + specular $nmapalpha + specularpower 0.505 + parallaxscale 0.032 + + diffusemap "textures/terrain/ground01_c" + normalmap "textures/terrain/ground01_n" + heightmap "textures/terrain/ground01_h" + +} + +shader "textures/terrain/rockbig1_256" +{ + tesssize 128 + surfparm stone + specular $nmapalpha + parallaxscale 0.033 + specularpower 0.605 + + diffusemap "textures/terrain/RockBig_c" + normalmap "textures/terrain/RockBig_N" alpha + heightmap "textures/terrain/RockBig_h" +} + + diff --git a/Alpha Prime/Mod/shaders/wall2.h b/Alpha Prime/Mod/shaders/wall2.h new file mode 100644 index 0000000..36080dc --- /dev/null +++ b/Alpha Prime/Mod/shaders/wall2.h @@ -0,0 +1,524 @@ +shader "textures/wall/walldock1" +{ + + specular $nmapalpha +castshadow + diffusemap "textures/wall/walldock1_c" + normalmap "textures/wall/walldock1_n" alpha + + /* + + //!FIDO TEST! + //specular 1.0 + //specularpower 0.46 + parallaxscale 0.0392 + qer_editorimage "textures/floor/floor1" + + //diffusemap "textures/terrain/rock02_c" + //normalmap "textures/terrain/rock02_n" alpha + //heightmap "textures/terrain/rock02_h" + + diffusemap "textures/heighttest/brickwall01_d" + normalmap "textures/heighttest/brickwall01_n" alpha + heightmap "textures/heighttest/brickwall01_h" +*/} + +shader "textures/wall/walldock1b" +{ + + specular $nmapalpha +castshadow + diffusemap "textures/wall/walldock1b_c" + normalmap "textures/wall/walldock1b_n" alpha +} + +shader "textures/wall/walldock1d" +{ + + specular $nmapalpha +castshadow + diffusemap "textures/wall/walldock1d_c" + normalmap "textures/wall/walldock1d_n" alpha +} + +shader "textures/wall/walldock1e" +{ + + specular $nmapalpha +castshadow + diffusemap "textures/wall/walldock1e_c" + normalmap "textures/wall/walldock1d_n" alpha +} + +shader "textures/wall/pipeswires" +{ + + subdivsize 32 + specular $nmapalpha +castshadow + diffusemap "textures/wall/pipeswires_c" + normalmap "textures/wall/pipeswires_n" alpha +} + + +shader "textures/wall/ConcreteWall_01" +{ + specular $nmapalpha + + diffusemap "textures/wall/ConcreteWall_01_c" + normalmap "textures/wall/ConcreteWall_01_n" alpha +} + +shader "textures/wall/ConcreteWall_02" +{ + specular $nmapalpha + + diffusemap "textures/wall/ConcreteWall_02_c" + normalmap "textures/wall/ConcreteWall_02_n" alpha +} + +shader "textures/wall/ConcreteWall_02a" +{ + specular $nmapalpha + + diffusemap "textures/wall/ConcreteWall_02a_c" + normalmap "textures/wall/ConcreteWall_02a_n" alpha +} + +shader "textures/wall/MetalWall_01a" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_01a_c" + normalmap "textures/wall/MetalWall_01a_n" alpha +} + + +shader "textures/wall/MetalWall_04" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_04_c" + normalmap "textures/wall/MetalWall_04_n" alpha +} + +shader "textures/wall/MetalWall_04a" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_04a_c" + normalmap "textures/wall/MetalWall_04a_n" alpha +} + +shader "textures/wall/MetalWall_04b" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_04b_c" + normalmap "textures/wall/MetalWall_04a_n" alpha +} + +shader "textures/wall/MetalWall_05" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_05_c" + normalmap "textures/wall/MetalWall_05_n" alpha +} + +shader "textures/wall/MetalWall_06" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_06_c" + normalmap "textures/wall/MetalWall_06_n" alpha +} + +shader "textures/wall/SlotsWall_01" +{ + specular $nmapalpha + + diffusemap "textures/wall/SlotsWall_01_c" + normalmap "textures/wall/SlotsWall_01_n" alpha +} + +shader "textures/wall/SlotsWall_02" +{ + specular $nmapalpha + + diffusemap "textures/wall/SlotsWall_02_c" + normalmap "textures/wall/SlotsWall_02_n" alpha +} + +shader "textures/wall/MetalWall_07" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_07_c" + normalmap "textures/wall/MetalWall_07_n" alpha +} + +shader "textures/wall/MetalWall_07a" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_07_c" + normalmap "textures/wall/MetalWall_07a_n" alpha + qer_editorimage "textures/wall/MetalWall_07a" + +} + +shader "textures/wall/MetalWall_08" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_08_c" + normalmap "textures/wall/MetalWall_08_n" alpha +} + +shader "textures/wall/MetalWall_08a" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_08a_c" + normalmap "textures/wall/MetalWall_08a_n" alpha +} + +shader "textures/wall/MetalWall_09" +{ + specular $nmapalpha + tesssize 144 + + diffusemap "textures/wall/MetalWall_09_c" + normalmap "textures/wall/MetalWall_09_n" alpha +} + +shader "textures/wall/MetalWall_10" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_10_c" + normalmap "textures/wall/MetalWall_10_n" alpha +} + +shader "textures/wall/MetalWall_10a" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_10a_c" + normalmap "textures/wall/MetalWall_10a_n" alpha +} + +shader "textures/wall/MetalWall_10b" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_10b_c" + normalmap "textures/wall/MetalWall_10b_n" alpha +} + +shader "textures/wall/MetalWall_10c" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_10c_c" + normalmap "textures/wall/MetalWall_10c_n" alpha +} + +shader "textures/wall/MetalWall_10d" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_10d_c" + normalmap "textures/wall/MetalWall_10c_n" alpha +} + +shader "textures/wall/MetalWall_11" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_11_c" + normalmap "textures/wall/MetalWall_11_n" alpha +} + +shader "textures/wall/MetalWall_12" +{ + specular $nmapalpha + + diffusemap "textures/wall/MetalWall_12_c" + normalmap "textures/wall/MetalWall_12_n" alpha +} + +shader "textures/wall/E_MetalWall_01" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_MetalWall_01_c" + normalmap "textures/wall/E_MetalWall_01_n" alpha +} + +shader "textures/wall/E_MetalWall_02" +{ + specular $nmapalpha + tesssize 256 + + diffusemap "textures/wall/E_MetalWall_02_c" + normalmap "textures/wall/E_MetalWall_02_n" alpha +} + + +shader "textures/wall/E_MetalWall_03" +{ + specular $nmapalpha + tesssize 256 + + diffusemap "textures/wall/E_MetalWall_03_c" + normalmap "textures/wall/E_MetalWall_03_n" alpha +} + +shader "textures/wall/E_MetalWall_04" +{ + specular $nmapalpha + tesssize 144 + + diffusemap "textures/wall/E_MetalWall_04_c" + normalmap "textures/wall/E_MetalWall_04_n" alpha +} + +shader "textures/wall/E_MetalWall_05" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_MetalWall_05_c" + normalmap "textures/wall/E_MetalWall_05_n" alpha +} + +shader "textures/wall/E_MetalWall_06" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_MetalWall_06_c" + normalmap "textures/wall/E_MetalWall_06_n" alpha +} + +shader "textures/wall/E_MetalWall_06b" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_MetalWall_06b_c" + normalmap "textures/wall/E_MetalWall_06b_n" alpha +} + +shader "textures/wall/E_MetalWall_06c" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_MetalWall_06c_c" + normalmap "textures/wall/E_MetalWall_06c_n" alpha +} + +shader "textures/wall/E_MetalWall_06d" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_MetalWall_06d_c" + normalmap "textures/wall/E_MetalWall_06d_n" alpha +} + +shader "textures/wall/E_MetalWall_07" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_MetalWall_07_c" + normalmap "textures/wall/MetalWall_08a_n" alpha +} + +shader "textures/wall/E_ConcreteWall_02" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_ConcreteWall_02_c" + normalmap "textures/wall/E_ConcreteWall_02_n" alpha +} + +shader "textures/wall/E_HallWall_01" +{ + specular $nmapalpha + tesssize 256 + + diffusemap "textures/wall/E_HallWall_01_c" + normalmap "textures/wall/E_HallWall_01_n" alpha +} + +shader "textures/wall/E_HallWall_02" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_HallWall_02_c" + normalmap "textures/wall/E_HallWall_02_n" alpha +} + +shader "textures/wall/E_HallWall_03" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_HallWall_03_c" + normalmap "textures/wall/E_HallWall_03_n" alpha +} + +shader "textures/wall/E_HallWall_04" +{ + specular $nmapalpha + tesssize 256 + + diffusemap "textures/wall/E_HallWall_04_c" + normalmap "textures/wall/E_HallWall_04_n" alpha +} + +//pro oblejsi rouru na zacatku l04 +shader "textures/wall/E_HallWall_04_t16" +{ + specular $nmapalpha + tesssize 18 + + diffusemap "textures/wall/E_HallWall_04_c" + normalmap "textures/wall/E_HallWall_04_n" alpha +} + +shader "textures/wall/E_HallWall_05" +{ + specular $nmapalpha + tesssize 144 + + diffusemap "textures/wall/E_HallWall_05_c" + normalmap "textures/wall/E_HallWall_05_n" alpha +} + +shader "textures/wall/E_HallWall_06" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_HallWall_06_c" + normalmap "textures/wall/E_HallWall_06_n" alpha +} + +shader "textures/wall/E_WallWindows_01" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_WallWindows_01_c" + normalmap "textures/wall/E_WallWindows_01_n" alpha +} + +shader "textures/wall/E_WallWindows_02" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_WallWindows_02_c" + normalmap "textures/wall/E_WallWindows_02_n" alpha +} + +shader "textures/wall/E_WallWindows_03" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_WallWindows_03_c" + normalmap "textures/wall/E_WallWindows_03_n" alpha +} + +shader "textures/wall/E_WallSlots_01" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_WallSlots_01_c" + normalmap "textures/wall/E_WallSlots_01_n" alpha +} + +shader "textures/wall/E_WallSlots_01a" +{ + specular $nmapalpha + + diffusemap "textures/wall/E_WallSlots_01a_c" + normalmap "textures/wall/E_WallSlots_01a_n" alpha +} + +shader "textures/wall01/H_MetalWall_01" +{ + specular $nmapalpha + + diffusemap "textures/wall01/H_MetalWall_01_c" + normalmap "textures/wall01/H_MetalWall_01_n" alpha +} + +shader "textures/wall01/H_MetalWall_02" +{ + specular $nmapalpha + + diffusemap "textures/wall01/H_MetalWall_02_c" + normalmap "textures/wall01/H_MetalWall_02_n" alpha + +} + +shader "textures/wall01/H_MetalWall_03" +{ + specular $nmapalpha + tesssize 144 + + diffusemap "textures/wall01/H_MetalWall_03_c" + normalmap "textures/wall01/H_MetalWall_03_n" alpha +} + +shader "textures/wall01/H_MetalWall_03_env" +{ + specular 0 //$nmapalpha + reflection $nmapalpha + + diffusemap "textures/wall01/H_MetalWall_03_c" + normalmap "textures/wall01/H_MetalWall_03_n" alpha + envmap $nearestcube +} + +shader "textures/wall01/H_MetalWall_03_envspec" +{ + specular 0.503 //$nmapalpha + reflection $nmapalpha + + diffusemap "textures/wall01/H_MetalWall_03_c" + normalmap "textures/wall01/H_MetalWall_03_n" alpha + envmap $nearestcube +} + +shader "textures/wall01/H_MetalWall_04" +{ + specular 0.403 //$nmapalpha + + diffusemap "textures/wall01/H_MetalWall_04_c" + normalmap "textures/wall01/H_MetalWall_04_n" alpha +} + +shader "textures/wall01/H_MetalWall_04_env" +{ + specular 0 //$nmapalpha + reflection $nmapalpha + diffusemap "textures/wall01/H_MetalWall_04_c" + normalmap "textures/wall01/H_MetalWall_04_n" alpha + envmap $nearestcube +} + +shader "textures/wall01/H_MetalWall_04_envspec" +{ + specular 0.503 //$nmapalpha + reflection $nmapalpha + diffusemap "textures/wall01/H_MetalWall_04_c" + normalmap "textures/wall01/H_MetalWall_04_n" alpha + envmap $nearestcube +} + +shader "textures/wall01/H_MetalTrim_01" +{ + + specular $nmapalpha +castshadow + diffusemap "textures/wall01/H_MetalTrim_01_c" + normalmap "textures/wall01/H_MetalTrim_01_n" alpha +} diff --git a/Alpha Prime/Mod/shaders/wire.h b/Alpha Prime/Mod/shaders/wire.h new file mode 100644 index 0000000..6a08a33 --- /dev/null +++ b/Alpha Prime/Mod/shaders/wire.h @@ -0,0 +1,191 @@ +shader "textures/wire/cables1" +{ + tesssize 32 + + surfparm nonsolid + surfparm trans + surfparm nomarks + surfparm alphashadow + + specular $nmapalpha + specularpower 0.81 + + alphatest 32 + + diffusemap "textures/wire/cables1_c" alpha + qer_editorimage "textures/wire/cables1" + normalmap "textures/wire/cables1_n" alpha +} + +shader "textures/wire/cables2" +{ + tesssize 32 + + surfparm nonsolid + surfparm trans + surfparm nomarks + surfparm alphashadow + cull none + + specular $nmapalpha + specularpower 0.81 + + alphatest 64 + + diffusemap "textures/wire/cables2_c" alpha + qer_editorimage "textures/wire/cables2" + normalmap "textures/wire/cables2_n" alpha +} + +shader "textures/wire/wirestep1" +{ + surfparm trans + surfparm nomarks + surfparm iron + surfparm alphashadow + + specular $nmapalpha + specularpower 0.41 + + alphatest 16 + + diffusemap "textures/wire/wirestep1_c" + qer_editorimage "textures/wire/wirestep1" + normalmap "textures/wire/wirestep1_n" alpha +} + +shader "textures/wire/wiredfloor1" +{ + surfparm trans + surfparm nomarks + surfparm iron + surfparm alphashadow + + specular $nmapalpha + specularpower 0.41 + + alphatest 16 + + diffusemap "textures/wire/wiredfloor1_c" alpha + qer_editorimage "textures/wire/wiredfloor1" + normalmap "textures/wire/wiredfloor1_n" alpha +} + +shader "textures/wire/wiredfloor1a" +{ + surfparm trans + surfparm nomarks + surfparm iron + surfparm alphashadow + + specular $alpha + specularpower 0.41 + + alphatest 16 + + diffusemap "textures/wire/wiredfloor1a_c" alpha + qer_editorimage "textures/wire/wiredfloor1a" + normalmap "textures/wire/wiredfloor1_n" alpha +} + +shader "textures/wire/fencing" +{ + + surfparm trans + surfparm detail + surfparm nomarks + surfparm metal + surfparm castshadow + + specular $nmapalpha + specularpower 0.41 + cull none + alphatest 16 + + diffusemap "textures/wire/fencing_c" + qer_editorimage "textures/wire/fencing" + normalmap "textures/wire/fencing_n" alpha +} + +shader "textures/wire/lamela1" +{ + qer_editorimage "textures/wire/lamela1" + surfparm trans + surfparm detail + surfparm metal + surfparm alphashadow + + specular $alpha + + cull none + alphatest 5 + + diffusemap "textures/wire/lamela1_c" alpha + normalmap "textures/wire/lamela1_n" +} + +shader "textures/wire/Fencing_02" +{ + + surfparm trans + surfparm detail + surfparm nomarks + surfparm metal + surfparm castshadow + + specular $nmapalpha + specularpower 0.41 + alphatest 16 + + diffusemap "textures/wire/Fencing_02_c" + normalmap "textures/wire/Fencing_02_n" alpha +} + +shader "textures/wire/Fencing_03" +{ + + surfparm trans + surfparm detail + surfparm nomarks + surfparm metal + surfparm castshadow + + specular $nmapalpha + specularpower 0.41 + alphatest 100 + + diffusemap "textures/wire/Fencing_03_c" + normalmap "textures/wire/Fencing_03_n" alpha +} + +shader "textures/wire/ventilator_01" +{ + + surfparm trans + surfparm detail + surfparm nomarks + surfparm metal + castshadow + specular $nmapalpha + specularpower 0.41 + alphatest 16 + + diffusemap "textures/wire/ventilator_01_c" + normalmap "textures/wire/ventilator_01_n" alpha +} + +shader "textures/wire/ventilator_01a" +{ + + surfparm trans + surfparm detail + surfparm nomarks + surfparm metal + castshadow + specular $nmapalpha + specularpower 0.41 + alphatest 16 + + diffusemap "textures/wire/ventilator_01a_c" + normalmap "textures/wire/ventilator_01_n" alpha +} diff --git a/Alpha Prime/Mod/sound/shaders.h b/Alpha Prime/Mod/sound/shaders.h new file mode 100644 index 0000000..17d3e30 --- /dev/null +++ b/Alpha Prime/Mod/sound/shaders.h @@ -0,0 +1,16446 @@ +//-------------------Music------------------ +/* +MenuMusic - muzika +MenuEnter - enter/click na tlacitko +MenuSwitch - prechod na dalsi button? +MenuEscape - escape v menu +*/ +//MENU----------------------------------------------- + sound "video/logo_idea" + { + "video/logo_idea" + ambient + stream + volume 1.0 + } + + sound "video/logo_bes" + { + "video/logo_bes" + ambient + stream + volume 1.0 + } + + + sound "MenuMusic" + { + "sound/mainmenu/menu" + stream + ambient + volume 0.4 + } + + sound "MenuEnter" + { + "sound/HUD/ClickHUD_04" + ambient + volume 1.0 + } + + sound "MenuSwitch" + { + "sound/HUD/ClickHUD_03" + ambient + volume 1.0 + } + sound "MenuEscape" + { + "sound/HUD/FadeOut_HUD" + ambient + volume 1.0 + } + sound "MenuSelect" + { + "sound/HUD/ClickHUD_03" + ambient + volume 0.4 + } + +// audioplayer + sound "AudioplayerMusic_01" + { + "sound/audiotracks/spacemess1" + spatial + volume 1.0 + } + +//l0i + sound "pub" + { + "sound/ambiences/l0i/intro_pub" + ambient + volume 0.5 + } + + sound "radio" + { + "sound/ambiences/l0i/intro_music_mono" + spatial + volume 1.0 + } + +//--------------START OF NEW MUSIC DEFINITION-------------------- + + //AMBIENTS---------------------------------------------------- + + sound "ambi_01" + { + "sound/ambiences/ambients/ambi_01" + ambient + volume 1.0 + stream + } + sound "ambi_02" + { + "sound/ambiences/ambients/ambi_02" + ambient + volume 1.0 + stream + } + sound "ambi_03" + { + "sound/ambiences/ambients/ambi_03" + ambient + volume 1.0 + stream + } + sound "ambi_04" + { + "sound/ambiences/ambients/ambi_04" + ambient + volume 1.0 + stream + } + sound "ambi_05" + { + "sound/ambiences/ambients/ambi_05" + ambient + volume 1.0 + stream + } + sound "ambi_06" + { + "sound/ambiences/ambients/ambi_06" + ambient + volume 1.0 + stream + } + sound "ambi_07" + { + "sound/ambiences/ambients/ambi_07" + ambient + volume 1.0 + stream + } + sound "ambi_08" + { + "sound/ambiences/ambients/ambi_08" + ambient + volume 1.0 + stream + } + sound "ambi_09" + { + "sound/ambiences/ambients/ambi_09" + ambient + volume 1.0 + stream + } + sound "ambi_10" + { + "sound/ambiences/ambients/ambi_10" + ambient + volume 1.0 + stream + } + sound "ambi_11" + { + "sound/ambiences/ambients/ambi_11" + ambient + volume 1.0 + stream + } + sound "ambi_12" + { + "sound/ambiences/ambients/ambi_12" + ambient + volume 1.0 + stream + } + sound "ambi_13" + { + "sound/ambiences/ambients/ambi_13" + ambient + volume 1.0 + stream + } + sound "ambi_14" + { + "sound/ambiences/ambients/ambi_14" + ambient + volume 1.0 + stream + } + //FIGHTS----------------------------------------------------- + sound "fight_01" + { + "sound/ambiences/fights/fight_01" + ambient + volume 1.0 + stream + } + sound "fight_02" + { + "sound/ambiences/fights/fight_02" + ambient + volume 1.0 + stream + } + sound "fight_03" + { + "sound/ambiences/fights/fight_03" + ambient + volume 1.0 + stream + } + sound "fight_04" + { + "sound/ambiences/fights/fight_04" + ambient + volume 1.0 + stream + } + sound "fight_05" + { + "sound/ambiences/fights/fight_05" + ambient + volume 1.0 + stream + } + sound "fight_06" + { + "sound/ambiences/fights/fight_06" + ambient + volume 1.0 + stream + } + sound "fight_07" + { + "sound/ambiences/fights/fight_07" + ambient + volume 1.0 + stream + } + sound "fight_08" + { + "sound/ambiences/fights/fight_08" + ambient + volume 1.0 + stream + } + sound "fight_09" + { + "sound/ambiences/fights/fight_09" + ambient + volume 1.0 + stream + } + sound "fight_10" + { + "sound/ambiences/fights/fight_10" + ambient + volume 1.0 + stream + } + sound "fight_11" + { + "sound/ambiences/fights/fight_11" + ambient + volume 1.0 + stream + } + sound "fight_12" + { + "sound/ambiences/fights/fight_12" + ambient + volume 1.0 + stream + } + sound "fight_13" + { + "sound/ambiences/fights/fight_13" + ambient + volume 1.0 + stream + } + sound "fight_14" + { + "sound/ambiences/fights/fight_14" + ambient + volume 1.0 + stream + } + + + sound "outro_music" + { + "sound/ambiences/outro_music" + ambient + volume 1.0 + stream + } + sound "outro_music2" + { + "sound/ambiences/outro_music2" + ambient + volume 1.0 + stream + } + + sound "L01_fall" + { + "sound/ambiences/L01/L01_fall" + ambient + volume 1.0 + stream + } + + sound "L01_fall_ship" + { + "sound/ambiences/Ambisounds/l01_fall_ship" + ambient + volume 1.0 + stream + } + +//--------------END OF NEW MUSIC DEFINITION-------------------- + + +//L01----------------------------------------------- + sound "L01_dialog1" + { + "sound/ambiences/l01/1-6_music" + ambient + volume 1.0 + stream + } + + +//L02----------------------------------------------- + + +//L03------------------------------------------------- + + sound "L03_dialog1" + { + "sound/ambiences/l03/3-1_cutscene" + ambient + volume 1.0 + stream + } + sound "L03_dialog2" + { + "sound/ambiences/l03/3-3_cutscene" + ambient + volume 1.0 + stream + } + + +//L04------------------------------------------------- + + +//L05------------------------------------------------- + + +//L06------------------------------------------------- + + //DIALOG + sound "L06_dialog1" + { + "sound/ambiences/l06/6-1_cutscene" + ambient + volume 1.0 + stream + } + +//L07------------------------------------------------- + +//L07------------------------------------------------- + + //DIALOG + sound "L08_dialog1" + { + "sound/ambiences/l08/8-2_music" + ambient + volume 1.0 + stream + } + +//L09------------------------------------------------- + + //DIALOG + sound "L09_dialog1" + { + "sound/ambiences/l09/9-3_music" + ambient + volume 1.0 + stream + } + + sound "L09_dialog2" + { + "sound/ambiences/l09/9-4_music" + ambient + volume 1.0 + stream + } + +//-------------------znelky--------------- +sound "l02_znelka01" +{ + "sound/ambiences/l02/znelka01" + ambient + stream + volume 0.5 +} + +//-------------------znelky ende--------------- +sound "lopta_01" +{ +"sound/misc/lopta_01" +spatial +volume 0.3 +} +sound "sound/misc/camera_02" +{ + "sound/misc/camera_02" + spatial + range half + freqcontrol + volume 0.1 +} +sound "camera_motor01" +{ + "sound/misc/camera_03" + spatial + range half + freqcontrol + volume 0.3 +} +sound "sentry_motor01" +{ + "sound/creatures/Sentry/sentry_loop01" + spatial +// freqcontrol + volume 0.4 +} +//========================VEHICLES============================// + + //HALL LOADER + + sound "Hall01" + { + "sound/vehicles/loader/hall01" + spatial + volume 1.0 + } + sound "Hall02" + { + "sound/vehicles/loader/hall02" + spatial + volume 1.0 + } + sound "Hall03" + { + "sound/vehicles/loader/hall03" + spatial + volume 1.0 + } + sound "Hall04" + { + "sound/vehicles/loader/hall04" + spatial + volume 1.0 + } + sound "Hall05" + { + "sound/vehicles/loader/hall05" + spatial + volume 1.0 + } + sound "Hall06" + { + "sound/vehicles/loader/hall06" + spatial + volume 1.0 + } + sound "Hall07" + { + "sound/vehicles/loader/hall07" + spatial + volume 1.0 + } + + //BUGGY + sound "motor01" + { + "sound/vehicles/buggy/motor001" + spatial + freqcontrol + volume 1.0 + } + sound "motor02" + { + "sound/vehicles/buggy/motor002" + spatial + freqcontrol + volume 1.0 + } + sound "motor03" + { + "sound/vehicles/buggy/motor003" + spatial + freqcontrol + volume 1.0 + } + sound "motor04" + { + "sound/vehicles/buggy/motor004" + spatial + freqcontrol + volume 1.0 + } + sound "GearUpDown" + { + "sound/RHDevices/Jesterka/Jest_Doraz02" + spatial + volume 0.5 + } + + //TRAIN------------------------- + sound "train_start02" + { + "sound/vehicles/train_Start04" + spatial + volume 0.4 + } + sound "train_start01" + { + "sound/vehicles/train_Start03" + spatial + volume 0.6 + } + sound "train_loop01" + { + "sound/vehicles/train_goLoop01" + spatial + volume 0.7 + } + sound "train_end01" + { + "sound/vehicles/train_End04" + spatial + volume 0.6 + } + sound "train_inside01" + { + "sound/vehicles/train_loop" + spatial + volume 1.0 + } + //SWITCH-vyhybka----------------- + sound "switch01" + { + "sound/vehicles/vyhybka_02" + ambient + volume 1.0 + } + //Koleje------------------------- + sound "koleje01" + { + "sound/vehicles/kolej_a" + "sound/vehicles/kolej_b" + "sound/vehicles/kolej_c" + "sound/vehicles/kolej_d" + spatial + volume 0.4 + } + +//cervena paka + sound "paka01_activating" + { + "sound/vehicles/vyhybka_02" + spatial + volume 1.0 + } + + sound "paka01_deactivating" + { + "sound/vehicles/vyhybka_02" + spatial + volume 1.0 + } + +//=================Lamps, lights, etc.========================// +sound "lamp01" +{ + "sound/environment/lamps/fluorLamp03" + spatial + volume 0.4 +} +sound "lamp02" +{ + "sound/environment/lamps/fluorLamp04" + spatial + volume 0.4 +} +sound "lamp03" +{ + "sound/environment/lamps/fluorLamp05" + spatial + volume 0.4 +} +sound "lamp04" +{ + "sound/environment/lamps/fluorLamp06" + spatial + volume 0.4 +} +sound "lamp04b" +{ + "sound/environment/lamps/fluorLamp06" + spatial + volume 0.6 +} +sound "lamp05" +{ + "sound/environment/lamps/fluorLamp09" + spatial + volume 0.4 +} +sound "lamp05_low" +{ + "sound/environment/lamps/fluorLamp09" + spatial + volume 0.4 +} +sound "lamp05_half" +{ + "sound/environment/lamps/fluorLamp09" + range half + spatial + volume 0.4 +} + +//=================MACHINES========================// + +sound "switch001" //middle deep litle noisy machines sound loop + { + "sound/environment/mechs/switch01" + spatial + volume 1.0 + } + + sound "machine01" //middle deep litle noisy machines sound loop + { + "sound/environment/machines/machine01" + spatial + volume 0.8 + } + sound "machine01_low" //middle deep litle noisy machines sound loop + { + "sound/environment/machines/machine01" + spatial + volume 0.4 + } + sound "machine01b" //middle deep litle noisy machines sound loop + { + "sound/environment/machines/machine01" + spatial + volume 1.0 + } + sound "machine02" //double airlock - noisy no loop + { + "sound/environment/machines/machine02" + spatial + volume 0.8 + } + sound "machine03" //double airlock - noisy no loop + { + "sound/environment/machines/machine03" + spatial + volume 0.8 + } + sound "machine04" //high pitched noisy sound loop + { + "sound/environment/machines/machine04" + spatial + volume 0.8 + } + sound "machine04b" //high pitched noisy sound loop low + { + "sound/environment/machines/machine04" + spatial + volume 0.4 + } + sound "machine05" //very high pitched jet noisy sound loop + { + "sound/environment/machines/machine05" + spatial + volume 0.8 + } + sound "machine05a" //very high pitched jet noisy sound loop + { + "sound/environment/machines/machine05" + spatial + volume 0.3 + } + sound "machine06" //deep litle resonance loop + { + "sound/environment/machines/machine06" + spatial + volume 0.8 + } + sound "machine07" //deep and middle litle resonance loop + { + "sound/environment/machines/machine07" + spatial + volume 0.8 + } + sound "machine08" //realy analog machine :-) engine loop + { + "sound/environment/machines/machine08" + spatial + volume 0.8 + } +//=================GENERATORS========================// +sound "hackLoop" +{ + "sound/environment/Computers/hackLOOp" + spatial + volume 1.0 +} +sound "hackEnd" +{ + "sound/environment/Computers/hackEnd" + spatial + volume 1.0 +} +sound "compFan01" +{ + "sound/environment/Computers/compfan01" + spatial + volume 0.5 +} +sound "compThink01" +{ + "sound/environment/Computers/data02" + "sound/environment/Computers/data03" + "sound/environment/Computers/data04" + "sound/environment/Computers/data05" + "sound/environment/Computers/data06" + "sound/environment/Computers/data07" + "sound/environment/Computers/data08" + "sound/environment/Computers/data09" + "sound/environment/Computers/data10" + "sound/environment/Computers/data11" + "sound/environment/Computers/data12" + "sound/environment/Computers/data13" + "sound/environment/Computers/data14" + "sound/environment/Computers/data15" + spatial + volume 0.4 +} +sound "compThink02" +{ + "sound/environment/Computers/comp01" + "sound/environment/Computers/comp02" + "sound/environment/Computers/comp03" + "sound/environment/Computers/comp04" + "sound/environment/Computers/comp05" + spatial + volume 0.3 +} +sound "compThink03" +{ + "sound/environment/Computers/comp06" + "sound/environment/Computers/comp07" + "sound/environment/Computers/comp08" + "sound/environment/Computers/comp09" + "sound/environment/Computers/comp10" + + spatial + volume 0.3 +} +sound "compThink04" +{ + "sound/environment/Computers/comp11" + "sound/environment/Computers/comp12" + "sound/environment/Computers/comp13" + "sound/environment/Computers/comp14" + "sound/environment/Computers/comp15" + spatial + volume 0.3 +} +sound "ventilation01" +{ + "sound/environment/generators/ventilation_loop" + spatial + volume 1.0 + minrange higher +} +sound "ventilation_shutdown" +{ + "sound/environment/generators/ventilation_shutdown02" + spatial + volume 1.0 +} +sound "generator01" +{ + "sound/environment/generators/generator01" + range half + spatial + volume 0.5 +} +sound "generator02" +{ + "sound/environment/generators/generator02" + range half + spatial + volume 0.5 +} +sound "generator03" +{ + "sound/environment/generators/generator03" + range half + spatial + volume 0.5 +} +sound "generator04" +{ + "sound/environment/generators/generator04" + range half + spatial + volume 0.5 +} +sound "generator05" +{ + "sound/environment/generators/generator05" + range half + spatial + volume 0.5 +} +sound "generator05_low" +{ + "sound/environment/generators/generator05" + range half + spatial + volume 0.3 +} +sound "generator06" +{ + "sound/environment/generators/generator06" + range half + spatial + volume 0.5 +} +sound "generator07" +{ + "sound/environment/generators/generator07" + range half + spatial + volume 0.3 +} +sound "generator08" +{ + "sound/environment/generators/generator08" + range half + spatial + volume 0.5 +} +sound "generator09" +{ + "sound/environment/generators/generator09" + range half + spatial + volume 0.5 +} +sound "generator10" +{ + "sound/environment/generators/generator10" + range half + spatial + volume 0.5 +} +sound "generator11" +{ + "sound/environment/generators/generator11" + range half + spatial + volume 0.5 +} +sound "turbine02" +{ + "sound/environment/generators/turbine02" + range half + spatial + volume 0.3 +} +sound "turbine02_high" +{ + "sound/environment/generators/turbine02" + spatial + volume 0.4 +} +//=================RHDevice===================// +sound "mineActivation01" +{ + "sound/RHDevices/mine/mineActivate04" + range half + spatial + volume 0.61 +} +sound "mine01" +{ + "sound/RHDevices/mine/mine_loop04" + range half + spatial + volume 0.6 + freqcontrol +} +sound "mine02" +{ + "sound/RHDevices/mine/mine02" + range half + spatial + volume 1.0 + freqcontrol +} +sound "Jest_doraz01" +{ + "sound/RHDevices/Jesterka/Jest_Doraz02" + range half + spatial + volume 1.0 +} +sound "Jest_loop02" //motor +{ + "sound/RHDevices/Jesterka/Jest_loop02" + range half + spatial + freqcontrol + volume 1.0 +} +sound "Jest_rameno01" //rameno +{ + "sound/RHDevices/Jesterka/Jest_rameno01" + range half + spatial + volume 1.0 +} +sound "Jest_uchop01" //cyklicky uchop-upusteni +{ + "sound/RHDevices/Jesterka/Jest_uchop02" + "sound/RHDevices/Jesterka/Jest_uchop01" + cycle + range half + spatial + volume 1.0 +} +//=================Mechanism===================// +sound "mech01" +{ + "sound/environment/mechs/mech01" + range half + spatial + volume 1.0 +} +sound "mech02" +{ + "sound/environment/mechs/mech02" + range half + spatial + volume 0.4 +} +sound "mech03" +{ + "sound/environment/mechs/mech03" + range half + spatial + volume 1.0 +} + +//=================LIFT========================// +sound "lift_02_loop" +{ + "sound/lift/lift_loop01" + ambient + volume 1.0 +} +sound "lift_malfunction" +{ + "sound/lift/lift_malfunction01" + ambient + volume 1.0 +} +sound "lift_boom" +{ + "sound/lift/lift_boom01" + ambient + volume 1.0 +} + +sound "lift_01_start" +{ + "sound/lift/lift01_start" + spatial + volume 1.0 +} +sound "lift_01_loop" +{ + "sound/lift/lift01" + spatial + volume 0.7 +} +sound "lift_01_end" +{ + "sound/lift/lift01_end" + spatial + volume 1.0 +} + +//================DOOR=========================// + + //-----------SAFE DOOR ANIMACE------------ + sound "safeDoor01_unlock" //START + { + "sound/DOOR/safeDoor_unlock2" + spatial + volume 0.8 + } + sound "safeDoor01_lock" //START + { + "sound/DOOR/safeDoor_lock2" + spatial + volume 0.8 + } + sound "safeDoor01_start" //START + { + "sound/DOOR/sDoor_start03" + spatial + volume 0.5 + } + sound "safeDoor01_loop" //LOOP + { + "sound/DOOR/sDoor_loop01" + spatial + volume 0.5 + } + sound "safeDoor01_end" //END + { + "sound/DOOR/sDoor_end01" + spatial + volume 0.7 + } + + //--------------------------------------- + +sound "mriz_end" +{ + "sound/DOOR/mriz02" + spatial + volume 1.0 +} +sound "mriz_vrz" +{ + "sound/DOOR/vrz02" + spatial + volume 1.0 +} + + +sound "door_unlock01" +{ + "sound/DOOR/unlock02" + spatial + volume 1.0 +} +sound "Door01_START" +{ + "sound/DOOR/door_01_START" + spatial + volume 0.6 +} +sound "Door01_LOOP" +{ + "sound/DOOR/door_01_LOOP" + spatial + volume 0.6 +} +sound "Door01_END" +{ + "sound/DOOR/door_01_END" + spatial + volume 0.6 +} + +sound "Door02_START" +{ + "sound/DOOR/Door_02_START" + spatial + volume 0.6 +} +sound "Door02_LOOP" +{ + "sound/DOOR/Door_02_LOOP" + spatial + volume 0.6 +} +sound "Door02_END" +{ + "sound/DOOR/Door_02_END" + spatial + volume 0.6 +} + +sound "Door03_START" +{ + "sound/DOOR/Door_03_START" + spatial + volume 0.6 +} +sound "Door03_LOOP" +{ + "sound/DOOR/Door_03_LOOP" + spatial + volume 0.6 +} +sound "Door03_END" +{ + "sound/DOOR/Door_03_END" + spatial + volume 0.6 +} + +sound "Door04_START" +{ + "sound/DOOR/Door_04_START" + spatial + volume 0.5 +} +sound "Door04_LOOP" +{ + "sound/DOOR/Door_04_LOOP" + spatial + volume 0.5 +} +sound "Door04_END" +{ + "sound/DOOR/Door_04_END" + spatial + volume 0.5 +} + +sound "Door05_START" +{ + "sound/DOOR/Door_05_START" + spatial + volume 0.6 +} +sound "Door05_LOOP" +{ + "sound/DOOR/Door_05_LOOP" + spatial + volume 0.6 +} +sound "Door05_END" +{ + "sound/DOOR/Door_05_END" + spatial + volume 0.6 +} + + +//=================Display========================// +//------ !NENI POUZE PRO DISPLEJE! -----------// +sound "shield_start" +{ + "sound/effects/recharge_start" + ambient + volume 0.3 +} +sound "shield_loop" +{ + "sound/effects/recharge_loop" + ambient + volume 0.4 +} +sound "HackingAreaInfo" +{ + "sound/display/disp_efx_43" + ambient + volume 1.0 +} +sound "HackingModeStart" +{ + "sound/display/disp_efx_121" + ambient + volume 0.797 +} +sound "HackingModeEnd" +{ + "sound/creatures/player/flashlight" + ambient + volume 0.8 +} +sound "HackingGUILoop" +{ + "sound/display/disp_efx_128" + ambient + volume 0.5 +} +sound "HackingGUISelect" +{ + "sound/display/disp_efx_14" + spatial + volume 0.8 +} + + + +sound "Disp_effect_128" +{ + "sound/display/disp_efx_128" + range quart + spatial + volume 0.3 +} +sound "Disp_effect_128b" +{ + "sound/display/disp_efx_128" + range half + spatial + volume 0.8 +} +sound "Disp_effect_127" +{ + "sound/display/disp_efx_127" + spatial + volume 1.0 +} +sound "Disp_effect_126" +{ + "sound/display/disp_efx_126" + spatial + volume 1.0 +} +sound "Disp_effect_125" +{ + "sound/display/disp_efx_125" + spatial + volume 1.0 +} + +sound "Disp_effect_speak02" +{ + "sound/display/disp_efx_sp02" + spatial + volume 0.4 +} +sound "Disp_effect_100" +{ + "sound/display/disp_efx_100" + spatial + volume 0.4 +} +sound "Disp_effect_101" +{ + "sound/display/disp_efx_101" + spatial + volume 0.6 +} +sound "Disp_effect_102" +{ + "sound/display/disp_efx_102" + spatial + volume 0.6 +} +sound "Disp_effect_102b" +{ + "sound/display/disp_efx_102" + spatial + volume 0.4 +} +sound "Disp_effect_103" +{ + "sound/display/disp_efx_103" + spatial + volume 0.6 +} +sound "Disp_effect_104" +{ + "sound/display/disp_efx_104" + spatial + volume 0.3 +} +sound "Disp_effect_104b" +{ + "sound/display/disp_efx_104" + spatial + volume 0.7 +} +sound "Disp_effect_105" +{ + "sound/display/disp_efx_105" + spatial + volume 0.6 +} +sound "Disp_effect_106" +{ + "sound/display/disp_efx_106" + spatial + volume 0.4 +} +sound "Disp_effect_107" +{ + "sound/display/disp_efx_107" + spatial + volume 0.5 +} +sound "Disp_effect_108" +{ + "sound/display/disp_efx_108" + spatial + volume 0.3 +} +sound "Disp_effect_109" +{ + "sound/display/disp_efx_109" + spatial + volume 0.5 +} +sound "Disp_effect_01" +{ + "sound/display/disp_efx_01" + spatial + volume 0.4 +} +sound "Disp_effect_02" +{ + "sound/display/disp_efx_02" + spatial + volume 0.4 +} +sound "Disp_effect_03" +{ + "sound/display/disp_efx_03" + spatial + volume 0.2 +} +sound "Disp_effect_03b" +{ + "sound/display/disp_efx_03" + spatial + volume 0.4 +} +sound "Disp_effect_04" +{ + "sound/display/disp_efx_04" + spatial + volume 0.4 +} +sound "Disp_effect_05" +{ + "sound/display/disp_efx_05" + spatial + volume 0.4 +} +sound "Disp_effect_06" +{ + "sound/display/disp_efx_06" + spatial + volume 0.4 +} +sound "Disp_effect_07" +{ + "sound/display/disp_efx_07" + spatial + volume 0.4 +} +sound "Disp_effect_08" +{ + "sound/display/disp_efx_08" + spatial + volume 0.4 +} +sound "Disp_effect_09" +{ + "sound/display/disp_efx_09" + spatial + volume 0.4 +} +sound "Disp_effect_10" +{ + "sound/display/disp_efx_10" + range quart + spatial + volume 0.2 +} +sound "Disp_effect_11" +{ + "sound/display/disp_efx_11" + spatial + volume 0.4 +} +sound "Disp_effect_12" +{ + "sound/display/disp_efx_12" + spatial + volume 0.4 +} +sound "Disp_effect_13" +{ + "sound/display/disp_efx_13" + spatial + volume 0.4 +} +sound "Disp_effect_14" +{ + "sound/display/disp_efx_14" + spatial + volume 0.4 +} +//-- +sound "Disp_effect_20" +{ + "sound/display/disp_efx_20" + spatial + volume 0.4 +} +sound "Disp_effect_21" +{ + "sound/display/disp_efx_21" + spatial + volume 0.4 +} +sound "Disp_effect_22" +{ + "sound/display/disp_efx_22" + spatial + volume 0.3 +} +sound "Disp_effect_23" +{ + "sound/display/disp_efx_23" + spatial + volume 0.4 +} +sound "Disp_effect_23b" +{ + "sound/display/disp_efx_23b" + spatial + volume 0.8 +} +sound "Disp_effect_24" +{ + "sound/display/disp_efx_24" + spatial + volume 0.3 +} +sound "Disp_effect_121" +{ + "sound/display/disp_efx_121" + spatial + volume 0.8 +} +sound "Disp_effect_122" +{ + "sound/display/disp_efx_122" + spatial + volume 0.8 +} +sound "Disp_effect_123" +{ + "sound/display/disp_efx_123" + ambient + volume 0.8 +} +sound "Disp_effect_28" +{ + "sound/display/disp_efx_28" + spatial + volume 0.4 +} +sound "Disp_effect_29" +{ + "sound/display/disp_efx_29" + spatial + volume 0.4 +} +sound "Disp_effect_30" +{ + "sound/display/disp_efx_30" + spatial + volume 0.4 +} +sound "Disp_effect_31" +{ + "sound/display/disp_efx_31" + spatial + volume 0.4 +} +sound "Disp_effect_31b" +{ + "sound/display/disp_efx_31" + spatial + volume 0.3 +} +sound "Disp_effect_32" +{ + "sound/display/disp_efx_32" + spatial + volume 0.4 +} +sound "Disp_effect_32b" +{ + "sound/display/disp_efx_32" + spatial + volume 0.6 +} +sound "Disp_effect_33" +{ + "sound/display/disp_efx_33" + spatial + volume 0.4 +} +sound "Disp_effect_34" +{ + "sound/display/disp_efx_34" + spatial + volume 0.4 +} +sound "Disp_effect_35" +{ + "sound/display/disp_efx_35" + spatial + volume 0.4 +} +sound "Disp_effect_36" +{ + "sound/display/disp_efx_36" + spatial + volume 0.4 +} +sound "Disp_effect_37" +{ + "sound/display/disp_efx_37" + spatial + volume 0.4 +} +sound "Disp_effect_38" +{ + "sound/display/disp_efx_38" + spatial + volume 0.4 +} +sound "Disp_effect_39" +{ + "sound/display/disp_efx_39" + spatial + volume 0.4 +} +sound "Disp_effect_40" +{ + "sound/display/disp_efx_40" + spatial + volume 0.2 +} +sound "Disp_effect_41" +{ + "sound/display/disp_efx_41" + spatial + volume 0.2 +} +sound "Disp_effect_42" +{ + "sound/display/disp_efx_42" + spatial + volume 0.4 +} +sound "Disp_effect_43" +{ + "sound/display/disp_efx_43" + spatial + volume 0.4 +} +sound "Disp_effect_44" +{ + "sound/display/disp_efx_44" + spatial + volume 0.4 +} +sound "Disp_effect_44b" +{ + "sound/display/disp_efx_44" + ambient + volume 0.7 +} +sound "Disp_effect_45" +{ + "sound/display/disp_efx_45" + spatial + volume 0.4 +} +sound "Disp_effect_46" +{ + "sound/display/disp_efx_46" + spatial + volume 0.4 +} +sound "Disp_effect_47" +{ + "sound/display/disp_efx_47" + spatial + volume 0.4 +} +sound "Disp_effect_48" +{ + "sound/display/disp_efx_48" + spatial + volume 0.4 +} +sound "Disp_effect_49" +{ + "sound/display/disp_efx_49" + spatial + volume 0.4 +} +sound "Disp_effect_49b" +{ + "sound/display/disp_efx_49" + ambient + volume 1.0 +} +sound "Disp_effect_50" +{ + "sound/display/disp_efx_50" + spatial + volume 0.4 +} +sound "Disp_effect_sp01" +{ + "sound/display/disp_efx_sp01" + ambient + volume 0.5 +} +sound "Disp_effect_sp02" +{ + "sound/display/disp_efx_sp02" + ambient + volume 0.4 +} +sound "Disp_effect_51" +{ + "sound/display/disp_efx_51" + spatial + volume 0.4 +} +sound "Disp_effect_52" +{ + "sound/display/disp_efx_52" + spatial + volume 0.6 +} +sound "Disp_effect_53" +{ + "sound/display/disp_efx_53" + spatial + volume 0.5 +} +//=================EFFECTS========================= +sound "circuit" +{ + "sound/effects/circuit" + spatial + volume 0.7 +} + +sound "constructionFall02" +{ +"sound/effects/constructionFall02" +ambient +volume 1.0 +} +sound "constructionFall02n" +{ +"sound/effects/constructionFall02" +ambient +volume 0.5 +} +sound "constructionFall" +{ +"sound/effects/constructionFall" + +ambient +volume 1.0 +} +sound "Keyboard01" +{ +"sound/effects/keyboard/keyboard01" +"sound/effects/keyboard/keyboard02" +"sound/effects/keyboard/keyboard03" +"sound/effects/keyboard/keyboard04" +"sound/effects/keyboard/keyboard05" +"sound/effects/keyboard/keyboard06" +"sound/effects/keyboard/keyboard07" + +spatial +range half +volume 0.7 +} +sound "WaterPipe01_low" +{ +"sound/effects/pipes/waterpipe01" +range half +spatial +volume 0.4 +} +sound "WaterPipe01" +{ +"sound/effects/pipes/waterpipe01" +spatial +volume 0.5 +} + +sound "MetalCreak01" +{ +"sound/effects/MetalCreak/vrz01" +"sound/effects/MetalCreak/vrz02" +"sound/effects/MetalCreak/vrz03" +"sound/effects/MetalCreak/vrz04" +"sound/effects/MetalCreak/vrz05" +"sound/effects/MetalCreak/vrz06" +"sound/effects/MetalCreak/vrz07" +"sound/effects/MetalCreak/vrz08" +"sound/effects/MetalCreak/vrz09" +"sound/effects/MetalCreak/vrz10" +"sound/effects/MetalCreak/vrz11" +spatial +volume 0.5 +} +sound "MetalCreak02" +{ +"sound/effects/MetalCreak/vrz01" +"sound/effects/MetalCreak/vrz02" +spatial +volume 0.5 +} +sound "MetalCreak03" +{ +"sound/effects/MetalCreak/vrz09" +"sound/effects/MetalCreak/vrz02" +ambient +volume 0.5 +} +sound "ShortCreak01" +{ +"sound/effects/shortCreek01" +"sound/effects/shortCreek02" +"sound/effects/shortCreek03" +"sound/effects/shortCreek04" +"sound/effects/shortCreek05" +spatial +volume 0.7 +} +sound "ShortCreak02" +{ +"sound/effects/shortCreek02" +"sound/effects/shortCreek04" +"sound/effects/shortCreek05" +spatial +volume 1.0 +} +sound "raillway_speech" +{ + "sound/effects/raillway" + ambient + volume 1.0 +} +sound "emergency_speech02" +{ +"sound/effects/emergency/emergency02" +ambient +volume 0.7 +} +sound "Wind_loop01" +{ +"sound/effects/emergency/e_Wind_loop" +spatial +volume 0.4 +} +sound "Wind_loop02" +{ +"sound/effects/wind02" +ambient +volume 0.5 +} +sound "Wind_loop03" +{ +"sound/effects/wind03" +ambient +volume 0.4 +} +sound "Wind_loop03b" +{ +"sound/effects/wind03" +ambient +volume 0.3 +} +sound "Sykot04" +{ +"sound/effects/emergency/sykot04" +spatial +volume 0.4 +} +sound "meteorit_loop" +{ +"sound/effects/meteorit_loop" +spatial +volume 1.0 +minrange highest +} + +sound "Sykot05" +{ +"sound/effects/emergency/sykot05" +spatial +volume 0.4 +} +sound "Sykot06" +{ +"sound/effects/emergency/sykot06" +spatial +volume 0.5 +} +sound "Sykot07" +{ +"sound/effects/emergency/sykot07" +spatial +volume 0.6 +} + + +sound "emergency_speech01" +{ +"sound/effects/emergency/emergency01" +spatial +volume 1.0 +} +sound "alarm_01" +{ + "sound/misc/alarm_01" + spatial + volume 0.3 +} +sound "alarm_02" +{ + "sound/effects/emergency/Warning01" + spatial + volume 0.4 +} +sound "alarm_02c" +{ + "sound/effects/emergency/Warning01" + spatial + volume 1.0 +} +sound "alarm_02b" +{ + "sound/effects/emergency/Warning01" + spatial + volume 0.3 +} +sound "alarm_03" +{ + "sound/effects/emergency/Warning04" + spatial + volume 0.4 +} +sound "alarm_04" +{ + "sound/effects/emergency/Warning04" + spatial + volume 1.0 +} + +sound "BulletTimeIn" +{ +"sound/effects/BulletIN01" + +ambient +volume 1.004 +} +sound "BulletTimeLoop" +{ +"sound/effects/BulletTime04" +ambient +volume 1.002 +} +sound "BulletTimeOut" +{ +"sound/effects/BulletOUT01" + +ambient +volume 1.004 +} + +sound "Steps01" +{ + "sound/effects/ambiSteps_01" + "sound/effects/ambiSteps_02" + "sound/effects/ambiSteps_03" + "sound/effects/ambiSteps_04" + "sound/effects/ambiSteps_05" + "sound/effects/ambiSteps_06" + "sound/effects/ambiSteps_07" + spatial + volume 1.0 +} +sound "Meteors01" +{ + "sound/effects/aster_boom_01" + "sound/effects/aster_boom_02" + "sound/effects/aster_boom_03" + "sound/effects/aster_boom_04" + "sound/effects/aster_boom_06" + spatial + volume 1.0 + minrange higher +} +sound "MeteorsLoop01" +{ + "sound/effects/aster_boom_loop_03" + spatial + volume 1.0 + minrange higher +} + +sound "heart" +{ +"sound/effects/heart" +ambient +volume 0.8 +} +sound "shipburst" +{ +"sound/effects/vybuch" +ambient +volume 1.0 +} +sound "bossburn" +{ +"sound/effects/bossburn2" +spatial +volume 1.0 +minrange highest +} + +sound "PipeExplosion" +{ + "sound/effects/Pipes/PipeExplosion01" + "sound/effects/Pipes/PipeExplosion02" + spatial + volume 1.0 + minrange highest +} +sound "sound/effects/Explosion_flash_01" +{ + "sound/effects/Explosion_flash_01" + ambient + volume 1.0 + minrange highest +} +sound "MagnetField_01" +{ + "sound/effects/MagnetField_01" + spatial + volume 0.7 + minrange higher +} + +//=================Rics============================ +sound "Rics_STONE" +{ + "sound/WEAPONS/Rics/Ric_STONE01" + "sound/WEAPONS/Rics/Ric_STONE02" + "sound/WEAPONS/Rics/Ric_STONE03" + "sound/WEAPONS/Rics/Ric_STONE04" + "sound/WEAPONS/Rics/Ric_STONE05" + "sound/WEAPONS/Rics/Ric_STONE06" + spatial + volume 0.7 +} +sound "Rics_PISEK" +{ + "sound/WEAPONS/Rics/Ric_PISEK02" + "sound/WEAPONS/Rics/Ric_PISEK03" + "sound/WEAPONS/Rics/Ric_PISEK04" + spatial + volume 0.7 +} + +sound "Rics_Gravel" +{ + "sound/WEAPONS/Hammer/metal_gravel" + spatial + volume 0.7 +} + +sound "Rics_BetonHammer" +{ + "sound/WEAPONS/Hammer/metal_beton01" + "sound/WEAPONS/Hammer/metal_beton02" + "sound/WEAPONS/Hammer/metal_beton03" + spatial + volume 0.7 +} +sound "Rics_MetalHammer" +{ + "sound/weapons/rics/Ric05" + "sound/weapons/rics/Ric06" + "sound/weapons/rics/Ric07" + "sound/weapons/rics/Ric08" + "sound/weapons/rics/Ric09" + "sound/weapons/rics/Ric10" + "sound/weapons/rics/Ric11" + + spatial + range half + volume 0.7 +} +sound "Rics_Metal" +{ + "sound/weapons/rics/Ric01" + "sound/weapons/rics/Ric02" + "sound/weapons/rics/Ric03" + "sound/weapons/rics/Ric04" + "sound/weapons/rics/Ric12" + "sound/weapons/rics/Ric08" + "sound/weapons/rics/Ric09" + "sound/weapons/rics/Ric10" + "sound/weapons/rics/Ric11" + "sound/weapons/rics/Ric13" + spatial + range half + volume 1.007 +} +sound "Rics_Flesh" +{ + "sound/weapons/rics/rics_flesh08" + "sound/weapons/rics/rics_flesh09" + "sound/weapons/rics/rics_flesh10" + "sound/weapons/rics/rics_flesh11" + "sound/weapons/rics/rics_flesh12" + "sound/weapons/rics/rics_flesh13" + "sound/weapons/rics/rics_flesh14" + spatial + range half + volume 1.0 +} +/* +sound "Rics_Metal" +{ + "sound/weapons/rics/Ric01" + //"" + //"" + "sound/weapons/rics/Ric04" + "sound/weapons/rics/Ric08" + "sound/weapons/rics/Ric09" + "sound/weapons/rics/Ric10" + "sound/weapons/rics/Ric11" + spatial + volume 0.4 +} +*/ +//=================Creatures======================= + + //boss + sound "boss_pain01" + { + "sound/creatures/boss/pain01" + "sound/creatures/boss/pain02" + "sound/creatures/boss/pain03" + spatial + volume 1.04 + minrange higher + } + sound "boss_idle01" + { + "sound/creatures/boss/idle01" + "sound/creatures/boss/idle02" + "sound/creatures/boss/idle03" + "sound/creatures/boss/idle04" + spatial + volume 1.03 + minrange higher + } + sound "boss_death01" + { + "sound/creatures/boss/death01" + spatial + volume 1.04 + minrange higher + } + sound "boss_attack01" + { + "sound/creatures/boss/attack01" + "sound/creatures/boss/attack02" + spatial + volume 1.04 + minrange higher + } + + sound "boss_fs01" + { + "sound/creatures/boss/FS01" + "sound/creatures/boss/FS02" + "sound/creatures/boss/FS03" + "sound/creatures/boss/FS04" + spatial + volume 1.03 + minrange higher + } +/* + sound "speech_misc01" + { + "sound/creatures/speech01" + spatial + volume 1.0 + } + sound "speech_misc02" + { + "sound/creatures/speech02" + spatial + volume 0.6 + } + sound "speech_misc03" + { + "sound/creatures/speech03_nopower" + ambient + volume 1.0 + } + sound "speech_misc04" + { + "sound/creatures/speech03_activated" + ambient + volume 1.0 + } + sound "speech_misc05" + { + "sound/creatures/speech03_open" + ambient + volume 1.0 + } +*/ +//----Guard Start----// + sound "Guard_pain01" + { + "sound/creatures/guard/pain01" + "sound/creatures/guard/pain02" + "sound/creatures/guard/pain03" + "sound/creatures/guard/pain04" + "sound/creatures/guard/guard_pain01" + "sound/creatures/guard/guard_pain02" + "sound/creatures/guard/guard_pain03" + "sound/creatures/guard/guard_pain04" + "sound/creatures/guard/guard_pain05" + "sound/creatures/guard/guard_pain06" + "sound/creatures/guard/guard_pain07" + spatial + volume 1.05 + } + sound "Guard_death01" + { + "sound/creatures/guard/death01" + "sound/creatures/guard/death02" + "sound/creatures/guard/guard_death01" + "sound/creatures/guard/guard_death02" + "sound/creatures/guard/guard_death03" + "sound/creatures/guard/guard_death04" + + spatial + volume 1.05 + } + +//----Technician Start----// + sound "Technician_pain01" + { + "sound/creatures/Technician/pain01" + "sound/creatures/Technician/pain02" + "sound/creatures/Technician/pain03" + "sound/creatures/Technician/pain04" + "sound/creatures/Technician/technic_pain01" + "sound/creatures/Technician/technic_pain02" + "sound/creatures/Technician/technic_pain03" + "sound/creatures/Technician/technic_pain04" + "sound/creatures/Technician/technic_pain05" + "sound/creatures/Technician/technic_pain06" + "sound/creatures/Technician/technic_pain07" + spatial + volume 1.05 + } + sound "Technician_death01" + { + "sound/creatures/Technician/death01" + "sound/creatures/Technician/death02" + "sound/creatures/Technician/death03" + "sound/creatures/Technician/technic_death01" + "sound/creatures/Technician/technic_death02" + "sound/creatures/Technician/technic_death03" + "sound/creatures/Technician/technic_death04" + spatial + volume 1.05 + } +//----HeavyTrooper Start----// + sound "Hfs_01" + { + "sound/creatures/heavytrooper/Rfs_01" + "sound/creatures/heavytrooper/Rfs_02" + "sound/creatures/heavytrooper/Rfs_03" + "sound/creatures/heavytrooper/Rfs_04" + spatial + volume 1.03 + minrange higher + } + + sound "HTrooper_HTservo01" + { + "sound/creatures/HeavyTrooper/HTservo01" + "sound/creatures/HeavyTrooper/HTservo01b" + "sound/creatures/HeavyTrooper/HTservo01c" + spatial + volume 0.73 + minrange higher + } + sound "HTrooper_HTservo02" + { + "sound/creatures/HeavyTrooper/HTservo02" + spatial + volume 0.73 + } + sound "HTrooper_HTservo03" + { + "sound/creatures/HeavyTrooper/HTservo03" + spatial + volume 0.73 + minrange higher + } + sound "HTrooper_pain01" + { + "sound/creatures/HeavyTrooper/pain01" + "sound/creatures/HeavyTrooper/pain02" + "sound/creatures/HeavyTrooper/pain03" + "sound/creatures/HeavyTrooper/pain04" + "sound/creatures/HeavyTrooper/specops_pain04" + "sound/creatures/HeavyTrooper/specops_pain06" + spatial + volume 1.05 + minrange higher + } + sound "HTrooper_death01" + { + "sound/creatures/HeavyTrooper/death01" + "sound/creatures/HeavyTrooper/death02" + "sound/creatures/HeavyTrooper/death03" + "sound/creatures/HeavyTrooper/specops_death02" + "sound/creatures/HeavyTrooper/specops_death03" + "sound/creatures/HeavyTrooper/specops_death06" + spatial + volume 1.05 + minrange higher + } + sound "HTrooper_breath01a" + { + "sound/creatures/heavyTrooper/breath002a" + "sound/creatures/heavyTrooper/breath003a" + range half + spatial + volume 0.555 + } + sound "HTrooper_breath01b" + { + "sound/creatures/heavyTrooper/breath002b" + "sound/creatures/heavyTrooper/breath003b" + range half + spatial + volume 0.555 + } +//----LightTrooper End----// + + //----LightTrooper Start----// + + sound "LTrooper_ST_RELOADING" + { + "sound/dialogs/AI_troop42a" + "sound/dialogs/AI_troop42b" + "sound/dialogs/AI_troop42c" + spatial + volume 1.07 + } + + sound "LTrooper_ST_CHANGINGWP" + { + "sound/dialogs/AI_troop31a" + "sound/dialogs/AI_troop31b" + "sound/dialogs/AI_troop31c" + "sound/dialogs/AI_troop32a" + "sound/dialogs/AI_troop32b" + "sound/dialogs/AI_troop32c" + "sound/dialogs/AI_troop39a" + "sound/dialogs/AI_troop39b" + "sound/dialogs/AI_troop39c" + spatial + volume 1.07 + } + sound "LTrooper_ST_TAKECOVER" + { + "sound/dialogs/AI_troop13a" + "sound/dialogs/AI_troop13b" + "sound/dialogs/AI_troop13c" + "sound/dialogs/AI_troop14a" + "sound/dialogs/AI_troop14b" + "sound/dialogs/AI_troop14c" + "sound/dialogs/AI_troop15a" + "sound/dialogs/AI_troop15b" + "sound/dialogs/AI_troop15c" + spatial + volume 1.07 + } + /* + sound "LTrooper_ST_ALERT" + { + + "sound/dialogs/AI_troop09a" + "sound/dialogs/AI_troop09b" + "sound/dialogs/AI_troop09c" + + spatial + volume 1.07 + } + */ + sound "LTrooper_ST_ALERTBYATTACK" + { + "sound/dialogs/AI_troop23a" + "sound/dialogs/AI_troop23b" + "sound/dialogs/AI_troop23c" + "sound/dialogs/AI_troop19a" + "sound/dialogs/AI_troop19b" + "sound/dialogs/AI_troop19c" + "sound/dialogs/AI_troop20a" + "sound/dialogs/AI_troop20b" + "sound/dialogs/AI_troop20c" + spatial + volume 1.07 + } + + sound "LTrooper_ST_ALERTBYSHOT" + { + "sound/dialogs/AI_troop14a" + "sound/dialogs/AI_troop14b" + "sound/dialogs/AI_troop14c" + "sound/dialogs/AI_troop34a" + "sound/dialogs/AI_troop34b" + "sound/dialogs/AI_troop34c" + "sound/dialogs/AI_troop33a" + "sound/dialogs/AI_troop33b" + "sound/dialogs/AI_troop33c" + spatial + volume 1.07 + } + sound "LTrooper_ST_ALERTBYFRIENDISSHOT" + { + "sound/dialogs/AI_troop37a" + "sound/dialogs/AI_troop37b" + "sound/dialogs/AI_troop37c" + "sound/dialogs/AI_troop38a" + "sound/dialogs/AI_troop38b" + "sound/dialogs/AI_troop38c" + spatial + volume 1.07 + } + sound "LTrooper_ST_SQUADATTACKED" + { + "sound/dialogs/AI_troop30a" + "sound/dialogs/AI_troop30b" + "sound/dialogs/AI_troop30c" + "sound/dialogs/AI_troop40a" + "sound/dialogs/AI_troop40b" + "sound/dialogs/AI_troop40c" + "sound/dialogs/AI_troop41a" + "sound/dialogs/AI_troop41b" + "sound/dialogs/AI_troop41c" + spatial + volume 1.07 + } + sound "LTrooper_ST_TEAMMATEKILLED" + { + "sound/dialogs/AI_troop16a" + "sound/dialogs/AI_troop16b" + "sound/dialogs/AI_troop16c" + "sound/dialogs/AI_troop17a" + "sound/dialogs/AI_troop17b" + "sound/dialogs/AI_troop17c" + "sound/dialogs/AI_troop18a" + "sound/dialogs/AI_troop18b" + "sound/dialogs/AI_troop18c" + "sound/dialogs/AI_troop25a" + "sound/dialogs/AI_troop25b" + "sound/dialogs/AI_troop25c" + "sound/dialogs/AI_troop26a" + "sound/dialogs/AI_troop26b" + "sound/dialogs/AI_troop26c" + "sound/dialogs/AI_troop27a" + "sound/dialogs/AI_troop27b" + "sound/dialogs/AI_troop21a" + "sound/dialogs/AI_troop21b" + "sound/dialogs/AI_troop21c" + spatial + volume 1.07 + } + + sound "LTrooper_ST_SQUADLASTMAN" + { + "sound/dialogs/AI_troop22a" + "sound/dialogs/AI_troop22b" + "sound/dialogs/AI_troop22c" + "sound/dialogs/AI_troop35a" + "sound/dialogs/AI_troop35b" + "sound/dialogs/AI_troop35c" + "sound/dialogs/AI_troop36a" + "sound/dialogs/AI_troop36b" + "sound/dialogs/AI_troop36c" + spatial + volume 1.07 + } + sound "LTrooper_ST_GRENADE" + { + "sound/dialogs/AI_troop29a" + "sound/dialogs/AI_troop29b" + "sound/dialogs/AI_troop29c" + "sound/dialogs/AI_troop28a" + "sound/dialogs/AI_troop28b" + "sound/dialogs/AI_troop28c" + "sound/dialogs/AI_troop39a" + "sound/dialogs/AI_troop39b" + "sound/dialogs/AI_troop39c" + "sound/dialogs/AI_troop27a" + "sound/dialogs/AI_troop27b" + spatial + volume 1.07 + } + + /* + sound "LTrooper_reloading" + { + "sound/dialogs/AI_troop24" + "sound/dialogs/AI_troop09" + spatial + volume 1.07 + } +*/ + sound "LTrooper_niceshot" + { + "sound/creatures/lightTrooper/speech/niceshot" + spatial + volume 1.07 + } + sound "LTrooper_shit" + { + "sound/creatures/lightTrooper/another03" + spatial + volume 1.07 + } + sound "LTrooper_common2" + { + "sound/creatures/lightTrooper/speech/common04" + spatial + volume 1.07 + } + sound "LTrooper_common3" + { + "sound/creatures/lightTrooper/speech/common01" + spatial + volume 1.07 + } + sound "LTrooper_watchback" + { + "sound/creatures/lightTrooper/speech/watchback" + spatial + volume 1.07 + } + sound "omen" + { + "sound/creatures/lightTrooper/another05" + spatial + volume 1.07 + } + sound "LTrooper_coverme" + { + "sound/creatures/lightTrooper/speech/coverme" + spatial + volume 1.07 + } + sound "LTrooper_turnaround" + { + "sound/creatures/lightTrooper/speech/turnaround" + spatial + volume 1.07 + } + sound "LTrooper_breath01a" + { + "sound/creatures/lightTrooper/breath002a" + "sound/creatures/lightTrooper/breath003a" + range half + spatial + volume 0.555 + } + sound "LTrooper_breath01b" + { + "sound/creatures/lightTrooper/breath002b" + "sound/creatures/lightTrooper/breath003b" + range half + spatial + volume 0.555 + } + + sound "LTrooper_rustle01" + { + "sound/creatures/lightTrooper/rustle001" + "sound/creatures/lightTrooper/rustle002" + range half + spatial + volume 0.53 + } + + sound "LTrooper_rustle02" + { + "sound/creatures/lightTrooper/rustle003" + //"sound/creatures/lightTrooper/rustle004" + "sound/creatures/lightTrooper/rustle005" + "sound/creatures/lightTrooper/rustle006" + spatial + volume 0.43 + } + + + sound "LTrooper_pain01" + { + "sound/creatures/lightTrooper/breath03" + "sound/creatures/lightTrooper/breath04" + "sound/creatures/lightTrooper/pain02" + "sound/creatures/lightTrooper/pain03" + "sound/creatures/lightTrooper/pain04" + "sound/creatures/lightTrooper/pain05" + "sound/creatures/lightTrooper/pain06" + "sound/creatures/lightTrooper/pain07" + "sound/creatures/lightTrooper/pain08" + "sound/creatures/lightTrooper/specops_pain01" + "sound/creatures/lightTrooper/specops_pain02" + "sound/creatures/lightTrooper/specops_pain03" + "sound/creatures/lightTrooper/specops_pain05" + "sound/creatures/lightTrooper/specops_pain07" + "sound/creatures/lightTrooper/specops_pain08" + + spatial + volume 1.06 + } + sound "LTrooper_death01" + { + "sound/creatures/lightTrooper/death01" + "sound/creatures/lightTrooper/death02" + "sound/creatures/lightTrooper/death03" + "sound/creatures/lightTrooper/specops_death01" + "sound/creatures/lightTrooper/specops_death04" + "sound/creatures/lightTrooper/specops_death05" + "sound/creatures/lightTrooper/specops_death07" + "sound/creatures/lightTrooper/specops_death08" + spatial + volume 1.06 + } + sound "LTrooper_fsight01" + { + "sound/creatures/lightTrooper/another01" + "sound/creatures/lightTrooper/another02" + "sound/creatures/lightTrooper/another04" + spatial + volume 1.06 + } + //-------hlasky------- +// sound "LTrooper_No" +// { +// "sound/creatures/lightTrooper/speech/No" +// "sound/creatures/lightTrooper/speech/No_getup" +// spatial +// volume 1.07 +// } + + sound "LTrooper_attacked" + { + "sound/creatures/lightTrooper/speech/attack" + spatial + volume 1.07 + } + + /* + sound "LTrooper_support" + { + "sound/creatures/lightTrooper/speech/support01" + "sound/creatures/lightTrooper/speech/support02" + spatial + volume 1.07 + } + */ + sound "LTrooper_support02" + { + "sound/creatures/lightTrooper/speech/support02" + spatial + volume 0.684 + } + + sound "LTrooper_common" + { + "sound/creatures/lightTrooper/speech/common01" + "sound/creatures/lightTrooper/speech/common02" + "sound/creatures/lightTrooper/speech/common04" + spatial + volume 1.07 + } + + sound "LTrooper_mumraj" + { + "sound/creatures/lightTrooper/speech/mumraj01" + "sound/creatures/lightTrooper/speech/mumraj02" + "sound/creatures/lightTrooper/speech/mumraj03" + "sound/creatures/lightTrooper/speech/mumraj04" + "sound/creatures/lightTrooper/speech/mumraj05" + spatial + volume 1.07 + } + /* + sound "LTrooper_painv" + { + "sound/creatures/lightTrooper/speech/painv01" + "sound/creatures/lightTrooper/speech/painv02" + //"sound/creatures/lightTrooper/speech/painv03" + spatial + volume 1.07 + } + sound "LTrooper_piskot" + { + "sound/creatures/lightTrooper/speech/piskot01" + "sound/creatures/lightTrooper/speech/piskot02" + spatial + volume 1.07 + } + */ + /* + sound "LTrooper_carefull" + { + "sound/creatures/lightTrooper/speech/carefull" + spatial + volume 1.07 + } + sound "LTrooper_giveme" + { + "sound/creatures/lightTrooper/speech/giveme" + spatial + volume 1.07 + } + sound "LTrooper_gonow" + { + "sound/creatures/lightTrooper/speech/gonow01" + spatial + volume 1.07 + } + */ + sound "LTrooper_listen" + { + "sound/creatures/lightTrooper/speech/listen" + spatial + volume 1.07 + } + + /* + sound "LTrooper_move" + { + "sound/creatures/lightTrooper/speech/move01" + spatial + volume 1.07 + } + sound "LTrooper_me" + { + "sound/creatures/lightTrooper/speech/me" + spatial + volume 1.07 + } + */ + sound "LTrooper_letsgo" + { + "sound/creatures/lightTrooper/speech/letsgoforit" + spatial + volume 1.07 + } + sound "LTrooper_now" + { + "sound/creatures/lightTrooper/speech/now" + spatial + volume 1.07 + } + sound "LTrooper_righthere" + { + "sound/creatures/lightTrooper/speech/righthere" + spatial + volume 1.07 + } + sound "LTrooper_whoisthat" + { + "sound/creatures/lightTrooper/speech/whoisthat" + spatial + volume 1.07 + } + + + //----LightTrooper Ende----// + + +//----SecurityRobot01 Start----// + +sound "SRobot_cwalkA" +{ + "sound/creatures/SecurityRobot/v2/spider_cWalk01" + "sound/creatures/SecurityRobot/v2/spider_cWalk02" + "sound/creatures/SecurityRobot/v2/spider_cWalk03" + "sound/creatures/SecurityRobot/v2/spider_cWalk04" + "sound/creatures/SecurityRobot/v2/spider_cWalk05" + spatial + volume 0.63 +} +sound "SRobot_fs" +{ + "sound/creatures/SecurityRobot/v2/fs01" + "sound/creatures/SecurityRobot/v2/fs02" + "sound/creatures/SecurityRobot/v2/fs03" + "sound/creatures/SecurityRobot/v2/fs04" + "sound/creatures/SecurityRobot/v2/fs05" + "sound/creatures/SecurityRobot/v2/fs06" + spatial + volume 0.43 +} +sound "SRobot_cwalkB" +{ + "sound/creatures/SecurityRobot/cwalk02" + "sound/creatures/SecurityRobot/cwalk04" + "sound/creatures/SecurityRobot/cwalk06" + "sound/creatures/SecurityRobot/cwalk08" + spatial + volume 0.63 +} +sound "SRobot_rwalkA" +{ + "sound/creatures/SecurityRobot/v2/spider_rWalk01" + "sound/creatures/SecurityRobot/v2/spider_rWalk02" + "sound/creatures/SecurityRobot/v2/spider_rWalk03" + "sound/creatures/SecurityRobot/v2/spider_rWalk04" + "sound/creatures/SecurityRobot/v2/spider_rWalk05" + "sound/creatures/SecurityRobot/v2/spider_rWalk06" + spatial + volume 0.53 +} +sound "SRobot_rwalkB" +{ + "sound/creatures/SecurityRobot/rwalk04" + "sound/creatures/SecurityRobot/rwalk05" + "sound/creatures/SecurityRobot/rwalk06" + "sound/creatures/SecurityRobot/rwalk08" + spatial + volume 0.53 +} +sound "strafe_loop" +{ + "sound/creatures/SecurityRobot/strafe_loop" + spatial + volume 0.33 +} +sound "Idle_loop" +{ + "sound/creatures/SecurityRobot/idle02_loop" + spatial + volume 0.33 +} + +sound "ShortServo01" +{ + "sound/creatures/SecurityRobot/ShortServo01" + spatial + volume 0.63 +} +sound "ShortServo02" +{ + "sound/creatures/SecurityRobot/ShortServo02" + spatial + volume 0.63 +} +sound "ShortServo03" +{ + "sound/creatures/SecurityRobot/ShortServo03" + spatial + volume 0.63 +} +sound "ShortServo04" +{ + "sound/creatures/SecurityRobot/ShortServo04" + spatial + volume 0.63 +} + +sound "SRobot_pain" +{ + "sound/creatures/SecurityRobot/Sense01" + "sound/creatures/SecurityRobot/Sense02" + "sound/creatures/SecurityRobot/Sense03" + "sound/creatures/SecurityRobot/Sense04" + "sound/creatures/SecurityRobot/Sense05" + spatial + volume 0.54 +} +sound "SRobot_death" +{ + "sound/creatures/SecurityRobot/Sense10" + "sound/creatures/SecurityRobot/Sense07" + spatial + volume 0.84 +} +sound "SRobot_firstsight" +{ + "sound/creatures/SecurityRobot/Sense06" + "sound/creatures/SecurityRobot/Sense09" + "sound/creatures/SecurityRobot/Sense11" + "sound/creatures/SecurityRobot/Sense12" + "sound/creatures/SecurityRobot/Sense13" + spatial + volume 0.44 +} +sound "SRobot_idle" +{ + "sound/creatures/SecurityRobot/Sense08" + "sound/creatures/SecurityRobot/Sense14" + "sound/creatures/SecurityRobot/Sense15" + spatial + volume 0.44 +} +//----SecurityRobot01 END ----// + + + +//----HumanoidRobot01 Start----// + +sound "speech01" +{ + "sound/creatures/HumanoidRobot01/sp/warning" + spatial + volume 0.56 +} +sound "speech02" +{ + "sound/creatures/HumanoidRobot01/sp/overhere" + spatial + volume 0.56 +} +sound "speech03" +{ + "sound/creatures/HumanoidRobot01/sp/getdYourweapon" + "sound/empty" + "sound/empty" + "sound/empty" + "sound/empty" + spatial + volume 0.56 +} +sound "speech04" +{ + "sound/creatures/HumanoidRobot01/sp/getdYourweapon2" + spatial + volume 0.56 +} +sound "speech05" +{ + "sound/creatures/HumanoidRobot01/sp/cover" + spatial + volume 0.56 +} +sound "speech06" +{ + "sound/creatures/HumanoidRobot01/sp/bb" + spatial + volume 0.56 +} +sound "speech07" +{ + "sound/creatures/HumanoidRobot01/sp/bb2" + spatial + volume 0.56 +} + + +sound "HRobot_fstep01" +{ + "sound/creatures/HumanoidRobot01/fs01" + "sound/creatures/HumanoidRobot01/fs02" + "sound/creatures/HumanoidRobot01/fs03" + "sound/creatures/HumanoidRobot01/fs04" + "sound/creatures/HumanoidRobot01/fs05" + "sound/creatures/HumanoidRobot01/fs06" + spatial + range half + volume 1.03 +} +sound "HRobot_loop01" +{ + "sound/creatures/HumanoidRobot01/Hrobot_loop01" + spatial + range half + volume 0.33 +} +sound "HRobot_loop02" +{ + "sound/creatures/HumanoidRobot01/Hrobot_loopa" + "sound/creatures/HumanoidRobot01/Hrobot_loopb" + spatial + cycle + range half + volume 0.83 +} +sound "HRobot_move01" +{ + "sound/creatures/HumanoidRobot01/Hrobot_move09" + "sound/creatures/HumanoidRobot01/Hrobot_move10" + "sound/creatures/HumanoidRobot01/Hrobot_move11" + spatial + range half + volume 1.03 +} +sound "HRobot_servo01" +{ + "sound/creatures/HumanoidRobot01/HumanStep01a" + "sound/creatures/HumanoidRobot01/HumanStep01b" + spatial + range half + volume 0.43 +} +sound "HRobot_servo02" +{ + "sound/creatures/HumanoidRobot01/HumanStrafe01a" + spatial + range half + volume 0.43 +} +sound "HRobot_servo03" +{ + "sound/creatures/HumanoidRobot01/HumanRun01a" + "sound/creatures/HumanoidRobot01/HumanRun01b" + spatial + range half + volume 0.73 +} +sound "HRobot_servo04" +{ + "sound/creatures/HumanoidRobot01/HumanCrouchDown01" + spatial + range half + volume 0.43 +} +sound "Hrobot_pain_01" +{ + "sound/creatures/HumanoidRobot01/pain01" + "sound/creatures/HumanoidRobot01/pain02" + "sound/creatures/HumanoidRobot01/pain03" + "sound/creatures/HumanoidRobot01/pain04" + "sound/creatures/HumanoidRobot01/pain05" + "sound/creatures/HumanoidRobot01/pain06" + "sound/creatures/HumanoidRobot01/pain07" + "sound/creatures/HumanoidRobot01/pain08" + spatial + range half + volume 1.04 +} + + +//---HumanoidRobot End---------// + + +//Dron// +//new "funny" dron// + +sound "dron_pain01" +{ + "sound/creatures/dron/fun/dronPain_01" + "sound/creatures/dron/fun/dronPain_02" + "sound/creatures/dron/fun/dronPain_03" + "sound/creatures/dron/fun/dronPain_04" + spatial + range half + volume 1.0 +} +sound "dron_death01" +{ + "sound/creatures/dron/fun/dronDeath_01" + "sound/creatures/dron/fun/dronDeath_02" + spatial + range half + volume 1.0 +} +sound "dron_death02" +{ + "sound/creatures/dron/dron_death" + spatial + range half + volume 1.0 +} +sound "dron_1stsight01" +{ + "sound/creatures/dron/fun/dronFsight_01" + "sound/creatures/dron/fun/dronFsight_02" + spatial + range half + volume 1.0 +} +sound "dron_idle01" +{ + "sound/creatures/dron/fun/dronIdle_01" + "sound/creatures/dron/fun/dronIdle_02" + "sound/creatures/dron/fun/dronIdle_03" + "sound/creatures/dron/fun/dronIdle_04" + "sound/creatures/dron/fun/dronIdle_05" + spatial + range half + volume 1.0 +} +sound "dron_idle02" +{ + "sound/creatures/dron/fun/dronIdle_06" + "sound/creatures/dron/fun/dronIdle_07" + "sound/creatures/dron/fun/dronIdle_08" + "sound/creatures/dron/fun/dronIdle_09" + "sound/creatures/dron/fun/dronIdle_10" + spatial + range half + volume 1.0 +} +sound "dron_susp01" +{ + "sound/creatures/dron/fun/dronSusp_01" + "sound/creatures/dron/fun/dronSusp_02" + spatial + range half + volume 1.0 +} + +sound "dron_shot01" +{ + "sound/creatures/dron/DronLaser_01" + spatial + range half + volume 1.0 +} +sound "Inside_01" +{ + "sound/creatures/Inside_01" + ambient + volume 0.3 +} +sound "Inside_02" +{ + "sound/creatures/Inside_02" + ambient + volume 0.3 +} +sound "Inside_03" +{ + "sound/creatures/Inside_03" + ambient + volume 0.3 +} + +//temp for noloop// +/* +sound "dronNoLoop_01" +{ + "sound/creatures/dron/noloop/dron_01" + spatial + volume 0.8 +} +sound "drondronNoLoop_02" +{ + "sound/creatures/dron/noloop/dron_02" + spatial + volume 0.8 +} +sound "drondronNoLoop_03" +{ + "sound/creatures/dron/noloop/dron_03" + spatial + volume 0.8 +} +sound "drondronNoLoop_04" +{ + "sound/creatures/dron/noloop/dron_04" + spatial + volume 0.8 +} +*/ +sound "dron_01" +{ + "sound/creatures/dron/noloop/dron_01" + spatial + range half + volume 0.8 +} +sound "dron_02" +{ + "sound/creatures/dron/dron_02" + spatial + range half + volume 0.8 +} +sound "dron_03" +{ + "sound/creatures/dron/noloop/dron_02" + spatial + range half + volume 0.8 +} +sound "dron_04" +{ + "sound/creatures/dron/noloop/dron_04" + spatial + range half + volume 0.8 +} +sound "dron_07" +{ + "sound/creatures/dron/dron_07" + spatial + volume 0.8 +} +sound "dron_08" +{ + "sound/creatures/dron/dron_08" + spatial + volume 0.8 +} +sound "dron_09" +{ + "sound/creatures/dron/dron_09" + spatial + volume 0.8 +} +sound "dron_10" +{ + "sound/creatures/dron/dron_10" + spatial + volume 0.8 +} +sound "dron_11" +{ + "sound/creatures/dron/dron_11" + spatial + volume 0.8 +} +sound "dron_12" +{ + "sound/creatures/dron/dron_12" + spatial + volume 0.8 +} +sound "dron_13" +{ + "sound/creatures/dron/noloop/dron_03" + spatial + volume 0.8 +} +sound "dron_14" +{ + "sound/creatures/dron/dron_14" + spatial + volume 0.8 +} +sound "dron_15" +{ + "sound/creatures/dron/dron_15" + spatial + volume 0.8 +} +sound "dron_16" +{ + "sound/creatures/dron/dron_16" + spatial + volume 0.8 +} +sound "dron_17" +{ + "sound/creatures/dron/dron_17" + "sound/empty" + spatial + volume 0.4 +} +sound "dron_18" +{ + "sound/creatures/dron/dron_19" + "sound/creatures/dron/dron_20" + "sound/creatures/dron/dron_21" + "sound/creatures/dron/dron_22" + "sound/empty" + spatial + volume 0.4 +} +//ROOOBOOTTT// +sound "loop_relaxIdle" +{ + "sound/creatures/robot/1relax/robot_loop04_relax" + spatial + volume 0.53 +} +sound "loop_alertIdle" +{ + "sound/creatures/robot/2alert/robot_loop02_alertIdle" + spatial + volume 0.53 +} +sound "loop_alertWalk" +{ + "sound/creatures/robot/2alert/robot_loop01_alertWalk" + spatial + volume 0.53 +} +sound "loop_combatIdle" +{ + "sound/creatures/robot/3combat/robot_loop03_combatIdle" + spatial + volume 0.53 +} +sound "loop_combatWalk" +{ + "sound/creatures/robot/3combat/robot_loop05_combatWalk" + spatial + volume 0.53 +} +sound "servo_01" +{ + "sound/creatures/robot/mechALLsrv_01" + "sound/creatures/robot/mechALL_01" + "sound/creatures/robot/mechALLsrv_02" + "sound/creatures/robot/mechALL_02" + "sound/creatures/robot/mechALLsrv_03" + "sound/creatures/robot/mechALL_03" + "sound/creatures/robot/mechALL_04" + spatial + volume 0.43 +} +sound "servo_02" +{ + "sound/creatures/robot/mechALL_001" + "sound/creatures/robot/mechALL_002" + + range half + cycle + spatial + volume 0.43 +} +sound "servo_001" +{ + "sound/creatures/robot/servo_001" + spatial + volume 0.43 +} +sound "servo_002" +{ + "sound/creatures/robot/servo_002" + spatial + volume 0.43 +} +sound "servo_003" +{ + "sound/creatures/robot/servo_003" + spatial + volume 0.43 +} +sound "servo_004" +{ + "sound/creatures/robot/servo_004" + spatial + volume 0.43 +} +sound "servo_005" +{ + "sound/creatures/robot/servo_005" + spatial + volume 0.43 +} +sound "servo_006" +{ + "sound/creatures/robot/servo_006" + spatial + volume 0.43 +} +sound "servo_007" +{ + "sound/creatures/robot/servo_007" + spatial + volume 0.43 +} +sound "servo_mix_001" +{ + "sound/creatures/HumanoidRobot01/Hrobot_move02" + "sound/creatures/HumanoidRobot01/Hrobot_move04" + "sound/creatures/HumanoidRobot01/Hrobot_move05" + "sound/creatures/robot/servo_005" + "sound/creatures/HumanoidRobot01/Hrobot_move02" + "sound/creatures/HumanoidRobot01/Hrobot_move05" + "sound/creatures/robot/servo_007" + spatial + volume 0.43 +} + +sound "misc_mech_01" { + + "sound/creatures/HumanoidRobot01/misc06" + "sound/creatures/HumanoidRobot01/misc08" + "sound/creatures/HumanoidRobot01/misc09" + "sound/creatures/HumanoidRobot01/misc10" + "sound/creatures/HumanoidRobot01/misc11" + + range half + spatial + volume 0.53 +} + + +sound "robot_idle_01" +{ + "sound/creatures/robot/robot_idle_loop_01" + range half + spatial + volume 0.43 +} +sound "mechALL_08" +{ + "sound/creatures/robot/mechALL_08" + spatial + volume 0.43 +} + +sound "servo_01b" +{ + "sound/creatures/robot/servo_01b" + spatial + volume 0.33 +} +sound "servo_03b" +{ + "sound/creatures/robot/servo_03b" + spatial + volume 0.33 +} +sound "servo_03t" +{ + "sound/creatures/robot/servo_03t" + spatial + volume 0.33 +} +sound "servo_04b" +{ + "sound/creatures/robot/servo_04b" + spatial + volume 0.33 +} +sound "servo_05b" +{ + "sound/creatures/robot/servo_05b" + spatial + volume 0.33 +} +sound "servo_06b" +{ + "sound/creatures/robot/servo_06b" + spatial + volume 0.33 +} +sound "servo_07b" +{ + "sound/creatures/robot/servo_07b" + spatial + volume 0.33 +} +sound "syk_01" +{ + "sound/creatures/robot/syk_01" + spatial + volume 0.33 +} +sound "syk_02" +{ + "sound/creatures/robot/syk_01" + spatial + volume 0.43 +} +sound "Fsteps" +{ + "sound/creatures/robot/fs_01" + "sound/creatures/robot/fs_02" + "sound/creatures/robot/fs_03" + "sound/creatures/robot/fs_04" + "sound/creatures/robot/fs_05" + "sound/creatures/robot/fs_06" + "sound/creatures/robot/fs_07" + "sound/creatures/robot/fs_08" + spatial + volume 0.43 +} +sound "robot_pain_01" +{ + "sound/creatures/robot/pain_01" + "sound/creatures/robot/pain_02" + "sound/creatures/robot/pain_03" + spatial + volume 1.03 +} +sound "pain_03" +{ +"sound/creatures/robot/pain_03" + spatial + volume 0.43 +} +sound "robot_death_01" +{ + "sound/creatures/robot/Death_01" + "sound/creatures/robot/Death_02" + spatial + volume 1.03 +} +//=================FootSteps========================= + + + +sound "fs_specForces_01" //special forces +{ + "sound/creatures/lighttrooper/boots01" + "sound/creatures/lighttrooper/boots02" + "sound/creatures/lighttrooper/boots03" + "sound/creatures/lighttrooper/boots04" + "sound/creatures/lighttrooper/boots05" + "sound/creatures/lighttrooper/boots06" + "sound/creatures/lighttrooper/boots07" + range half + spatial + volume 0.82 + +} + + +sound "fsOut_02a" //pisek +{ + "sound/fs/outdoor/fs_gravel01" + "sound/fs/outdoor/fs_gravel02" + "sound/fs/outdoor/fs_gravel03" + range half + spatial + volume 0.52 +} +sound "fsOut_02b" //pisek +{ + "sound/fs/outdoor/fs_gravel04" + "sound/fs/outdoor/fs_gravel05" + "sound/fs/outdoor/fs_gravel06" + range half + spatial + volume 0.52 +} + +sound "fsOut_01a" //outdoor +{ + "sound/fs/outdoor/fs_out01" + "sound/fs/outdoor/fs_out02" + "sound/fs/outdoor/fs_out03" + "sound/fs/outdoor/fs_out04" + range half + spatial + volume 0.32 +} +sound "fsOut_01b" //outdoor +{ + "sound/fs/outdoor/fs_out05" + "sound/fs/outdoor/fs_out06" + "sound/fs/outdoor/fs_out07" + "sound/fs/outdoor/fs_out08" + range half + spatial + volume 0.32 +} + +sound "fsPlast_01a" //plastic +{ + "sound/fs/plastic/fs_plastic04" + "sound/fs/plastic/fs_plastic05" + range half + spatial + volume 0.42 +} +sound "fsPlast_01b" //plastic +{ + "sound/fs/plastic/fs_plastic01" + "sound/fs/plastic/fs_plastic02" + range half + spatial + volume 0.42 +} +sound "fsIron_02" //roboti +{ + "sound/fs/iron_02/fsi_01" + "sound/fs/iron_02/fsi_02" + "sound/fs/iron_02/fsi_03" + "sound/fs/iron_02/fsi_04" + range half + spatial + volume 0.52 +} + + +sound "fsBeton_01a" +{ + "sound/fs/beton_01/fsb_01" + "sound/fs/beton_01/fsb_02" + range half + spatial + volume 0.52 +} +sound "fsBeton_01b" +{ + "sound/fs/beton_01/fsb_03" + "sound/fs/beton_01/fsb_04" + "sound/fs/beton_01/fsb_05" + range half + spatial + volume 0.52 +} + +sound "fs_01a" +{ + "sound/fs/metal_01/fs_01" + "sound/fs/metal_01/fs_02" + "sound/fs/metal_01/fs_04" + range half + spatial + volume 0.42 +} +sound "fs_01b" +{ + "sound/fs/metal_01/fs_03" + "sound/fs/metal_01/fs_05" + range half + spatial + volume 0.42 +} +sound "fsIron_01a" +{ + "sound/fs/iron_01/fsi_01" + "sound/fs/iron_01/fsi_02" + "sound/fs/iron_01/fsi_03" + range half + spatial + volume 0.52 +} +sound "fsIron_01b" +{ + "sound/fs/iron_01/fsi_05" + "sound/fs/iron_01/fsi_06" + range half + spatial + volume 0.52 +} + +//=================GUNS========================= +sound "Hammer_out" //outdoor +{ + "sound/fs/outdoor/fs_out01" + "sound/fs/outdoor/fs_out02" + "sound/fs/outdoor/fs_out03" + "sound/fs/outdoor/fs_out04" + range half + spatial + volume 1.0 +} +sound "Hammer_miss01" +{ + "sound/WEAPONS/Hammer/svist1" + "sound/WEAPONS/Hammer/svist2" + "sound/WEAPONS/Hammer/svist3" + spatial + volume 0.7 +} +sound "RocketLauncher_fire01" +{ + "sound/WEAPONS/RocketLauncher/rocket_fire01" + spatial + volume 1.0 + minrange highest +} +sound "RocketLauncher_reload01a" +{ + "sound/WEAPONS/RocketLauncher/rocket_reload01a" + spatial + volume 1.0 +} +sound "RocketLauncher_reload01b" +{ + "sound/WEAPONS/RocketLauncher/rocket_reload01b" + spatial + volume 1.0 +} +sound "RocketLauncher_IN" +{ + "sound/WEAPONS/RocketLauncher/rocket_IN01" + spatial + volume 1.0 +} +sound "flameThrower_loop01" +{ + "sound/WEAPONS/flameThrower/flame_loop01" + //"sound/WEAPONS/flameThrower/flame03" + spatial + volume 1.0 + minrange higher +} +sound "flameThrower_end01" +{ + "sound/WEAPONS/flameThrower/flame_end02" + spatial + volume 1.0 + minrange higher +} +sound "flame_IN" +{ + "sound/WEAPONS/flameThrower/flame_IN03" + spatial + volume 1.0 +} + +sound "gatlingLE_loop" +{ + //"sound/WEAPONS/Gatling/gatlingLE_loop" + "sound/WEAPONS/Gatling/gatling_fire01" + spatial + volume 1.0 +} + +sound "gatlingLE_end" +{ + "sound/WEAPONS/Gatling/gatlingLE_end" + spatial + volume 1.0 +} +sound "gatling_IN" +{ + "sound/WEAPONS/Gatling/gatling_IN01" + spatial + volume 0.6 +} +sound "shotgun_IN" +{ + "sound/WEAPONS/shotgun/shotgun_in01" + spatial + volume 0.7 +} + +sound "rGun01" +{ + "sound/WEAPONS/RobotGun/rGun01" + "sound/WEAPONS/RobotGun/rGun02" + "sound/WEAPONS/RobotGun/rGun03" + spatial + volume 0.8 +} +sound "Weap_Grenade_expl3" +{ + "sound/WEAPONS/Grenade/Boom03" + ambient + volume 1.0 +} +sound "Weap_Grenade_expl2" +{ + "sound/WEAPONS/Grenade/Boom01" + "sound/WEAPONS/Grenade/Boom02" + "sound/WEAPONS/Grenade/Boom03" + "sound/WEAPONS/Grenade/Boom04" + "sound/WEAPONS/Grenade/Boom05" + ambient + volume 1.0 + minrange 512 +} +sound "Weap_Grenade_expl" +{ + "sound/WEAPONS/Grenade/Boom01" + "sound/WEAPONS/Grenade/Boom02" + "sound/WEAPONS/Grenade/Boom03" + "sound/WEAPONS/Grenade/Boom04" + "sound/WEAPONS/Grenade/Boom05" + spatial + volume 1.0 + minrange 512 +} +sound "sound/weapons/grenade/Gexplosion05" +{ + "sound/WEAPONS/Grenade/Boom05" + spatial + volume 1.0 + minrange 512 +} +sound "Gactivate01" +{ + "sound/WEAPONS/Grenade/GAactivate02" + spatial + volume 1.0 +} + +sound "SniperServo01" +{ + "sound/WEAPONS/Sniper/screenServo01" + spatial + volume 1.0 +} + +sound "Sniper01" +{ + "sound/WEAPONS/Sniper/Sniper07" + spatial + volume 0.6 +} +sound "jackHammer01" +{ + "sound/WEAPONS/JackHammer/jackHammer02" + spatial + volume 0.7 +} +sound "jackHammer02" +{ + "sound/WEAPONS/JackHammer/jackHammer03" + spatial + volume 1.0 +} +sound "jackHammer03" +{ + "sound/WEAPONS/JackHammer/jackHammer04" + spatial + volume 1.0 +} +sound "jackHammer04" +{ + "sound/WEAPONS/JackHammer/jackHammer05" + spatial + volume 1.0 +} +sound "ShotGun_01" +{ + "sound/WEAPONS/ShotGun/Shotgun01" + spatial + volume 0.6 +} +sound "shotgun_reload01a" +{ + "sound/WEAPONS/ShotGun/SHreload01_a" + spatial + volume 0.6 +} +sound "shotgun_reload01b" +{ + "sound/WEAPONS/ShotGun/SHreload01_b" + spatial + volume 0.6 +} +sound "shotgun_reload01c" +{ + "sound/WEAPONS/ShotGun/shotgun_reload03" + spatial + volume 0.6 +} +sound "reload_01" +{ + "sound/WEAPONS/reload_02" + spatial + volume 0.6 +} + +sound "shotgun_reload02" +{ + "sound/WEAPONS/ShotGun/shotgun_reload02" + spatial + volume 0.6 +} + + +sound "robot_shot02" +{ +"sound/weapons/sentry/sentry_shot_01" +/*"sound/creatures/robot/weapons/shot01" +"sound/creatures/robot/weapons/shot02" +"sound/creatures/robot/weapons/shot03" +"sound/creatures/robot/weapons/shot04" +*/ +spatial +volume 0.7 +} +sound "robot_shot01" +{ +"sound/weapons/sentry/sentry_shot_01" +spatial +volume 0.7 +} +sound "pistol_shot01" +{ +"sound/weapons/pistol/pistolShot04" +spatial +volume 0.5 +} +sound "reloadall" +{ +"sound/weapons/reloadall" +ambient +volume 0.6 +} +sound "pistol_reload01a" +{ +"sound/weapons/pistol/pistol_reload02_a" +spatial +volume 1.0 +} +sound "pistol_reload01b" +{ +"sound/weapons/pistol/pistol_reload02_b" +spatial +volume 1.0 +} +sound "pistol_reload01c" +{ +"sound/weapons/pistol/pistol_reload02_c" +spatial +volume 1.0 +} +sound "sentry_shot01" +{ + "sound/weapons/sentry/sentry_shot_01" + //"sound/weapons/sentry/sentry_shot_02" + spatial + volume 0.9 +} +sound "sentry_shot02" +{ + "sound/weapons/sentry/sentry_shot_02" + //"sound/weapons/sentry/sentry_shot_02" + spatial + volume 0.9 +} +sound "Shell01" +{ +"sound/WEAPONS/nabojnice_01" +"sound/WEAPONS/nabojnice_02" +"sound/WEAPONS/nabojnice_03" +"sound/WEAPONS/nabojnice_04" +"sound/WEAPONS/nabojnice_05" + spatial + range quart + volume 1.035 +} + +sound "Weap_Tachyon" +{ + "sound/WEAPONS/Grenade/Tach_gun_02" + spatial + volume 0.8 +} +sound "sound/WEAPONS/Grenade/explosion_05" +{ + "sound/WEAPONS/Grenade/explosion_05" + spatial + volume 1.0 +} +sound "Weap_Tachyon_expl" +{ + "sound/WEAPONS/Grenade/explosion_03" + "sound/WEAPONS/Grenade/explosion_05" + "sound/WEAPONS/Grenade/explosion_06" + "sound/WEAPONS/Grenade/explosion_07" + spatial + volume 1.0 +} +sound "Reload01a" +{ + "sound/WEAPONS/GLOCK/MGreload01_a" + spatial + volume 1.0 +} +sound "Reload01b" +{ + "sound/WEAPONS/GLOCK/MGreload01_b" + spatial + volume 1.0 +} +sound "sound/WEAPONS/glock/glockfire" +{ + + "sound/weapons/glock/mainGun_24" + "sound/weapons/glock/mainGun_24" + "sound/weapons/glock/mainGun_25" + + spatial + volume 0.6 +} +sound "noammo" +{ + + "sound/weapons/glock/noammo_pistol" + + spatial + volume 0.6 +} + +sound "Hubbardium_Pick" +{ + "sound/hud/PickuUp03" + ambient + volume 1.0 +} +sound "Weapon_Pick" +{ + "sound/weapons/shotgun/shotgun_reload03" + spatial + volume 1.0 +} + +sound "Ammo_Pick" +{ + "sound/weapons/reloadall" + ambient + volume 1.0 +} + +sound "WeaponGUI_ScrollIn" //nabeh buttonov +{ + "sound/hud/FadeIn_HUD" + ambient + volume 0.7 +} + +sound "WeaponGUI_ScrollOut" //odchod buttonov +{ + "sound/hud/FadeOut_HUD" + ambient + volume 0.7 +} + +sound "WeaponGUI_Select" //zbran bola vybrana +{ + "sound/hud/ClickHUD_04" + ambient + volume 1.0 +} + +sound "WeaponGUI_BadSelect" //pokus o vyber zbrane ale button je prazdny takze zbran nejde selektnut +{ + "sound/hud/FailHUD_04" + ambient + volume 1.0 +} + +sound "WeaponGUI_ButtonEnter" //kurzor presiel na novy button +{ + "sound/hud/ClickHUD_03" + ambient + volume 0.4 +} + +//=================AMBIENTS========================= +sound "sound/ambiences/e3/engine_06" +{ + "sound/ambiences/e3/engine_06" + ambient + stream + volume 0.3 +} +sound "bad_engine_01" +{ + "sound/ambiences/PublisherLevel/bad-engine_11" + spatial + volume 0.6 +} +sound "AmbiLifts_01" +{ + "sound/effects/ambi_doors" + "sound/effects/ambi_doors2" + ambient + volume 0.4 +} +sound "activate" +{ + "sound/door/activate01" + "sound/door/activate02" + "sound/door/activate03" + ambient + volume 0.8 +} +sound "activate02" +{ + "sound/door/activate04" + ambient + volume 0.8 +} +//===========Player==================== + sound "OxygenPumpUp" + { + "sound/display/disp_efx_10" + spatial + volume 0.4 + } + sound "OxygenDeviceJoin" + { + "sound/creatures/player/Oxygene/Oxygene_load01" + spatial + volume 0.5 + } + sound "OxygenDeviceUnjoin" + { + "sound/creatures/player/Oxygene/Oxygene_unload01" + spatial + volume 0.6 + } +sound "Oxygene_nadech01" +{ + "sound/creatures/player/Oxygene/oxygene01" + "sound/creatures/player/Oxygene/oxygene03" + "sound/creatures/player/Oxygene/oxygene05" + "sound/creatures/player/Oxygene/oxygene07" + ambient + volume 0.3 +} +sound "Oxygene_vydech01" +{ + "sound/creatures/player/Oxygene/oxygene02" + "sound/creatures/player/Oxygene/oxygene04" + "sound/creatures/player/Oxygene/oxygene06" + ambient + volume 0.3 +} + +sound "hearthbeat" +{ + "sound/creatures/player/hearthbeat03" + ambient + volume 0.42 +} +sound "hearthbeat02" +{ + "sound/creatures/player/hearthbeat03" + ambient + volume 0.42 +} + + +sound "rustle01" +{ + "sound/creatures/faggioli/rustle6" + "sound/creatures/faggioli/rustle11" + "sound/creatures/faggioli/rustle12" + spatial + volume 0.8 +} + + +sound "player_flashlight" +{ + "sound/creatures/player/flashlight" + global + spatial + volume 0.43 +} +sound "player_pains" +{ + "sound/creatures/player/movement/ppain1" + "sound/creatures/player/movement/ppain2" + //"sound/creatures/player/movement/ppain3" + + global + ambient + volume 0.33 +} + +sound "player_deaths" +{ + "sound/creatures/player/movement/pdeath1" + "sound/creatures/player/movement/pdeath2" + + spatial + range half + volume 0.73 +} + + +//=================AMBI SOUND(ENGINES, TRAFO)========================= +sound "zkrat_01" +{ + "sound/ambiences/AmbiSounds/shrtcirc_01" + "sound/ambiences/AmbiSounds/shrtcirc_02" + "sound/ambiences/AmbiSounds/shrtcirc_03" + "sound/ambiences/AmbiSounds/shrtcirc_04" + "sound/ambiences/AmbiSounds/shrtcirc_05" + "sound/ambiences/AmbiSounds/shrtcirc_06" + range quart + spatial + volume 0.3 +} +sound "zkrat_02" +{ + "sound/ambiences/AmbiSounds/shrtcirc_001" + "sound/ambiences/AmbiSounds/shrtcirc_002" + spatial + volume 0.5 +} + +sound "zkrat_03" //schvalne chcem iba ten jeden zvuk +{ + "sound/ambiences/AmbiSounds/shrtcirc_001" + spatial + volume 0.5 +} + +sound "Ventilace_01" +{ + "sound/ambiences/AmbiSounds/fan1" + spatial + volume 0.4 +} +sound "Ventilace_02" +{ + "sound/ambiences/AmbiSounds/fan_norm_01" + spatial + volume 0.5 + minrange normal +} + +sound "Ventilace_03" +{ + "sound/ambiences/AmbiSounds/fan1" + spatial + volume 1 +} + +sound "sound/ambiences/e3/engine_10" +{ + "sound/ambiences/e3/engine_10" + spatial + volume 0.8 +} +sound "sound/ambiences/e3/engine_11" +{ + "sound/ambiences/e3/engine_11" + range half + spatial + volume 0.8 +} + +/* +sound "sound/ambiences/e3/MIA_02" +{ + "sound/ambiences/e3/MIA_02" + spatial + volume 0.5 +} +*/ + +//============MENU and END TITLE=========== + +/*sound "sound/mainmenu/menu" +{ + "sound/mainmenu/menu" + stream + ambient + volume 0.5 +} +*/ + +//=================INVENTORY========================= + + +//===============physics sounds=================//ragdolls + +sound "physic_Metal_solid" +{ + "sound/physic/common/Metal_solid01" + "sound/physic/common/Metal_solid02" + "sound/physic/common/Metal_solid03" + spatial + range half + volume 0.8 +} +sound "physic_Metal_soft" +{ + "sound/physic/common/Metal_soft01" + "sound/physic/common/Metal_soft02" + spatial + range half + volume 0.8 +} +sound "physic_plastic_hard" +{ + "sound/physic/common/Material_plastic_Hard01" + "sound/physic/common/Material_plastic_Hard02" + "sound/physic/common/Material_plastic_Hard03" + "sound/physic/common/Material_plastic_Hard04" + "sound/physic/common/Material_plastic_Hard05" + spatial + range half + volume 0.8 +} +sound "physic_plastic_solid" +{ + "sound/physic/common/Material_plastic_Solid01" + "sound/physic/common/Material_plastic_Solid02" + "sound/physic/common/Material_plastic_Solid03" + "sound/physic/common/Material_plastic_Solid04" + "sound/physic/common/Material_plastic_Solid05" + spatial + range half + volume 0.8 +} +sound "physic_bar_hard01" +{ + "sound/physic/common/Material_Bar_Hard01" + "sound/physic/common/Material_Bar_Hard02" + "sound/physic/common/Material_Bar_Hard03" + "sound/physic/common/Material_Bar_Hard04" + "sound/physic/common/Material_Bar_Hard05" + spatial + range half + volume 0.8 +} +sound "physic_bar_solid01" +{ + "sound/physic/common/Material_Bar_Solid01" + "sound/physic/common/Material_Bar_Solid02" + spatial + range half + volume 0.4 +} +sound "physic_bar_soft01" +{ + "sound/physic/common/smallvrz001" + "sound/physic/common/smallvrz002" + spatial + range half + volume 0.3 +} +sound "physic_metal01" +{ + "sound/physic/box/impact_02" + "sound/physic/box/impact_03" + "sound/physic/box/impact_04" + "sound/physic/box/impact_05" + spatial + range half + volume 1.0 +} + +sound "physic_metal_default" +{ + "sound/physic/box/impact2_01" + "sound/physic/box/impact2_02" + "sound/physic/box/impact2_03" + "sound/physic/box/impact2_04" + "sound/physic/box/impact2_05" + "sound/physic/box/impact2_06" + "sound/physic/box/impact2_07" + "sound/physic/box/impact2_08" + "sound/physic/box/impact2_09" + spatial + range half + volume 1.0 +} +sound "physic_common01" //universal +{ + "sound/physic/common/impact3_01" + "sound/physic/common/impact3_02" + "sound/physic/common/impact3_03" + "sound/physic/common/impact4_01" + "sound/physic/common/impact4_02" + "sound/physic/common/impact4_03" + "sound/physic/common/impact4_06" + spatial + range half + volume 1.0 +} +sound "physic_common02" //small iron item +{ + "sound/physic/common/impact4_04" + "sound/physic/common/impact4_05" + spatial + range half + volume 1.0 +} + +sound "glass_break" +{ + "sound/MATERIAL/glass/glass_01" + "sound/MATERIAL/glass/glass_02" + "sound/MATERIAL/glass/glass_03" + "sound/MATERIAL/glass/glass_04" + "sound/MATERIAL/glass/glass_05" + "sound/MATERIAL/glass/glass_06" + spatial + range half + volume 1.03 +} + +sound "Plate_item" +{ + "sound/MATERIAL/Plate/plate_01" + "sound/MATERIAL/Plate/plate_02" + "sound/MATERIAL/Plate/plate_03" + "sound/MATERIAL/Plate/plate_04" + "sound/MATERIAL/Plate/plate_05" + spatial + range half + volume 1.0 +} +sound "iron_hard01" +{ + "sound/MATERIAL/iron/iron_hard01" + "sound/MATERIAL/iron/iron_hard02" + "sound/MATERIAL/iron/iron_hard03" + "sound/MATERIAL/iron/iron_hard04" + spatial + range half + volume 1.0 +} +sound "iron_solid01" +{ + "sound/MATERIAL/iron/material_iron_solid01" + "sound/MATERIAL/iron/material_iron_solid02" + "sound/MATERIAL/iron/material_iron_solid03" + spatial + range half + volume 1.0 +} +sound "cinka01" +{ + "sound/MATERIAL/cinka/iron_hard01" + "sound/MATERIAL/cinka/iron_hard02" + "sound/MATERIAL/cinka/iron_hard03" + "sound/MATERIAL/cinka/iron_hard04" + spatial + range half + volume 1.0 +} +sound "Metal_universal01" +{ + "sound/MATERIAL/cinka/iron_hard02" + "sound/MATERIAL/cinka/iron_hard05" + "sound/MATERIAL/cinka/iron_hard06" + spatial + range half + volume 0.7 +} +sound "Metal_universal02" +{ + "sound/MATERIAL/cinka/iron_hard06" + "sound/MATERIAL/cinka/iron_hard02" + spatial + range half + volume 0.5 +} +sound "pribor01" +{ + "sound/MATERIAL/iron/pribor_hard01" + "sound/MATERIAL/iron/pribor_hard02" + "sound/MATERIAL/iron/pribor_hard03" + spatial + range half + volume 1.0 +} +sound "flesh_hard01" +{ + "sound/MATERIAL/flesh/flesh_hard01" + "sound/MATERIAL/flesh/flesh_hard02" + "sound/MATERIAL/flesh/flesh_hard03" + "sound/MATERIAL/flesh/flesh_hard04" + spatial + range half + volume 1.0 +} +sound "flesh_solid01" +{ + "sound/MATERIAL/flesh/flesh_solid01" + "sound/MATERIAL/flesh/flesh_solid02" + "sound/MATERIAL/flesh/flesh_solid03" + "sound/MATERIAL/flesh/flesh_solid04" + spatial + range half + volume 1.0 +} +sound "grenade_hard01" +{ + "sound/MATERIAL/grenade/Gimpact01" + "sound/MATERIAL/grenade/Gimpact02" + "sound/MATERIAL/grenade/Gimpact03" + "sound/MATERIAL/grenade/Gimpact04" + spatial + volume 1.02 + } +sound "grenade_solid01" +{ + "sound/MATERIAL/grenade/Gimpact01" + "sound/MATERIAL/grenade/Gimpact02" + "sound/MATERIAL/grenade/Gimpact03" + "sound/MATERIAL/grenade/Gimpact04" + spatial + volume 0.52 + } +/* +sound "physic_bone" +{ + "sound/physic/bone_fall1" + "sound/physic/bone_fall2" + "sound/physic/bone_fall3" + "sound/physic/bone_fall4" + spatial + volume 1.04 +} + +sound "physic_flesh" +{ + "sound/physic/flesh_fall1" + "sound/physic/flesh_fall2" + "sound/physic/flesh_fall3" + "sound/physic/flesh_fall4" + spatial + volume 1.04 +} +sound "physic_metal" +{ + "sound/physic/plate_fall1" + "sound/physic/plate_fall2" + "sound/physic/plate_fall3" + "sound/physic/plate_fall4" + spatial + volume 1.02 +} + +//===============physics sounds=================//weapons +sound "physics_metal_weapons" +{ + "sound/physic/mFall1" + "sound/physic/mFall2" + "sound/physic/mFall3" + "sound/physic/mFall4" + "sound/physic/mFall5" + spatial + volume 1.03 +} + +sound "physics_wood_weapons" +{ + "sound/physic/wFall1" + "sound/physic/wFall2" + "sound/physic/wFall3" + "sound/physic/wFall4" + spatial + volume 1.03 +} +*/ + +/* +sound "physic_bone" +{ + "sound/physic/bone_fall1" + "sound/physic/bone_fall2" + "sound/physic/bone_fall3" + "sound/physic/bone_fall4" + spatial + volume 1.04 +} +*/ + + +//========== RND sounds start ================================================== +/* +sound "rnd_birds1" //group1 Birds +{ + "sound/effects/env/eagleI" + "sound/effects/env/eagleII" + "sound/effects/env/IbisI" + "sound/effects/env/eagleV" + "sound/effects/env/owlII" + "sound/effects/env/owlI" + "sound/effects/env/batI" + + spatial + range half +} +*/ +//*************************************************** + +//=================================================== +//================DIALOGS SHADERS==================== +//=================================================== + + +//NARRATOR +#define DIALOG_FX_N1 \ + reverb 0.0 -17.3 1308,1 0.05 + +#define DIALOG_FX \ + echo 29.1 22.7 575.1 454.3 0.0 \ + flange 29.1 100 -39.1 6.05 2.84 \ + reverb 0.0 -7.3 3000 0.0 + + +//---------------------PLAYER--------------- +//NORMAL(ROOM) +#define DIALOG_FX_P1 \ + reverb -5.5 -17.3 1308.1 0.5 + +//HALL +#define DIALOG_FX_P2 \ + reverb -5.5 -14.0 2511.6 0.0 + +//CHURCH +#define DIALOG_FX_P3 \ + reverb -5.4 -14.0 3000 0.0 \ + echo 11.0 7.6 407.8 442.60 0.0 + + +//MOUNTAIN +#define DIALOG_FX_P4 \ + reverb -5.4 -17.9 2651,2 0.0 \ + echo 11.0 11.6 512.4 465.90 0.0 +//-------------------------------------------- + +#define DIALOG_FX_D1 \ + echo 17.4 7.6 988.9 1267.8 0.0 \ + reverb -6.0 -4.3 3000 0.0 + //flange 29.1 100 -39.1 6.05 2.84 \ + +//#define DIALOG_FX_D1 \ + //chorus 64.5 77.3 -2.3 4.10 7.70 \ + //Ventilace_01ressor 8.4 20.4 684.6 -29.7 33.2 0.65 \ + //echo 17.4 7.6 500.8 524.0 0.0 \ + //reverb 0.0 -9.5 2581.4 0.0 + +#define DIALOG_FX_A1 \ + echo 17.4 7.6 988.9 1267.8 0.0 \ + chorus 65.1 39.0 -15.0 2.30 15.30 \ + reverb 0.0 -7.3 2581.4 0.0 \ + compressor 22.3 11.6 273.0 -54.1 73.5 0.65 +/* +sound "TestShader" +{ + "sound/dialogs/0001" + + ambient + + volume 1 + + DIALOG_FX + + + //wet/dry, feedback, left delay, right delay, pan delay + echo 29.1 22.7 575.1 454.3 0.0 + + //wet/dry, depth, feedback, frequency, delay + flange 29.1 100 -39.1 6.05 2.84 + + //in gain, reverb mix, reverb time, hifreq ratio + reverb 0.0 -7.3 3000 0.0 + + //Compressor Gain Attack Release Treshold Ratio Predelay + 22,3 11,6 273,0 -54,1 73,5 0,65 + + //Chorus wet/dry mix Depth Feedback Frequency Delay + 65,1 39,0 -15,0 2,30 15,30 + + +} +*/ + +//********************SCHILLACI HLASKY************************ + +//NAHODNE hlasky pri boji do vysilacky +sound "schillaci_vysilacka01" +{ +"sound/creatures/faggioli/hlv0000" +"sound/creatures/faggioli/hlv0001" +"sound/creatures/faggioli/hlv0003" +"sound/creatures/faggioli/hlv0004" +"sound/creatures/faggioli/hlv0005" +"sound/creatures/faggioli/hlv0006" +"sound/creatures/faggioli/hlv0012" +"sound/creatures/faggioli/hlv0013" +"sound/creatures/faggioli/hlv0014" +"sound/creatures/faggioli/hlv0015" +"sound/creatures/faggioli/hlv0016" +ambient +volume 0.8 +} +//NAHODNE hlasky pri boji - slysitelna vzdalenost +sound "schillaci_vysilacka02" +{ +"sound/creatures/faggioli/hl0001" +"sound/creatures/faggioli/hl0003" +"sound/creatures/faggioli/hl0004" +"sound/creatures/faggioli/hl0016" +"sound/creatures/faggioli/hl0017" +"sound/creatures/faggioli/hl0018" +spatial +volume 1.0 +} +//---HLASKY pro skript---// + +//----move, common... +sound "schillaci01" +{ +"sound/creatures/faggioli/hl0002" +"sound/creatures/faggioli/hl0007" +"sound/creatures/faggioli/hl0011" +"sound/creatures/faggioli/hl0021" +"sound/creatures/faggioli/hl0022" +ambient +volume 1.0 +} +//----cover +sound "schillaci02" +{ +"sound/creatures/faggioli/hl0005" +"sound/creatures/faggioli/hl0023" +"sound/creatures/faggioli/hl0024" +cycle +ambient +volume 1.0 +} +//---turn watch +sound "schillaci03" +{ +"sound/creatures/faggioli/hl0006" +"sound/creatures/faggioli/hl0013" +"sound/creatures/faggioli/hl0014" +ambient +volume 1.0 +} +//---no way(?) +sound "schillaci04" +{ +"sound/creatures/faggioli/hl0010" +ambient +volume 1.0 +} +//---down down +sound "schillaci05" +{ +"sound/creatures/faggioli/hl0015" +ambient +volume 1.0 +} +//---put your head +sound "schillaci06" +{ +"sound/creatures/faggioli/hl0012" +ambient +volume 1.0 +} +//what are you doing?! +sound "schillaci07" +{ +"sound/creatures/faggioli/hl0025" +ambient +volume 1.0 +} +// NICE SHOT! +sound "schillaci08" +{ +"sound/creatures/faggioli/hl0009" +ambient +volume 1.0 +} +//******************SCHILLACI END********************************* + +//---------------------------------------------------------------------- +//---------shadery pro cutscenovy dialogy ----------- +//---------------------------------------------------------------------- + +//Shadery: + +sound "0_1_Arn0001" +{ +"sound/dialogs/0_1_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_1_Arn0002" +{ +"sound/dialogs/0_1_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_1_Arn0003" +{ +"sound/dialogs/0_1_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_1_PAv0001" +{ +"sound/dialogs/0_1_PAv0001" +ambient +volume 1.0 +stream + +} + + +sound "0_1_PAv0002" +{ +"sound/dialogs/0_1_PAv0002" +ambient +volume 1.0 +stream + +} + + +sound "0_1_PAv0003" +{ +"sound/dialogs/0_1_PAv0003" +ambient +volume 1.0 +stream + +} + + +sound "0_1_Tmv0001" +{ +"sound/dialogs/0_1_Tmv0001" +ambient +volume 1.0 +stream + +} + + +sound "0_2_Arn0001" +{ +"sound/dialogs/0_2_Arn0001" +ambient +volume 0.6 +stream + +} + + +sound "0_2_Arn0002" +{ +"sound/dialogs/0_2_Arn0002" +ambient +volume 0.6 +stream + +} + + +sound "0_2_Arn0003" +{ +"sound/dialogs/0_2_Arn0003" +ambient +volume 0.6 +stream + +} + + +sound "0_2_Liv0001" +{ +"sound/dialogs/0_2_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "0_2_Liv0002" +{ +"sound/dialogs/0_2_Liv0002" +ambient +volume 1.0 +stream + +} + + +sound "0_2_Liv0003" +{ +"sound/dialogs/0_2_Liv0003" +ambient +volume 1.0 +stream + +} + + +sound "0_2_Liv0003a" +{ +"sound/dialogs/0_2_Liv0003a" +ambient +volume 1.0 +stream + +} + + +sound "0_2_Liv0004" +{ +"sound/dialogs/0_2_Liv0004" +ambient +volume 1.0 +stream + +} + + +sound "0_2_Liv0005" +{ +"sound/dialogs/0_2_Liv0005" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Arn0001" +{ +"sound/dialogs/0_3_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_3_Arn0002" +{ +"sound/dialogs/0_3_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_3_Arn0003" +{ +"sound/dialogs/0_3_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_3_Arn0004" +{ +"sound/dialogs/0_3_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_3_Arn0005" +{ +"sound/dialogs/0_3_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_3_Arn0006" +{ +"sound/dialogs/0_3_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_3_Arn0007" +{ +"sound/dialogs/0_3_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "0_3_Liv0001" +{ +"sound/dialogs/0_3_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Liv0002" +{ +"sound/dialogs/0_3_Liv0002" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Liv0003" +{ +"sound/dialogs/0_3_Liv0003" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Liv0004" +{ +"sound/dialogs/0_3_Liv0004" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Liv0004a" +{ +"sound/dialogs/0_3_Liv0004a" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Liv0005" +{ +"sound/dialogs/0_3_Liv0005" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Liv0005a" +{ +"sound/dialogs/0_3_Liv0005a" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Liv0006" +{ +"sound/dialogs/0_3_Liv0006" +ambient +volume 1.0 +stream + +} + + +sound "0_3_Liv0007" +{ +"sound/dialogs/0_3_Liv0007" +ambient +volume 1.0 +stream + +} + + +sound "0_6_Arn0001" +{ +"sound/dialogs/0_6_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_2_Tc10001" +{ +"sound/dialogs/1_2_Tc10001" +spatial +volume 0.6 +minrange normal +} + + +sound "1_2_Tc10001_verze" +{ +"sound/dialogs/1_2_Tc10001_verze" +spatial +volume 0.6 +minrange normal +} + + +sound "1_2_Tc20001" +{ +"sound/dialogs/1_2_Tc20001" +spatial +volume 0.6 +minrange normal +} + + +sound "1_3_Arn0001" +{ +"sound/dialogs/1_3_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "1_3_Liv0001" +{ +"sound/dialogs/1_3_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "1_4_Grd0001" +{ +"sound/dialogs/1_4_Grd0001" +spatial +volume 0.6 +minrange highest +} + + +sound "1_4_Grd0002" +{ +"sound/dialogs/1_4_Grd0002" +spatial +volume 0.6 +minrange highest +} + + +sound "1_4_Tec0001" +{ +"sound/dialogs/1_4_Tec0001" +spatial +volume 0.6 +minrange highest +} + + +sound "1_6_Arn0001" +{ +"sound/dialogs/1_6_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_6_Arn0002" +{ +"sound/dialogs/1_6_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_6_Arn0003" +{ +"sound/dialogs/1_6_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_6_Arn0004" +{ +"sound/dialogs/1_6_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_6_Arn0005" +{ +"sound/dialogs/1_6_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_6_Pao0001" +{ +"sound/dialogs/1_6_Pao0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0002" +{ +"sound/dialogs/1_6_Pao0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0003" +{ +"sound/dialogs/1_6_Pao0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0004" +{ +"sound/dialogs/1_6_Pao0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0005" +{ +"sound/dialogs/1_6_Pao0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0006" +{ +"sound/dialogs/1_6_Pao0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0007" +{ +"sound/dialogs/1_6_Pao0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0008" +{ +"sound/dialogs/1_6_Pao0008" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0008a" +{ +"sound/dialogs/1_6_Pao0008a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0009" +{ +"sound/dialogs/1_6_Pao0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0009a" +{ +"sound/dialogs/1_6_Pao0009a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0010" +{ +"sound/dialogs/1_6_Pao0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0011" +{ +"sound/dialogs/1_6_Pao0011" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0012" +{ +"sound/dialogs/1_6_Pao0012" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_6_Pao0013" +{ +"sound/dialogs/1_6_Pao0013" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Arn0001" +{ +"sound/dialogs/1_8_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_8_Arn0001a" +{ +"sound/dialogs/1_8_Arn0001a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_8_Arn0002" +{ +"sound/dialogs/1_8_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_8_Arn0003" +{ +"sound/dialogs/1_8_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_8_Arn0004" +{ +"sound/dialogs/1_8_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_8_Arn0005" +{ +"sound/dialogs/1_8_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_8_Pao0001" +{ +"sound/dialogs/1_8_Pao0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Pao0002" +{ +"sound/dialogs/1_8_Pao0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Pao0003" +{ +"sound/dialogs/1_8_Pao0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Pao0004" +{ +"sound/dialogs/1_8_Pao0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Pao0005" +{ +"sound/dialogs/1_8_Pao0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Pao0006" +{ +"sound/dialogs/1_8_Pao0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Pao0006a" +{ +"sound/dialogs/1_8_Pao0006a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Pao0007" +{ +"sound/dialogs/1_8_Pao0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_8_Pao0007a" +{ +"sound/dialogs/1_8_Pao0007a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "1_C_Arn0001" +{ +"sound/dialogs/1_C_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_C_Arn0002" +{ +"sound/dialogs/1_C_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "1_C_Arn0003" +{ +"sound/dialogs/1_C_Arn0003" +ambient +volume 0.6 +} + + +sound "1_C_Arn0004" +{ +"sound/dialogs/1_C_Arn0004" +ambient +volume 0.6 +} + + +sound "2_1_Pao0001" +{ +"sound/dialogs/2_1_Pao0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_1_Pao0002" +{ +"sound/dialogs/2_1_Pao0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_1_Pao0003" +{ +"sound/dialogs/2_1_Pao0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_1_Pao0004" +{ +"sound/dialogs/2_1_Pao0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_2_Arn0001" +{ +"sound/dialogs/2_2_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "2_2_Arn0002" +{ +"sound/dialogs/2_2_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "2_2_Arn0003" +{ +"sound/dialogs/2_2_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "2_2_Pao0001" +{ +"sound/dialogs/2_2_Pao0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_2_Pao0002" +{ +"sound/dialogs/2_2_Pao0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_2_Pao0003" +{ +"sound/dialogs/2_2_Pao0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_2_Pao0004" +{ +"sound/dialogs/2_2_Pao0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_2_Pao0005" +{ +"sound/dialogs/2_2_Pao0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_2_Pao0005a" +{ +"sound/dialogs/2_2_Pao0005a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_2_Pao0006" +{ +"sound/dialogs/2_2_Pao0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_3_Arn0001" +{ +"sound/dialogs/2_3_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "2_3_Arn0002" +{ +"sound/dialogs/2_3_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "2_3_Liv0001" +{ +"sound/dialogs/2_3_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "2_3_Liv0001a" +{ +"sound/dialogs/2_3_Liv0001a" +ambient +volume 1.0 +stream + +} + + +sound "2_3_Liv0002" +{ +"sound/dialogs/2_3_Liv0002" +ambient +volume 1.0 +stream + +} + + +sound "2_3_Liv0003" +{ +"sound/dialogs/2_3_Liv0003" +ambient +volume 1.0 +stream + +} + + +sound "2_4_Arn0001" +{ +"sound/dialogs/2_4_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "2_4_Arn0002" +{ +"sound/dialogs/2_4_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "2_4_Arn0003" +{ +"sound/dialogs/2_4_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "2_4_Liv0001" +{ +"sound/dialogs/2_4_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "2_4_Liv0002" +{ +"sound/dialogs/2_4_Liv0002" +ambient +volume 1.0 +stream + +} + + +sound "2_4_Liv0003" +{ +"sound/dialogs/2_4_Liv0003" +ambient +volume 1.0 +stream + +} + + +sound "2_4_Liv0004" +{ +"sound/dialogs/2_4_Liv0004" +ambient +volume 1.0 +stream + +} + + +sound "2_4_Liv0005" +{ +"sound/dialogs/2_4_Liv0005" +ambient +volume 1.0 +stream + +} + + +sound "2_4_Liv0006" +{ +"sound/dialogs/2_4_Liv0006" +ambient +volume 1.0 +stream + +} + + +sound "2_5_Arn0001" +{ +"sound/dialogs/2_5_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "2_5_Arn0002" +{ +"sound/dialogs/2_5_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "2_5_Arn0003" +{ +"sound/dialogs/2_5_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "2_5_Arn0004" +{ +"sound/dialogs/2_5_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "2_5_Pao0001" +{ +"sound/dialogs/2_5_Pao0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_5_Pao0002" +{ +"sound/dialogs/2_5_Pao0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_5_Pao0003" +{ +"sound/dialogs/2_5_Pao0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_5_Pao0004" +{ +"sound/dialogs/2_5_Pao0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "2_5_Pao0005" +{ +"sound/dialogs/2_5_Pao0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Arn0001" +{ +"sound/dialogs/3_1_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0002" +{ +"sound/dialogs/3_1_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0003" +{ +"sound/dialogs/3_1_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0004" +{ +"sound/dialogs/3_1_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0005" +{ +"sound/dialogs/3_1_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0006" +{ +"sound/dialogs/3_1_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0006a" +{ +"sound/dialogs/3_1_Arn0006a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0007" +{ +"sound/dialogs/3_1_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0008" +{ +"sound/dialogs/3_1_Arn0008" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Arn0009" +{ +"sound/dialogs/3_1_Arn0009" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "3_1_Pao0001" +{ +"sound/dialogs/3_1_Pao0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0002" +{ +"sound/dialogs/3_1_Pao0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0003" +{ +"sound/dialogs/3_1_Pao0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0004" +{ +"sound/dialogs/3_1_Pao0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0005" +{ +"sound/dialogs/3_1_Pao0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0006" +{ +"sound/dialogs/3_1_Pao0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0007" +{ +"sound/dialogs/3_1_Pao0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0008" +{ +"sound/dialogs/3_1_Pao0008" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0009" +{ +"sound/dialogs/3_1_Pao0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0010" +{ +"sound/dialogs/3_1_Pao0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0011" +{ +"sound/dialogs/3_1_Pao0011" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0011a" +{ +"sound/dialogs/3_1_Pao0011a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0012" +{ +"sound/dialogs/3_1_Pao0012" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0013" +{ +"sound/dialogs/3_1_Pao0013" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0014" +{ +"sound/dialogs/3_1_Pao0014" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0015" +{ +"sound/dialogs/3_1_Pao0015" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0016" +{ +"sound/dialogs/3_1_Pao0016" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0017" +{ +"sound/dialogs/3_1_Pao0017" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0018" +{ +"sound/dialogs/3_1_Pao0018" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0019" +{ +"sound/dialogs/3_1_Pao0019" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0020" +{ +"sound/dialogs/3_1_Pao0020" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0021" +{ +"sound/dialogs/3_1_Pao0021" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0022" +{ +"sound/dialogs/3_1_Pao0022" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_1_Pao0023" +{ +"sound/dialogs/3_1_Pao0023" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_2_Arn0001" +{ +"sound/dialogs/3_2_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "3_2_Arn0002" +{ +"sound/dialogs/3_2_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "3_2_Arn0003" +{ +"sound/dialogs/3_2_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "3_2_Bru0001" +{ +"sound/dialogs/3_2_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "3_2_Bru0002" +{ +"sound/dialogs/3_2_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "3_2_Bru0003" +{ +"sound/dialogs/3_2_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "3_3_Oli0001" +{ +"sound/dialogs/3_3_Oli0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0002" +{ +"sound/dialogs/3_3_Oli0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0003" +{ +"sound/dialogs/3_3_Oli0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0004" +{ +"sound/dialogs/3_3_Oli0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0005" +{ +"sound/dialogs/3_3_Oli0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0005a" +{ +"sound/dialogs/3_3_Oli0005a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0006" +{ +"sound/dialogs/3_3_Oli0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0007" +{ +"sound/dialogs/3_3_Oli0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0008" +{ +"sound/dialogs/3_3_Oli0008" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0009" +{ +"sound/dialogs/3_3_Oli0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0010" +{ +"sound/dialogs/3_3_Oli0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0011" +{ +"sound/dialogs/3_3_Oli0011" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0012" +{ +"sound/dialogs/3_3_Oli0012" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0013" +{ +"sound/dialogs/3_3_Oli0013" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0014" +{ +"sound/dialogs/3_3_Oli0014" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0015" +{ +"sound/dialogs/3_3_Oli0015" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0016" +{ +"sound/dialogs/3_3_Oli0016" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Oli0017" +{ +"sound/dialogs/3_3_Oli0017" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0001" +{ +"sound/dialogs/3_3_Pao0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0002" +{ +"sound/dialogs/3_3_Pao0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0003" +{ +"sound/dialogs/3_3_Pao0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0004" +{ +"sound/dialogs/3_3_Pao0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0005" +{ +"sound/dialogs/3_3_Pao0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0006" +{ +"sound/dialogs/3_3_Pao0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0006a" +{ +"sound/dialogs/3_3_Pao0006a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0007" +{ +"sound/dialogs/3_3_Pao0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0009" +{ +"sound/dialogs/3_3_Pao0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0010" +{ +"sound/dialogs/3_3_Pao0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0011" +{ +"sound/dialogs/3_3_Pao0011" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0012" +{ +"sound/dialogs/3_3_Pao0012" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0013" +{ +"sound/dialogs/3_3_Pao0013" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0013a" +{ +"sound/dialogs/3_3_Pao0013a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Pao0014" +{ +"sound/dialogs/3_3_Pao0014" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Ser0001" +{ +"sound/dialogs/3_3_Ser0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Ser0002" +{ +"sound/dialogs/3_3_Ser0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_3_Ser0003" +{ +"sound/dialogs/3_3_Ser0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "3_4_Arn0001" +{ +"sound/dialogs/3_4_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "3_4_Arn0001a" +{ +"sound/dialogs/3_4_Arn0001a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "3_4_Bru0001" +{ +"sound/dialogs/3_4_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "3_4_Bru0002" +{ +"sound/dialogs/3_4_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "3_4_Bru0003" +{ +"sound/dialogs/3_4_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "3_4_Bru0004" +{ +"sound/dialogs/3_4_Bru0004" +ambient +volume 1.0 +stream + +} + + +sound "3_4_Bru0004a" +{ +"sound/dialogs/3_4_Bru0004a" +ambient +volume 1.0 +stream + +} + + +sound "3_4_Bru0004b" +{ +"sound/dialogs/3_4_Bru0004b" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Arn0001" +{ +"sound/dialogs/4_1_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_1_Arn0002" +{ +"sound/dialogs/4_1_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_1_Arn0003" +{ +"sound/dialogs/4_1_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_1_Arn0004" +{ +"sound/dialogs/4_1_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_1_Arn0005" +{ +"sound/dialogs/4_1_Arn0005" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_1_Arn0006" +{ +"sound/dialogs/4_1_Arn0006" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_1_Arn0007" +{ +"sound/dialogs/4_1_Arn0007" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_1_Liv0001" +{ +"sound/dialogs/4_1_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0002" +{ +"sound/dialogs/4_1_Liv0002" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0002a" +{ +"sound/dialogs/4_1_Liv0002a" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0002b" +{ +"sound/dialogs/4_1_Liv0002b" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0003" +{ +"sound/dialogs/4_1_Liv0003" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0003a" +{ +"sound/dialogs/4_1_Liv0003a" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0004" +{ +"sound/dialogs/4_1_Liv0004" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0005" +{ +"sound/dialogs/4_1_Liv0005" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0006" +{ +"sound/dialogs/4_1_Liv0006" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0007" +{ +"sound/dialogs/4_1_Liv0007" +ambient +volume 1.0 +stream + +} + + +sound "4_1_Liv0008" +{ +"sound/dialogs/4_1_Liv0008" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Arn0001" +{ +"sound/dialogs/4_2_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_2_Arn0002" +{ +"sound/dialogs/4_2_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_2_Arn0003" +{ +"sound/dialogs/4_2_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_2_Arn0004" +{ +"sound/dialogs/4_2_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "4_2_Bru0001" +{ +"sound/dialogs/4_2_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0001a" +{ +"sound/dialogs/4_2_Bru0001a" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0002" +{ +"sound/dialogs/4_2_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0002a" +{ +"sound/dialogs/4_2_Bru0002a" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0003" +{ +"sound/dialogs/4_2_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0003a" +{ +"sound/dialogs/4_2_Bru0003a" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0004" +{ +"sound/dialogs/4_2_Bru0004" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0005" +{ +"sound/dialogs/4_2_Bru0005" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0006" +{ +"sound/dialogs/4_2_Bru0006" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0006a" +{ +"sound/dialogs/4_2_Bru0006a" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0007" +{ +"sound/dialogs/4_2_Bru0007" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0007a" +{ +"sound/dialogs/4_2_Bru0007a" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0008" +{ +"sound/dialogs/4_2_Bru0008" +ambient +volume 1.0 +stream + +} + + +sound "4_2_Bru0009" +{ +"sound/dialogs/4_2_Bru0009" +ambient +volume 1.0 +stream + +} + + +sound "5_1_Arn0001" +{ +"sound/dialogs/5_1_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0002" +{ +"sound/dialogs/5_1_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0003" +{ +"sound/dialogs/5_1_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0004" +{ +"sound/dialogs/5_1_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0005" +{ +"sound/dialogs/5_1_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0006" +{ +"sound/dialogs/5_1_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0007" +{ +"sound/dialogs/5_1_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0008" +{ +"sound/dialogs/5_1_Arn0008" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0009" +{ +"sound/dialogs/5_1_Arn0009" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0010" +{ +"sound/dialogs/5_1_Arn0010" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0011" +{ +"sound/dialogs/5_1_Arn0011" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_Arn0012" +{ +"sound/dialogs/5_1_Arn0012" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_1_War0001" +{ +"sound/dialogs/5_1_War0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0001a" +{ +"sound/dialogs/5_1_War0001a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0002" +{ +"sound/dialogs/5_1_War0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0003" +{ +"sound/dialogs/5_1_War0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0004" +{ +"sound/dialogs/5_1_War0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0005" +{ +"sound/dialogs/5_1_War0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0005a" +{ +"sound/dialogs/5_1_War0005a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0006" +{ +"sound/dialogs/5_1_War0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0006a" +{ +"sound/dialogs/5_1_War0006a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0006b" +{ +"sound/dialogs/5_1_War0006b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0006c" +{ +"sound/dialogs/5_1_War0006c" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0007" +{ +"sound/dialogs/5_1_War0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0008" +{ +"sound/dialogs/5_1_War0008" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0008a" +{ +"sound/dialogs/5_1_War0008a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0008b" +{ +"sound/dialogs/5_1_War0008b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0008c" +{ +"sound/dialogs/5_1_War0008c" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0009" +{ +"sound/dialogs/5_1_War0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0010" +{ +"sound/dialogs/5_1_War0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0011" +{ +"sound/dialogs/5_1_War0011" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0011a" +{ +"sound/dialogs/5_1_War0011a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0011b" +{ +"sound/dialogs/5_1_War0011b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0012" +{ +"sound/dialogs/5_1_War0012" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0012a" +{ +"sound/dialogs/5_1_War0012a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0013" +{ +"sound/dialogs/5_1_War0013" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_1_War0014" +{ +"sound/dialogs/5_1_War0014" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_2_Arn0001" +{ +"sound/dialogs/5_2_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_2_Arn0002" +{ +"sound/dialogs/5_2_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "5_2_War0001" +{ +"sound/dialogs/5_2_War0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "5_2_War0002" +{ +"sound/dialogs/5_2_War0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_Arn0001" +{ +"sound/dialogs/6_1_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0002" +{ +"sound/dialogs/6_1_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0003" +{ +"sound/dialogs/6_1_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0003a" +{ +"sound/dialogs/6_1_Arn0003a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0004" +{ +"sound/dialogs/6_1_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0005" +{ +"sound/dialogs/6_1_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0006" +{ +"sound/dialogs/6_1_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0007" +{ +"sound/dialogs/6_1_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0008" +{ +"sound/dialogs/6_1_Arn0008" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0009" +{ +"sound/dialogs/6_1_Arn0009" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0010" +{ +"sound/dialogs/6_1_Arn0010" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0011" +{ +"sound/dialogs/6_1_Arn0011" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0012" +{ +"sound/dialogs/6_1_Arn0012" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_Arn0013" +{ +"sound/dialogs/6_1_Arn0013" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_1_SpO0001" +{ +"sound/dialogs/6_1_SpO0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0001" +{ +"sound/dialogs/6_1_War0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0002" +{ +"sound/dialogs/6_1_War0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0002a" +{ +"sound/dialogs/6_1_War0002a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0003" +{ +"sound/dialogs/6_1_War0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0004" +{ +"sound/dialogs/6_1_War0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0005" +{ +"sound/dialogs/6_1_War0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0006" +{ +"sound/dialogs/6_1_War0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0006a" +{ +"sound/dialogs/6_1_War0006a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0006b" +{ +"sound/dialogs/6_1_War0006b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0006c" +{ +"sound/dialogs/6_1_War0006c" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0006d" +{ +"sound/dialogs/6_1_War0006d" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0007" +{ +"sound/dialogs/6_1_War0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0007a" +{ +"sound/dialogs/6_1_War0007a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0008" +{ +"sound/dialogs/6_1_War0008" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0009" +{ +"sound/dialogs/6_1_War0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0009a" +{ +"sound/dialogs/6_1_War0009a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0009b" +{ +"sound/dialogs/6_1_War0009b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0010" +{ +"sound/dialogs/6_1_War0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0011" +{ +"sound/dialogs/6_1_War0011" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0012" +{ +"sound/dialogs/6_1_War0012" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0012a" +{ +"sound/dialogs/6_1_War0012a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0013" +{ +"sound/dialogs/6_1_War0013" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0014" +{ +"sound/dialogs/6_1_War0014" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0014a" +{ +"sound/dialogs/6_1_War0014a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0015" +{ +"sound/dialogs/6_1_War0015" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0016" +{ +"sound/dialogs/6_1_War0016" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0017" +{ +"sound/dialogs/6_1_War0017" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0018" +{ +"sound/dialogs/6_1_War0018" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0019" +{ +"sound/dialogs/6_1_War0019" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0019a" +{ +"sound/dialogs/6_1_War0019a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0019b" +{ +"sound/dialogs/6_1_War0019b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0019c" +{ +"sound/dialogs/6_1_War0019c" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0020" +{ +"sound/dialogs/6_1_War0020" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0021" +{ +"sound/dialogs/6_1_War0021" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0022" +{ +"sound/dialogs/6_1_War0022" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_1_War0023" +{ +"sound/dialogs/6_1_War0023" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_2_0001" +{ +"sound/dialogs/6_2_0001" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "6_2_0001a" +{ +"sound/dialogs/6_2_0001a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "6_2_Arn0001" +{ +"sound/dialogs/6_2_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0001a" +{ +"sound/dialogs/6_2_Arn0001a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0002" +{ +"sound/dialogs/6_2_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0003" +{ +"sound/dialogs/6_2_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0004" +{ +"sound/dialogs/6_2_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0005" +{ +"sound/dialogs/6_2_Arn0005" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0006" +{ +"sound/dialogs/6_2_Arn0006" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0007" +{ +"sound/dialogs/6_2_Arn0007" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0008" +{ +"sound/dialogs/6_2_Arn0008" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0009" +{ +"sound/dialogs/6_2_Arn0009" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0010" +{ +"sound/dialogs/6_2_Arn0010" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Arn0011" +{ +"sound/dialogs/6_2_Arn0011" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_2_Liv0001" +{ +"sound/dialogs/6_2_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0002" +{ +"sound/dialogs/6_2_Liv0002" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0003" +{ +"sound/dialogs/6_2_Liv0003" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0004" +{ +"sound/dialogs/6_2_Liv0004" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0005" +{ +"sound/dialogs/6_2_Liv0005" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0006" +{ +"sound/dialogs/6_2_Liv0006" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0006a" +{ +"sound/dialogs/6_2_Liv0006a" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0006b" +{ +"sound/dialogs/6_2_Liv0006b" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0007" +{ +"sound/dialogs/6_2_Liv0007" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0007a" +{ +"sound/dialogs/6_2_Liv0007a" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0007b" +{ +"sound/dialogs/6_2_Liv0007b" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0008" +{ +"sound/dialogs/6_2_Liv0008" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0009" +{ +"sound/dialogs/6_2_Liv0009" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0009a" +{ +"sound/dialogs/6_2_Liv0009a" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0010" +{ +"sound/dialogs/6_2_Liv0010" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0011" +{ +"sound/dialogs/6_2_Liv0011" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0011a" +{ +"sound/dialogs/6_2_Liv0011a" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0012" +{ +"sound/dialogs/6_2_Liv0012" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0012a" +{ +"sound/dialogs/6_2_Liv0012a" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0013" +{ +"sound/dialogs/6_2_Liv0013" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0014" +{ +"sound/dialogs/6_2_Liv0014" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0015" +{ +"sound/dialogs/6_2_Liv0015" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0015a" +{ +"sound/dialogs/6_2_Liv0015a" +ambient +volume 1.0 +stream + +} + + +sound "6_2_Liv0016" +{ +"sound/dialogs/6_2_Liv0016" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Arn0001" +{ +"sound/dialogs/6_3_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_3_Arn0002" +{ +"sound/dialogs/6_3_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_3_Arn0003" +{ +"sound/dialogs/6_3_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_3_Arn0004" +{ +"sound/dialogs/6_3_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_3_Arn0005" +{ +"sound/dialogs/6_3_Arn0005" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_3_Bru0001" +{ +"sound/dialogs/6_3_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0002" +{ +"sound/dialogs/6_3_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0003" +{ +"sound/dialogs/6_3_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0004" +{ +"sound/dialogs/6_3_Bru0004" +ambient +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "6_3_Bru0005" +{ +"sound/dialogs/6_3_Bru0005" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0006" +{ +"sound/dialogs/6_3_Bru0006" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0007" +{ +"sound/dialogs/6_3_Bru0007" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0007a" +{ +"sound/dialogs/6_3_Bru0007a" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0008" +{ +"sound/dialogs/6_3_Bru0008" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0009" +{ +"sound/dialogs/6_3_Bru0009" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0009a" +{ +"sound/dialogs/6_3_Bru0009a" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0009b" +{ +"sound/dialogs/6_3_Bru0009b" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0010" +{ +"sound/dialogs/6_3_Bru0010" +ambient +volume 1.0 +stream + +} + + +sound "6_3_Bru0010a" +{ +"sound/dialogs/6_3_Bru0010a" +ambient +volume 1.0 +stream + +} + + +sound "6_4_0001" +{ +"sound/dialogs/6_4_0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_0002" +{ +"sound/dialogs/6_4_0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_Arn0001" +{ +"sound/dialogs/6_4_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Arn0002" +{ +"sound/dialogs/6_4_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Arn0003" +{ +"sound/dialogs/6_4_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Arn0004" +{ +"sound/dialogs/6_4_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Arn0005" +{ +"sound/dialogs/6_4_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Arn0006" +{ +"sound/dialogs/6_4_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Arn0007" +{ +"sound/dialogs/6_4_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Arn0008" +{ +"sound/dialogs/6_4_Arn0008" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Arn0009" +{ +"sound/dialogs/6_4_Arn0009" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "6_4_Bru0001" +{ +"sound/dialogs/6_4_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0001a" +{ +"sound/dialogs/6_4_Bru0001a" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0001b" +{ +"sound/dialogs/6_4_Bru0001b" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0001c" +{ +"sound/dialogs/6_4_Bru0001c" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0002" +{ +"sound/dialogs/6_4_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0002a" +{ +"sound/dialogs/6_4_Bru0002a" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0003" +{ +"sound/dialogs/6_4_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0004" +{ +"sound/dialogs/6_4_Bru0004" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0004a" +{ +"sound/dialogs/6_4_Bru0004a" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0005" +{ +"sound/dialogs/6_4_Bru0005" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0006" +{ +"sound/dialogs/6_4_Bru0006" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0007" +{ +"sound/dialogs/6_4_Bru0007" +ambient +volume 1.0 +stream + +} + + +sound "6_4_Bru0008" +{ +"sound/dialogs/6_4_Bru0008" +ambient +volume 1.0 +stream + +} + + +sound "6_4_GrS0001" +{ +"sound/dialogs/6_4_GrS0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_Oli0001" +{ +"sound/dialogs/6_4_Oli0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_Oli0002" +{ +"sound/dialogs/6_4_Oli0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_Oli0003" +{ +"sound/dialogs/6_4_Oli0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_War0001" +{ +"sound/dialogs/6_4_War0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_War0002" +{ +"sound/dialogs/6_4_War0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_War0002a" +{ +"sound/dialogs/6_4_War0002a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_War0003" +{ +"sound/dialogs/6_4_War0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_4_War0003a" +{ +"sound/dialogs/6_4_War0003a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "6_5_Arn0001" +{ +"sound/dialogs/6_5_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_5_Arn0002" +{ +"sound/dialogs/6_5_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_5_Arn0003" +{ +"sound/dialogs/6_5_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "6_5_Bru0001" +{ +"sound/dialogs/6_5_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "6_5_Bru0001a" +{ +"sound/dialogs/6_5_Bru0001a" +ambient +volume 1.0 +stream + +} + + +sound "6_5_Bru0002" +{ +"sound/dialogs/6_5_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "6_5_Bru0002a" +{ +"sound/dialogs/6_5_Bru0002a" +ambient +volume 1.0 +stream + +} + + +sound "6_5_Bru0003" +{ +"sound/dialogs/6_5_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "6_5_Bru0004" +{ +"sound/dialogs/6_5_Bru0004" +ambient +volume 1.0 +stream + +} + + +sound "6_5_Bru0005" +{ +"sound/dialogs/6_5_Bru0005" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Arn0001" +{ +"sound/dialogs/7_1_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Arn0002" +{ +"sound/dialogs/7_1_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Arn0003" +{ +"sound/dialogs/7_1_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Arn0003a" +{ +"sound/dialogs/7_1_Arn0003a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Arn0003b" +{ +"sound/dialogs/7_1_Arn0003b" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Arn0004" +{ +"sound/dialogs/7_1_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Arn0005" +{ +"sound/dialogs/7_1_Arn0005" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Arn0006" +{ +"sound/dialogs/7_1_Arn0006" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Arn0007" +{ +"sound/dialogs/7_1_Arn0007" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_1_Liv0001" +{ +"sound/dialogs/7_1_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0002" +{ +"sound/dialogs/7_1_Liv0002" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0003" +{ +"sound/dialogs/7_1_Liv0003" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0004" +{ +"sound/dialogs/7_1_Liv0004" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0005" +{ +"sound/dialogs/7_1_Liv0005" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0005a" +{ +"sound/dialogs/7_1_Liv0005a" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0006" +{ +"sound/dialogs/7_1_Liv0006" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0007" +{ +"sound/dialogs/7_1_Liv0007" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0007a" +{ +"sound/dialogs/7_1_Liv0007a" +ambient +volume 1.0 +stream + +} + + +sound "7_1_Liv0008" +{ +"sound/dialogs/7_1_Liv0008" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Arn0001" +{ +"sound/dialogs/7_2_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "7_2_Arn0002" +{ +"sound/dialogs/7_2_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "7_2_Arn0003" +{ +"sound/dialogs/7_2_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "7_2_Arn0004" +{ +"sound/dialogs/7_2_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "7_2_Arn0005" +{ +"sound/dialogs/7_2_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "7_2_Arn0006" +{ +"sound/dialogs/7_2_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "7_2_Bru0001" +{ +"sound/dialogs/7_2_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0001a" +{ +"sound/dialogs/7_2_Bru0001a" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0002" +{ +"sound/dialogs/7_2_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0003" +{ +"sound/dialogs/7_2_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0003a" +{ +"sound/dialogs/7_2_Bru0003a" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0004" +{ +"sound/dialogs/7_2_Bru0004" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0005" +{ +"sound/dialogs/7_2_Bru0005" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0006" +{ +"sound/dialogs/7_2_Bru0006" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0007" +{ +"sound/dialogs/7_2_Bru0007" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0008" +{ +"sound/dialogs/7_2_Bru0008" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0009" +{ +"sound/dialogs/7_2_Bru0009" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0009a" +{ +"sound/dialogs/7_2_Bru0009a" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0010" +{ +"sound/dialogs/7_2_Bru0010" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0010a" +{ +"sound/dialogs/7_2_Bru0010a" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0011" +{ +"sound/dialogs/7_2_Bru0011" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0011a" +{ +"sound/dialogs/7_2_Bru0011a" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0012" +{ +"sound/dialogs/7_2_Bru0012" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0012a" +{ +"sound/dialogs/7_2_Bru0012a" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0013" +{ +"sound/dialogs/7_2_Bru0013" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0013a" +{ +"sound/dialogs/7_2_Bru0013a" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Bru0014" +{ +"sound/dialogs/7_2_Bru0014" +ambient +volume 1.0 +stream + +} + + +sound "7_2_Oli0001" +{ +"sound/dialogs/7_2_Oli0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0001a" +{ +"sound/dialogs/7_2_Oli0001a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0001b" +{ +"sound/dialogs/7_2_Oli0001b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0002" +{ +"sound/dialogs/7_2_Oli0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0002a" +{ +"sound/dialogs/7_2_Oli0002a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0003" +{ +"sound/dialogs/7_2_Oli0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0003a" +{ +"sound/dialogs/7_2_Oli0003a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0003b" +{ +"sound/dialogs/7_2_Oli0003b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0004" +{ +"sound/dialogs/7_2_Oli0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0005" +{ +"sound/dialogs/7_2_Oli0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0005a" +{ +"sound/dialogs/7_2_Oli0005a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0005b" +{ +"sound/dialogs/7_2_Oli0005b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0006" +{ +"sound/dialogs/7_2_Oli0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_2_Oli0006a" +{ +"sound/dialogs/7_2_Oli0006a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "7_3_Arn0001" +{ +"sound/dialogs/7_3_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_3_Arn0002" +{ +"sound/dialogs/7_3_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_3_Arn0002a" +{ +"sound/dialogs/7_3_Arn0002a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_3_Arn0003" +{ +"sound/dialogs/7_3_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_3_Arn0004" +{ +"sound/dialogs/7_3_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "7_3_Bru000" +{ +"sound/dialogs/7_3_Bru000" +spatial +volume 1.0 +stream + +} + + +sound "7_3_Bru0001" +{ +"sound/dialogs/7_3_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0001a" +{ +"sound/dialogs/7_3_Bru0001a" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0001b" +{ +"sound/dialogs/7_3_Bru0001b" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0002" +{ +"sound/dialogs/7_3_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0002a" +{ +"sound/dialogs/7_3_Bru0002a" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0003" +{ +"sound/dialogs/7_3_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0004" +{ +"sound/dialogs/7_3_Bru0004" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0005" +{ +"sound/dialogs/7_3_Bru0005" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0005a" +{ +"sound/dialogs/7_3_Bru0005a" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0006" +{ +"sound/dialogs/7_3_Bru0006" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0007" +{ +"sound/dialogs/7_3_Bru0007" +ambient +volume 1.0 +stream + +} + + +sound "7_3_Bru0007a" +{ +"sound/dialogs/7_3_Bru0007a" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Arn0001" +{ +"sound/dialogs/8_1_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0001a" +{ +"sound/dialogs/8_1_Arn0001a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0002" +{ +"sound/dialogs/8_1_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0003" +{ +"sound/dialogs/8_1_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0003a" +{ +"sound/dialogs/8_1_Arn0003a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0003b" +{ +"sound/dialogs/8_1_Arn0003b" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0004" +{ +"sound/dialogs/8_1_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0005" +{ +"sound/dialogs/8_1_Arn0005" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0006" +{ +"sound/dialogs/8_1_Arn0006" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0006a" +{ +"sound/dialogs/8_1_Arn0006a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0007" +{ +"sound/dialogs/8_1_Arn0007" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Arn0008" +{ +"sound/dialogs/8_1_Arn0008" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_1_Liv0001" +{ +"sound/dialogs/8_1_Liv0001" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0002" +{ +"sound/dialogs/8_1_Liv0002" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0003" +{ +"sound/dialogs/8_1_Liv0003" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0004" +{ +"sound/dialogs/8_1_Liv0004" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0005" +{ +"sound/dialogs/8_1_Liv0005" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0006" +{ +"sound/dialogs/8_1_Liv0006" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0007" +{ +"sound/dialogs/8_1_Liv0007" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0008" +{ +"sound/dialogs/8_1_Liv0008" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0008a" +{ +"sound/dialogs/8_1_Liv0008a" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0009" +{ +"sound/dialogs/8_1_Liv0009" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0009a" +{ +"sound/dialogs/8_1_Liv0009a" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0010" +{ +"sound/dialogs/8_1_Liv0010" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0011" +{ +"sound/dialogs/8_1_Liv0011" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0011a" +{ +"sound/dialogs/8_1_Liv0011a" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0011b" +{ +"sound/dialogs/8_1_Liv0011b" +ambient +volume 1.0 +stream + +} + + +sound "8_1_Liv0011c" +{ +"sound/dialogs/8_1_Liv0011c" +ambient +volume 1.0 +stream + +} + + +sound "8_2_Arn0001" +{ +"sound/dialogs/8_2_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0002" +{ +"sound/dialogs/8_2_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0003" +{ +"sound/dialogs/8_2_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0004" +{ +"sound/dialogs/8_2_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0004_verze" +{ +"sound/dialogs/8_2_Arn0004_verze" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0005" +{ +"sound/dialogs/8_2_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0006" +{ +"sound/dialogs/8_2_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0007" +{ +"sound/dialogs/8_2_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0008" +{ +"sound/dialogs/8_2_Arn0008" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0009" +{ +"sound/dialogs/8_2_Arn0009" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0010" +{ +"sound/dialogs/8_2_Arn0010" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0011" +{ +"sound/dialogs/8_2_Arn0011" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0012" +{ +"sound/dialogs/8_2_Arn0012" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0013" +{ +"sound/dialogs/8_2_Arn0013" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0014" +{ +"sound/dialogs/8_2_Arn0014" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0015" +{ +"sound/dialogs/8_2_Arn0015" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0016" +{ +"sound/dialogs/8_2_Arn0016" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0016a" +{ +"sound/dialogs/8_2_Arn0016a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Arn0017" +{ +"sound/dialogs/8_2_Arn0017" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "8_2_Bru0001" +{ +"sound/dialogs/8_2_Bru0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0001a" +{ +"sound/dialogs/8_2_Bru0001a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0002" +{ +"sound/dialogs/8_2_Bru0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0003" +{ +"sound/dialogs/8_2_Bru0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0004" +{ +"sound/dialogs/8_2_Bru0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0005" +{ +"sound/dialogs/8_2_Bru0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0006" +{ +"sound/dialogs/8_2_Bru0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0007" +{ +"sound/dialogs/8_2_Bru0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0007a" +{ +"sound/dialogs/8_2_Bru0007a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0007b" +{ +"sound/dialogs/8_2_Bru0007b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0008" +{ +"sound/dialogs/8_2_Bru0008" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0009" +{ +"sound/dialogs/8_2_Bru0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0010" +{ +"sound/dialogs/8_2_Bru0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0010a" +{ +"sound/dialogs/8_2_Bru0010a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_Bru0010b" +{ +"sound/dialogs/8_2_Bru0010b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0001" +{ +"sound/dialogs/8_2_War0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0002" +{ +"sound/dialogs/8_2_War0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0003" +{ +"sound/dialogs/8_2_War0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0004" +{ +"sound/dialogs/8_2_War0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0005" +{ +"sound/dialogs/8_2_War0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0006" +{ +"sound/dialogs/8_2_War0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0007" +{ +"sound/dialogs/8_2_War0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0008" +{ +"sound/dialogs/8_2_War0008" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0009" +{ +"sound/dialogs/8_2_War0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_2_War0010" +{ +"sound/dialogs/8_2_War0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Arn0001" +{ +"sound/dialogs/8_3_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_3_Arn0001a" +{ +"sound/dialogs/8_3_Arn0001a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_3_Arn0002" +{ +"sound/dialogs/8_3_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_3_Arn0003" +{ +"sound/dialogs/8_3_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_3_Arn0004" +{ +"sound/dialogs/8_3_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_3_Arn0005" +{ +"sound/dialogs/8_3_Arn0005" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_3_Arn0005a" +{ +"sound/dialogs/8_3_Arn0005a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_3_Arn0006" +{ +"sound/dialogs/8_3_Arn0006" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "8_3_Oli0001" +{ +"sound/dialogs/8_3_Oli0001" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0002" +{ +"sound/dialogs/8_3_Oli0002" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0003" +{ +"sound/dialogs/8_3_Oli0003" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0004" +{ +"sound/dialogs/8_3_Oli0004" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0004a" +{ +"sound/dialogs/8_3_Oli0004a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0005" +{ +"sound/dialogs/8_3_Oli0005" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0005a" +{ +"sound/dialogs/8_3_Oli0005a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0005b" +{ +"sound/dialogs/8_3_Oli0005b" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0006" +{ +"sound/dialogs/8_3_Oli0006" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0007" +{ +"sound/dialogs/8_3_Oli0007" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0007a" +{ +"sound/dialogs/8_3_Oli0007a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0008" +{ +"sound/dialogs/8_3_Oli0008" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0009" +{ +"sound/dialogs/8_3_Oli0009" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0010" +{ +"sound/dialogs/8_3_Oli0010" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0010a" +{ +"sound/dialogs/8_3_Oli0010a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0010b" +{ +"sound/dialogs/8_3_Oli0010b" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0011" +{ +"sound/dialogs/8_3_Oli0011" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0011a" +{ +"sound/dialogs/8_3_Oli0011a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0012" +{ +"sound/dialogs/8_3_Oli0012" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0013" +{ +"sound/dialogs/8_3_Oli0013" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0013a" +{ +"sound/dialogs/8_3_Oli0013a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0014" +{ +"sound/dialogs/8_3_Oli0014" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0014a" +{ +"sound/dialogs/8_3_Oli0014a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0014b" +{ +"sound/dialogs/8_3_Oli0014b" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0015" +{ +"sound/dialogs/8_3_Oli0015" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0015a" +{ +"sound/dialogs/8_3_Oli0015a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "8_3_Oli0015b" +{ +"sound/dialogs/8_3_Oli0015b" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_1_Arn0001" +{ +"sound/dialogs/9_1_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0002" +{ +"sound/dialogs/9_1_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0003" +{ +"sound/dialogs/9_1_Arn0003" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0004" +{ +"sound/dialogs/9_1_Arn0004" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0005" +{ +"sound/dialogs/9_1_Arn0005" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0006" +{ +"sound/dialogs/9_1_Arn0006" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0007" +{ +"sound/dialogs/9_1_Arn0007" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0007a" +{ +"sound/dialogs/9_1_Arn0007a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0008" +{ +"sound/dialogs/9_1_Arn0008" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0009" +{ +"sound/dialogs/9_1_Arn0009" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0010" +{ +"sound/dialogs/9_1_Arn0010" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Arn0011" +{ +"sound/dialogs/9_1_Arn0011" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_1_Bru0001" +{ +"sound/dialogs/9_1_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0002" +{ +"sound/dialogs/9_1_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0003" +{ +"sound/dialogs/9_1_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0004" +{ +"sound/dialogs/9_1_Bru0004" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0005" +{ +"sound/dialogs/9_1_Bru0005" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0006" +{ +"sound/dialogs/9_1_Bru0006" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0006a" +{ +"sound/dialogs/9_1_Bru0006a" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0007" +{ +"sound/dialogs/9_1_Bru0007" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0007a" +{ +"sound/dialogs/9_1_Bru0007a" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0008" +{ +"sound/dialogs/9_1_Bru0008" +ambient +volume 1.0 +stream + +} + + +sound "9_1_Bru0008a" +{ +"sound/dialogs/9_1_Bru0008a" +ambient +volume 1.0 +stream + +} + + +sound "9_2_Arn0001" +{ +"sound/dialogs/9_2_Arn0001" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_2_Arn0002" +{ +"sound/dialogs/9_2_Arn0002" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_2_Arn0002a" +{ +"sound/dialogs/9_2_Arn0002a" +ambient +volume 0.6 +stream +minrange highest +} + + +sound "9_2_Oli0001" +{ +"sound/dialogs/9_2_Oli0001" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_2_Oli0001a" +{ +"sound/dialogs/9_2_Oli0001a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_2_Oli0002" +{ +"sound/dialogs/9_2_Oli0002" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_2_Oli0002a" +{ +"sound/dialogs/9_2_Oli0002a" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_2_Oli0002b" +{ +"sound/dialogs/9_2_Oli0002b" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_2_Oli0002c" +{ +"sound/dialogs/9_2_Oli0002c" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_2_Oli0003" +{ +"sound/dialogs/9_2_Oli0003" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_2_Oli0004" +{ +"sound/dialogs/9_2_Oli0004" +ambient +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Arn0001" +{ +"sound/dialogs/9_3_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0002" +{ +"sound/dialogs/9_3_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0002a" +{ +"sound/dialogs/9_3_Arn0002a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0003" +{ +"sound/dialogs/9_3_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0004" +{ +"sound/dialogs/9_3_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0005" +{ +"sound/dialogs/9_3_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0005a" +{ +"sound/dialogs/9_3_Arn0005a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0006" +{ +"sound/dialogs/9_3_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0006a" +{ +"sound/dialogs/9_3_Arn0006a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0007" +{ +"sound/dialogs/9_3_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Arn0008" +{ +"sound/dialogs/9_3_Arn0008" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_3_Mon0001" +{ +"sound/dialogs/9_3_Mon0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0001" +{ +"sound/dialogs/9_3_Oli0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0002" +{ +"sound/dialogs/9_3_Oli0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0003" +{ +"sound/dialogs/9_3_Oli0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0004" +{ +"sound/dialogs/9_3_Oli0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0004a" +{ +"sound/dialogs/9_3_Oli0004a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0005" +{ +"sound/dialogs/9_3_Oli0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0005a" +{ +"sound/dialogs/9_3_Oli0005a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0006" +{ +"sound/dialogs/9_3_Oli0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0007" +{ +"sound/dialogs/9_3_Oli0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0007a" +{ +"sound/dialogs/9_3_Oli0007a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0008" +{ +"sound/dialogs/9_3_Oli0008" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0008a" +{ +"sound/dialogs/9_3_Oli0008a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0008b" +{ +"sound/dialogs/9_3_Oli0008b" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0009" +{ +"sound/dialogs/9_3_Oli0009" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0010" +{ +"sound/dialogs/9_3_Oli0010" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0012" +{ +"sound/dialogs/9_3_Oli0012" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0013" +{ +"sound/dialogs/9_3_Oli0013" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_3_Oli0014" +{ +"sound/dialogs/9_3_Oli0014" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_4_Arn0001" +{ +"sound/dialogs/9_4_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0002" +{ +"sound/dialogs/9_4_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0002a" +{ +"sound/dialogs/9_4_Arn0002a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0003" +{ +"sound/dialogs/9_4_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0004" +{ +"sound/dialogs/9_4_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0005" +{ +"sound/dialogs/9_4_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0006" +{ +"sound/dialogs/9_4_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0007" +{ +"sound/dialogs/9_4_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0008" +{ +"sound/dialogs/9_4_Arn0008" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0008a" +{ +"sound/dialogs/9_4_Arn0008a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0009" +{ +"sound/dialogs/9_4_Arn0009" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0010" +{ +"sound/dialogs/9_4_Arn0010" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0010a" +{ +"sound/dialogs/9_4_Arn0010a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0011" +{ +"sound/dialogs/9_4_Arn0011" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0012" +{ +"sound/dialogs/9_4_Arn0012" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0013" +{ +"sound/dialogs/9_4_Arn0013" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0014" +{ +"sound/dialogs/9_4_Arn0014" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0015" +{ +"sound/dialogs/9_4_Arn0015" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0016" +{ +"sound/dialogs/9_4_Arn0016" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0016a" +{ +"sound/dialogs/9_4_Arn0016a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0017" +{ +"sound/dialogs/9_4_Arn0017" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0018" +{ +"sound/dialogs/9_4_Arn0018" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0019" +{ +"sound/dialogs/9_4_Arn0019" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Arn0020" +{ +"sound/dialogs/9_4_Arn0020" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "9_4_Bru0001" +{ +"sound/dialogs/9_4_Bru0001" +ambient +volume 1.0 +stream + +} + + +sound "9_4_Bru0001a" +{ +"sound/dialogs/9_4_Bru0001a" +ambient +volume 1.0 +stream + +} + + +sound "9_4_Bru0002" +{ +"sound/dialogs/9_4_Bru0002" +ambient +volume 1.0 +stream + +} + + +sound "9_4_Bru0002a" +{ +"sound/dialogs/9_4_Bru0002a" +ambient +volume 1.0 +stream + +} + + +sound "9_4_Bru0003" +{ +"sound/dialogs/9_4_Bru0003" +ambient +volume 1.0 +stream + +} + + +sound "9_4_Bru0003a" +{ +"sound/dialogs/9_4_Bru0003a" +ambient +volume 1.0 +stream + +} + + +sound "9_4_Bru0004" +{ +"sound/dialogs/9_4_Bru0004" +ambient +volume 1.0 +stream + +} + + +sound "9_4_Com0001" +{ +"sound/dialogs/9_4_Com0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "9_4_Liv0001" +{ +"sound/dialogs/9_4_Liv0001" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0002" +{ +"sound/dialogs/9_4_Liv0002" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0003" +{ +"sound/dialogs/9_4_Liv0003" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0004" +{ +"sound/dialogs/9_4_Liv0004" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0004a" +{ +"sound/dialogs/9_4_Liv0004a" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0005" +{ +"sound/dialogs/9_4_Liv0005" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0006" +{ +"sound/dialogs/9_4_Liv0006" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0007" +{ +"sound/dialogs/9_4_Liv0007" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0008" +{ +"sound/dialogs/9_4_Liv0008" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0009" +{ +"sound/dialogs/9_4_Liv0009" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0009a" +{ +"sound/dialogs/9_4_Liv0009a" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "9_4_Liv0010" +{ +"sound/dialogs/9_4_Liv0010" +spatial +volume 0.5 +stream +minrange highest +} + + +sound "I_1_Adv0001" +{ +"sound/dialogs/I_1_Adv0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_Adv0001a" +{ +"sound/dialogs/I_1_Adv0001a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_Arn0001" +{ +"sound/dialogs/I_1_Arn0001" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0002" +{ +"sound/dialogs/I_1_Arn0002" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0003" +{ +"sound/dialogs/I_1_Arn0003" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0003a" +{ +"sound/dialogs/I_1_Arn0003a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0004" +{ +"sound/dialogs/I_1_Arn0004" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0005" +{ +"sound/dialogs/I_1_Arn0005" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0006" +{ +"sound/dialogs/I_1_Arn0006" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0006a" +{ +"sound/dialogs/I_1_Arn0006a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0007" +{ +"sound/dialogs/I_1_Arn0007" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0007a" +{ +"sound/dialogs/I_1_Arn0007a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0008" +{ +"sound/dialogs/I_1_Arn0008" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0009" +{ +"sound/dialogs/I_1_Arn0009" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0010" +{ +"sound/dialogs/I_1_Arn0010" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0011" +{ +"sound/dialogs/I_1_Arn0011" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0011a" +{ +"sound/dialogs/I_1_Arn0011a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0012" +{ +"sound/dialogs/I_1_Arn0012" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0013" +{ +"sound/dialogs/I_1_Arn0013" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0014" +{ +"sound/dialogs/I_1_Arn0014" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Arn0014a" +{ +"sound/dialogs/I_1_Arn0014a" +spatial +volume 0.6 +stream +minrange highest +} + + +sound "I_1_Liv0001" +{ +"sound/dialogs/I_1_Liv0001" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0001a" +{ +"sound/dialogs/I_1_Liv0001a" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0002" +{ +"sound/dialogs/I_1_Liv0002" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0003" +{ +"sound/dialogs/I_1_Liv0003" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0004" +{ +"sound/dialogs/I_1_Liv0004" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0004a" +{ +"sound/dialogs/I_1_Liv0004a" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0005" +{ +"sound/dialogs/I_1_Liv0005" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0006" +{ +"sound/dialogs/I_1_Liv0006" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0007" +{ +"sound/dialogs/I_1_Liv0007" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0008" +{ +"sound/dialogs/I_1_Liv0008" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0009" +{ +"sound/dialogs/I_1_Liv0009" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0010" +{ +"sound/dialogs/I_1_Liv0010" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0011" +{ +"sound/dialogs/I_1_Liv0011" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0012" +{ +"sound/dialogs/I_1_Liv0012" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0012a" +{ +"sound/dialogs/I_1_Liv0012a" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0013" +{ +"sound/dialogs/I_1_Liv0013" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0014" +{ +"sound/dialogs/I_1_Liv0014" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0015" +{ +"sound/dialogs/I_1_Liv0015" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0015a" +{ +"sound/dialogs/I_1_Liv0015a" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0016" +{ +"sound/dialogs/I_1_Liv0016" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0017" +{ +"sound/dialogs/I_1_Liv0017" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0017a" +{ +"sound/dialogs/I_1_Liv0017a" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Liv0018" +{ +"sound/dialogs/I_1_Liv0018" +spatial +volume 1.0 +stream + +} + + +sound "I_1_Pr20001" +{ +"sound/dialogs/I_1_Pr20001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_Pr20002" +{ +"sound/dialogs/I_1_Pr20002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_Pr20003" +{ +"sound/dialogs/I_1_Pr20003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_Pr20003a" +{ +"sound/dialogs/I_1_Pr20003a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_Pr20004" +{ +"sound/dialogs/I_1_Pr20004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0001" +{ +"sound/dialogs/I_1_PrF0001" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0001a" +{ +"sound/dialogs/I_1_PrF0001a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0002" +{ +"sound/dialogs/I_1_PrF0002" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0003" +{ +"sound/dialogs/I_1_PrF0003" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0004" +{ +"sound/dialogs/I_1_PrF0004" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0005" +{ +"sound/dialogs/I_1_PrF0005" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0005a" +{ +"sound/dialogs/I_1_PrF0005a" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0006" +{ +"sound/dialogs/I_1_PrF0006" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "I_1_PrF0007" +{ +"sound/dialogs/I_1_PrF0007" +spatial +volume 1.0 +stream +minrange highest +} + + +sound "O_1_Liv0001" +{ +"sound/dialogs/O_1_Liv0001" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0002" +{ +"sound/dialogs/O_1_Liv0002" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0003" +{ +"sound/dialogs/O_1_Liv0003" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0004" +{ +"sound/dialogs/O_1_Liv0004" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0004_verze" +{ +"sound/dialogs/O_1_Liv0004_verze" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0005" +{ +"sound/dialogs/O_1_Liv0005" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0006" +{ +"sound/dialogs/O_1_Liv0006" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0006a" +{ +"sound/dialogs/O_1_Liv0006a" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0007" +{ +"sound/dialogs/O_1_Liv0007" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0007a" +{ +"sound/dialogs/O_1_Liv0007a" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0008" +{ +"sound/dialogs/O_1_Liv0008" +ambient +volume 1.0 +stream +} + + +sound "O_1_Liv0009" +{ +"sound/dialogs/O_1_Liv0009" +ambient +volume 1.0 +stream +} + + +sound "O_1_Pat0001" +{ +"sound/dialogs/O_1_Pat0001" +ambient +volume 1.0 +stream +} + + +sound "O_1_Pat0002" +{ +"sound/dialogs/O_1_Pat0002" +ambient +volume 1.0 +stream +} + + +sound "O_1_Pat0002a" +{ +"sound/dialogs/O_1_Pat0002a" +ambient +volume 1.0 +stream +} + + +sound "O_1_Pat0003" +{ +"sound/dialogs/O_1_Pat0003" +ambient +volume 1.0 +stream +} + + +sound "O_1_Pat0004" +{ +"sound/dialogs/O_1_Pat0004" +ambient +volume 1.0 +stream +} + + +sound "O_1_Pat0005" +{ +"sound/dialogs/O_1_Pat0005" +ambient +volume 1.0 +stream +} + +sound "AI_troop13a" +{ +"sound/dialogs/AI_troop13a" +spatial +volume 1.0 +stream +} + +/* + +sound "AI_troop13b" +{ +"sound/dialogs/AI_troop13b" +spatial +volume 1.0 +stream + +} + + +sound "AI_troop13c" +{ +"sound/dialogs/AI_troop13c" +spatial +volume 1.0 +stream + +} + + +sound "AI_troop14a" +{ +"sound/dialogs/AI_troop14a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop14b" +{ +"sound/dialogs/AI_troop14b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop14c" +{ +"sound/dialogs/AI_troop14c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop15a" +{ +"sound/dialogs/AI_troop15a" +spatial +volume 1.0 +stream +DIALOG_FX_P1} + + +sound "AI_troop15b" +{ +"sound/dialogs/AI_troop15b" +spatial +volume 1.0 +stream +DIALOG_FX_P1} + + +sound "AI_troop15c" +{ +"sound/dialogs/AI_troop15c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop16a" +{ +"sound/dialogs/AI_troop16a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop16b" +{ +"sound/dialogs/AI_troop16b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop16c" +{ +"sound/dialogs/AI_troop16c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop17a" +{ +"sound/dialogs/AI_troop17a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop17b" +{ +"sound/dialogs/AI_troop17b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop17c" +{ +"sound/dialogs/AI_troop17c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop18a" +{ +"sound/dialogs/AI_troop18a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop18b" +{ +"sound/dialogs/AI_troop18b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop18c" +{ +"sound/dialogs/AI_troop18c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop19a" +{ +"sound/dialogs/AI_troop19a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop19b" +{ +"sound/dialogs/AI_troop19b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop19c" +{ +"sound/dialogs/AI_troop19c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop20a" +{ +"sound/dialogs/AI_troop20a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop20b" +{ +"sound/dialogs/AI_troop20b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop20c" +{ +"sound/dialogs/AI_troop20c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop21a" +{ +"sound/dialogs/AI_troop21a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop21b" +{ +"sound/dialogs/AI_troop21b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop21c" +{ +"sound/dialogs/AI_troop21c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop22a" +{ +"sound/dialogs/AI_troop22a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop22b" +{ +"sound/dialogs/AI_troop22b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop22c" +{ +"sound/dialogs/AI_troop22c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop23a" +{ +"sound/dialogs/AI_troop23a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop23b" +{ +"sound/dialogs/AI_troop23b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop23c" +{ +"sound/dialogs/AI_troop23c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop24a" +{ +"sound/dialogs/AI_troop24a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop24b" +{ +"sound/dialogs/AI_troop24b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop24c" +{ +"sound/dialogs/AI_troop24c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop25a" +{ +"sound/dialogs/AI_troop25a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop25b" +{ +"sound/dialogs/AI_troop25b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop25c" +{ +"sound/dialogs/AI_troop25c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop26a" +{ +"sound/dialogs/AI_troop26a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop26b" +{ +"sound/dialogs/AI_troop26b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop26c" +{ +"sound/dialogs/AI_troop26c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop27a" +{ +"sound/dialogs/AI_troop27a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop27b" +{ +"sound/dialogs/AI_troop27b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop28a" +{ +"sound/dialogs/AI_troop28a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop28b" +{ +"sound/dialogs/AI_troop28b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop28c" +{ +"sound/dialogs/AI_troop28c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop29a" +{ +"sound/dialogs/AI_troop29a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop29b" +{ +"sound/dialogs/AI_troop29b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop29c" +{ +"sound/dialogs/AI_troop29c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop30a" +{ +"sound/dialogs/AI_troop30a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop30b" +{ +"sound/dialogs/AI_troop30b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop30c" +{ +"sound/dialogs/AI_troop30c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop31a" +{ +"sound/dialogs/AI_troop31a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop31b" +{ +"sound/dialogs/AI_troop31b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop31c" +{ +"sound/dialogs/AI_troop31c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop32a" +{ +"sound/dialogs/AI_troop32a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop32b" +{ +"sound/dialogs/AI_troop32b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop32c" +{ +"sound/dialogs/AI_troop32c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop33a" +{ +"sound/dialogs/AI_troop33a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop33b" +{ +"sound/dialogs/AI_troop33b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop33c" +{ +"sound/dialogs/AI_troop33c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop34a" +{ +"sound/dialogs/AI_troop34a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop34b" +{ +"sound/dialogs/AI_troop34b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop34c" +{ +"sound/dialogs/AI_troop34c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop35a" +{ +"sound/dialogs/AI_troop35a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop35b" +{ +"sound/dialogs/AI_troop35b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop35c" +{ +"sound/dialogs/AI_troop35c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop36a" +{ +"sound/dialogs/AI_troop36a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop36b" +{ +"sound/dialogs/AI_troop36b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop36c" +{ +"sound/dialogs/AI_troop36c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop37a" +{ +"sound/dialogs/AI_troop37a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop37b" +{ +"sound/dialogs/AI_troop37b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop37c" +{ +"sound/dialogs/AI_troop37c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop38a" +{ +"sound/dialogs/AI_troop38a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop38b" +{ +"sound/dialogs/AI_troop38b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop38c" +{ +"sound/dialogs/AI_troop38c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop39a" +{ +"sound/dialogs/AI_troop39a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop39b" +{ +"sound/dialogs/AI_troop39b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop39c" +{ +"sound/dialogs/AI_troop39c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop40a" +{ +"sound/dialogs/AI_troop40a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop40b" +{ +"sound/dialogs/AI_troop40b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop40c" +{ +"sound/dialogs/AI_troop40c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop41a" +{ +"sound/dialogs/AI_troop41a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop41b" +{ +"sound/dialogs/AI_troop41b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop41c" +{ +"sound/dialogs/AI_troop41c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop42a" +{ +"sound/dialogs/AI_troop42a" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop42b" +{ +"sound/dialogs/AI_troop42b" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + + +sound "AI_troop42c" +{ +"sound/dialogs/AI_troop42c" +spatial +volume 1.0 +stream +DIALOG_FX_P1 +} + +*/ + +//sound "I_1_Adv0001" +//{ +//"sound/dialogs/I_1_Adv0001" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Adv0001a" +//{ +//"sound/dialogs/I_1_Adv0001a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0001" +//{ +//"sound/dialogs/I_1_Arn0001" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0002" +//{ +//"sound/dialogs/I_1_Arn0002" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0003" +//{ +//"sound/dialogs/I_1_Arn0003" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0003a" +//{ +//"sound/dialogs/I_1_Arn0003a" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0004" +//{ +//"sound/dialogs/I_1_Arn0004" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0005" +//{ +//"sound/dialogs/I_1_Arn0005" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0006" +//{ +//"sound/dialogs/I_1_Arn0006" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0006a" +//{ +//"sound/dialogs/I_1_Arn0006a" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0007" +//{ +//"sound/dialogs/I_1_Arn0007" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0007a" +//{ +//"sound/dialogs/I_1_Arn0007a" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0008" +//{ +//"sound/dialogs/I_1_Arn0008" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0009" +//{ +//"sound/dialogs/I_1_Arn0009" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0010" +//{ +//"sound/dialogs/I_1_Arn0010" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0011" +//{ +//"sound/dialogs/I_1_Arn0011" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0011a" +//{ +//"sound/dialogs/I_1_Arn0011a" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0012" +//{ +//"sound/dialogs/I_1_Arn0012" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0013" +//{ +//"sound/dialogs/I_1_Arn0013" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0014" +//{ +//"sound/dialogs/I_1_Arn0014" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Arn0014a" +//{ +//"sound/dialogs/I_1_Arn0014a" +//spatial +//volume 0.6 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0001" +//{ +//"sound/dialogs/I_1_Liv0001" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0001a" +//{ +//"sound/dialogs/I_1_Liv0001a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0002" +//{ +//"sound/dialogs/I_1_Liv0002" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0003" +//{ +//"sound/dialogs/I_1_Liv0003" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0004" +//{ +//"sound/dialogs/I_1_Liv0004" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0004a" +//{ +//"sound/dialogs/I_1_Liv0004a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0005" +//{ +//"sound/dialogs/I_1_Liv0005" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0006" +//{ +//"sound/dialogs/I_1_Liv0006" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0007" +//{ +//"sound/dialogs/I_1_Liv0007" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0008" +//{ +//"sound/dialogs/I_1_Liv0008" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0009" +//{ +//"sound/dialogs/I_1_Liv0009" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0010" +//{ +//"sound/dialogs/I_1_Liv0010" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0011" +//{ +//"sound/dialogs/I_1_Liv0011" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0012" +//{ +//"sound/dialogs/I_1_Liv0012" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0012a" +//{ +//"sound/dialogs/I_1_Liv0012a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0013" +//{ +//"sound/dialogs/I_1_Liv0013" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0014" +//{ +//"sound/dialogs/I_1_Liv0014" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0015" +//{ +//"sound/dialogs/I_1_Liv0015" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0015a" +//{ +//"sound/dialogs/I_1_Liv0015a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0016" +//{ +//"sound/dialogs/I_1_Liv0016" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0017" +//{ +//"sound/dialogs/I_1_Liv0017" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0017a" +//{ +//"sound/dialogs/I_1_Liv0017a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Liv0018" +//{ +//"sound/dialogs/I_1_Liv0018" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Pr20001" +//{ +//"sound/dialogs/I_1_Pr20001" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Pr20002" +//{ +//"sound/dialogs/I_1_Pr20002" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Pr20003" +//{ +//"sound/dialogs/I_1_Pr20003" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Pr20003a" +//{ +//"sound/dialogs/I_1_Pr20003a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_Pr20004" +//{ +//"sound/dialogs/I_1_Pr20004" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0001" +//{ +//"sound/dialogs/I_1_PrF0001" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0001a" +//{ +//"sound/dialogs/I_1_PrF0001a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0002" +//{ +//"sound/dialogs/I_1_PrF0002" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0003" +//{ +//"sound/dialogs/I_1_PrF0003" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0004" +//{ +//"sound/dialogs/I_1_PrF0004" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0005" +//{ +//"sound/dialogs/I_1_PrF0005" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0005a" +//{ +//"sound/dialogs/I_1_PrF0005a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0006" +//{ +//"sound/dialogs/I_1_PrF0006" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "I_1_PrF0007" +//{ +//"sound/dialogs/I_1_PrF0007" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0001" +//{ +//"sound/dialogs/O_1_Liv0001" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0002" +//{ +//"sound/dialogs/O_1_Liv0002" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0003" +//{ +//"sound/dialogs/O_1_Liv0003" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0004" +//{ +//"sound/dialogs/O_1_Liv0004" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0004_verze" +//{ +//"sound/dialogs/O_1_Liv0004_verze" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0005" +//{ +//"sound/dialogs/O_1_Liv0005" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0006" +//{ +//"sound/dialogs/O_1_Liv0006" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0006a" +//{ +//"sound/dialogs/O_1_Liv0006a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0007" +//{ +//"sound/dialogs/O_1_Liv0007" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0007a" +//{ +//"sound/dialogs/O_1_Liv0007a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0008" +//{ +//"sound/dialogs/O_1_Liv0008" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Liv0009" +//{ +//"sound/dialogs/O_1_Liv0009" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Pat0001" +//{ +//"sound/dialogs/O_1_Pat0001" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Pat0002" +//{ +//"sound/dialogs/O_1_Pat0002" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Pat0002a" +//{ +//"sound/dialogs/O_1_Pat0002a" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Pat0003" +//{ +//"sound/dialogs/O_1_Pat0003" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Pat0004" +//{ +//"sound/dialogs/O_1_Pat0004" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} +// +// +//sound "O_1_Pat0005" +//{ +//"sound/dialogs/O_1_Pat0005" +//spatial +//volume 1.0 +//stream +//DIALOG_FX_P1 +//} + + +/***************************** + SHADERY PRO COMPUTER HLASKY +*****************************/ +sound "ENV_01" +{ +"sound/dialogs/ENV_01" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_02" +{ +"sound/dialogs/ENV_02" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_03" +{ +"sound/dialogs/ENV_03" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_04" +{ +"sound/dialogs/ENV_04" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_05" +{ +"sound/dialogs/ENV_05" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + +sound "ENV_05a" +{ +"sound/dialogs/ENV_05a" +spatial +volume 1.0 +stream +} + +sound "ENV_06" +{ +"sound/dialogs/ENV_06" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_07" +{ +"sound/dialogs/ENV_07" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_08" +{ +"sound/dialogs/ENV_08" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_09" +{ +"sound/dialogs/ENV_09" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_10" +{ +"sound/dialogs/ENV_10" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_11" +{ +"sound/dialogs/ENV_11" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_12" +{ +"sound/dialogs/ENV_12" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_13" +{ +"sound/dialogs/ENV_13" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_14" +{ +"sound/dialogs/ENV_14" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_15" +{ +"sound/dialogs/ENV_15" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_16" +{ +"sound/dialogs/ENV_16" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_17" +{ +"sound/dialogs/ENV_17" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_18" +{ +"sound/dialogs/ENV_18" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_19" +{ +"sound/dialogs/ENV_19" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_20" +{ +"sound/dialogs/ENV_20" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_21" +{ +"sound/dialogs/ENV_21" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + +sound "ENV_21s" +{ +"sound/dialogs/ENV_21s" +spatial +volume 0.5 +minrange high +} + + +sound "ENV_22" +{ +"sound/dialogs/ENV_22" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_23" +{ +"sound/dialogs/ENV_23" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_24" +{ +"sound/dialogs/ENV_24" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + +sound "ENV_24s" +{ +"sound/dialogs/ENV_24s" +spatial +volume 0.5 +minrange high +} + + +sound "ENV_25" +{ +"sound/dialogs/ENV_25" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_26" +{ +"sound/dialogs/ENV_26" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_27" +{ +"sound/dialogs/ENV_27" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_28" +{ +"sound/dialogs/ENV_28" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + +sound "ENV_28s" +{ +"sound/dialogs/ENV_28s" +spatial +volume 1.0 +} + +sound "ENV_29" +{ +"sound/dialogs/ENV_29" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + +sound "ENV_29s" +{ +"sound/dialogs/ENV_29s" +spatial +volume 0.4 +} + +sound "ENV_30" +{ +"sound/dialogs/ENV_30" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_31" +{ +"sound/dialogs/ENV_31" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_32" +{ +"sound/dialogs/ENV_32" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_33" +{ +"sound/dialogs/ENV_33" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + +sound "ENV_33s" +{ +"sound/dialogs/ENV_33s" +ambient +volume 1.0 +} + +sound "ENV_34" +{ +"sound/dialogs/ENV_34" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_35" +{ +"sound/dialogs/ENV_35" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_36" +{ +"sound/dialogs/ENV_36" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_37" +{ +"sound/dialogs/ENV_37" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_38" +{ +"sound/dialogs/ENV_38" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_39" +{ +"sound/dialogs/ENV_39" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_40" +{ +"sound/dialogs/ENV_40" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_41" +{ +"sound/dialogs/ENV_41" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_42" +{ +"sound/dialogs/ENV_42" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_43" +{ +"sound/dialogs/ENV_43" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_44" +{ +"sound/dialogs/ENV_44" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_45" +{ +"sound/dialogs/ENV_45" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + + +sound "ENV_46" +{ +"sound/dialogs/ENV_46" +ambient +volume 1.0 +stream +DIALOG_FX_P2 +} + +//--------------custom shadery pro cutsceny---------------// + + +sound "Crouch_Up2" +{ +"sound/cutscenes/Crouch_Up2" +spatial +volume 1.0 +} + + +sound "rustle3" +{ +"sound/cutscenes/rustle3" +spatial +volume 1.0 +} + + +sound "fs2" +{ +"sound/cutscenes/fs2" +spatial +volume 1.0 +} + + +sound "fs4" +{ +"sound/cutscenes/fs4" +spatial +volume 1.0 +} + + +sound "fs5" +{ +"sound/cutscenes/fs5" +spatial +volume 1.0 +} + + +sound "fs6" +{ +"sound/cutscenes/fs6" +spatial +volume 1.0 +} + + +sound "fs1" +{ +"sound/cutscenes/fs1" +spatial +volume 1.0 +} + + +sound "fs3" +{ +"sound/cutscenes/fs3" +spatial +volume 1.0 +} + + +sound "fs7" +{ +"sound/cutscenes/fs7" +spatial +volume 0.7 +} + + +sound "rustle003" +{ +"sound/cutscenes/rustle003" +spatial +volume 0.5 +} + + +sound "rustle006" +{ +"sound/cutscenes/rustle006" +spatial +volume 0.5 +} + + +sound "rustle004" +{ +"sound/cutscenes/rustle004" +spatial +volume 0.5 +} + + +sound "rustle001" +{ +"sound/cutscenes/rustle001" +spatial +volume 0.5 +} + + +sound "rustle002" +{ +"sound/cutscenes/rustle002" +spatial +volume 0.5 +} + + +sound "rustle005" +{ +"sound/cutscenes/rustle005" +spatial +volume 0.5 +} + + +sound "rustle4" +{ +"sound/cutscenes/rustle4" +spatial +volume 1.0 +} + + +sound "Ruchy_02" +{ +"sound/cutscenes/Ruchy_02" +spatial +volume 1.0 +} + + +sound "rustle6" +{ +"sound/cutscenes/rustle6" +spatial +volume 1.0 +} + + +sound "rustle12" +{ +"sound/cutscenes/rustle12" +spatial +volume 1.0 +} + + +sound "rustle5" +{ +"sound/cutscenes/rustle5" +spatial +volume 1.0 +} + + +sound "rustle8" +{ +"sound/cutscenes/rustle8" +spatial +volume 1.0 +} + + +sound "rustle2" +{ +"sound/cutscenes/rustle2" +spatial +volume 1.0 +} + + +sound "L3-1" +{ +"sound/cutscenes/L3-1" +spatial +volume 1.0 +} + +sound "boots03" +{ +"sound/cutscenes/boots03" +spatial +volume 0.5 +} + + +sound "boots01" +{ +"sound/cutscenes/boots01" +spatial +volume 0.5 +} + + +sound "boots04" +{ +"sound/cutscenes/boots04" +spatial +volume 0.5 +} + + +sound "boots05" +{ +"sound/cutscenes/boots05" +spatial +volume 0.5 +} + + +sound "boots02" +{ +"sound/cutscenes/boots02" +spatial +volume 0.5 +} + + +sound "boots07" +{ +"sound/cutscenes/boots07" +spatial +volume 0.5 +} + +sound "flesh_solid03" +{ +"sound/cutscenes/flesh_solid03" +spatial +volume 1.0 +} + + +sound "door_01_START" +{ +"sound/cutscenes/door_01_START" +spatial +volume 1.0 +} + + +sound "door_01_END" +{ +"sound/cutscenes/door_01_END" +spatial +volume 1.0 +} + + +sound "flesh_solid02" +{ +"sound/cutscenes/flesh_solid02" +spatial +volume 1.0 +} + +sound "flame05" +{ +"sound/cutscenes/flame05" +spatial +volume 0.7 +} + + +sound "vrz05" +{ +"sound/cutscenes/vrz05" +spatial +volume 1.0 +} + + +sound "aster_boom_01" +{ +"sound/cutscenes/aster_boom_01" +spatial +volume 1.0 +minrange higher +} + + +sound "vrz09" +{ +"sound/cutscenes/vrz09" +spatial +volume 1.0 +} + + +sound "explosion_02" +{ +"sound/cutscenes/explosion_02" +spatial +volume 1.0 +} + + +sound "flame_loop01" +{ +"sound/cutscenes/flame_loop01" +spatial +volume 1.0 +} + +sound "flame_loop02" +{ +"sound/cutscenes/flame_loop01" +spatial +volume 0.5 +} + +sound "vrz07" +{ +"sound/cutscenes/vrz07" +spatial +volume 1.0 +} + + +sound "explosion_03" +{ +"sound/cutscenes/explosion_03" +spatial +volume 1.0 +} + + +sound "vrz11" +{ +"sound/cutscenes/vrz11" +spatial +volume 1.0 +} + + +sound "Sykot02" +{ +"sound/cutscenes/Sykot02" +spatial +volume 1.0 +} + + +sound "aster_boom_loop_03" +{ +"sound/cutscenes/aster_boom_loop_03" +spatial +volume 1.0 +minrange higher +} + +sound "kameny01" +{ +"sound/effects/kameni1" +"sound/effects/kameni2" +spatial +volume 0.7 +} + +sound "artemisboom" +{ +"sound/effects/artemisboom01" +"sound/effects/artemisboom02" +"sound/effects/artemisboom03" +"sound/effects/artemisboom04" +"sound/effects/artemisboom05" +"sound/effects/artemisboom06" +ambient +volume 1.0 +} + +sound "impact3_01" +{ +"sound/cutscenes/impact3_01" +spatial +volume 1.0 +} + + +sound "llop2" +{ +"sound/cutscenes/llop2" +spatial +volume 1.0 +} + + +sound "data13-01" +{ +"sound/cutscenes/data13-01" +spatial +volume 1.0 +} + + +sound "doors7" +{ +"sound/cutscenes/doors7" +spatial +volume 1.0 +} + +sound "rust10" +{ +"sound/cutscenes/rust10" +spatial +volume 1.0 +} + + +sound "rust07" +{ +"sound/cutscenes/rust07" +spatial +volume 1.0 +} + + +sound "rust08" +{ +"sound/cutscenes/rust08" +spatial +volume 1.0 +} + + +sound "rust05" +{ +"sound/cutscenes/rust05" +spatial +volume 1.0 +} + + +sound "rust12" +{ +"sound/cutscenes/rust12" +spatial +volume 1.0 +} + + +sound "rust06" +{ +"sound/cutscenes/rust06" +spatial +volume 1.0 +} + + +sound "rust04" +{ +"sound/cutscenes/rust04" +spatial +volume 1.0 +} + +sound "rust11" +{ +"sound/cutscenes/rust11" +spatial +volume 1.0 +} + + +sound "rust09" +{ +"sound/cutscenes/rust09" +spatial +volume 1.0 +} + + +sound "rust03" +{ +"sound/cutscenes/rust03" +spatial +volume 1.0 +} + + +sound "rustle1" +{ +"sound/cutscenes/rustle1" +spatial +volume 1.0 +} + +sound "rust13" +{ +"sound/cutscenes/rust13" +spatial +volume 1.0 +} + + +sound "rust01" +{ +"sound/cutscenes/rust01" +spatial +volume 1.0 +} + + +sound "rustle11-15" +{ +"sound/cutscenes/rustle11-15" +spatial +volume 1.0 +} + + +sound "rustle9-01" +{ +"sound/cutscenes/rustle9-01" +spatial +volume 1.0 +} + + +sound "gravel4" +{ +"sound/cutscenes/gravel4" +spatial +volume 1.0 +} + + +sound "keyboard04" +{ +"sound/cutscenes/keyboard04" +spatial +volume 1.0 +} + + +sound "keyboard001" +{ +"sound/cutscenes/keyboard01" +spatial +volume 1.0 +} + + +sound "keyboard02" +{ +"sound/cutscenes/keyboard02" +spatial +volume 1.0 +} + + +sound "rustle4-14" +{ +"sound/cutscenes/rustle4-14" +spatial +volume 1.0 +} + + +sound "rustle8-01" +{ +"sound/cutscenes/rustle8-01" +spatial +volume 1.0 +} + + +sound "keyboard03" +{ +"sound/cutscenes/keyboard03" +spatial +volume 1.0 +} + + +sound "keyboard05" +{ +"sound/cutscenes/keyboard05" +spatial +volume 1.0 +} + + +sound "gravel2" +{ +"sound/cutscenes/gravel2" +spatial +volume 1.0 +} + +sound "rust02" +{ +"sound/cutscenes/rust02" +spatial +volume 1.0 +} + + +sound "Crouch_Down" +{ +"sound/cutscenes/Crouch_Down" +spatial +volume 1.0 +} + + +sound "boots06" +{ +"sound/cutscenes/boots06" +spatial +volume 1.0 +} + + +sound "gatling_IN01" +{ +"sound/cutscenes/gatling_IN01" +spatial +volume 1.0 +} + + +sound "shotgun_reload01" +{ +"sound/cutscenes/shotgun_reload01" +spatial +volume 1.0 +} + +sound "gravel3" +{ +"sound/cutscenes/gravel3" +spatial +volume 1.0 +} + + +sound "gravel1" +{ +"sound/cutscenes/gravel1" +spatial +volume 1.0 +} + +sound "rustle1-01" +{ +"sound/cutscenes/rustle1-01" +spatial +volume 1.0 +} +sound "MGreload01_a" +{ +"sound/cutscenes/MGreload01_a" +spatial +volume 1.0 +} + + +sound "misc02" +{ +"sound/cutscenes/misc02" +spatial +volume 1.0 +} +sound "Rfs_01" +{ +"sound/cutscenes/Rfs_01" +spatial +volume 1.0 +} + + +sound "Rfs_02" +{ +"sound/cutscenes/Rfs_02" +spatial +volume 1.0 +} + + +sound "Rfs_03" +{ +"sound/cutscenes/Rfs_03" +spatial +volume 1.0 +} + + +sound "Rfs_04" +{ +"sound/cutscenes/Rfs_04" +spatial +volume 1.0 +} + +sound "rustle12-01" +{ +"sound/cutscenes/rustle12-01" +spatial +volume 1.0 +} + +sound "data02" +{ +"sound/cutscenes/data02" +spatial +volume 1.0 +} + + +sound "data15" +{ +"sound/cutscenes/data15" +spatial +volume 1.0 +} + + +sound "disp_efx_50" +{ +"sound/cutscenes/disp_efx_50" +spatial +volume 1.0 +} + + +sound "data13" +{ +"sound/cutscenes/data13" +spatial +volume 1.0 +} + +sound "rustle5-01" +{ +"sound/cutscenes/rustle5-01" +spatial +volume 1.0 +} + + +sound "boom_05" +{ +"sound/cutscenes/boom_05" +spatial +volume 1.0 +minrange highest +} + + +sound "flesh_fall3" +{ +"sound/cutscenes/flesh_fall3" +spatial +volume 1.0 +} + + +sound "flesh_fall2" +{ +"sound/cutscenes/flesh_fall2" +spatial +volume 1.0 +} + + +sound "boom_03" +{ +"sound/cutscenes/boom_03" +spatial +volume 1.0 +minrange highest +} + + +sound "rics_flesh09" +{ +"sound/cutscenes/rics_flesh09" +spatial +volume 1.0 +} + +sound "flesh_hard02" +{ +"sound/cutscenes/flesh_hard02" +spatial +volume 1.0 +} + + +sound "rustle7-01" +{ +"sound/cutscenes/rustle7-01" +spatial +volume 1.0 +} + + +sound "bulletIN01" +{ +"sound/cutscenes/bulletIN01" +ambient +volume 1.004 +} + + +sound "boomflashwav-01" +{ +"sound/cutscenes/boomflashwav-01" +spatial +volume 1.0 +} + +sound "rics_flesh14" +{ +"sound/cutscenes/rics_flesh14" +spatial +volume 1.0 +} + + +sound "nabojnice_03" +{ +"sound/cutscenes/nabojnice_03" +spatial +volume 1.0 +} + + +sound "pistol01-01" +{ +"sound/cutscenes/pistol01-01" +spatial +volume 1.0 +} + + +sound "sum2" +{ +"sound/cutscenes/sum2" +spatial +volume 1.0 +} + + +sound "pistol3-01" +{ +"sound/cutscenes/pistol3-01" +spatial +volume 1.0 +} + + +sound "pistol2" +{ +"sound/cutscenes/pistol2" +spatial +volume 1.0 +} + + +sound "pistol4-01" +{ +"sound/cutscenes/pistol4-01" +spatial +volume 1.0 +} + + +sound "nabojnice_04" +{ +"sound/cutscenes/nabojnice_04" +spatial +volume 1.0 +} + +sound "fs_out05" +{ +"sound/cutscenes/fs_out05" +spatial +volume 1.0 +} + + +sound "HTservo02" +{ +"sound/cutscenes/HTservo02" +spatial +volume 1.0 +} + + +sound "fs_out01" +{ +"sound/cutscenes/fs_out01" +spatial +volume 1.0 +} + + +sound "rustle6-01" +{ +"sound/cutscenes/rustle6-01" +spatial +volume 1.0 +} + +sound "Vytah-11" +{ +"sound/cutscenes/Vytah-11" +spatial +volume 1.0 +} + + +sound "Vytah-12" +{ +"sound/cutscenes/Vytah-12" +spatial +volume 1.0 +} + + +sound "Vytah-13" +{ +"sound/cutscenes/Vytah-13" +spatial +volume 1.0 +} + + +sound "rustle003-01" +{ +"sound/cutscenes/rustle003-01" +spatial +volume 1.0 +} + + +sound "Vytah-10" +{ +"sound/cutscenes/Vytah-10" +spatial +volume 1.0 +} + +sound "mriz02" +{ +"sound/cutscenes/mriz02" +spatial +volume 1.0 +} + + +sound "boots01-01" +{ +"sound/cutscenes/boots01-01" +spatial +volume 1.0 +} + + +sound "boots03-01" +{ +"sound/cutscenes/boots03-01" +spatial +volume 1.0 +} + + +sound "keyboard-04" +{ +"sound/cutscenes/keyboard-04" +spatial +volume 1.0 +} + + +sound "keyboard-06" +{ +"sound/cutscenes/keyboard-06" +spatial +volume 1.0 +} + + +sound "keyboard-05" +{ +"sound/cutscenes/keyboard-05" +spatial +volume 1.0 +} + +sound "breath002a" +{ +"sound/cutscenes/breath002a" +spatial +volume 1.0 +} + + +sound "breath003b" +{ +"sound/cutscenes/breath003b" +spatial +volume 1.0 +} + + +sound "Warning05" +{ +"sound/cutscenes/Warning05" +ambient +volume 0.5 +} + + +sound "chain15" +{ +"sound/cutscenes/chain15" +spatial +volume 1.0 +} + + +sound "disp_efx_29" +{ +"sound/cutscenes/disp_efx_29" +spatial +volume 1.0 +} + +sound "disp_efx_33" +{ +"sound/cutscenes/disp_efx_33" +spatial +volume 1.0 +} + +sound "drinking computer0001" +{ +"sound/cutscenes/drinking computer0001" +spatial +volume 1.0 +} + + +sound "drinking computer0003" +{ +"sound/cutscenes/drinking computer0003" +spatial +volume 1.0 +} + + +sound "chlcomputer0001" +{ +"sound/cutscenes/chlcomputer0001" +spatial +volume 1.0 +} + + +sound "chlcomputer0002" +{ +"sound/cutscenes/chlcomputer0002" +spatial +volume 1.0 +} + + +sound "chlcomputer0003" +{ +"sound/cutscenes/chlcomputer0003" +spatial +volume 1.0 +} + + +sound "chlcomputer0004" +{ +"sound/cutscenes/chlcomputer0004" +spatial +volume 1.0 +} + + +sound "chlcomputer0005" +{ +"sound/cutscenes/chlcomputer0005" +spatial +volume 1.0 +} + + +sound "chlcomputer0006" +{ +"sound/cutscenes/chlcomputer0006" +spatial +volume 1.0 +} + + +sound "chlcomputer0007" +{ +"sound/cutscenes/chlcomputer0007" +spatial +volume 1.0 +} + + +sound "chlcomputer0008" +{ +"sound/cutscenes/chlcomputer0008" +spatial +volume 1.0 +} + + +sound "chlcomputer0009" +{ +"sound/cutscenes/chlcomputer0009" +spatial +volume 1.0 +} + + +sound "chlcomputer0010" +{ +"sound/cutscenes/chlcomputer0010" +spatial +volume 1.0 +} + + +sound "chlcomputer0011" +{ +"sound/cutscenes/chlcomputer0011" +spatial +volume 1.0 +} + + +sound "chlcomputer0012" +{ +"sound/cutscenes/chlcomputer0012" +spatial +volume 1.0 +} + + +sound "chlcomputer0013" +{ +"sound/cutscenes/chlcomputer0013" +spatial +volume 1.0 +} + + +sound "chlcomputer0014" +{ +"sound/cutscenes/chlcomputer0014" +spatial +volume 1.0 +} + + +sound "chlcomputer0015" +{ +"sound/cutscenes/chlcomputer0015" +spatial +volume 1.0 +} + + +sound "chlcomputer0016" +{ +"sound/cutscenes/chlcomputer0016" +spatial +volume 1.0 +} + + +sound "chlcomputer0017" +{ +"sound/cutscenes/chlcomputer0017" +spatial +volume 1.0 +} + + +sound "chlcomputer0018" +{ +"sound/cutscenes/chlcomputer0018" +spatial +volume 1.0 +} + + +sound "chlcomputer0019" +{ +"sound/cutscenes/chlcomputer0019" +spatial +volume 1.0 +} + + +sound "chlcomputer0020" +{ +"sound/cutscenes/chlcomputer0020" +spatial +volume 1.0 +} + + +sound "chlcomputer0021" +{ +"sound/cutscenes/chlcomputer0021" +spatial +volume 1.0 +} + + +sound "chlcomputer0022" +{ +"sound/cutscenes/chlcomputer0022" +spatial +volume 1.0 +} + + +sound "chlcomputer0023" +{ +"sound/cutscenes/chlcomputer0023" +spatial +volume 1.0 +} + + +sound "chlcomputer0024" +{ +"sound/cutscenes/chlcomputer0024" +spatial +volume 1.0 +} + + +sound "chlcomputer0025" +{ +"sound/cutscenes/chlcomputer0025" +spatial +volume 1.0 +} + + +sound "chlcomputer0026" +{ +"sound/cutscenes/chlcomputer0026" +spatial +volume 1.0 +} + + +sound "chlcomputer0027" +{ +"sound/cutscenes/chlcomputer0027" +spatial +volume 1.0 +} + + +sound "chlcomputer0028" +{ +"sound/cutscenes/chlcomputer0028" +spatial +volume 1.0 +} + + +sound "chlcomputer0029" +{ +"sound/cutscenes/chlcomputer0029" +spatial +volume 1.0 +} + + +sound "chlcomputer0030" +{ +"sound/cutscenes/chlcomputer0030" +spatial +volume 1.0 +} + + +sound "chlcomputer0031" +{ +"sound/cutscenes/chlcomputer0031" +spatial +volume 1.0 +} + + +sound "chlcomputer0032" +{ +"sound/cutscenes/chlcomputer0032" +spatial +volume 1.0 +} + + +sound "chlcomputer0033" +{ +"sound/cutscenes/chlcomputer0033" +spatial +volume 1.0 +} + + +sound "chlcomputer0034" +{ +"sound/cutscenes/chlcomputer0034" +spatial +volume 1.0 +} + + +sound "chlcomputer0035" +{ +"sound/cutscenes/chlcomputer0035" +spatial +volume 1.0 +} + + +sound "chlcomputer0036" +{ +"sound/cutscenes/chlcomputer0036" +spatial +volume 1.0 +} + + +sound "chlcomputer0037" +{ +"sound/cutscenes/chlcomputer0037" +spatial +volume 1.0 +} + + +sound "chlcomputer0038" +{ +"sound/cutscenes/chlcomputer0038" +spatial +volume 1.0 +} + + +sound "chlcomputer0039" +{ +"sound/cutscenes/chlcomputer0039" +spatial +volume 1.0 +} + + +sound "chlcomputer0040" +{ +"sound/cutscenes/chlcomputer0040" +spatial +volume 1.0 +} + + +sound "chlcomputer0041" +{ +"sound/cutscenes/chlcomputer0041" +spatial +volume 1.0 +} + + +sound "chlcomputer0042" +{ +"sound/cutscenes/chlcomputer0042" +spatial +volume 1.0 +} + + +sound "chlcomputer0043" +{ +"sound/cutscenes/chlcomputer0043" +spatial +volume 1.0 +} + + +sound "chlcomputer0044" +{ +"sound/cutscenes/chlcomputer0044" +spatial +volume 1.0 +} + + +sound "chlcomputer0045" +{ +"sound/cutscenes/chlcomputer0045" +spatial +volume 1.0 +} + + +sound "chlcomputer0046" +{ +"sound/cutscenes/chlcomputer0046" +spatial +volume 1.0 +} + + +sound "chlcomputer0047" +{ +"sound/cutscenes/chlcomputer0047" +spatial +volume 1.0 +} + + +sound "chlcomputer0048" +{ +"sound/cutscenes/chlcomputer0048" +spatial +volume 1.0 +} + + +sound "chlcomputer0049" +{ +"sound/cutscenes/chlcomputer0049" +spatial +volume 1.0 +} + + +sound "chlcomputer0050" +{ +"sound/cutscenes/chlcomputer0050" +spatial +volume 1.0 +} + + +sound "chlcomputer0051" +{ +"sound/cutscenes/chlcomputer0051" +spatial +volume 1.0 +} + + +sound "chlcomputer0052" +{ +"sound/cutscenes/chlcomputer0052" +spatial +volume 1.0 +} + + +sound "chlcomputer0053" +{ +"sound/cutscenes/chlcomputer0053" +spatial +volume 1.0 +} + + +sound "chlcomputer0054" +{ +"sound/cutscenes/chlcomputer0054" +spatial +volume 1.0 +} + + +sound "chlcomputer0055" +{ +"sound/cutscenes/chlcomputer0055" +spatial +volume 1.0 +} + + +sound "chlcomputer0056" +{ +"sound/cutscenes/chlcomputer0056" +spatial +volume 1.0 +} + + +sound "chlcomputer0057" +{ +"sound/cutscenes/chlcomputer0057" +spatial +volume 1.0 +} + + +sound "chlcomputer0058" +{ +"sound/cutscenes/chlcomputer0058" +spatial +volume 1.0 +} + + +sound "chlcomputer0059" +{ +"sound/cutscenes/chlcomputer0059" +spatial +volume 1.0 +} + + +sound "chlcomputer0060" +{ +"sound/cutscenes/chlcomputer0060" +spatial +volume 1.0 +} + + +sound "chlcomputer0061" +{ +"sound/cutscenes/chlcomputer0061" +spatial +volume 1.0 +} + + +sound "chlcomputer0062" +{ +"sound/cutscenes/chlcomputer0062" +spatial +volume 1.0 +} + + +sound "chlcomputer0063" +{ +"sound/cutscenes/chlcomputer0063" +spatial +volume 1.0 +} + + +sound "chlcomputer0064" +{ +"sound/cutscenes/chlcomputer0064" +spatial +volume 1.0 +} + + +sound "chlcomputer0065" +{ +"sound/cutscenes/chlcomputer0065" +spatial +volume 1.0 +} + + +sound "chlcomputer0066" +{ +"sound/cutscenes/chlcomputer0066" +spatial +volume 1.0 +} + + +sound "chlcomputer0067" +{ +"sound/cutscenes/chlcomputer0067" +spatial +volume 1.0 +} + + +sound "chlcomputer0068" +{ +"sound/cutscenes/chlcomputer0068" +spatial +volume 1.0 +} + + +sound "chlcomputer0069" +{ +"sound/cutscenes/chlcomputer0069" +spatial +volume 1.0 +} + + +sound "chlcomputer0070" +{ +"sound/cutscenes/chlcomputer0070" +spatial +volume 1.0 +} + + +sound "chlcomputer0071" +{ +"sound/cutscenes/chlcomputer0071" +spatial +volume 1.0 +} + + +sound "chlcomputer0072" +{ +"sound/cutscenes/chlcomputer0072" +spatial +volume 1.0 +} + +sound "ringtone01" +{ +"sound/effects/ring01" +spatial +volume 1.0 +} diff --git a/Alpha Prime/Rus/ISSkin.dll b/Alpha Prime/Rus/ISSkin.dll new file mode 100644 index 0000000..2580f20 Binary files /dev/null and b/Alpha Prime/Rus/ISSkin.dll differ diff --git a/Alpha Prime/Rus/data03.res b/Alpha Prime/Rus/data03.res new file mode 100644 index 0000000..0906441 Binary files /dev/null and b/Alpha Prime/Rus/data03.res differ diff --git a/Alpha Prime/Rus/skin.cjstyles b/Alpha Prime/Rus/skin.cjstyles new file mode 100644 index 0000000..7ac40ec Binary files /dev/null and b/Alpha Prime/Rus/skin.cjstyles differ diff --git a/Alpha Prime/zip/data.zip.001 b/Alpha Prime/zip/data.zip.001 new file mode 100644 index 0000000..28152d5 Binary files /dev/null and b/Alpha Prime/zip/data.zip.001 differ diff --git a/Alpha Prime/zip/data.zip.002 b/Alpha Prime/zip/data.zip.002 new file mode 100644 index 0000000..10b8515 Binary files /dev/null and b/Alpha Prime/zip/data.zip.002 differ diff --git a/Alpha Prime/zip/data.zip.003 b/Alpha Prime/zip/data.zip.003 new file mode 100644 index 0000000..c424737 Binary files /dev/null and b/Alpha Prime/zip/data.zip.003 differ diff --git a/Alpha Prime/zip/data.zip.004 b/Alpha Prime/zip/data.zip.004 new file mode 100644 index 0000000..705074c Binary files /dev/null and b/Alpha Prime/zip/data.zip.004 differ diff --git a/Alpha-Prime.iss b/Alpha-Prime.iss new file mode 100644 index 0000000..d3deaec --- /dev/null +++ b/Alpha-Prime.iss @@ -0,0 +1,155 @@ +; ИнÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ https://jrsoftware.org/ishelp/index.php + +; Ð’Ñегда менÑÑŽÑ‚ÑÑ +#define GameName "Alpha Prime" ; Ðазвание игры +#define GameNameDash "Alpha-Prime" ; Ðазвание игры без пробелов +#define GameNameEXE "AlphaPrime" ; Ðазвание exe файла игры +#define GameVer "1.3" ; ВерÑÐ¸Ñ Ð¸Ð³Ñ€Ñ‹ +#define GameAppIdSteam "2590" ; Ид игры в Ñтиме +; От Ñитуации завиÑит +#define AppDescription "РуÑификатор текÑта и звука" ; ОпиÑание программы +#define Typ "Russificier" ; Тип Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ +; ПрактичеÑки никогда не менÑетÑÑ +#define AppVer "1.0" ; ВерÑÐ¸Ñ ÑƒÑтановщика +#define Platz "C:\Users\TeMeR\Documents\GitHub" ; МеÑто +; КонÑтанты +#define Copyright "Folk" ; (конÑтант)Копирайт +#define AppPublisher "Russifiers for Humans" ; (конÑтант)Ðазвание инициативы +#define AppPublisherDash "Russifiers-for-Humans" ; (конÑтант)Ðазвание инициативы +#define PublisherURL "https://steamcommunity.com/id/TeMeR55" ; (конÑтант)СÑылка на автора +#define AppURL "https://github.com/" + AppPublisherDash + "/" +GameNameDash + "-" + Typ +"/releases" ; СÑылка на руководÑтво +; Сложные переменные +#define Location Platz + "\" + GameNameDash + "-" + Typ ; МеÑто нахождение ÑоурÑа +#define OriginalNameSetup Typ + "-" + GameNameDash ; Оригинальное наименование Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ +#define AppNameAndDescript GameName + " - " + AppDescription ; Ðазвание программы и опиÑание +#define ProductVerName AppNameAndDescript + " Ð´Ð»Ñ Ð²ÐµÑ€Ñии " + GameVer ; Ðазвание программы Ð´Ð»Ñ ÐºÐ°ÐºÐ¾Ð¹ верÑии игры в ÑиÑтеме + +#define UnArcivProg "7zG.EXE" +#define FolderUnArcivProg "7z" +#define Arciv "data.zip.001" +[Setup] +; Ðомер Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð´Ð»Ñ ÐµÐ³Ð¾ удаление лучше вÑе Ð²Ñ€ÐµÐ¼Ñ Ð½Ðµ забывать разный Ñовать. Проверка уникальный длÑ: Alpha Prime Russificier +AppId={{09A0905D-62FD-4BCE-BE5D-0E6AA12A2AB6} +//--------------------------------------App's information and version--------------------------------------\\ +; СвойÑтва Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ +AppName={#AppNameAndDescript} +AppVersion={#AppVer} +AppVerName={#ProductVerName} +AppCopyright={#Copyright} +AppContact={#PublisherURL} +AppComments={#Typ} +AppPublisher={#AppPublisher} +AppPublisherURL={#PublisherURL} +AppSupportURL={#AppURL} +AppUpdatesURL={#AppURL} +AppReadmeFile={#AppURL} +VersionInfoCompany={#AppPublisher} +VersionInfoCopyright={#Copyright} +VersionInfoDescription={#AppDescription} +VersionInfoOriginalFileName={#OriginalNameSetup} +VersionInfoProductName={#ProductVerName} +VersionInfoProductTextVersion={#AppVer} +VersionInfoVersion={#AppVer} +//--------------------------------------Options--------------------------------------\\ +; ЕÑли уÑтановлено значение «да», программа уÑтановки отобразит флажок «Ðе Ñоздавать папку в меню «ПуÑк» +AllowNoIcons=yes +; Ð˜Ð¼Ñ Ð¿Ð°Ð¿ÐºÐ¸ в меню «ПуÑк» +DefaultGroupName={#AppPublisher} +; Путь по умолчанию +DefaultDirName={code:GetInstallationPath} +; Ðазвание уÑтановщика +OutputBaseFilename={#OriginalNameSetup} +; ЕÑли уÑтановлено значение «нет», отключает уведомление об "СущеÑтвующей папке" +DirExistsWarning=no +; ЕÑли уÑтановлено значение «да», включает уведомление об "Ðе ÑущеÑтвующей папке" +EnableDirDoesntExistWarning=yes +;ЕÑли уÑтановлено значение «нет», включает Ñтраницу "МаÑтер приветÑтвует" +DisableWelcomePage=no +;ЕÑли уÑтановлено значение «нет», включает Ñтраницу "СпаÑибо за уÑтановку" +DisableFinishedPage=no +//--------------------------------------Compression--------------------------------------\\ +;DiskSpanning=true +; Размер в байтах твоего setup1.bin +;DiskSliceSize=314572800 +; Метод ÑÐ¶Ð°Ñ‚Ð¸Ñ +Compression=lzma2/ultra64 +; ЕÑли уÑтановлено значение «да»,включает Ñжатие в один поток(лучше Ñжимает, но проблем больше) +SolidCompression=yes +LZMAUseSeparateProcess=yes +LZMADictionarySize=1048576 +LZMANumFastBytes=273 +//--------------------------------------Files--------------------------------------\\ +; Путь к фалу Лицензии +LicenseFile={#Location}\Licence.rtf +; Путь к фалу ОпиÑание +InfoBeforeFile={#Location}\Description.rtf +;InfoAfterFile=infoafter.txt +; Путь к фалу Иконка +SetupIconFile={#Location}\Icon.ico +; Путь к фалу Сетап +OutputDir={#Location}\ +; Путь к фалу Картинки +WizardImageFile={#Location}\Pic.bmp +; Путь к фалу Картинки +WizardSmallImageFile={#Location}\Pic.bmp + +[Components] +Name: "mod"; Description: "мод Dominus Prime 7.8.2.7"; Types: custom + +[Files] +; РеÑурÑÑ‹ +Source: {#Location}\{#FolderUnArcivProg}\*; DestDir: "{tmp}"; Flags: deleteafterinstall +;Source: {#Location}\{#GameName}\*; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: {#Location}\{#GameName}\Rus\*; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; +Source: {#Location}\{#GameName}\zip\*; DestDir: "{tmp}"; Flags: deleteafterinstall +Source: {#Location}\{#GameName}\mod\*; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: mod +[Icons] +; Ярлык +Name: "{userprograms}\{#AppPublisher}\{#GameName}\{cm:ProgramOnTheWeb,{#ProductVerName}}"; Filename: "{#AppURL}" +; Ярлык +Name: "{userprograms}\{#AppPublisher}\{#GameName}\{cm:UninstallProgram,{#ProductVerName}}"; Filename: "{uninstallexe}" + +[Run] + ;Ðа финальной Ñтраницу Ñпрашивает о запуÑке финального продукта +Filename: "{tmp}\{#UnArcivProg}"; Parameters: "x {tmp}\{#Arciv} -y -o""{app}""" +[UninstallDelete] +Type: files; Name: "{app}\data00.res" + +[Code] +var + InstallationPath: string; + +function GetInstallationPath(Param: string): string; + +begin + { Обнаруженный путь кÑшируетÑÑ, так как он вызываетÑÑ Ð½ÐµÑколько раз } + + if InstallationPath = '' then + begin + if RegQueryStringValue( + HKLM64, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App {#GameAppIdSteam}', + 'InstallLocation', InstallationPath) then + begin + Log('Detected Steam installation: ' + InstallationPath); + end + // Ð´Ð»Ñ Ð³Ð¾Ð³ + // else + //if RegQueryStringValue( + // HKLM32, 'SOFTWARE\GOG.com\Games\1196955511', + // 'path', InstallationPath) then + //begin + // Log('Detected GOG installation: ' + InstallationPath); + //end + else + begin + if IsWin64 then InstallationPath := ExpandConstant('{commonpf64}') + else InstallationPath := ExpandConstant('{commonpf32}'); + InstallationPath:=InstallationPath +'/{#GameName}'; + Log('No installation detected, using the default path: ' + InstallationPath); + end; + end; + Result := InstallationPath; +end; + +[Languages] +Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"; \ No newline at end of file diff --git a/Description.rtf b/Description.rtf new file mode 100644 index 0000000..82a02a5 --- /dev/null +++ b/Description.rtf @@ -0,0 +1,357 @@ +{\rtf1\adeflang1025\ansi\ansicpg1251\uc1\adeff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1049\deflangfe1049\themelang1049\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f2\fbidi \fmodern\fcharset204\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;} +{\f34\fbidi \froman\fcharset204\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset204\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\flomajor\f31500\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fhimajor\f31502\fbidi \fswiss\fcharset204\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fbimajor\f31503\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\flominor\f31504\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fhiminor\f31506\fbidi \fswiss\fcharset204\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f45\fbidi \froman\fcharset0\fprq2 Times New Roman;} +{\f43\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f46\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f47\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f48\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f49\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f50\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f51\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f65\fbidi \fmodern\fcharset0\fprq1 Courier New;} +{\f63\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f66\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f67\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f68\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);} +{\f69\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f70\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f71\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f385\fbidi \froman\fcharset0\fprq2 Cambria Math;} +{\f383\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f386\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f387\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f390\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;} +{\f391\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f415\fbidi \fswiss\fcharset0\fprq2 Calibri;}{\f413\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f416\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;} +{\f417\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f418\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\f419\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f420\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\f421\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\flomajor\f31510\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbmajor\f31520\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31530\fbidi \fswiss\fcharset0\fprq2 Calibri Light;} +{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;} +{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;} +{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31540\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\flominor\f31550\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31560\fbidi \froman\fcharset0\fprq2 Times New Roman;} +{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31570\fbidi \fswiss\fcharset0\fprq2 Calibri;}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);} +{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);} +{\fbiminor\f31580\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128; +\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;\chyperlink\ctint255\cshade255\red5\green99\blue193;\red96\green94\blue92;\red225\green223\blue221;\cfollowedhyperlink\ctint255\cshade255\red149\green79\blue114;}{\*\defchp +\f31506\fs22\lang1049\langfe1033\langfenp1033 }{\*\defpap \ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive +\ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}{\*\cs15 \additive +\rtlch\fcs1 \af0 \ltrch\fcs0 \ul\cf19 \sbasedon10 \sunhideused \styrsid3626830 Hyperlink;}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \cf20\chshdng0\chcfpat0\chcbpat21 \sbasedon10 \ssemihidden \sunhideused \styrsid3626830 Unresolved Mention;}{ +\s17\ql \li720\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0\contextualspace \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 +\sbasedon0 \snext17 \sqformat \spriority34 \styrsid14354919 List Paragraph;}{\*\cs18 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \ul\cf22 \sbasedon10 \ssemihidden \sunhideused \styrsid4349618 FollowedHyperlink;}}{\*\listtable{\list\listtemplateid-1\listhybrid +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 +\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0 +\levelindent0{\leveltext\leveltemplateid-2108099970\'01\'95;}{\levelnumbers;}\loch\af0\hich\af0\dbch\af0\fbias0 \fi-705\li2505\lin2505 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;} +\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid30109507} +{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li720\lin720 }{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid68747277\'01\u-3844 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-2108099970\'01\'95;}{\levelnumbers;}\loch\af0\hich\af0\dbch\af0\fbias0 \fi-705\li2505\lin2505 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747265 +\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 +\fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 } +{\listname ;}\listid516044894}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid68747275\'01\u-3880 ?;}{\levelnumbers;}\f10\fbias0 +\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 +\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267 +\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;} +\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid1270357947}{\list\listtemplateid699988292\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid68747265 +\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 +\fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid2034451717}}{\*\listoverridetable{\listoverride\listid30109507\listoverridecount0\ls1}{\listoverride\listid1270357947\listoverridecount0\ls2} +{\listoverride\listid516044894\listoverridecount0\ls3}{\listoverride\listid2034451717\listoverridecount0\ls4}}{\*\pgptbl {\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0 +\sa0}}{\*\rsidtbl \rsid8831\rsid224109\rsid597949\rsid987817\rsid998770\rsid1051524\rsid1270673\rsid1318002\rsid1601567\rsid1645456\rsid2111891\rsid2172468\rsid2308756\rsid2431466\rsid3215954\rsid3233162\rsid3357078\rsid3626830\rsid4223707\rsid4349618 +\rsid4395433\rsid4656146\rsid5471613\rsid5788035\rsid6111719\rsid6580838\rsid7103820\rsid7632055\rsid8405622\rsid9310919\rsid9371921\rsid9701231\rsid9965380\rsid9974117\rsid10443381\rsid10562742\rsid10570932\rsid10770800\rsid10975515\rsid11680636 +\rsid11739446\rsid12148247\rsid12217139\rsid12270666\rsid12321203\rsid12797372\rsid12859273\rsid12938869\rsid13063051\rsid13072254\rsid13114517\rsid13257270\rsid13389345\rsid13589814\rsid14104063\rsid14319131\rsid14354919\rsid14486487\rsid14569459 +\rsid14885992\rsid14897730\rsid14899543\rsid14942821\rsid15008283\rsid15159251\rsid15348066\rsid15617117\rsid16648109}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info +{\author TeMeR}{\operator Vad Temer}{\creatim\yr2022\mo2\dy14\hr17\min38}{\revtim\yr2023\mo8\dy5\hr23\min36}{\version30}{\edmins169}{\nofpages2}{\nofwords543}{\nofchars3099}{\nofcharsws3635}{\vern31}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/offi +ce/word/2003/wordml}}\paperw11906\paperh16838\margl1701\margr850\margt1134\margb1134\gutter0\ltrsect +\deftab708\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1 +\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1134\dghshow1\dgvshow1 +\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct +\asianbrkrule\rsidroot6580838\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0 +{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2 +\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\qc \fi-227\li227\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin227\itap0\pararsid14319131 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 {\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\fs32\lang1033\langfe1033\langnp1033\insrsid5471613\charrsid5471613 {\*\bkmkstart _Hlk93961743}{\*\bkmkstart _Hlk93961703}{\*\bkmkstart _Hlk93961680}Alpha}{ +\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\fs32\insrsid1270673\charrsid1270673 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\fs32\lang1033\langfe1033\langnp1033\insrsid5471613\charrsid5471613 Prime}{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\fs32\insrsid5471613\charrsid12859273 + +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid14319131\charrsid14319131 \'d0\'f3\'f1\'e8\'f4\'e8\'ea\'e0\'f2\'ee\'f0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid14319131\charrsid13072254 }{\rtlch\fcs1 \af0 \ltrch\fcs0 +\f0\fs20\insrsid14319131\charrsid14319131 \'f2\'e5\'ea\'f1\'f2\'e0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid987817 \'e8 \'e7\'e2\'f3\'ea\'e0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid14319131\charrsid13072254 +\par }\pard \ltrpar\qj \li0\ri0\sb20\sa20\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12148247 {\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\fs24\ul\insrsid10975515\charrsid9371921 \'d2\'f0\'e5\'e1\'ee\'e2\'e0\'ed\'e8\'ff}{ +\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs28\ul\insrsid10975515\charrsid14319131 : +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\insrsid224109\charrsid14319131 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\insrsid10975515\charrsid9371921 \'cb\'e8\'f6\'e5\'ed\'e7\'e8\'ff}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid10975515\charrsid4349618 }{ +\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\lang1033\langfe1033\langnp1033\insrsid10975515\charrsid13589814 Steam}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid13589814\charrsid4349618 :}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13589814\charrsid4349618 } +{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid5471613 HYPERLINK "https://store.steampowered.com/app/2590/Alpha_Prime/"}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid5471613 {\*\datafield +00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b82000000680074007400700073003a002f002f00730074006f00720065002e0073007400650061006d0070006f00770065007200650064002e0063006f006d002f006100700070002f0032003500390030002f004100 +6c007000680061005f005000720069006d0065002f000000795881f43b1d7f48af2c825dc485276300000000a5ab00030000}}}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \cs15\f0\fs24\ul\cf19\insrsid5471613 Alpha}{\rtlch\fcs1 \af0 \ltrch\fcs0 +\cs15\f0\fs24\ul\cf19\insrsid1270673\charrsid1270673 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \cs15\f0\fs24\ul\cf19\insrsid5471613 Prime}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0 +\ltrch\fcs0 \f0\fs24\insrsid5788035\charrsid11739446 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid2308756\charrsid2308756 (}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid5788035 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid2308756 \'f2\'ee\'eb\'fc +\'ea\'ee \'e4\'eb\'ff \'e2\'e0\'f8\'e5\'e3\'ee \'f3\'e4\'ee\'e1\'f1\'f2\'e2\'e0, \'f7\'f2\'ee\'e1\'fb \'f3\'f1\'f2\'e0\'ed\'ee\'e2\'f9\'e8\'ea \'ef\'ee\'ed\'ff\'eb, \'ea\'f3\'e4\'e0 \'e2\'f1\'e5 \'ef\'f0\'e0\'e2\'e8\'eb\'fc\'ed\'ee \'ea\'e8\'e4\'e0\'f2 +\'fc}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid5788035 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid2308756 )}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid15617117\charrsid2308756 +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\fs24\ul\insrsid10975515\charrsid9371921 {\*\bkmkstart _Hlk93961754}\'d3\'f1\'f2\'e0\'ed\'ee\'e2\'ea\'e0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid10975515\charrsid9371921 : +\par }\pard \ltrpar\qj \li0\ri0\sb20\sa20\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12859273 {\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid224109 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid10975515\charrsid9371921 \'d1\'eb +\'e5\'e4\'f3\'e9\'f2\'e5 \'e8\'ed\'f1\'f2\'f0\'f3\'ea\'f6\'e8\'ff\'ec }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid10770800 \'f3\'f1\'f2\'e0\'ed\'ee\'e2\'f9\'e8\'ea\'e0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid10975515\charrsid9371921 .}{\rtlch\fcs1 \af0 +\ltrch\fcs0 \f0\insrsid12859273\charrsid12859273 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid12859273 \'d3\'f1\'f2\'e0\'ed\'ee\'e2\'ea\'e0 \'ef\'ee\'eb\'ed\'ee\'f1\'f2\'fc\'fe \'e0\'e2\'f2\'ee\'ec\'e0\'f2\'e8\'f7\'e5\'f1\'ea\'e0\'ff, \'f1 \'e2\'ee\'e7\'ec +\'ee\'e6\'ed\'ee\'f1\'f2\'fc\'fe \'e2\'fb\'e1\'ee\'f0\'e0 \'e4\'ee\'ef\'ee\'eb\'ed\'e8\'f2\'e5\'eb\'fc\'ed\'ee\'e3\'ee \'e0\'f1\'ef\'e5\'ea\'f2\'e0 \'ea\'e0\'ea: +\par {\listtext\pard\plain\ltrpar \s17 \rtlch\fcs1 \af0\afs22 \ltrch\fcs0 \f3\fs22\insrsid12859273 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard\plain \ltrpar +\s17\qj \fi-360\li720\ri0\sb20\sa20\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin720\itap0\pararsid12859273\contextualspace \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 {\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid12859273 \'cc\'ee\'e4 }{\field{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\lang1033\langfe1033\langnp1033\insrsid12859273 + HYPERLINK "https://www.moddb.com/mods/alpha-prime-dominus-prime/downloads/alpha-prime-dominus-prime-v75" }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\lang1033\langfe1033\langnp1033\insrsid12859273 {\*\datafield +00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90bd2000000680074007400700073003a002f002f007700770077002e006d006f006400640062002e0063006f006d002f006d006f00640073002f0061006c007000680061002d007000720069006d0065002d0064006f00 +6d0069006e00750073002d007000720069006d0065002f0064006f0077006e006c006f006100640073002f0061006c007000680061002d007000720069006d0065002d0064006f006d0069006e00750073002d007000720069006d0065002d007600370035000000795881f43b1d7f48af2c825dc485276300000000a5ab00 +0300}}}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \cs15\f0\ul\cf19\lang1033\langfe1033\langnp1033\insrsid12859273\charrsid12859273 Dominus Prime}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj { +\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid14354919\charrsid12859273 +\par }\pard\plain \ltrpar\qj \li0\ri0\sb20\sa20\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12859273 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 {\rtlch\fcs1 +\af0 \ltrch\fcs0 \f0\insrsid12859273 +\par \'c8\'e7\'ec\'e5\'ed\'e5\'ed\'e8\'ff \'e2 \'ec\'ee\'e4\'e5}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid12859273\charrsid12859273 : +\par - \'e7\'e4\'ee\'f0\'ee\'e2\'fc\'e5 \'e2\'f0\'e0\'e3\'ee\'e2 \'f3\'e2\'e5\'eb\'e8\'f7\'e5\'ed\'ee (\'ef\'ee\'f7\'f2\'e8 \'e4\'ee \'ef\'f0\'ee\'ef\'e0\'f2\'f7\'e5\'ed\'ed\'ee\'e3\'ee \'f1\'ee\'f1\'f2\'ee\'ff\'ed\'e8\'ff, \'ed\'e5\'ea\'ee\'f2\'ee\'f0\'fb\'e5 + \'e4\'e0\'e6\'e5 \'e1\'ee\'eb\'fc\'f8\'e5) +\par -\'eb\'f3\'f7\'f8\'e8\'e9 \'c8\'c8 \'e2\'f0\'e0\'e3\'ee\'e2 (\'f0\'e5\'e0\'e3\'e8\'f0\'f3\'fe\'f2 \'e1\'fb\'f1\'f2\'f0\'e5\'e5, \'e1\'e5\'e3\'e0\'fe\'f2 \'e1\'fb\'f1\'f2\'f0\'e5\'e5, \'f3\'ec\'ed\'e5\'e5 \'e8 \'e0\'e3\'f0\'e5\'f1\'f1\'e8\'e2\'ed\'e5\'e5) + +\par - \'e1\'ee\'eb\'fc\'f8\'e5 \'ed\'e5\'f2 \'e2\'f0\'e0\'e3\'e0-\'f6\'e5\'eb\'e8\'f2\'e5\'eb\'ff (\'f2\'ee\'f7\'ed\'ee\'f1\'f2\'fc \'e2\'f0\'e0\'e3\'e0 \'e8\'e7\'ec\'e5\'ed\'e5\'ed\'e0) +\par - \'c0\'f2\'e0\'ea\'e0 \'e2\'f0\'e0\'e3\'e0 \'e2 \'e1\'eb\'e8\'e6\'ed\'e5\'ec \'e1\'ee\'fe \'f2\'e5\'ef\'e5\'f0\'fc \'e1\'fc\'e5\'f2 \'f1\'e8\'eb\'fc\'ed\'e5\'e5 \'e8 \'e1\'fb\'f1\'f2\'f0\'e5\'e5 +\par - \'f3 \'e2\'f0\'e0\'e3\'e0 \'f0\'e0\'e7\'ed\'ee\'e5 \'ee\'f0\'f3\'e6\'e8\'e5 (\'ed\'e5\'ea\'ee\'f2\'ee\'f0\'fb\'e5 \'f3\'f0\'ee\'e2\'ed\'e8 \'e1\'f3\'e4\'f3\'f2 \'e4\'ee\'e2\'ee\'eb\'fc\'ed\'ee \'ed\'e0\'ef\'f0\'ff\'e6\'e5\'ed\'ed\'fb\'ec\'e8 ;)) +\par - \'e7\'e4\'ee\'f0\'ee\'e2\'fc\'e5 \'e8\'e3\'f0\'ee\'ea\'e0 \'ed\'e5\'ec\'ed\'ee\'e3\'ee \'f3\'e2\'e5\'eb\'e8\'f7\'e8\'eb\'ee\'f1\'fc (\'ef\'f0\'e8\'ec\'e5\'f0\'ed\'ee \'ed\'e0 3~4 \'ef\'f0\'ee\'f6\'e5\'ed\'f2\'e0) +\par - \'cc\'e5\'e4\'e8\'f6\'e8\'ed\'f1\'ea\'e8\'e5 \'ef\'f3\'ed\'ea\'f2\'fb \'e8 \'e0\'ef\'f2\'e5\'f7\'ea\'e8 \'f2\'e5\'ef\'e5\'f0\'fc \'e8\'ec\'e5\'fe\'f2 \'e1\'ee\'eb\'fc\'f8\'e5 \'ef\'f0\'e8\'ef\'e0\'f1\'ee\'e2 +\par - \'e8\'e3\'f0\'ee\'ea \'f2\'e5\'ef\'e5\'f0\'fc \'e4\'e2\'e8\'e3\'e0\'e5\'f2\'f1\'ff \'cd\'c0\'cc\'cd\'ce\'c3\'ce \'ef\'eb\'e0\'e2\'ed\'e5\'e5 \'e4\'e0\'e6\'e5 \'ef\'f0\'e8 \'ef\'f0\'e8\'f6\'e5\'eb\'e8\'e2\'e0\'ed\'e8\'e8 (\'e1\'ee\'eb\'fc\'f8\'e5 \'ed +\'e5 \'f5\'ee\'e4\'e8\'f2\'fc \'f1 \'ef\'f0\'ee\'ec\'e0\'f5\'ee\'ec XD) +\par - \'fd\'ed\'e5\'f0\'e3\'e8\'ff \'e7\'e0\'ec\'e5\'e4\'eb\'e5\'ed\'e8\'ff \'e8\'e3\'f0\'ee\'ea\'e0 \'ef\'ee\'eb\'f3\'f7\'e0\'e5\'f2 \'f1\'e0\'ec\'ee\'e2\'ee\'f1\'f1\'f2\'e0\'ed\'ee\'e2\'eb\'e5\'ed\'e8\'e5, \'ef\'ee\'ea\'e0: +\par 1. \'f0\'e5\'e3\'e5\'ed\'e5\'f0\'e8\'f0\'ee\'e2\'e0\'f2\'fc \'f2\'ee\'eb\'fc\'ea\'ee \'e4\'ee 14%, \'ea\'ee\'e3\'e4\'e0 \'ed\'e8\'e6\'e5 +\par 2. \'f0\'e5\'e3\'e5\'ed \'f2\'ee\'eb\'fc\'ea\'ee \'ea\'ee\'e3\'e4\'e0 \'e8\'e3\'f0\'ee\'ea \'ed\'e5 \'e4\'e2\'e8\'e3\'e0\'e5\'f2\'f1\'ff +\par 3. \'d0\'e5\'e3\'e5\'ed\'e5\'f0\'e0\'f6\'e8\'ff \'e1\'fb\'f1\'f2\'f0\'e5\'e5 \'ef\'f0\'e8 \'ef\'f0\'e8\'f1\'e5\'e4\'e0\'ed\'e8\'e8 +\par 4.\'ed\'e0\'ec\'ed\'ee\'e3\'ee \'ec\'e5\'e4\'eb\'e5\'ed\'ed\'e5\'e5 \'ef\'f0\'e8 \'ed\'e0\'ea\'eb\'ee\'ed\'e5 +\par -slow-mo \'f2\'e5\'ef\'e5\'f0\'fc "\'ec\'e5\'e4\'eb\'e5\'ed\'ed\'e5\'e5" (40% -> 64%) +\par -slow-mo \'cd\'c5 \'ef\'ee\'e2\'eb\'e8\'ff\'e5\'f2 (\'e7\'e0\'ec\'e5\'e4\'eb\'e8\'f2) \'e2\'e0\'f8\'f3 \'ec\'fb\'f8\'fc, \'e0 \'f2\'e0\'ea\'e6\'e5 \'e2\'e0\'f8\'e5 \'e4\'e2\'e8\'e6\'e5\'ed\'e8\'e5 \'e8 \'f1\'ea\'ee\'f0\'ee\'f1\'f2\'fc \'ef\'f0\'e8\'f6\'e5 +\'eb\'e8\'e2\'e0\'ed\'e8\'ff \'e1\'f3\'e4\'f3\'f2 \'e1\'ee\'eb\'e5\'e5 \'ef\'eb\'e0\'e2\'ed\'fb\'ec\'e8 +\par -\'ee\'e1\'f9\'e0\'ff \'e5\'ec\'ea\'ee\'f1\'f2\'fc \'e7\'e0\'ec\'e5\'e4\'eb\'e5\'ed\'ed\'ee\'e9 \'f1\'fa\'e5\'ec\'ea\'e8 \'f3\'e2\'e5\'eb\'e8\'f7\'e5\'ed\'e0 +\par - \'e2\'fb\'f1\'ee\'f2\'e0 \'ef\'f0\'fb\'e6\'ea\'e0 \'e8\'e3\'f0\'ee\'ea\'e0 \'f3\'ec\'e5\'ed\'fc\'f8\'e5\'ed\'e0 +\par - \'f1\'ea\'ee\'f0\'ee\'f1\'f2\'fc \'ef\'f0\'e8\'f6\'e5\'eb\'e8\'e2\'e0\'ed\'e8\'ff \'e8\'e3\'f0\'ee\'ea\'e0 \'f3\'e2\'e5\'eb\'e8\'f7\'e5\'ed\'e0 +\par -\'f3\'e2\'e5\'eb\'e8\'f7\'e5\'ed\'fb \'ee\'f2\'e4\'e0\'f7\'e0 \'e8 \'f2\'ee\'f7\'ed\'ee\'f1\'f2\'fc \'ee\'f0\'f3\'e6\'e8\'ff (\'f1\'f2\'f0\'e5\'eb\'ff\'e9\'f2\'e5 \'f1 \'f3\'ec\'ee\'ec) +\par - \'ee\'e1\'f9\'e8\'e9 \'f3\'f0\'ee\'ed \'ee\'f2 \'ee\'f0\'f3\'e6\'e8\'ff \'f3\'ec\'e5\'ed\'fc\'f8\'e8\'eb\'f1\'ff (\'ea\'f0\'ee\'ec\'e5 \'ec\'ee\'eb\'ee\'f2\'e0 \'e8 \'ee\'e3\'ed\'e5\'ec\'e5\'f2\'e0), \'ed\'ee \'ec\'e5\'f1\'f2\'e0 \'ef\'ee\'ef\'e0\'e4 +\'e0\'ed\'e8\'ff \'f1\'f2\'e0\'eb\'e8 \'ed\'e0\'ec\'ed\'ee\'e3\'ee \'e1\'ee\'eb\'e5\'e5 \'f0\'e0\'e7\'f3\'ec\'ed\'fb\'ec\'e8 +\par -\'ee\'e3\'ed\'e5\'ec\'e5\'f2 \'f2\'e5\'ef\'e5\'f0\'fc \'ee\'f7\'e5\'ed\'fc \'ef\'ee\'eb\'e5\'e7\'e5\'ed: +\par 1.\'c4\'ee\'e1\'e0\'e2\'e8\'f2\'fc \'e0\'f2\'f0\'e8\'e1\'f3\'f2 \'ec\'ee\'f0\'e0\'eb\'fc\'ed\'ee\'e3\'ee \'f3\'f0\'ee\'ed\'e0 \'ee\'e7\'ed\'e0\'f7\'e0\'e5\'f2, \'f7\'f2\'ee \'f2\'e5\'ef\'e5\'f0\'fc \'e2\'fb \'ec\'ee\'e6\'e5\'f2\'e5 \'ee\'f2\'ef\'f3\'e3 +\'e8\'e2\'e0\'f2\'fc \'e8\'ec \'e2\'f0\'e0\'e3\'ee\'e2 (\'e8 \'e4\'ee\'e2\'ee\'eb\'fc\'ed\'ee \'eb\'e5\'e3\'ea\'ee) +\par 2.\'ea\'ee\'ed\'f3\'f1 \'ef\'eb\'e0\'ec\'e5\'ed\'e8 \'f8\'e8\'f0\'e5 (\'e3\'ee\'f0\'e8\'f2\'e5 \'e1\'ee\'eb\'fc\'f8\'e5) +\par 3.\'ed\'e5\'ec\'ed\'ee\'e3\'ee \'f3\'e2\'e5\'eb\'e8\'f7\'e8\'eb\'f1\'ff \'f3\'f0\'ee\'ed \'e8 \'e4\'e8\'f1\'f2\'e0\'ed\'f6\'e8\'ff (\'ed\'ee \'e8 \'ef\'f0\'ee\'f2\'e8\'e2\'ed\'e8\'ea \'f2\'ee\'e6\'e5!!!) +\par 4. \'d0\'ee\'e1\'ee\'f2 \'f2\'e5\'ef\'e5\'f0\'fc \'e1\'f3\'e4\'e5\'f2 \'ed\'e0\'ef\'f3\'e3\'e0\'ed \'e8 \'ef\'f0\'e5\'f0\'e2\'e0\'ed \'ee\'e3\'ed\'e5\'ec\'e5\'f2\'ee\'ec (\'ed\'ee \'e2\'f1\'e5 \'e5\'f9\'e5 \'ed\'e5 \'ef\'ee\'eb\'f3\'f7\'e0\'e5\'f2 \'f3 +\'f0\'ee\'ed\'e0, \'f2\'e0\'ea \'f7\'f2\'ee \'e1\'f3\'e4\'fc\'f2\'e5 \'ee\'f1\'f2\'ee\'f0\'ee\'e6\'ed\'fb!!!) +\par - \'f3\'e2\'e5\'eb\'e8\'f7\'e5\'ed \'ec\'e0\'e3\'e0\'e7\'e8\'ed \'ef\'e0\'f2\'f0\'ee\'ed\'ee\'e2 \'e4\'eb\'ff \'f8\'f2\'f3\'f0\'ec\'ee\'e2\'ee\'e9 \'e2\'e8\'ed\'f2\'ee\'e2\'ea\'e8 (28 -> 32) +\par - \'f3\'e2\'e5\'eb\'e8\'f7\'e5\'ed \'ec\'e0\'e3\'e0\'e7\'e8\'ed \'ef\'e0\'f2\'f0\'ee\'ed\'ee\'e2 (?) \'e4\'eb\'ff \'f0\'e0\'ea\'e5\'f2\'ed\'e8\'f6\'fb (1 -> 2) +\par - \'ed\'e0\'f1\'f2\'f0\'ee\'e8\'f2\'fc FOV \'f1\'ed\'e0\'e9\'ef\'e5\'f0\'f1\'ea\'ee\'e9 \'e2\'e8\'ed\'f2\'ee\'e2\'ea\'e8 +\par +\par \'dd\'f4\'f4\'e5\'ea\'f2\'fb: +\par -\'f1\'f2\'f0\'e5\'eb\'fc\'e1\'e0 \'ef\'ee \'ee\'e1\'fa\'e5\'ea\'f2\'e0\'ec \'ef\'f0\'ee\'e8\'e7\'e2\'ee\'e4\'e8\'f2 \'e1\'ee\'eb\'fc\'f8\'e5 \'e4\'fb\'ec\'e0 \'e8 \'f2\'e5\'ef\'e5\'f0\'fc \'ee\'ed\'e8 \'e4\'eb\'ff\'f2\'f1\'ff \'e4\'ee\'eb\'fc\'f8\'e5 ( +\'ea\'e0\'ea \'e2 F.E.A.R.) +\par - \'e1\'ee\'eb\'fc\'f8\'e5 \'fd\'f4\'f4\'e5\'ea\'f2\'e0 \'ea\'f0\'ee\'e2\'e8 (\'e8 \'e4\'e0, \'ee\'ed\'e8 \'f2\'ee\'e6\'e5 \'e4\'eb\'ff\'f2\'f1\'ff \'e4\'ee\'eb\'fc\'f8\'e5) +\par - \'e2\'ea\'eb\'fe\'f7\'e8\'f2\'fc \'ab\'ed\'e5\'ea\'ee\'f2\'ee\'f0\'fb\'e5\'bb \'e2\'ed\'f3\'f2\'f0\'e8\'e8\'e3\'f0\'ee\'e2\'fb\'e5 \'fd\'f4\'f4\'e5\'ea\'f2\'fb PhysX, \'ea\'ee\'f2\'ee\'f0\'fb\'e5 \'e2\'e0\'ec \'ed\'e5 \'ed\'f3\'e6\'ed\'fb \'e4\'eb\'ff +\'ef\'ee\'ea\'f3\'ef\'ea\'e8 PPU (\'e4\'e0, \'fd\'f2\'ee \'e2\'e0\'f0\'e8\'e0\'ed\'f2 \'f2\'ee\'eb\'fc\'ea\'ee PPU, \'e0 \'ea\'e0\'f0\'f2\'fb nvidia \'ed\'e5 \'ef\'ee\'e4\'e4\'e5\'f0\'e6\'e8\'e2\'e0\'fe\'f2 shxt, \'ff \'f2\'e5\'f1\'f2\'e8\'f0\'ee\'e2\'e0 +\'eb): +\par 1. \'e4\'e8\'ed\'e0\'ec\'e8\'f7\'e5\'f1\'ea\'e8\'e5 \'ee\'e1\'eb\'ee\'ec\'ea\'e8 \'ef\'f0\'e8 \'e2\'e7\'f0\'fb\'e2\'e5 +\par 2. \'d1\'f2\'e5\'ea\'eb\'ee PhysX +\par 3. \'c6\'e8\'e4\'ea\'ee\'f1\'f2\'fc PhysX +\par 4. \'ed\'ee\'e2\'fb\'e9 \'fd\'f4\'f4\'e5\'ea\'f2 \'ea\'e0\'ef\'e0\'fe\'f9\'e5\'e9 \'ea\'f0\'ee\'e2\'e8 :) +\par 5.\'e4\'e8\'ed\'e0\'ec\'e8\'f7\'e5\'f1\'ea\'e8\'e9 \'fd\'f4\'f4\'e5\'ea\'f2 \'f7\'e0\'f1\'f2\'e8\'f6 +\par 6.\'e8 \'ec\'ed\'ee\'e3\'ee\'e5 \'e4\'f0\'f3\'e3\'ee\'e5 \'ff \'e4\'e0\'e6\'e5 \'ed\'e5 \'ef\'ee\'ed\'e8\'ec\'e0\'fe XD +\par -\'ed\'e5\'ea\'ee\'f2\'ee\'f0\'ee\'e5 \'ee\'f0\'f3\'e6\'e8\'e5 \'e8\'e7\'ec\'e5\'ed\'e5\'ed\'ee (\'ed\'e0\'ef\'f0\'e8\'ec\'e5\'f0, \'f8\'f2\'f3\'f0\'ec\'ee\'e2\'e0\'ff \'e2\'e8\'ed\'f2\'ee\'e2\'ea\'e0 \'f2\'e5\'ef\'e5\'f0\'fc \'f1\'f2\'f0\'e5\'eb\'ff\'e5 +\'f2 \'eb\'e0\'e7\'e5\'f0\'ee\'ec XD) +\par - \'ed\'e5\'ea\'ee\'f2\'ee\'f0\'fb\'e5 \'fd\'f4\'f4\'e5\'ea\'f2\'fb \'e1\'f3\'e4\'f3\'f2 \'ec\'e5\'ed\'ff\'f2\'fc\'f1\'ff \'ef\'f0\'e8 \'e2\'ea\'eb\'fe\'f7\'e5\'ed\'e8\'e8 \'f1\'eb\'ee\'f3-\'ec\'ee +\par -\'e4\'ee\'e1\'e0\'e2\'eb\'e5\'ed\'fb/\'e8\'e7\'ec\'e5\'ed\'e5\'ed\'fb \'ed\'e5\'ea\'ee\'f2\'ee\'f0\'fb\'e5 \'ee\'f0\'e8\'e3\'e8\'ed\'e0\'eb\'fc\'ed\'fb\'e5 \'fd\'f4\'f4\'e5\'ea\'f2\'fb \'f7\'e0\'f1\'f2\'e8\'f6 +\par +\par \'c3\'f0\'e0\'f4\'e8\'ea\'e0: +\par -\'e2\'ee\'f1\'f1\'f2\'e0\'ed\'ee\'e2\'e8\'f2\'fc \'e2\'f1\'e5 \'ed\'e5\'e4\'ee\'f1\'f2\'e0\'fe\'f9\'e8\'e5 \'e4\'e8\'ed\'e0\'ec\'e8\'f7\'e5\'f1\'ea\'e8\'e5 \'f2\'e5\'ed\'e8 (\'e4\'e0\'e6\'e5 \'e1\'f0\'ee\'f8\'e5\'ed\'ed\'e0\'ff \'e2\'e0\'ec\'e8 \'e3\'f0 +\'e0\'ed\'e0\'f2\'e0 \'f2\'e5\'ef\'e5\'f0\'fc \'e8\'ec\'e5\'e5\'f2 \'f2\'e5\'ed\'fc) +\par - \'e1\'ee\'eb\'e5\'e5 \'f7\'e5\'f2\'ea\'e8\'e5 \'f2\'e5\'ed\'e8 +\par -\'eb\'f3\'f7\'f8\'e5\'e5 \'ee\'f1\'e2\'e5\'f9\'e5\'ed\'e8\'e5 +\par - \'ed\'e5\'ea\'ee\'f2\'ee\'f0\'fb\'e5 \'e2\'ed\'f3\'f2\'f0\'e8\'e8\'e3\'f0\'ee\'e2\'fb\'e5 \'ea\'e0\'f0\'f2\'fb \'f2\'e5\'ef\'e5\'f0\'fc \'eb\'f3\'f7\'f8\'e5 +\par +\par \'c4\'f0\'f3\'e3\'ee\'e9: +\par - \'e8\'f1\'ef\'f0\'e0\'e2\'eb\'e5\'ed/\'f3\'eb\'f3\'f7\'f8\'e5\'ed \'ee\'e1\'f9\'e8\'e9 \'fd\'f4\'f4\'e5\'ea\'f2 \'f2\'f0\'ff\'ef\'e8\'f7\'ed\'ee\'e9 \'ea\'f3\'ea\'eb\'fb (\'e1\'ee\'eb\'fc\'f8\'e5 \'ed\'e5\'f2 \'f1\'e8\'e4\'ff\'f9\'e5\'e3\'ee \'f2\'f0 +\'f3\'ef\'e0, \'e8, \'ed\'e0\'ea\'ee\'ed\'e5\'f6, \'e2\'fb \'ec\'ee\'e6\'e5\'f2\'e5 \'e2\'e7\'ee\'f0\'e2\'e0\'f2\'fc \'f1\'e2\'ee\'e5\'e3\'ee \'e2\'f0\'e0\'e3\'e0 \'e8\'e7 \'e4\'f0\'ee\'e1\'ee\'e2\'e8\'ea\'e0!) +\par -\'e1\'ee\'eb\'e5\'e5 \'f0\'e5\'e0\'eb\'e8\'f1\'f2\'e8\'f7\'ed\'fb\'e9 \'f4\'e8\'e7\'e8\'f7\'e5\'f1\'ea\'e8\'e9 \'fd\'f4\'f4\'e5\'ea\'f2 +\par -\'f2\'e5\'ef\'e5\'f0\'fc \'f0\'ee\'e1\'ee\'f2 \'e1\'f3\'e4\'e5\'f2 \'f1\'e8\'ec\'f3\'eb\'e8\'f0\'ee\'e2\'e0\'f2\'fc \'f1\'ec\'e5\'f0\'f2\'fc, \'f7\'f2\'ee\'e1\'fb \'f1\'ef\'f0\'ff\'f2\'e0\'f2\'fc \'f1\'e2\'ee\'e5 \'ee\'f0\'f3\'e6\'e8\'e5 :)}{\rtlch\fcs1 +\af0 \ltrch\fcs0 \f0\insrsid12859273 +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid12859273\charrsid12859273 +\par }\pard \ltrpar\qj \li0\ri0\sb20\sa20\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12148247 {\rtlch\fcs1 \af0 \ltrch\fcs0 \b\f0\fs24\ul\insrsid10975515\charrsid9371921 {\*\bkmkend _Hlk93961743}\'d3\'e4\'e0\'eb\'e5\'ed +\'e8\'e5}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs24\insrsid10975515\charrsid9371921 :}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid10975515\charrsid15617117 +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid224109 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid10975515\charrsid9371921 \'c7\'e0\'e9\'e4\'e8\'f2\'e5 \'e2 \'e4\'e8\'f0\'e5\'ea\'f2\'ee\'f0\'e8\'fe \'e8\'e3\'f0\'fb \'e8 \'e7\'e0\'ef\'f3\'f1\'f2\'e8\'f2\'e5 +\'f4\'e0\'e9\'eb }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\lang1033\langfe1033\langnp1033\insrsid1318002\charrsid1318002 unins}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid1318002\charrsid1318002 ***}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid10975515\charrsid9371921 +.exe.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid15617117 +\par _________________________________________________ +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid12148247 {\*\bkmkend _Hlk93961703} +\par }{\field{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid9974117 HYPERLINK "https://steamcommunity.com/id/TeMeR55" }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid9974117 {\*\datafield +00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b64000000680074007400700073003a002f002f0073007400650061006d0063006f006d006d0075006e006900740079002e0063006f006d002f00690064002f00540065004d0065005200350035000000795881f43b1d +7f48af2c825dc485276300000000a5ab000308000074000000b8030800ff000090007cffa42c000000d0000000000074815c00}}}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \cs15\f0\fs20\ul\cf19\insrsid9974117\charrsid9974117 \'d7}{\rtlch\fcs1 \af0 \ltrch\fcs0 +\cs15\f0\fs20\ul\cf19\insrsid10975515\charrsid9974117 \'e5\'eb\'ee\'e2\'e5\'ea}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid10975515\charrsid14486487 , +\'ea\'ee\'f2\'ee\'f0\'fb\'e9 \'f3\'e4\'e5\'eb\'e8\'eb \'e2\'f0\'e5\'ec\'ff \'e8 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid9974117 \'f1\'e4\'e5\'eb\'e0\'eb}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid10975515\charrsid14486487 \'e4\'eb\'ff \'e2\'e0 +\'f1 \'f3\'e4\'ee\'e1\'ed\'fb\'e9 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid15008283 \'ef\'e0\'ea}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid9974117\charrsid9974117 .}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\fs20\insrsid15617117\charrsid9974117 +{\*\bkmkend _Hlk93961680}{\*\bkmkend _Hlk93961754} +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100507a8df2be070000fc200000160000007468656d652f7468656d652f +7468656d65312e786d6cec595f8f1bb7117f2f90efb0d87759ff76f5e760399056922ff69d6d58b2833cf2246a973eee5258527716020381f39497040192a00f +0dd0f6a50f41d103ea2241d1a05fe1f2190cd868d30fd12177a52525cabe3bb88051dc1d70b74bfd66f8e3cc706644defcf0694c9d139c72c2928e5bbd51711d +9c4cd8942461c77d341e965aaec3054aa688b20477dc25e6ee87b73ef8cd4db427221c6307e413be873a6e24c47caf5ce6131846fc069be3043e9bb13446025e +d3b03c4dd129e88d69b956a934ca312289eb242806b5e77f3cffdbf93fcecf9cfbb3199960f7d64aff80c22489e0726042d391d48e57427ff8e5f9f9d9f9cfe7 +2fcecf7ef90c9e7f86ff5f29d9e971554af0250f68ea9c20da7161ea293b1de3a7c27528e2023ee8b815f5e3966fdd2ca3bd5c888a1db29adc50fde472b9c0f4 +b8a6e64cc3a3f5a49ee77b8dee5abf0250b18d1b34078d4163ad4f01d064022bcfb8983a9bb5c0cbb11a287bb4e8ee37fbf5aa81d7f4d7b738777df96be01528 +d3ef6de187c300ac68e01528c3fb5b78bfd7eef54dfd0a94e11b5bf866a5dbf79a867e058a28498eb7d015bf510f56ab5d43668cee5be16ddf1b366bb9f20205 +d1b08e3639c58c25e2a2b117a3272c1d828014a44890c411cb399ea109047a8028394a897340c20802718e12c661b852ab0c2b75f82b7f3df5a43c8cf630d2a4 +254f60c6b786243f874f5232171df70e687535c8ab9f7e7af9fcc5cbe73fbefcfcf397cfff92cfad541972fb280975b95ffff4f57fbeffccf9f75f7fffeb37df +66536fe2b98e7ffde72f5efffd9f6f520f2b2e4cf1eabbb3d72fce5efdf6cb7ffdf08d457b3745473a7c4c62cc9d7bf8d479c86258a0853f3e4a2f27318e10d1 +25ba49c85182e42c16fd031119e87b4b449105d7c3a61d1fa7907a6cc0db8b2706e151942e04b168bc1bc506f09031da63a9d50a77e55c9a99c78b24b44f9e2e +74dc43844e6c73072831bc3c58cc2107139bca20c206cd071425028538c1c2919fb1638c2dabfb8410c3ae87649232ce66c2f984383d44ac26199323239a0aa1 +7d12835f963682e06fc336878f9d1ea3b655f7f1898984bd81a885fc1853c38cb7d142a0d8a6728c62aa1bfc0089c84672b44c273a6ec005783ac494398329e6 +dc26733f85f56a4ebf0b69c6eef643ba8c4d642ac8b14de701624c47f6d97110a1786ec38e4812e9d88ff8318428721e3061831f327387c877f0034a76bafb31 +c186bbdf9e0d1e4186d5291501223f59a4165fdec6cc88dfd192ce10b6a59a6e1a1b29b69b126b74f416a111da071853748aa6183b8f3eb230e8b1b961f382f4 +9d08b2ca3eb605d61d64c6aa7c4f30c78e6a76b6f3e401e146c88e70c876f0395c6e249e254a6294eed27c0fbcaedb7c00a52eb605c07d3a39d681f708b48910 +2f56a3dce7a0430bee9d5a1f44c82860f29ddbe375991afebbc81e837df9c4a071817d0932f8d23290d8759937da668ca83141113063045d862ddd8288e1fe42 +44165725b6b0cacdcc4d5bb801ba25a3e98949f2d60e68a3f7f1ff77bd0f7418af7ef7bd65b3bd9b7ec7aed8485697ec74762593fd8dfe66176eb3ab09583a25 +ef7f53d3478be401863ab29db1ae7b9aeb9ec6fdbfef6976ede7eb4e6657bf71ddc9b8d0615c7732f9e1cabbe9648ae605fa1a79e0911dfca863a0f8c2a74033 +42e9482c293ee0ea2088c3f79be91006a51e75488ad7a784f3081e65d983090d5c982225e3a44c7c4c44348ad01c4e8baaae5412f25c75c89d39e37088a486ad +ba259e2ee24336cd0e43ab5579f099555a8e44315ef1d7e37070253274a3591cf0add52bb6a13a985d1190b29721a14d6692a85b48345783d248ea18188c6621 +a156f64e58b42d2c5a52fdca555b2c80dada2bf005dc81afed1dd7f7400484e07c0e9af5a9f453e6ea95779533dfa5a77719d3880068b857115078ba2db9ee5c +9e5c5d166a17f0b441420b379384b28c6af878045f8bf3e894a317a171595fb70b971af4a429d47c105a058d66eb4d2caeea6b90dbcc0d34d133054d9cd38edb +a8fb10321334efb833384486c7780eb1c3e577304443b8ac998834dbf057c92cf3948b3ee25166709574b26c101381538792b8e3cae5afdd4013954314b76a0d +12c27b4bae0d69e57d23074e379d8c67333c11badbb51169e9ec15327c962bac9f2af1ab83a5245b80bb47d1f4d439a28bf4218210f39b5569c029e1709750cd +ac39257059b64e6445fc6d14a63cedeab7552a86b27144e711ca2b8a9ecc33b84ae56b3aea6d6d03ed2d5f33185433495e088f42596075a31ad5745d35320e3b +abeedb85a4e5b4a459d44c23abc8aa69cf62c60cab32b061cbab15798dd5cac490d3f40a9fa5eecd94db5ee5ba8d3e615d25c0e06bfb59aaee050a8246ad98cc +a026196fa76199b3f351b376ac16f8166a1729125ad66facd46ed86d5d23acd3c1e0952a3fc86d462d0ccd567da6b2b4ba68d72fc2d9d113481e7de87a175470 +e54ab8d64e11344423d593646903b6c853916f0d78721629e9b89f56fcae17d4fca05469f9839257f72aa596dfad97babe5faf0efc6aa5dfab3d83c222a2b8ea +6797fc43b8d0a0cbfcaa5f8d6f5df7c7ab3b9b1b13169799bac52f2be2eababf5a33aefbb35b7e672c2ff35d8740d2f9b4511bb6ebed5ea3d4ae778725afdf6b +95da41a357ea3782667fd80ffc567bf8cc754e14d8ebd603af3168951ad52028798d8aa4df6a979a5eadd6f59addd6c0eb3ecbdb185879963e725b807915af5b +ff050000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e +616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc91363 +32de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3 +a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ff +ff0300504b01022d0014000600080000002100e9de0fbfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d +2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01 +022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e61 +6765722e786d6c504b01022d0014000600080000002100507a8df2be070000fc2000001600000000000000000000000000d60200007468656d652f7468656d65 +2f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b0100002700000000000000000000000000c80a00007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000c30b00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; +\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid; +\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid; +\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2; +\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1; +\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1; +\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; +\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2; +\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3; +\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; +\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; +\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; +\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; +\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; +\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; +\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; +\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; +\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; +\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; +\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; +\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore 01050000 +02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000508a +d264c3c7d901feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/Icon.ico b/Icon.ico new file mode 100644 index 0000000..2f5055f Binary files /dev/null and b/Icon.ico differ diff --git a/Licence.rtf b/Licence.rtf new file mode 100644 index 0000000..e6010d6 --- /dev/null +++ b/Licence.rtf @@ -0,0 +1,232 @@ +{\rtf1\adeflang1025\ansi\ansicpg1251\uc1\adeff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1049\deflangfe1049\themelang1049\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f2\fbidi \fmodern\fcharset204\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;} +{\f34\fbidi \froman\fcharset204\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset204\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\flomajor\f31500\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fhimajor\f31502\fbidi \fswiss\fcharset204\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fbimajor\f31503\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\flominor\f31504\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fhiminor\f31506\fbidi \fswiss\fcharset204\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f561\fbidi \froman\fcharset0\fprq2 Times New Roman;} +{\f559\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f562\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f563\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f564\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f565\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f566\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f567\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f581\fbidi \fmodern\fcharset0\fprq1 Courier New;} +{\f579\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f582\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f583\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f584\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);} +{\f585\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f586\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f587\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f901\fbidi \froman\fcharset0\fprq2 Cambria Math;} +{\f899\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f902\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f903\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f906\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;} +{\f907\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f931\fbidi \fswiss\fcharset0\fprq2 Calibri;}{\f929\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f932\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;} +{\f933\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f934\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\f935\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f936\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\f937\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\flomajor\f31510\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbmajor\f31520\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31530\fbidi \fswiss\fcharset0\fprq2 Calibri Light;} +{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;} +{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;} +{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31540\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\flominor\f31550\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31560\fbidi \froman\fcharset0\fprq2 Times New Roman;} +{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31570\fbidi \fswiss\fcharset0\fprq2 Calibri;}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);} +{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);} +{\fbiminor\f31580\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128; +\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;\chyperlink\ctint255\cshade255\red5\green99\blue193;\red96\green94\blue92;\red225\green223\blue221;}{\*\defchp \f31506\fs22\lang1049\langfe1033\langfenp1033 }{\*\defpap +\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 +\af0\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}{\*\cs15 \additive +\rtlch\fcs1 \af0 \ltrch\fcs0 \ul\cf19 \sbasedon10 \sunhideused \styrsid3626830 Hyperlink;}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \cf20\chshdng0\chcfpat0\chcbpat21 \sbasedon10 \ssemihidden \sunhideused \styrsid3626830 Unresolved Mention;}{ +\s17\ql \li720\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0\contextualspace \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 +\sbasedon0 \snext17 \sqformat \spriority34 \styrsid5717176 List Paragraph;}}{\*\listtable{\list\listtemplateid-1682026260\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\leveltemplateid861417216\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-705\li1414\lin1414 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid68747289\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1789\lin1789 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid68747291\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2509\lin2509 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid68747279\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3229\lin3229 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid68747289\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3949\lin3949 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid68747291\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4669\lin4669 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid68747279\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5389\lin5389 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid68747289\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li6109\lin6109 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid68747291\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6829\lin6829 }{\listname ;}\listid992950316}{\list\listtemplateid-1048574864\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid68747275\'01\u-3880 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2279\lin2279 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0 +{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li2999\lin2999 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li3719\lin3719 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;} +\f3\fbias0 \fi-360\li4439\lin4439 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5159\lin5159 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li5879\lin5879 }{\listlevel\levelnfc23 +\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li6599\lin6599 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li7319\lin7319 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li8039\lin8039 }{\listname ;}\listid1782527748}}{\*\listoverridetable{\listoverride\listid1782527748\listoverridecount0\ls1} +{\listoverride\listid992950316\listoverridecount0\ls2}}{\*\rsidtbl \rsid224109\rsid597949\rsid1601567\rsid2111891\rsid2168416\rsid3233162\rsid3357078\rsid3626830\rsid4656146\rsid5717176\rsid6580838\rsid7474022\rsid9310919\rsid9371921\rsid10562742 +\rsid10570932\rsid10975515\rsid12148247\rsid14486487\rsid14942821\rsid15159251\rsid15617117\rsid15945929}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author TeMeR} +{\operator TeMeR}{\creatim\yr2022\mo1\dy24\hr23\min16}{\revtim\yr2022\mo1\dy25\hr1\min16}{\version20}{\edmins36}{\nofpages1}{\nofwords71}{\nofchars409}{\nofcharsws479}{\vern79}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} +\paperw11906\paperh16838\margl1701\margr850\margt1134\margb1134\gutter0\ltrsect +\deftab708\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1 +\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1134\dghshow1\dgvshow1 +\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct +\asianbrkrule\rsidroot6580838\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0 +{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2 +\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \fi708\li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid5717176 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\insrsid2168416\charrsid7474022 \'c4\'e0\'ed\'ed\'e0\'ff \'f0\'f3\'f1\'e8\'f4\'e8\'ea\'e0\'f6\'e8\'ff \'f0\'e0\'f1\'ef\'f0\'ee\'f1\'f2\'f0\'e0\'ed\'ff +\'e5\'f2\'f1\'ff \'e0\'e1\'f1\'ee\'eb\'fe\'f2\'ed\'ee \'e1\'e5\'f1\'ef\'eb\'e0\'f2\'ed\'ee. \'cb\'fe\'e1\'ee\'e5 \'ea\'ee\'ec\'ec\'e5\'f0\'f7\'e5\'f1\'ea\'ee\'e5 \'e8\'f1\'ef\'ee\'eb\'fc\'e7\'ee\'e2\'e0\'ed\'e8\'e5 \'e4\'e0\'ed\'ed\'ee\'e9 \'f0\'f3\'f1 +\'e8\'f4\'e8\'ea\'e0\'f6\'e8\'e8 \'e7\'e0\'ef\'f0\'e5\'f9\'e0\'e5\'f2\'f1\'ff. +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\insrsid5717176\charrsid7474022 \'c4\'e0\'ed\'ed\'e0\'ff \'f0\'f3\'f1\'e8\'f4\'e8\'ea\'e0\'f6\'e8\'ff \'ef\'ee\'f1\'f2\'e0\'e2\'eb\'ff\'e5\'f2\'f1\'ff \'ef\'ee \'ef\'f0\'e8\'ed\'f6\'e8\'ef\'f3 \'abas is\'bb. \'ed +\'e8\'ea\'e0\'ea\'e8\'f5 \'e3\'e0\'f0\'e0\'ed\'f2\'e8\'e9 \'ed\'e5 \'ef\'f0\'e8\'eb\'e0\'e3\'e0\'e5\'f2\'f1\'ff \'e8 \'ed\'e5 \'ef\'f0\'e5\'e4\'f3\'f1\'ec\'e0\'f2\'f0\'e8\'e2\'e0\'e5\'f2\'f1\'ff. \'e2\'fb \'e8\'f1\'ef\'ee\'eb\'fc\'e7\'f3\'e5\'f2\'e5 \'fd +\'f2\'f3 \'ec\'ee\'e4\'e8\'f4\'e8\'ea\'e0\'f6\'e8\'fe \'ee\'f0\'e8\'e3\'e8\'ed\'e0\'eb\'fc\'ed\'ee\'e9 \'e8\'e3\'f0\'fb \'ed\'e0 \'f1\'e2\'ee\'e9 \'f1\'f2\'f0\'e0\'f5 \'e8 \'f0\'e8\'f1\'ea. \'e0\'e2\'f2\'ee\'f0\'fb \'f0\'f3\'f1\'e8\'f4\'e8\'ea\'e0\'f6\'e8 +\'e8 \'ed\'e5 \'e1\'f3\'e4\'f3\'f2 \'ee\'f2\'e2\'e5\'f7\'e0\'f2\'fc \'ed\'e8 \'e7\'e0 \'ea\'e0\'ea\'e8\'e5 \'ef\'ee\'f2\'e5\'f0\'e8 \'e8\'eb\'e8 \'e8\'f1\'ea\'e0\'e6\'e5\'ed\'e8\'ff \'e4\'e0\'ed\'ed\'fb\'f5, \'eb\'fe\'e1\'f3\'fe \'f3\'ef\'f3\'f9\'e5\'ed +\'ed\'f3\'fe \'e2\'fb\'e3\'ee\'e4\'f3 \'e2 \'ef\'f0\'ee\'f6\'e5\'f1\'f1\'e5 \'e8\'f1\'ef\'ee\'eb\'fc\'e7\'ee\'e2\'e0\'ed\'e8\'ff \'e8\'eb\'e8 \'ed\'e5\'ef\'f0\'e0\'e2\'e8\'eb\'fc\'ed\'ee\'e3\'ee \'e8\'f1\'ef\'ee\'eb\'fc\'e7\'ee\'e2\'e0\'ed\'e8\'ff \'e4 +\'e0\'ed\'ed\'ee\'e9 \'ec\'ee\'e4\'e8\'f4\'e8\'ea\'e0\'f6\'e8\'e8.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \insrsid12148247\charrsid7474022 +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100507a8df2be070000fc200000160000007468656d652f7468656d652f +7468656d65312e786d6cec595f8f1bb7117f2f90efb0d87759ff76f5e760399056922ff69d6d58b2833cf2246a973eee5258527716020381f39497040192a00f +0dd0f6a50f41d103ea2241d1a05fe1f2190cd868d30fd12177a52525cabe3bb88051dc1d70b74bfd66f8e3cc706644defcf0694c9d139c72c2928e5bbd51711d +9c4cd8942461c77d341e965aaec3054aa688b20477dc25e6ee87b73ef8cd4db427221c6307e413be873a6e24c47caf5ce6131846fc069be3043e9bb13446025e +d3b03c4dd129e88d69b956a934ca312289eb242806b5e77f3cffdbf93fcecf9cfbb3199960f7d64aff80c22489e0726042d391d48e57427ff8e5f9f9d9f9cfe7 +2fcecf7ef90c9e7f86ff5f29d9e971554af0250f68ea9c20da7161ea293b1de3a7c27528e2023ee8b815f5e3966fdd2ca3bd5c888a1db29adc50fde472b9c0f4 +b8a6e64cc3a3f5a49ee77b8dee5abf0250b18d1b34078d4163ad4f01d064022bcfb8983a9bb5c0cbb11a287bb4e8ee37fbf5aa81d7f4d7b738777df96be01528 +d3ef6de187c300ac68e01528c3fb5b78bfd7eef54dfd0a94e11b5bf866a5dbf79a867e058a28498eb7d015bf510f56ab5d43668cee5be16ddf1b366bb9f20205 +d1b08e3639c58c25e2a2b117a3272c1d828014a44890c411cb399ea109047a8028394a897340c20802718e12c661b852ab0c2b75f82b7f3df5a43c8cf630d2a4 +254f60c6b786243f874f5232171df70e687535c8ab9f7e7af9fcc5cbe73fbefcfcf397cfff92cfad541972fb280975b95ffff4f57fbeffccf9f75f7fffeb37df +66536fe2b98e7ffde72f5efffd9f6f520f2b2e4cf1eabbb3d72fce5efdf6cb7ffdf08d457b3745473a7c4c62cc9d7bf8d479c86258a0853f3e4a2f27318e10d1 +25ba49c85182e42c16fd031119e87b4b449105d7c3a61d1fa7907a6cc0db8b2706e151942e04b168bc1bc506f09031da63a9d50a77e55c9a99c78b24b44f9e2e +74dc43844e6c73072831bc3c58cc2107139bca20c206cd071425028538c1c2919fb1638c2dabfb8410c3ae87649232ce66c2f984383d44ac26199323239a0aa1 +7d12835f963682e06fc336878f9d1ea3b655f7f1898984bd81a885fc1853c38cb7d142a0d8a6728c62aa1bfc0089c84672b44c273a6ec005783ac494398329e6 +dc26733f85f56a4ebf0b69c6eef643ba8c4d642ac8b14de701624c47f6d97110a1786ec38e4812e9d88ff8318428721e3061831f327387c877f0034a76bafb31 +c186bbdf9e0d1e4186d5291501223f59a4165fdec6cc88dfd192ce10b6a59a6e1a1b29b69b126b74f416a111da071853748aa6183b8f3eb230e8b1b961f382f4 +9d08b2ca3eb605d61d64c6aa7c4f30c78e6a76b6f3e401e146c88e70c876f0395c6e249e254a6294eed27c0fbcaedb7c00a52eb605c07d3a39d681f708b48910 +2f56a3dce7a0430bee9d5a1f44c82860f29ddbe375991afebbc81e837df9c4a071817d0932f8d23290d8759937da668ca83141113063045d862ddd8288e1fe42 +44165725b6b0cacdcc4d5bb801ba25a3e98949f2d60e68a3f7f1ff77bd0f7418af7ef7bd65b3bd9b7ec7aed8485697ec74762593fd8dfe66176eb3ab09583a25 +ef7f53d3478be401863ab29db1ae7b9aeb9ec6fdbfef6976ede7eb4e6657bf71ddc9b8d0615c7732f9e1cabbe9648ae605fa1a79e0911dfca863a0f8c2a74033 +42e9482c293ee0ea2088c3f79be91006a51e75488ad7a784f3081e65d983090d5c982225e3a44c7c4c44348ad01c4e8baaae5412f25c75c89d39e37088a486ad +ba259e2ee24336cd0e43ab5579f099555a8e44315ef1d7e37070253274a3591cf0add52bb6a13a985d1190b29721a14d6692a85b48345783d248ea18188c6621 +a156f64e58b42d2c5a52fdca555b2c80dada2bf005dc81afed1dd7f7400484e07c0e9af5a9f453e6ea95779533dfa5a77719d3880068b857115078ba2db9ee5c +9e5c5d166a17f0b441420b379384b28c6af878045f8bf3e894a317a171595fb70b971af4a429d47c105a058d66eb4d2caeea6b90dbcc0d34d133054d9cd38edb +a8fb10321334efb833384486c7780eb1c3e577304443b8ac998834dbf057c92cf3948b3ee25166709574b26c101381538792b8e3cae5afdd4013954314b76a0d +12c27b4bae0d69e57d23074e379d8c67333c11badbb51169e9ec15327c962bac9f2af1ab83a5245b80bb47d1f4d439a28bf4218210f39b5569c029e1709750cd +ac39257059b64e6445fc6d14a63cedeab7552a86b27144e711ca2b8a9ecc33b84ae56b3aea6d6d03ed2d5f33185433495e088f42596075a31ad5745d35320e3b +abeedb85a4e5b4a459d44c23abc8aa69cf62c60cab32b061cbab15798dd5cac490d3f40a9fa5eecd94db5ee5ba8d3e615d25c0e06bfb59aaee050a8246ad98cc +a026196fa76199b3f351b376ac16f8166a1729125ad66facd46ed86d5d23acd3c1e0952a3fc86d462d0ccd567da6b2b4ba68d72fc2d9d113481e7de87a175470 +e54ab8d64e11344423d593646903b6c853916f0d78721629e9b89f56fcae17d4fca05469f9839257f72aa596dfad97babe5faf0efc6aa5dfab3d83c222a2b8ea +6797fc43b8d0a0cbfcaa5f8d6f5df7c7ab3b9b1b13169799bac52f2be2eababf5a33aefbb35b7e672c2ff35d8740d2f9b4511bb6ebed5ea3d4ae778725afdf6b +95da41a357ea3782667fd80ffc567bf8cc754e14d8ebd603af3168951ad52028798d8aa4df6a979a5eadd6f59addd6c0eb3ecbdb185879963e725b807915af5b +ff050000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e +616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc91363 +32de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3 +a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ff +ff0300504b01022d0014000600080000002100e9de0fbfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d +2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01 +022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e61 +6765722e786d6c504b01022d0014000600080000002100507a8df2be070000fc2000001600000000000000000000000000d60200007468656d652f7468656d65 +2f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b0100002700000000000000000000000000c80a00007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000c30b00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax375\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; +\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid; +\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid; +\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2; +\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1; +\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1; +\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; +\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2; +\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3; +\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; +\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; +\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; +\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; +\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; +\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; +\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; +\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; +\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; +\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; +\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; +\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;}}{\*\datastore 010500000200000018000000 +4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000b0fd +a9ed5611d801feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/Pic.bmp b/Pic.bmp new file mode 100644 index 0000000..d9f7d7a Binary files /dev/null and b/Pic.bmp differ