System XMAS (Gift Christmas)
Hello RaGEZONE, I had no time to make a collaboration of this kind and I hope it is to your liking.
This only makes snow fall on all maps no matter what kind of game it is or where you are adding the santa hat to all the characters of both sexes.
A type of switch has been added to activate or deactivate it, since I release this code you can make any modification if you wish, enjoy it.
MMFeatureDefine.h
Code:
#define _XMASJORK2 1
in ZCharacter.cpp line "void ZCharacter::InitProperties()" add
Code:
#ifdef _XMASJORK2
if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DEATHMATCH_SOLO) ||
(ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_QUEST ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_TRAINING ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_GLADIATOR_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_SURVIVAL ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_BERSERKER ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_PAINTBALL_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_CLASSIC_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MODE_STAFF))//Xmas
{
if (GetProperty()->nSex == MMS_FEMALE){
m_Items.EquipItem(MMCIP_HEAD, 520513);
}
else{
m_Items.EquipItem(MMCIP_HEAD, 520013);
}
m_Items.EquipItem(MMCIP_FINGERL, 525005);
}
#endif
in ZGame.cpp line "class ZSnowTownParticleSystem" remplace for these:
Code:
class ZSnowTownParticleSystem
{
private:
RParticles* m_pParticles[5];
bool IsSnowTownMap()
{
#ifdef _XMASJORK2
if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MAX, 4)) return true;//Xmas
#else
if (!strnicmp(ZGetGameClient()->GetMatchStageSetting()->GetMapName(), "snow", 4)) return true;
#endif
return false;
}
public:
void Update(float fDeltaTime)
{
if (!IsSnowTownMap()) return;
#define SNOW_PARTICLE_COUNT_PER_SECOND 600 // ´ë·« ÃÊ´ç 300°³Âë ¿ø·¡ ÇÁ·¹ÀÓ´ç 14°³¿´À½.
int nSnowParticleCountPerSec = SNOW_PARTICLE_COUNT_PER_SECOND;
switch (ZGetConfiguration()->GetVideo()->nEffectLevel)
{
case Z_VIDEO_EFFECT_HIGH: break;
case Z_VIDEO_EFFECT_NORMAL: nSnowParticleCountPerSec = nSnowParticleCountPerSec / 8; break;
case Z_VIDEO_EFFECT_LOW: nSnowParticleCountPerSec = nSnowParticleCountPerSec / 12; break;
default: nSnowParticleCountPerSec = 0; break;
}
int nCount = min(nSnowParticleCountPerSec * fDeltaTime,20); // Çѹø¿¡ 20°³ ÀÌ»óÀº ¾È³ª¿Àµµ·ÏÇÑ´Ù
for(int i=0;i<nCount;i++)
{
RParticle *pp=new RSnowParticle();
pp->ftime=0;
pp->position = rvector(RandomNumber(-8000.0f, 8000.0f), RandomNumber(-8000.0f, 8000.0f), 1500.0f);
pp->velocity = rvector(RandomNumber(-40.0f, 40.0f), RandomNumber(-40.0f, 40.0f), RandomNumber(-150.0f, -250.0f));
pp->accel=rvector(0,0,-5.f);
int particle_index = RandomNumber(0, 2);
if (m_pParticles[particle_index]) m_pParticles[particle_index]->push_back(pp);
}
}
void Create()
{
if (!IsSnowTownMap()) return;
for (int i = 0; i < 3; i++)
{
m_pParticles[i] = NULL;
}
// ÆÄƼŬ »ý¼º
m_pParticles[0] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 25.0f);
m_pParticles[1] = RGetParticleSystem()->AddParticles("sfx/water_splash.bmp", 20.0f);
m_pParticles[2] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 15.0f);
m_pParticles[3] = RGetParticleSystem()->AddParticles("sfx/water_splash.bmp", 5.0f);
m_pParticles[4] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 5.0f);
}
void Destroy()
{
if (!IsSnowTownMap()) return;
m_pParticles[0]->Clear();
m_pParticles[1]->Clear();
m_pParticles[2]->Clear();
}
};
in ZWorld.cpp in line "bool ZWorld::Create(ZLoadingProgress *pLoading )" add these
Code:
#ifdef _XMASJORK2
if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DEATHMATCH_SOLO) ||
(ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_QUEST ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_TRAINING ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_GLADIATOR_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_SURVIVAL ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_BERSERKER ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_PAINTBALL_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_VAMPIRE ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_CLASSIC_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MODE_STAFF))//Xmas
#else
if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_VAMPIRE))
#endif
{
m_bFog = true;
m_fFogNear = 0.0f;
m_fFogFar = 6000.0f;
#ifdef _XMASJORK2
m_dwFogColor = 0xCCF1FF;
#else
m_dwFogColor = 0xC30404;
#endif
}
else
{
FogInfo finfo = GetBsp()->GetFogInfo();
m_bFog = finfo.bFogEnable;
m_fFogNear = finfo.fNear;
m_fFogFar = finfo.fFar;
m_dwFogColor = finfo.dwFogColor;
}
m_bCreated = true;
add these in your sfx.mrs
https://www.sendspace.com/file/is2amu
ScreenShots
http://i67.tinypic.com/33uzjwh.jpg
http://i66.tinypic.com/qoiu6q.jpg
It's everything and I hope you enjoy it.:thumbup1:
Re: System XMAS (Gift Christmas)
Never would of thought about this, I love the idea!
Re: System XMAS (Gift Christmas)
Quote:
Originally Posted by
StephanW
Never would of thought about this, I love the idea!
Thank bro!
Re: System XMAS (Gift Christmas)
Nice release.
I had the same idea a while ago and added it to FGunZ although using date as switch so it enables the effects automatically for certain dates and we don't have to push any .exe updates nor restart the server to enable/disable it. There's better ways but it works.
Re: System XMAS (Gift Christmas)
Quote:
Originally Posted by
mcsic
Nice release.
I had the same idea a while ago and added it to FGunZ although using date as switch so it enables the effects automatically for certain dates and we don't have to push any .exe updates nor restart the server to enable/disable it. There's better ways but it works.
I am trying to do the same but I do not know the pleasure of doing it that way.
Re: System XMAS (Gift Christmas)
That Itachi Model caught my eyes, you have other anime avatars? possible to share?
Re: System XMAS (Gift Christmas)
Quote:
Originally Posted by
MonkINC
That Itachi Model caught my eyes, you have other anime avatars? possible to share?
I'm sorry I can not share it, I only have the itachi one, if you're interested we can talk about possible businesses, I have more rare avatars.
Re: System XMAS (Gift Christmas)
Re: System XMAS (Gift Christmas)
Quote:
Originally Posted by
jorklenis2
Hello RaGEZONE, I had no time to make a collaboration of this kind and I hope it is to your liking.
This only makes snow fall on all maps no matter what kind of game it is or where you are adding the santa hat to all the characters of both sexes.
A type of switch has been added to activate or deactivate it, since I release this code you can make any modification if you wish, enjoy it.
MMFeatureDefine.h
Code:
#define _XMASJORK2 1
in
ZCharacter.cpp line "void ZCharacter::InitProperties()" add
Code:
#ifdef _XMASJORK2
if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DEATHMATCH_SOLO) ||
(ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_QUEST ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_TRAINING ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_GLADIATOR_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_SURVIVAL ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_BERSERKER ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_PAINTBALL_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_CLASSIC_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MODE_STAFF))//Xmas
{
if (GetProperty()->nSex == MMS_FEMALE){
m_Items.EquipItem(MMCIP_HEAD, 520513);
}
else{
m_Items.EquipItem(MMCIP_HEAD, 520013);
}
m_Items.EquipItem(MMCIP_FINGERL, 525005);
}
#endif
in
ZGame.cpp line "class ZSnowTownParticleSystem" remplace for these:
Code:
class ZSnowTownParticleSystem
{
private:
RParticles* m_pParticles[5];
bool IsSnowTownMap()
{
#ifdef _XMASJORK2
if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MAX, 4)) return true;//Xmas
#else
if (!strnicmp(ZGetGameClient()->GetMatchStageSetting()->GetMapName(), "snow", 4)) return true;
#endif
return false;
}
public:
void Update(float fDeltaTime)
{
if (!IsSnowTownMap()) return;
#define SNOW_PARTICLE_COUNT_PER_SECOND 600 // ´ë·« ÃÊ´ç 300°³Âë ¿ø·¡ ÇÁ·¹ÀÓ´ç 14°³¿´À½.
int nSnowParticleCountPerSec = SNOW_PARTICLE_COUNT_PER_SECOND;
switch (ZGetConfiguration()->GetVideo()->nEffectLevel)
{
case Z_VIDEO_EFFECT_HIGH: break;
case Z_VIDEO_EFFECT_NORMAL: nSnowParticleCountPerSec = nSnowParticleCountPerSec / 8; break;
case Z_VIDEO_EFFECT_LOW: nSnowParticleCountPerSec = nSnowParticleCountPerSec / 12; break;
default: nSnowParticleCountPerSec = 0; break;
}
int nCount = min(nSnowParticleCountPerSec * fDeltaTime,20); // Çѹø¿¡ 20°³ ÀÌ»óÀº ¾È³ª¿Àµµ·ÏÇÑ´Ù
for(int i=0;i<nCount;i++)
{
RParticle *pp=new RSnowParticle();
pp->ftime=0;
pp->position = rvector(RandomNumber(-8000.0f, 8000.0f), RandomNumber(-8000.0f, 8000.0f), 1500.0f);
pp->velocity = rvector(RandomNumber(-40.0f, 40.0f), RandomNumber(-40.0f, 40.0f), RandomNumber(-150.0f, -250.0f));
pp->accel=rvector(0,0,-5.f);
int particle_index = RandomNumber(0, 2);
if (m_pParticles[particle_index]) m_pParticles[particle_index]->push_back(pp);
}
}
void Create()
{
if (!IsSnowTownMap()) return;
for (int i = 0; i < 3; i++)
{
m_pParticles[i] = NULL;
}
// ÆÄƼŬ »ý¼º
m_pParticles[0] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 25.0f);
m_pParticles[1] = RGetParticleSystem()->AddParticles("sfx/water_splash.bmp", 20.0f);
m_pParticles[2] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 15.0f);
m_pParticles[3] = RGetParticleSystem()->AddParticles("sfx/water_splash.bmp", 5.0f);
m_pParticles[4] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 5.0f);
}
void Destroy()
{
if (!IsSnowTownMap()) return;
m_pParticles[0]->Clear();
m_pParticles[1]->Clear();
m_pParticles[2]->Clear();
}
};
in
ZWorld.cpp in line "bool ZWorld::Create(ZLoadingProgress *pLoading )" add these
Code:
#ifdef _XMASJORK2
if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DEATHMATCH_SOLO) ||
(ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_QUEST ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_TRAINING ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_GLADIATOR_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_SURVIVAL ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_BERSERKER ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_PAINTBALL_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_VAMPIRE ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_CLASSIC_SOLO ||
ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MODE_STAFF))//Xmas
#else
if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_VAMPIRE))
#endif
{
m_bFog = true;
m_fFogNear = 0.0f;
m_fFogFar = 6000.0f;
#ifdef _XMASJORK2
m_dwFogColor = 0xCCF1FF;
#else
m_dwFogColor = 0xC30404;
#endif
}
else
{
FogInfo finfo = GetBsp()->GetFogInfo();
m_bFog = finfo.bFogEnable;
m_fFogNear = finfo.fNear;
m_fFogFar = finfo.fFar;
m_dwFogColor = finfo.dwFogColor;
}
m_bCreated = true;
add these in your sfx.mrs
https://www.sendspace.com/file/is2amu
ScreenShots
http://i67.tinypic.com/33uzjwh.jpg
http://i66.tinypic.com/qoiu6q.jpg
It's everything and I hope you enjoy it.:thumbup1:
Remembering that you can check the NULL value in m_pParticles.
Code:
if (m_pParticles[0])
{
m_pParticles[0]->Clear();
m_pParticles[0] = NULL;
}
if (m_pParticles[1])
{
m_pParticles[1]->Clear();
m_pParticles[1] = NULL;
}
if (m_pParticles[2])
{
m_pParticles[2]->Clear();
m_pParticles[2] = NULL;
}