1 (edited by SEG4 2016-07-09 19:21:01)

Topic: [QUESTION]XXLDDRace tiles?

How work XXLDDRace/DDRace tiles?
Why "@XXLTomate" (mybe) just add new TILE_... in mapitems.h and initialized him in character.cpp??? AND WHY IT WORK EXAMPLE TILE_XXL???

mapitems.h

    TILE_RAINBOW=176,
    TILE_XXL, //Between TILE_RAINBOW and TILE_ADMIN
    TILE_ADMIN,

charecter.cpp

if(((m_TileIndex == TILE_XXL) || (m_TileFIndex == TILE_XXL)))
    {
        if (m_LastIndexTile == TILE_XXL || m_LastIndexFrontTile == TILE_XXL)
            return;

        char aBuf[256];
        if (m_FastReload)
        {
            m_FastReload = false;
            m_ReloadMultiplier = 1000;
            str_format(aBuf, sizeof(aBuf), "XXL disabled");
        }
        else
        {
            m_FastReload = true;
            m_ReloadMultiplier = 10000;
            str_format(aBuf, sizeof(aBuf), "XXL enabled");
        }

        GameServer()->SendChatTarget(m_pPlayer->GetCID(), aBuf);
    }

Why it work? I did the same and it didn't work. sad

2

Re: [QUESTION]XXLDDRace tiles?

Your ID equals with the Tile ID?

3

Re: [QUESTION]XXLDDRace tiles?

unsigned char* wrote:

Your ID equals with the Tile ID?

Yes!

4 (edited by jiks_p 2016-07-10 09:09:59)

Re: [QUESTION]XXLDDRace tiles?

find IsValidGameTile method in mapitem.cpp
and add this code
||  Index == TILE_XXL
after this !
Index == TILE_AIR

5

Re: [QUESTION]XXLDDRace tiles?

jiks_p wrote:

find IsValidGameTile method in mapitem.cpp
and add this code
||  Index == TILE_XXL
after this !
Index == TILE_AIR

mapitems.h have not IsValidGameTile method! sad
[img]IsValidGameTile[/img]

6

Re: [QUESTION]XXLDDRace tiles?

//top xD
I NEED REPLY!!!

7

Re: [QUESTION]XXLDDRace tiles?

SEG4 wrote:
jiks_p wrote:

find IsValidGameTile method in mapitem.cpp
and add this code
||  Index == TILE_XXL
after this !
Index == TILE_AIR

mapitems.h have not IsValidGameTile method! sad
[img]IsValidGameTile[/img]

mapitems.cpp

There are three kinds of lies: lies, damned lies, and benchmarks.

8 (edited by SEG4 2016-07-10 23:16:12)

Re: [QUESTION]XXLDDRace tiles?

fallen.kn wrote:

mapitems.cpp

Where i can find location mapitems.cpp?

I found only this files. They use mapitems.h.
http://s018.radikal.ru/i517/1607/6d/31796ebddc40.png

9

Re: [QUESTION]XXLDDRace tiles?

SEG4 wrote:
fallen.kn wrote:

mapitems.cpp

Where i can find location mapitems.cpp?

I found only this files. They use mapitems.h.
http://s018.radikal.ru/i517/1607/6d/31796ebddc40.png

src/game/mapitems.cpp

There are three kinds of lies: lies, damned lies, and benchmarks.

10

Re: [QUESTION]XXLDDRace tiles?

Try src/game/collision.cpp

There should be somewhere a line ( I don't know exactly which mod you are using as base ) like

if(Index <= SOME_TILE)
        {
            switch(Index)
            {
            case TILE_DEATH:
                m_pTiles[i].m_Index = COLFLAG_DEATH;
                break;
            case TILE_SOLID:
                m_pTiles[i].m_Index = COLFLAG_SOLID;
                break;
                        ......

Change the (Index <= SOME_TILE) to the highest Tileindex you are using, if you did not already do so. If you are using DDNet as base it could be a little bit different.

Greetings,
FuroS

"Panos."
               -FuroS