Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Rotation Base (CW and TeamMatch) Gift XMAS

I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
Hello how are you guys, here I bring you as a Christmas gift as usual I give things away and provide support to those who have no knowledge but here I am once again. merry christmas.

let's get started

What is base rotation for gunz?

For me, in my concept, which I visualize is that the teams change their spawn for each round that is going to start, the base of the red team spawns in the red base and when it ends they spawn in the base of the opposing team.

ZGame.cpp
for case MMATCH_ROUNDSTATE_FINISH: and add these
Code:
			char szRotationMsg[50];
			sprintf(szRotationMsg, "The base rotation has started!");
			ZGetGameInterface()->GetCombatInterface()->m_Chat.OutputChatMsg(szRotationMsg);

ZMatch.cpp
for void ZMatch::InitCharactersPosition() and add these, compare the code that is already written there, which is similar to what you are going to put, here it is not copy and paste, be careful.

Code:
	if (IsTeamPlay())
	{
		int nSpawnIndex[2] = { 0, 0 };
		auto nSpawn = 0;

		for (ZCharacterManager::iterator itor = ZGetGame()->m_CharacterManager.begin();
			itor != ZGetGame()->m_CharacterManager.end(); ++itor)
		{
			ZCharacter* pCharacter = (ZCharacter*)(*itor).second;
			for (int i = 0; i < 2; i++)
			{
				if (pCharacter->GetTeamID() == MMT_RED + i)
				{
					if ((IsTeamPlay) && GetCurrRound() > 0 && GetCurrRound() % 2)
					{
						if (i == 0)
							nSpawn = 1;
						else
							nSpawn = 0;
					}
					else
						nSpawn = i;

					ZMapSpawnData* pSpawnData = ZGetGame()->GetMapDesc()->GetSpawnManager()->GetTeamData(nSpawn, nSpawnIndex[nSpawn]);

					if (pSpawnData != NULL)
					{
						pCharacter->SetPosition(pSpawnData->m_Pos);
						pCharacter->SetDirection(pSpawnData->m_Dir);

						nSpawnIndex[nSpawn]++;
					}
				}
			}
		}
		return;
	}

It is up to you what you want to do with this, if you want to make a type of switch in stage setting or a box to activate it in clan war.

wLEDMs3 - Rotation Base (CW and TeamMatch) Gift XMAS - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Banned
Banned
Joined
Aug 14, 2015
Messages
84
Reaction score
31
Still waiting for you to be fixed the problem I've got. Thanks mate. Happy new year cheers!

8NP7MG3 - Rotation Base (CW and TeamMatch) Gift XMAS - RaGEZONE Forums

jorklenis2 - Rotation Base (CW and TeamMatch) Gift XMAS - RaGEZONE Forums

jorklenis2 - Rotation Base (CW and TeamMatch) Gift XMAS - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Sep 27, 2016
Messages
151
Reaction score
10

Attachments

You must be registered for see attachments list
Back
Top