diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llmessage/llpartdata.cpp | 28 | ||||
-rw-r--r-- | linden/indra/newview/app_settings/cloud.xml | 100 | ||||
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 10 |
3 files changed, 83 insertions, 55 deletions
diff --git a/linden/indra/llmessage/llpartdata.cpp b/linden/indra/llmessage/llpartdata.cpp index a2811ab..4012d2c 100644 --- a/linden/indra/llmessage/llpartdata.cpp +++ b/linden/indra/llmessage/llpartdata.cpp | |||
@@ -363,14 +363,14 @@ LLSD LLPartSysData::asLLSD() const | |||
363 | sd["LL_PART_EMISSIVE_MASK"] = (LLPartData::LL_PART_EMISSIVE_MASK & mPartData.mFlags) ? 1 : 0; | 363 | sd["LL_PART_EMISSIVE_MASK"] = (LLPartData::LL_PART_EMISSIVE_MASK & mPartData.mFlags) ? 1 : 0; |
364 | sd["LL_PART_BEAM_MASK"] = (LLPartData::LL_PART_BEAM_MASK & mPartData.mFlags) ? 1 : 0; | 364 | sd["LL_PART_BEAM_MASK"] = (LLPartData::LL_PART_BEAM_MASK & mPartData.mFlags) ? 1 : 0; |
365 | 365 | ||
366 | sd["SourceMaxage"] = mPartData.mMaxAge; | 366 | sd["ParticleMaxAge"] = mPartData.mMaxAge; |
367 | sd["Startcolor"] = ll_sd_from_color4(mPartData.mStartColor); | 367 | sd["StartColor"] = ll_sd_from_color4(mPartData.mStartColor); |
368 | sd["Endcolor"] = ll_sd_from_color4(mPartData.mEndColor); | 368 | sd["EndColor"] = ll_sd_from_color4(mPartData.mEndColor); |
369 | sd["Startscale"] = ll_sd_from_vector2(mPartData.mStartScale); | 369 | sd["StartScale"] = ll_sd_from_vector2(mPartData.mStartScale); |
370 | sd["Endscale"] = ll_sd_from_vector2(mPartData.mEndScale); | 370 | sd["EndScale"] = ll_sd_from_vector2(mPartData.mEndScale); |
371 | 371 | ||
372 | sd["ParticleMaxAge"] = mMaxAge; | 372 | sd["SourceMaxAge"] = mMaxAge; |
373 | sd["ParticleStartAge"] = mStartAge; | 373 | sd["SourceStartAge"] = mStartAge; |
374 | 374 | ||
375 | 375 | ||
376 | sd["LL_PART_SRC_PATTERN_DROP"] = ( mPattern & LL_PART_SRC_PATTERN_DROP) ? 1 : 0; | 376 | sd["LL_PART_SRC_PATTERN_DROP"] = ( mPattern & LL_PART_SRC_PATTERN_DROP) ? 1 : 0; |
@@ -406,14 +406,14 @@ bool LLPartSysData::fromLLSD(LLSD& sd) | |||
406 | if (sd["LL_PART_EMISSIVE_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_EMISSIVE_MASK; | 406 | if (sd["LL_PART_EMISSIVE_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_EMISSIVE_MASK; |
407 | if (sd["LL_PART_BEAM_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_BEAM_MASK; | 407 | if (sd["LL_PART_BEAM_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_BEAM_MASK; |
408 | 408 | ||
409 | mPartData.mMaxAge = (F32)sd["SourceMaxage"].asReal(); | 409 | mPartData.mMaxAge = (F32)sd["ParticleMaxAge"].asReal(); |
410 | mPartData.mStartColor = ll_color4_from_sd(sd["Startcolor"]); | 410 | mPartData.mStartColor = ll_color4_from_sd(sd["StartColor"]); |
411 | mPartData.mEndColor = ll_color4_from_sd(sd["Endcolor"]); | 411 | mPartData.mEndColor = ll_color4_from_sd(sd["EndColor"]); |
412 | mPartData.mStartScale = ll_vector2_from_sd(sd["Startscale"]); | 412 | mPartData.mStartScale = ll_vector2_from_sd(sd["StartScale"]); |
413 | mPartData.mEndScale = ll_vector2_from_sd(sd["Endscale"]); | 413 | mPartData.mEndScale = ll_vector2_from_sd(sd["EndScale"]); |
414 | 414 | ||
415 | mMaxAge = (F32)sd["ParticleMaxAge"].asReal(); | 415 | mMaxAge = (F32)sd["SourceMaxAge"].asReal(); |
416 | mStartAge = (F32)sd["ParticleStartAge"].asReal(); | 416 | mStartAge = (F32)sd["SourceStartAge"].asReal(); |
417 | 417 | ||
418 | mPattern = 0; | 418 | mPattern = 0; |
419 | if (sd["LL_PART_SRC_PATTERN_DROP"]) mPattern |= LL_PART_SRC_PATTERN_DROP; | 419 | if (sd["LL_PART_SRC_PATTERN_DROP"]) mPattern |= LL_PART_SRC_PATTERN_DROP; |
diff --git a/linden/indra/newview/app_settings/cloud.xml b/linden/indra/newview/app_settings/cloud.xml index ff9492b..e62bcf1 100644 --- a/linden/indra/newview/app_settings/cloud.xml +++ b/linden/indra/newview/app_settings/cloud.xml | |||
@@ -1,33 +1,87 @@ | |||
1 | <llsd> | 1 | <llsd> |
2 | <map> | 2 | <map> |
3 | |||
4 | |||
5 | <!-- Settings for the whole particle system --> | ||
6 | |||
7 | <key>SourceMaxAge</key><!-- how long the source can live with 0 forever --> | ||
8 | <real>0</real> | ||
9 | <key>SourceStartAge</key> | ||
10 | <real>0</real> | ||
11 | |||
3 | <key>AngularVelocity</key> | 12 | <key>AngularVelocity</key> |
4 | <array> | 13 | <array> |
5 | <real>0</real> | 14 | <real>0</real> |
6 | <real>0</real> | 15 | <real>0</real> |
7 | <real>0</real> | 16 | <real>0</real> |
8 | </array> | 17 | </array> |
18 | <key>InnerAngle</key> | ||
19 | <real>3.1415927410125732421875</real> | ||
20 | <key>OuterAngle</key> | ||
21 | <real>0</real> | ||
22 | |||
9 | <key>BurstPartCount</key> | 23 | <key>BurstPartCount</key> |
10 | <integer>1</integer> | 24 | <integer>1</integer> |
11 | <key>BurstRadius</key> | 25 | <key>BurstRadius</key> |
12 | <real>0.3</real> | 26 | <real>0.3</real> |
13 | <key>BurstRate</key> | 27 | <key>BurstRate</key> |
14 | <real>0.02</real> | 28 | <real>0.02</real> |
29 | <key>BurstSpeedMin</key> | ||
30 | <real>0.1</real> | ||
15 | <key>BurstSpeedMax</key> | 31 | <key>BurstSpeedMax</key> |
16 | <real>1</real> | 32 | <real>1</real> |
17 | <key>Endcolor</key> | 33 | |
34 | <!-- pattern flags set to 1 for true and 0 for false --> | ||
35 | <key>LL_PART_SRC_PATTERN_ANGLE</key> | ||
36 | <integer>0</integer> | ||
37 | <key>LL_PART_SRC_PATTERN_ANGLE_CONE</key> | ||
38 | <integer>1</integer> | ||
39 | <key>LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY</key> | ||
40 | <integer>0</integer> | ||
41 | <key>LL_PART_SRC_PATTERN_DROP</key> | ||
42 | <integer>0</integer> | ||
43 | <key>LL_PART_SRC_PATTERN_EXPLODE</key> | ||
44 | <integer>0</integer> | ||
45 | <!-- end of pattern flags --> | ||
46 | |||
47 | <!-- Settings for single particles within the system --> | ||
48 | |||
49 | <key>ParticleMaxAge</key><!-- how long a single particle can live with 0 forever --> | ||
50 | <real>4</real> | ||
51 | |||
52 | <key>PartImageID</key> <!--This setting is ignored for the cloud, used instead for now is the hardcoded --> | ||
53 | <string>0000000000000-0000-0000-000000000000</string><!-- skins/default/textures/cloud-particle.j2c --> | ||
54 | |||
55 | <key>StartColor</key><!-- RGBA --> | ||
56 | <array> | ||
57 | <real>0.9</real> | ||
58 | <real>0.0</real> | ||
59 | <real>0.8</real> | ||
60 | <real>0.7</real> | ||
61 | </array> | ||
62 | <key>EndColor</key><!-- RGBA --> | ||
18 | <array> | 63 | <array> |
19 | <real>0.75</real> | 64 | <real>0.75</real> |
20 | <real>0.47</real> | 65 | <real>0.47</real> |
21 | <real>0.81</real> | 66 | <real>0.81</real> |
22 | <real>0</real> | 67 | <real>0</real> |
23 | </array> | 68 | </array> |
24 | <key>Endscale</key> | 69 | |
70 | <key>StartScale</key> | ||
71 | <array> | ||
72 | <real>0.8</real> | ||
73 | <real>0.8</real> | ||
74 | </array> | ||
75 | <key>EndScale</key> | ||
25 | <array> | 76 | <array> |
26 | <real>0.02</real> | 77 | <real>0.02</real> |
27 | <real>0.02</real> | 78 | <real>0.02</real> |
28 | </array> | 79 | </array> |
29 | <key>InnerAngle</key> | 80 | |
30 | <real>3.1415927410125732421875</real> | 81 | <key>TargetId</key><!-- This setting is ignored for the cloud --> |
82 | <string>00000000-0000-0000-0000-000000000000</string> | ||
83 | |||
84 | <!-- masks flags set to 1 for true and 0 for false--> | ||
31 | <key>LL_PART_BEAM_MASK</key> | 85 | <key>LL_PART_BEAM_MASK</key> |
32 | <integer>0</integer> | 86 | <integer>0</integer> |
33 | <key>LL_PART_BOUNCE_MASK</key> | 87 | <key>LL_PART_BOUNCE_MASK</key> |
@@ -42,47 +96,13 @@ | |||
42 | <integer>1</integer> | 96 | <integer>1</integer> |
43 | <key>LL_PART_INTERP_SCALE_MASK</key> | 97 | <key>LL_PART_INTERP_SCALE_MASK</key> |
44 | <integer>1</integer> | 98 | <integer>1</integer> |
45 | <key>LL_PART_SRC_PATTERN_ANGLE</key> | ||
46 | <integer>0</integer> | ||
47 | <key>LL_PART_SRC_PATTERN_ANGLE_CONE</key> | ||
48 | <integer>1</integer> | ||
49 | <key>LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY</key> | ||
50 | <integer>0</integer> | ||
51 | <key>LL_PART_SRC_PATTERN_DROP</key> | ||
52 | <integer>0</integer> | ||
53 | <key>LL_PART_SRC_PATTERN_EXPLODE</key> | ||
54 | <integer>0</integer> | ||
55 | <key>LL_PART_TARGET_LINEAR_MASK</key> | 99 | <key>LL_PART_TARGET_LINEAR_MASK</key> |
56 | <integer>0</integer> | 100 | <integer>0</integer> |
57 | <key>LL_PART_TARGET_POS_MASK</key> | 101 | <key>LL_PART_TARGET_POS_MASK</key> |
58 | <integer>1</integer> | 102 | <integer>1</integer> |
59 | <key>LL_PART_WIND_MASK</key> | 103 | <key>LL_PART_WIND_MASK</key> |
60 | <integer>0</integer> | 104 | <integer>0</integer> |
61 | <key>OuterAngle</key> | 105 | <!-- end of mask flags --> |
62 | <real>0</real> | 106 | |
63 | <key>PartImageID</key> | ||
64 | <string>0000000000000-0000-0000-000000000000</string> | ||
65 | <key>ParticleMaxAge</key> | ||
66 | <real>0</real> | ||
67 | <key>ParticleStartAge</key> | ||
68 | <real>0</real> | ||
69 | <key>SourceMaxage</key> | ||
70 | <real>4</real> | ||
71 | <key>Startcolor</key> | ||
72 | <array> | ||
73 | <real>0.9</real> | ||
74 | <real>0.0</real> | ||
75 | <real>0.8</real> | ||
76 | <real>0.7</real> | ||
77 | </array> | ||
78 | <key>Startscale</key> | ||
79 | <array> | ||
80 | <real>0.8</real> | ||
81 | <real>0.8</real> | ||
82 | </array> | ||
83 | <key>TargetId</key> | ||
84 | <string>00000000-0000-0000-0000-000000000000</string> | ||
85 | <key>BurstSpeedMin</key> | ||
86 | <real>0.1</real> | ||
87 | </map> | 107 | </map> |
88 | </llsd> | 108 | </llsd> |
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 204357f..c0ddac5 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -1496,8 +1496,16 @@ LLPartSysData LLVOAvatar::sCloud; | |||
1496 | void LLVOAvatar::initCloud() | 1496 | void LLVOAvatar::initCloud() |
1497 | { | 1497 | { |
1498 | // fancy particle cloud designed by Brent | 1498 | // fancy particle cloud designed by Brent |
1499 | std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "cloud.xml"); | ||
1500 | if(!gDirUtilp->fileExists(filename)) | ||
1501 | { | ||
1502 | filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "cloud.xml"); | ||
1503 | } | ||
1504 | if(!gDirUtilp->fileExists(filename)) | ||
1505 | { | ||
1506 | filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cloud.xml"); | ||
1507 | } | ||
1499 | 1508 | ||
1500 | std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cloud.xml"); | ||
1501 | LLSD cloud; | 1509 | LLSD cloud; |
1502 | llifstream in_file(filename); | 1510 | llifstream in_file(filename); |
1503 | LLSDSerialize::fromXMLDocument(cloud, in_file); | 1511 | LLSDSerialize::fromXMLDocument(cloud, in_file); |