Instant character select code / jur13n's CW+Quest / 3D sound code / Clan create code

Results 1 to 1 of 1
  1. #1
    Gunz League owner Hakurah is offline
    MemberRank
    Dec 2006 Join Date
    Rio de JaneiroLocation
    602Posts

    Instant character select code / jur13n's CW+Quest / 3D sound code / Clan create code

    Hey guys. I posted here before asking for help for something else and here I am again asking for more from you. Sorry about that.

    Anyway, me and my friends are almost done creating a server for Brazilians to play in. I know most of you guys are saying the game is all but dead and that I shouldn't even be trying, but our thinking is that even if we get 10 of those people we enjoyed playing with back in the good times, that's enough. So I'm still trying my hand at this.

    There's one thing I'm pretty much stuck at:

    Clan creation with one sponsor: creating clans with four people using the create button works okay. Anyway, I followed this code to try and create a clan with only one extra member (I tried making the changes everywhere to make it so there's only a leader needed, but it got too complicated and long), but after selecting the person you want as a sponsor, there's no return ("The clan has been created" / "Waiting for agreement" etc.).

    Below is stuff I've fixed while I wait for someone to reply :P

    Instant character select: FIXED
    Spoiler:
    This gets rid of the transition that happens right after you log into the server. Instead of going down from the sky to the train stop where your character shows up, you'll face your characters right after you're done logging in. If you want to keep the sky behind your login screen, don't switch the last two lines (I have to warn you, the transition is abrupt, so it will look a little weird). I preferred changing them so that the background is the train already. Much cleaner. Anyway:

    Gunz Solution:


    ZGameInterface.cpp


    Line 1327
    Code:
        if ( m_pBackground)
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDSKY);
    Replace with:
    Code:
        if ( m_pBackground)
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDCHAR);
    Line 1339
    Code:
        if ( m_pBackground)
            m_pBackground->SetScene(LOGIN_SCENE_FALLDOWN);
    Replace with:
    Code:
        if ( m_pBackground)
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDCHAR);
    Line 1528
    Code:
        if ( m_pBackground)
        {
            m_pBackground->LoadMesh();
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDSKY);
        }
    Replace with:
    Code:
        if ( m_pBackground)
        {
            m_pBackground->LoadMesh();
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDCHAR);
        }
    Line 1571
    Code:
            if ( m_pBackground)
                m_pBackground->SetScene(LOGIN_SCENE_FALLDOWN);
    Replace with:
    Code:
            if ( m_pBackground)
                m_pBackground->SetScene(LOGIN_SCENE_FIXEDCHAR);
    Line 1662
    Code:
            if ( m_pBackground)
                m_pBackground->SetScene(LOGIN_SCENE_FALLDOWN);
    Replace with:
    Code:
            if ( m_pBackground)
                m_pBackground->SetScene(LOGIN_SCENE_FIXEDCHAR);
    Line 1671
    Code:
            m_pBackground->LoadMesh();
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDSKY);
    Replace with:
    Code:
            m_pBackground->LoadMesh();
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDCHAR);
    Line 1693
    Code:
            if ( m_pBackground)
                m_pBackground->SetScene(LOGIN_SCENE_FALLDOWN);
    Replace with:
    Code:
            if ( m_pBackground)
                m_pBackground->SetScene(LOGIN_SCENE_FIXEDCHAR);

    If you'd like the Login background changed along with the rest:

    Line 1635
    Code:
            m_pBackground->LoadMesh();
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDSKY);
    Replace with:
    Code:
            m_pBackground->LoadMesh();
            m_pBackground->SetScene(LOGIN_SCENE_FIXEDCHAR);
    Line 2881
    Code:
        if( m_pBackground!=0)
        {
            m_pBackground->SetScene( LOGIN_SCENE_FIXEDSKY);
            m_pBackground->LoadMesh();
            m_pBackground->Draw();
        }
    Replace with:
    Code:
        if( m_pBackground!=0)
        {
            m_pBackground->SetScene( LOGIN_SCENE_FIXEDCHAR);
            m_pBackground->LoadMesh();
            m_pBackground->Draw();
        }


    Clan wars + Quests in the same server: FIXED

    Spoiler:
    This tutorial is not enough. More changes are necessary.
    This tutorial is the way to go, sort of, because it did return a lot of errors I wasn't able to solve until I went back a version of my source. I manually changed every single MSM_CLAN to MSM_QUEST. In some cases, instead of taking off MSM_CLAN, I only included MSM_QUEST to the code. Somehow it worked. It's been so many changes that I don't even know how to explain it to you guys, I'm really sorry about that.


    3D Sound code: FIXED

    Spoiler:
    There were missing bShotgunSound changes at ZSoundEngine.cpp. Some stuff missing from ZSoundEngine.h too. All done now and it's working as it should.


    Team Deathmatch and Team games with solo game spawns: FIXED
    Spoiler:
    MatchServer Solution:

    CSCommon
    MMatchWorldItem.cpp (Ln 334):
    Code:
            if (bIsTeamPlay)        {
                int nSpawnCount = MGetMapsWorldItemSpawnInfo()->m_MapsSpawnInfo[nMapID].m_nTeamSpawnCount;
                if (nSpawnCount > 0)
                {
                    m_SpawnInfos.reserve(nSpawnCount);
                    
                    for (int i = 0; i < nSpawnCount; i++)
                    {
                        MMatchWorldItemSpawnInfo SpawnInfos;
                        SpawnInfos.x = pSpawnInfoSet->SoloSpawnInfo[i].x;
                        SpawnInfos.y = pSpawnInfoSet->SoloSpawnInfo[i].y;
                        SpawnInfos.z = pSpawnInfoSet->SoloSpawnInfo[i].z;
                        SpawnInfos.nCoolTime = pSpawnInfoSet->SoloSpawnInfo[i].nCoolTime;
                        SpawnInfos.nItemID = pSpawnInfoSet->SoloSpawnInfo[i].nItemID;
                        m_SpawnInfos.push_back(SpawnInfos);
                    }
                }
                m_nSpawnItemCount = nSpawnCount;
            }
    Replace with:

    Code:
            if (bIsTeamPlay)        {
                int nSpawnCount = MGetMapsWorldItemSpawnInfo()->m_MapsSpawnInfo[nMapID].m_nTeamSpawnCount;
                if (nSpawnCount > 0)
                {
                    m_SpawnInfos.reserve(nSpawnCount);
                    
                    for (int i = 0; i < nSpawnCount; i++)
                    {
                        MMatchWorldItemSpawnInfo SpawnInfos;
                        SpawnInfos.x = pSpawnInfoSet->TeamSpawnInfo[i].x;
                        SpawnInfos.y = pSpawnInfoSet->TeamSpawnInfo[i].y;
                        SpawnInfos.z = pSpawnInfoSet->TeamSpawnInfo[i].z;
                        SpawnInfos.nCoolTime = pSpawnInfoSet->TeamSpawnInfo[i].nCoolTime;
                        SpawnInfos.nItemID = pSpawnInfoSet->TeamSpawnInfo[i].nItemID;
                        m_SpawnInfos.push_back(SpawnInfos);
                    }
                }
                m_nSpawnItemCount = nSpawnCount;
            }


    I'm sorry I wrote so much, I just wanted to make everything clear so that you guys know exactly where I'm at. I really hope someone out there can help me with this. We're pretty much the last ones standing for the Brazilian GunZ community and I'm not ready to see it die.

    Have a nice one, guys! And don't give up on this game, it still is one of the best ones out there!
    Last edited by Hakurah; 17-07-14 at 06:20 AM.




Advertisement