[help] rotation base

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Registered RafaelFast is offline
    MemberRank
    Aug 2019 Join Date
    7Posts

    [help] rotation base

    Could someone help me to put rotation base in each round?
    Would someone make the code available?


  2. #2
    RailGunZ Soon! megol is offline
    True MemberRank
    Jun 2012 Join Date
    251Posts

    Re: [help] rotation base

    Quote Originally Posted by RafaelFast View Post
    Could someone help me to put rotation base in each round?
    Would someone make the code available?
    I don't believe it.
    Owner RailGunZ

  3. #3
    Registered RafaelFast is offline
    MemberRank
    Aug 2019 Join Date
    7Posts

    Re: [help] rotation base

    Quote Originally Posted by megol View Post
    I don't believe it.
    I know the sources have it, but I would like to know which source, and the exact location I should look for.I'm not good with programming, so I'm asking for support.I know it's easy for anyone who messes with it.But if anyone can collaborate, I appreciate it.

  4. #4
    Feel the wind. Orby is online now
    True MemberRank
    Oct 2015 Join Date
    WorldLocation
    256Posts

    Re: [help] rotation base

    Quote Originally Posted by RafaelFast View Post
    I know the sources have it, but I would like to know which source, and the exact location I should look for.I'm not good with programming, so I'm asking for support.I know it's easy for anyone who messes with it.But if anyone can collaborate, I appreciate it.
    I believe that there is no such thing in any published source so far.
    Live as if there is no tomorrow, and do wonders.

  5. #5
    Registered RafaelFast is offline
    MemberRank
    Aug 2019 Join Date
    7Posts

    Re: [help] rotation base

    Quote Originally Posted by Orby View Post
    I believe that there is no such thing in any published source so far.
    The gunz that are currently active all have the base rotation.

  6. #6
    Member xDividerx is offline
    MemberRank
    Feb 2012 Join Date
    94Posts

    Re: [help] rotation base

    Can you show a video of the feature?
    . You may stop this individual, but you can't stop us all... after all, we're all alike. -The Mentor
    [SIGPIC][/SIGPIC]

  7. #7
    Registered RafaelFast is offline
    MemberRank
    Aug 2019 Join Date
    7Posts

    Re: [help] rotation base

    Quote Originally Posted by xDividerx View Post
    Can you show a video of the feature?
    I can't, but I can explain it better.
    For example on the Mansion map, in round 1 you are born in the base blue.
    When the round ends and round 2 begins, you are born in the base red.
    And so on.

    Or on the Garden map, in the first round you spawn on top, and on the second round you spawn on the bottom.
    In the third round you will be born on top again.

  8. #8
    Feel the wind. Orby is online now
    True MemberRank
    Oct 2015 Join Date
    WorldLocation
    256Posts

    Re: [help] rotation base

    Quote Originally Posted by RafaelFast View Post
    The gunz that are currently active all have the base rotation.
    If most other servers have base rotation and because the developer of each server has developed their own code.
    Live as if there is no tomorrow, and do wonders.

  9. #9
    Member xDividerx is offline
    MemberRank
    Feb 2012 Join Date
    94Posts

    Re: [help] rotation base

    Quote Originally Posted by RafaelFast View Post
    I can't, but I can explain it better.
    For example on the Mansion map, in round 1 you are born in the base blue.
    When the round ends and round 2 begins, you are born in the base red.
    And so on.

    Or on the Garden map, in the first round you spawn on top, and on the second round you spawn on the bottom.
    In the third round you will be born on top again.
    So if I'm understanding you, this is for Team matches?
    . You may stop this individual, but you can't stop us all... after all, we're all alike. -The Mentor
    [SIGPIC][/SIGPIC]

  10. #10
    RailGunZ Soon! megol is offline
    True MemberRank
    Jun 2012 Join Date
    251Posts

    Re: [help] rotation base

    Quote Originally Posted by Orby View Post
    If most other servers have base rotation and because the developer of each server has developed their own code.
    I agree with what you say.

    - - - Updated - - -

    Quote Originally Posted by RafaelFast View Post
    The gunz that are currently active all have the base rotation.
    It is not obvious, contact programming services and ask for this in exchange for money or other things, in my case I bought it and asked for services for that and other things.
    Owner RailGunZ

  11. #11
    Aikatsu! jorklenis2 is offline
    True MemberRank
    Oct 2011 Join Date
    PanamáLocation
    762Posts

    Re: [help] rotation base

    Quote Originally Posted by RafaelFast View Post
    Could someone help me to put rotation base in each round?
    Would someone make the code available?
    Are you looking for this?
    https://imgur.com/a/xUdvs8W

    This is not public and I doubt that it is public, if you are lucky enough that someone does you a favor it would be fine but I am afraid I will not do it, I no longer have the interest to contribute anything in this section, there is a boy who made a publication which says to be willing to help people here I leave the post.

    https://forum.ragezone.com/f311/help...elped-1200864/

    He knows a lot of people who are good at this, I'm sure he will ask for the support of those people to help you.
    Last edited by jorklenis2; 1 Week Ago at 09:12 PM.

  12. #12
    Member xDividerx is offline
    MemberRank
    Feb 2012 Join Date
    94Posts

    Re: [help] rotation base

    Quote Originally Posted by jorklenis2 View Post
    Are you looking for this?
    https://imgur.com/a/xUdvs8W

    This is not public and I doubt that it is public, if you are lucky enough that someone does you a favor it would be fine but I am afraid I will not do it, I no longer have the interest to contribute anything in this section, there is a boy who made a publication which says to be willing to help people here I leave the post.

    https://forum.ragezone.com/f311/help...elped-1200864/

    He knows a lot of people who are good at this, I'm sure he will ask for the support of those people to help you.
    Thank you for the visual aid Jork. I think I see what he wants.
    . You may stop this individual, but you can't stop us all... after all, we're all alike. -The Mentor
    [SIGPIC][/SIGPIC]

  13. #13
    Registered Ryusaki is offline
    MemberRank
    Oct 2019 Join Date
    7Posts

    Re: [help] rotation base

    Go to ZMatch.cpp and locate the method InitCharactersPosition
    Replace the first if with this one:

    Code:
    if (this->IsTeamPlay()) 
    {
        int nSpawnIndex[2] = { 0, 0 };
        for (auto const& pair : ZGetGame()->m_CharacterManager)
        {
            auto pCharacter = pair.second;
            const auto teamId = pCharacter->GetTeamID();
    
            if (teamId == MMT_RED || teamId == MMT_BLUE)
            {
                auto teamIndex = teamId % MMT_RED;
                if (this->GetCurrRound() % 2 == 0)
                {
                    teamIndex = teamIndex == 0 ? 1 : 0;
                }
    
                if (auto pSpawnData = ZGetGame()->GetMapDesc()->GetSpawnManager()->GetTeamData(teamIndex, nSpawnIndex[teamIndex]))
                {
                    pCharacter->SetPosition(pSpawnData->m_Pos);
                    pCharacter->SetDirection(pSpawnData->m_Dir);
                    nSpawnIndex[teamIndex]++;
                }
           }
        }
        return;
    }
    Obs: I wrote using Notepad++, so I haven't tested it. It's just a base and probably won't work properly with custom game modes (eg. CTF) unless you do a few changes. You also might want to add an option to turn this on / off.
    Last edited by Ryusaki; 1 Week Ago at 02:54 AM. Reason: Accessing ZGame ptr from ZGetGame()

  14. #14
    Aikatsu! jorklenis2 is offline
    True MemberRank
    Oct 2011 Join Date
    PanamáLocation
    762Posts

    Re: [help] rotation base

    Quote Originally Posted by Ryusaki View Post
    Go to ZMatch.cpp and locate the method InitCharactersPosition
    Replace the first if with this one:

    Code:
    if (this->IsTeamPlay()) 
    {
        int nSpawnIndex[2] = { 0, 0 };
        for (auto const& pair : g_pGame->m_CharacterManager)
        {
            auto pCharacter = pair.second;
            const auto teamId = pCharacter->GetTeamID();
    
            if (teamId == MMT_RED || teamId == MMT_BLUE)
            {
                auto teamIndex = teamId % MMT_RED;
                if (this->GetCurrRound() % 2 == 0)
                {
                    teamIndex = teamIndex == 0 ? 1 : 0;
                }
    
                if (auto pSpawnData = g_pGame->GetMapDesc()->GetSpawnManager()->GetTeamData(teamIndex, nSpawnIndex[teamIndex]))
                {
                    pCharacter->SetPosition(pSpawnData->m_Pos);
                    pCharacter->SetDirection(pSpawnData->m_Dir);
                    nSpawnIndex[teamIndex]++;
                }
           }
        }
        return;
    }
    Obs: I wrote using Notepad++, so I haven't tested it. It's just a base and probably won't work properly with custom game modes (eg. CTF) unless you do a few changes. You also might want to add an option to turn this on / off.
    This is definitely not going to work, it looks like for a source code version 2007 or possibly refined gunz.

  15. #15
    Registered Ryusaki is offline
    MemberRank
    Oct 2019 Join Date
    7Posts

    Re: [help] rotation base

    Quote Originally Posted by jorklenis2 View Post
    This is definitely not going to work, it looks like for a source code version 2007 or possibly refined gunz.
    Nop, this works. Just tested and it does what OP asked, and no, I didn't use refined, but a random source that I've found in the Gunz Repo. It's true that it's not from a 1.5 source, but no matter, since the only thing that changed in the InitCharactersPosition method was the way how ZGame is accessed (it uses ZGetGame() instead of g_pGame).



Page 1 of 2 12 LastLast

Advertisement