Changed: #1469 Getting rid of a variable

--HG--
branch : gsoc2012-fabien
hg/feature/gsoc2012-fabien
Fabien_HENON 13 years ago
parent a1c8c9dc8a
commit ec6af57aa6

@ -61,14 +61,12 @@ CAMERA_ANIMATION_REGISTR_MODIFIER(CCameraAnimationModifierShake, "camera_modifie
class CCameraAnimationModifierSoundTrigger : public ICameraAnimationModifier
{
protected:
std::string SoundName;
std::string SoundPos;
NLMISC::CSheetId SoundId;
public:
CCameraAnimationModifierSoundTrigger()
{
SoundName = "";
SoundPos = "";
SoundId = NLMISC::CSheetId::Unknown;
}
@ -83,11 +81,10 @@ public:
nlwarning("<CCameraAnimationModifierSoundTrigger parseModifier> impossible to get the sound_name property of the basic modifier in primitive : %s", filename.c_str());
return false;
}
SoundName = value;
SoundId = NLMISC::CSheetId(SoundName);
SoundId = NLMISC::CSheetId(value);
if (SoundId == NLMISC::CSheetId::Unknown)
{
nlwarning("<CCameraAnimationModifierSoundTrigger parseModifier> sheetid not found for sound name %s in the basic modifier in primitive : %s", SoundName.c_str(), filename.c_str());
nlwarning("<CCameraAnimationModifierSoundTrigger parseModifier> sheetid not found for sound name %s in the basic modifier in primitive : %s", value.c_str(), filename.c_str());
return false;
}
// We get the sound position

@ -5443,13 +5443,13 @@ class CMissionActionSoundTrigger : public IMissionAction
return false;
}
_SoundName = script[1];
std::string SoundName = script[1];
if (script.size() >= 3)
_SoundPosition = script[2];
else
_SoundPosition = "";
_SoundId = NLMISC::CSheetId(_SoundName);
_SoundId = NLMISC::CSheetId(SoundName);
if (_SoundId == NLMISC::CSheetId::Unknown)
{
MISLOGSYNTAXERROR("sound_trigger action: sheetid not found");
@ -5465,7 +5465,6 @@ class CMissionActionSoundTrigger : public IMissionAction
// We tell the client to play the sound
};
std::string _SoundName;
std::string _SoundPosition;
NLMISC::CSheetId _SoundId;

Loading…
Cancel
Save