- 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
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.
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.
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.