Topic: Looking for massive CTF maps with multiple flags
With the new 64 player vanilla mod, I've been hosting a server with 32 players and I feel like one flag wouldn't be enough.
You are not logged in. Please login or register.
Teeworlds Forum → Maps → Looking for massive CTF maps with multiple flags
With the new 64 player vanilla mod, I've been hosting a server with 32 players and I feel like one flag wouldn't be enough.
Does vanilla64 even support multi-flags?
Vanilla client can't render more than two flags (one red, one blue) and server can't send more than both flags at a time. Good luck with that! ^^
Siile you did that in CSTT..... Was it Hard?
If you have multiple flags you have to choose which flag gets snapped (sent to client). It's limited to a blue and a red flag, and if you try to snap more flags either the server or client showing the flags will crash (I don't remember which one did, but it caused issues).
Server's CTF gamecontroller also by default has no idea how to handle more than one of each flags.
Can render more than one flag...
// render flag
for(int i = 0; i < Num; i++)
{
IClient::CSnapItem Item;
const void *pData = Client()->SnapGetItem(IClient::SNAP_CURRENT, i, &Item);
if(Item.m_Type == NETOBJTYPE_FLAG)
{
const void *pPrev = Client()->SnapFindItem(IClient::SNAP_PREV, Item.m_Type, Item.m_ID);
if (pPrev)
{
const void *pPrevGameData = Client()->SnapFindItem(IClient::SNAP_PREV, NETOBJTYPE_GAMEDATA, m_pClient->m_Snap.m_GameDataSnapID);
RenderFlag(static_cast<const CNetObj_Flag *>(pPrev), static_cast<const CNetObj_Flag *>(pData),
static_cast<const CNetObj_GameData *>(pPrevGameData), m_pClient->m_Snap.m_pGameDataObj);
}
}
}
But can't store more than two flags... for this.. but never is used :S
else if(Item.m_Type == NETOBJTYPE_FLAG)
m_Snap.m_paFlags[Item.m_ID%2] = (const CNetObj_Flag *)pData;
Hack the ID.. idk if works properly xD
ONly can use RED or BLUE.
Ummm perhaps
const void *pPrev = Client()->SnapFindItem(IClient::SNAP_PREV, Item.m_Type, Item.m_ID);
Fuck all no? xDD
@unsigned char, I think you can't just hack the id, because I think it's actually displayed Like if it's 1 it's blue and if it's 0 it's red or something like that..... Ans naturally you can't have an array with multiple objects in one index.....
@unsigned char, I think you can't just hack the id, because I think it's actually displayed Like if it's 1 it's blue and if it's 0 it's red or something like that..... Ans naturally you can't have an array with multiple objects in one index.....
The color are render by m_Team...
if(pCurrent->m_Team == TEAM_RED)
RenderTools()->SelectSprite(SPRITE_FLAG_RED);
else
RenderTools()->SelectSprite(SPRITE_FLAG_BLUE);
But i will do a test for confirm xDD
Umm you can render more than 1 flag of the same color...
Wow, can you give a bit more information about the code you used?
And what happens if you pick up one of them? Or carry one of them to a Red flag?
Wow, can you give a bit more information about the code you used?
And what happens if you pick up one of them? Or carry one of them to a Red flag?
The big problem is that new flags lost prediction... because the game object only accept one carrier per flag.
For implement this, the big change it's use m_ID instead m_Team in Snap (CFlag).
For other questions: All is "supervised" by the controller... just works like you designed it
Teeworlds Forum → Maps → Looking for massive CTF maps with multiple flags
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.