From: <wel...@us...> - 2011-04-22 17:37:38
|
Revision: 7171 http://planeshift.svn.sourceforge.net/planeshift/?rev=7171&view=rev Author: weltall2 Date: 2011-04-22 17:37:32 +0000 (Fri, 22 Apr 2011) Log Message: ----------- changed name from range to scale which is more approriate Modified Paths: -------------- trunk/data/schemas/CommonScripting.rng trunk/src/server/scripting.cpp Modified: trunk/data/schemas/CommonScripting.rng =================================================================== --- trunk/data/schemas/CommonScripting.rng 2011-04-22 17:35:28 UTC (rev 7170) +++ trunk/data/schemas/CommonScripting.rng 2011-04-22 17:37:32 UTC (rev 7171) @@ -92,7 +92,7 @@ <value>unattached</value> </choice> </attribute> - <attribute name="range"/> + <attribute name="scale"/> </optional> </element> Modified: trunk/src/server/scripting.cpp =================================================================== --- trunk/src/server/scripting.cpp 2011-04-22 17:35:28 UTC (rev 7170) +++ trunk/src/server/scripting.cpp 2011-04-22 17:37:32 UTC (rev 7171) @@ -1302,7 +1302,7 @@ class FxOp : public ImperativeOp { public: - FxOp() : ImperativeOp(), effectRange(NULL) { } + FxOp() : ImperativeOp(), effectScale(NULL) { } virtual ~FxOp() { } bool Load(iDocumentNode* top) @@ -1314,9 +1314,9 @@ name = top->GetAttributeValue("name"); sourceVar = top->GetAttributeValue("source"); targetVar = top->GetAttributeValue("target"); - if(top->GetAttributeValue("range")) + if(top->GetAttributeValue("scale")) { - effectRange = MathExpression::Create(top->GetAttributeValue("range")); + effectScale = MathExpression::Create(top->GetAttributeValue("scale")); } return !name.IsEmpty() && !targetVar.IsEmpty(); @@ -1326,18 +1326,18 @@ { gemObject* target = GetObject(env, targetVar); gemObject* source = target; - float range = 0.0f; + float scale = 0.0f; if (!sourceVar.IsEmpty()) source = GetObject(env, sourceVar); - if(effectRange) + if(effectScale) { - range = effectRange->Evaluate(env); + scale = effectScale->Evaluate(env); } if (attached) { - psEffectMessage fx(0, name, csVector3(0,0,0), source->GetEID(), target->GetEID(), 0, range); + psEffectMessage fx(0, name, csVector3(0,0,0), source->GetEID(), target->GetEID(), 0, scale); if (!fx.valid) { Error1("Error: <fx> could not create valid psEffectMessage\n"); @@ -1356,7 +1356,7 @@ pos.z -= DROP_DISTANCE* cosf(yrot); // Send effect message - psEffectMessage fx(0, name, pos, 0, 0, 0, range); + psEffectMessage fx(0, name, pos, 0, 0, 0, scale); if (!fx.valid) { Error1("Error: <fx> could not create valid psEffectMessage\n"); @@ -1371,7 +1371,7 @@ csString name; ///< the name of the effect csString sourceVar; ///< name of the MathVar containing where the effect starts csString targetVar; ///< name of the MathVar containing where the effect is aimed - MathExpression* effectRange; ///< the range which this effect will apply on the effect + MathExpression* effectScale; ///< the scale which this fxop will apply on the effect }; //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |