Many removals

Lots of NiGHTS code, lots of ringslinger code, revert actnum behavior back to vanilla
This commit is contained in:
Sally Coolatta 2020-08-10 21:45:51 -04:00
parent a442b6a4f6
commit c96bd5f64a
23 changed files with 108 additions and 1912 deletions

View file

@ -586,12 +586,6 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
rsp->oldrelangleturn = (INT16)SHORT(players[i].oldrelangleturn);
rsp->aiming = (angle_t)LONG(players[i].aiming);
rsp->currentweapon = LONG(players[i].currentweapon);
rsp->ringweapons = LONG(players[i].ringweapons);
rsp->ammoremoval = (UINT16)SHORT(players[i].ammoremoval);
rsp->ammoremovaltimer = (tic_t)LONG(players[i].ammoremovaltimer);
rsp->ammoremovalweapon = LONG(players[i].ammoremovalweapon);
for (j = 0; j < NUMPOWERS; ++j)
rsp->powers[j] = (UINT16)SHORT(players[i].powers[j]);
@ -602,12 +596,10 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
// Score is resynched in the rspfirm resync packet
rsp->rings = SHORT(players[i].rings);
rsp->spheres = SHORT(players[i].spheres);
rsp->lives = players[i].lives;
rsp->continues = players[i].continues;
rsp->scoreadd = players[i].scoreadd;
rsp->xtralife = players[i].xtralife;
rsp->pity = players[i].pity;
rsp->skincolor = players[i].skincolor;
rsp->skin = LONG(players[i].skin);
@ -730,12 +722,6 @@ static void resynch_read_player(resynch_pak *rsp)
players[i].oldrelangleturn = (INT16)SHORT(rsp->oldrelangleturn);
players[i].aiming = (angle_t)LONG(rsp->aiming);
players[i].currentweapon = LONG(rsp->currentweapon);
players[i].ringweapons = LONG(rsp->ringweapons);
players[i].ammoremoval = (UINT16)SHORT(rsp->ammoremoval);
players[i].ammoremovaltimer = (tic_t)LONG(rsp->ammoremovaltimer);
players[i].ammoremovalweapon = LONG(rsp->ammoremovalweapon);
for (j = 0; j < NUMPOWERS; ++j)
players[i].powers[j] = (UINT16)SHORT(rsp->powers[j]);
@ -746,12 +732,10 @@ static void resynch_read_player(resynch_pak *rsp)
// Score is resynched in the rspfirm resync packet
players[i].rings = SHORT(rsp->rings);
players[i].spheres = SHORT(rsp->spheres);
players[i].lives = rsp->lives;
players[i].continues = rsp->continues;
players[i].scoreadd = rsp->scoreadd;
players[i].xtralife = rsp->xtralife;
players[i].pity = rsp->pity;
players[i].skincolor = rsp->skincolor;
players[i].skin = LONG(rsp->skin);
@ -876,16 +860,8 @@ static void resynch_read_player(resynch_pak *rsp)
players[i].mo->scalespeed = (fixed_t)LONG(rsp->scalespeed);
// And finally, SET THE MOBJ SKIN damn it.
if ((players[i].powers[pw_carry] == CR_NIGHTSMODE) && (skins[players[i].skin].sprites[SPR2_NFLY].numframes == 0))
{
players[i].mo->skin = &skins[DEFAULTNIGHTSSKIN];
players[i].mo->color = skins[DEFAULTNIGHTSSKIN].prefcolor; // this will be corrected by thinker to super flash
}
else
{
players[i].mo->skin = &skins[players[i].skin];
players[i].mo->color = players[i].skincolor; // this will be corrected by thinker to super flash/mario star
}
players[i].mo->skin = &skins[players[i].skin];
players[i].mo->color = players[i].skincolor; // this will be corrected by thinker to super flash/mario star
P_SetThingPosition(players[i].mo);
}
@ -999,7 +975,6 @@ static inline void resynch_write_others(resynchend_pak *rst)
UINT8 i;
rst->ingame = 0;
rst->outofcoop = 0;
for (i = 0; i < MAXPLAYERS; ++i)
{
@ -1015,8 +990,6 @@ static inline void resynch_write_others(resynchend_pak *rst)
if (!players[i].spectator)
rst->ingame |= (1<<i);
if (players[i].outofcoop)
rst->outofcoop |= (1<<i);
rst->ctfteam[i] = (INT32)LONG(players[i].ctfteam);
rst->score[i] = (UINT32)LONG(players[i].score);
rst->marescore[i] = (UINT32)LONG(players[i].marescore);
@ -1032,13 +1005,11 @@ static inline void resynch_read_others(resynchend_pak *p)
{
UINT8 i;
UINT32 loc_ingame = (UINT32)LONG(p->ingame);
UINT32 loc_outofcoop = (UINT32)LONG(p->outofcoop);
for (i = 0; i < MAXPLAYERS; ++i)
{
// We don't care if they're in the game or not, just write all the data.
players[i].spectator = !(loc_ingame & (1<<i));
players[i].outofcoop = (loc_outofcoop & (1<<i));
players[i].ctfteam = (INT32)LONG(p->ctfteam[i]); // no, 0 does not mean spectator, at least not in Match
players[i].score = (UINT32)LONG(p->score[i]);
players[i].marescore = (UINT32)LONG(p->marescore[i]);
@ -1490,47 +1461,31 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
// set up the levelstring
if (netbuffer->u.serverinfo.iszone || (mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
{
if (mapheaderinfo[gamemap-1]->actnum[0])
snprintf(netbuffer->u.serverinfo.maptitle,
sizeof netbuffer->u.serverinfo.maptitle,
"%s %s",
mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum);
else
snprintf(netbuffer->u.serverinfo.maptitle,
sizeof netbuffer->u.serverinfo.maptitle,
"%s",
mapheaderinfo[gamemap-1]->lvlttl);
if (snprintf(netbuffer->u.serverinfo.maptitle,
sizeof netbuffer->u.serverinfo.maptitle,
"%s",
mapheaderinfo[gamemap-1]->lvlttl) < 0);
{
// If there's an encoding error, send UNKNOWN, we accept that the above may be truncated
strncpy(netbuffer->u.serverinfo.maptitle, "UNKNOWN", sizeof netbuffer->u.serverinfo.maptitle);
}
}
else
{
if (mapheaderinfo[gamemap-1]->actnum[0])
if (snprintf(netbuffer->u.serverinfo.maptitle,
sizeof netbuffer->u.serverinfo.maptitle,
"%s %s",
mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl) < 0)
{
if (snprintf(netbuffer->u.serverinfo.maptitle,
sizeof netbuffer->u.serverinfo.maptitle,
"%s %s %s",
mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum) < 0)
{
// If there's an encoding error, send UNKNOWN, we accept that the above may be truncated
strncpy(netbuffer->u.serverinfo.maptitle, "UNKNOWN", sizeof netbuffer->u.serverinfo.maptitle);
}
}
else
{
if (snprintf(netbuffer->u.serverinfo.maptitle,
sizeof netbuffer->u.serverinfo.maptitle,
"%s %s",
mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl) < 0)
{
// If there's an encoding error, send UNKNOWN, we accept that the above may be truncated
strncpy(netbuffer->u.serverinfo.maptitle, "UNKNOWN", sizeof netbuffer->u.serverinfo.maptitle);
}
// If there's an encoding error, send UNKNOWN, we accept that the above may be truncated
strncpy(netbuffer->u.serverinfo.maptitle, "UNKNOWN", sizeof netbuffer->u.serverinfo.maptitle);
}
}
}
else
strncpy(netbuffer->u.serverinfo.maptitle, "UNKNOWN", sizeof netbuffer->u.serverinfo.maptitle);
netbuffer->u.serverinfo.actnum = 0; //mapheaderinfo[gamemap-1]->actnum
netbuffer->u.serverinfo.actnum = mapheaderinfo[gamemap-1]->actnum;
memset(netbuffer->u.serverinfo.httpsource, 0, MAX_MIRROR_LENGTH);

View file

@ -188,7 +188,6 @@ typedef struct
fixed_t flagz[2];
UINT32 ingame; // Spectator bit for each player
UINT32 outofcoop; // outofcoop bit for each player
INT32 ctfteam[MAXPLAYERS]; // Which team? (can't be 1 bit, since in regular Match there are no teams)
// Resynch game scores and the like all at once
@ -213,8 +212,6 @@ typedef struct
INT16 oldrelangleturn;
angle_t aiming;
INT32 currentweapon;
INT32 ringweapons;
UINT16 powers[NUMPOWERS];
INT32 kartstuff[NUMKARTSTUFF]; // SRB2kart
@ -222,12 +219,10 @@ typedef struct
// Score is resynched in the confirm resync packet
INT16 rings;
INT16 spheres;
SINT8 lives;
SINT8 continues;
UINT8 scoreadd;
SINT8 xtralife;
SINT8 pity;
UINT16 skincolor;
INT32 skin;

View file

@ -5531,15 +5531,15 @@ static void Command_Showmap_f(void)
{
if (mapheaderinfo[gamemap-1]->zonttl[0] && !(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
{
if (mapheaderinfo[gamemap-1]->actnum[0])
CONS_Printf("%s (%d): %s %s %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum);
if (mapheaderinfo[gamemap-1]->actnum > 0)
CONS_Printf("%s (%d): %s %s %d\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum);
else
CONS_Printf("%s (%d): %s %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl);
}
else
{
if (mapheaderinfo[gamemap-1]->actnum[0])
CONS_Printf("%s (%d): %s %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum);
if (mapheaderinfo[gamemap-1]->actnum > 0)
CONS_Printf("%s (%d): %s %d\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum);
else
CONS_Printf("%s (%d): %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl);
}

View file

@ -182,23 +182,8 @@ typedef enum
typedef enum
{
CR_NONE = 0,
// The generic case is suitable for most objects.
CR_GENERIC,
// Tails carry.
CR_PLAYER,
// NiGHTS mode. Not technically a CARRYING, but doesn't stack with any of the others, so might as well go here.
CR_NIGHTSMODE,
CR_NIGHTSFALL,
// Old Brak sucks hard, but this gimmick could be used for something better, so we might as well continue supporting it.
CR_BRAKGOOP,
// Specific level gimmicks.
CR_ZOOMTUBE,
CR_ROPEHANG,
CR_MACESPIN,
CR_MINECART,
CR_ROLLOUT,
CR_PTERABYTE,
CR_DUSTDEVIL
} carrytype_t; // pw_carry
// Player powers. (don't edit this comment)
@ -517,15 +502,6 @@ typedef struct player_s
// player's ring count
INT16 rings;
INT16 spheres;
SINT8 pity; // i pity the fool.
INT32 currentweapon; // current weapon selected.
INT32 ringweapons; // weapons currently obtained.
UINT16 ammoremoval; // amount of ammo removed for the current weapon.
tic_t ammoremovaltimer; // flashing counter for ammo used.
INT32 ammoremovalweapon; // weapon from which the ammo was removed.
// Power ups. invinc and invis are tic counters.
UINT16 powers[NUMPOWERS];

View file

@ -11216,18 +11216,7 @@ struct {
// Carrying
{"CR_NONE",CR_NONE},
{"CR_GENERIC",CR_GENERIC},
{"CR_PLAYER",CR_PLAYER},
{"CR_NIGHTSMODE",CR_NIGHTSMODE},
{"CR_NIGHTSFALL",CR_NIGHTSFALL},
{"CR_BRAKGOOP",CR_BRAKGOOP},
{"CR_ZOOMTUBE",CR_ZOOMTUBE},
{"CR_ROPEHANG",CR_ROPEHANG},
{"CR_MACESPIN",CR_MACESPIN},
{"CR_MINECART",CR_MINECART},
{"CR_ROLLOUT",CR_ROLLOUT},
{"CR_PTERABYTE",CR_PTERABYTE},
{"CR_DUSTDEVIL",CR_DUSTDEVIL},
// Ring weapons (ringweapons_t)
// Useful for A_GiveWeapon

View file

@ -2152,9 +2152,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
boolean bot;
UINT8 botdifficulty;
SINT8 pity;
INT16 rings;
INT16 spheres;
INT16 playerangleturn;
INT16 oldrelangleturn;
@ -2227,7 +2225,6 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
mare = players[player].mare;
bot = players[player].bot;
botdifficulty = players[player].botvars.difficulty;
pity = players[player].pity;
// SRB2kart
if (betweenmaps || leveltime < starttime)
@ -2283,7 +2280,6 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
p->quittime = quittime;
p->splitscreenindex = splitscreenindex;
p->spectator = spectator;
p->outofcoop = outofcoop;
p->angleturn = playerangleturn;
p->oldrelangleturn = oldrelangleturn;
@ -2316,9 +2312,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
p->mare = mare;
p->bot = bot;
p->botvars.difficulty = botdifficulty;
p->pity = pity;
p->rings = rings;
p->spheres = spheres;
// SRB2kart
p->kartstuff[k_itemroulette] = itemroulette;
@ -4784,17 +4778,15 @@ char *G_BuildMapTitle(INT32 mapnum)
zonetext = M_GetText("Zone");
len += strlen(zonetext) + 1; // ' ' + zonetext
}
if (strlen(mapheaderinfo[mapnum-1]->actnum) > 0)
{
actnum = M_GetText(mapheaderinfo[mapnum-1]->actnum);
len += strlen(actnum) + 1; // ' ' + actnum
}
if (actnum > 0)
len += 1 + 11; // ' ' + INT32
title = Z_Malloc(len, PU_STATIC, NULL);
sprintf(title, "%s", mapheaderinfo[mapnum-1]->lvlttl);
if (zonetext) sprintf(title + strlen(title), " %s", zonetext);
if (actnum) sprintf(title + strlen(title), " %s", actnum);
if (actnum) sprintf(title + strlen(title), " %d", actnum);
}
return title;

View file

@ -2194,16 +2194,6 @@ void HU_Drawer(void)
INT32 strength = ((pausedelay - 1 - NEWTICRATE/2)*10)/(NEWTICRATE/3);
INT32 y = hudinfo[HUD_LIVES].y - 13;
if (players[consoleplayer].powers[pw_carry] == CR_NIGHTSMODE)
y -= 16;
else
{
if (players[consoleplayer].pflags & PF_AUTOBRAKE)
y -= 8;
if (players[consoleplayer].pflags & PF_ANALOGMODE)
y -= 8;
}
V_DrawThinString(hudinfo[HUD_LIVES].x-2, y,
hudinfo[HUD_LIVES].f|((leveltime & 4) ? V_SKYMAP : V_BLUEMAP),
"HOLD TO RETRY...");

View file

@ -2070,7 +2070,7 @@ static int mapheaderinfo_get(lua_State *L)
else if (fastcmp(field,"zonttl"))
lua_pushstring(L, header->zonttl);
else if (fastcmp(field,"actnum"))
lua_pushstring(L, header->actnum);
lua_pushinteger(L, header->actnum);
else if (fastcmp(field,"typeoflevel"))
lua_pushinteger(L, header->typeoflevel);
else if (fastcmp(field,"nextlevel"))

View file

@ -211,20 +211,6 @@ static int player_get(lua_State *L)
lua_pushangle(L, plr->drawangle);
else if (fastcmp(field,"rings"))
lua_pushinteger(L, plr->rings);
else if (fastcmp(field,"spheres"))
lua_pushinteger(L, plr->spheres);
else if (fastcmp(field,"pity"))
lua_pushinteger(L, plr->pity);
else if (fastcmp(field,"currentweapon"))
lua_pushinteger(L, plr->currentweapon);
else if (fastcmp(field,"ringweapons"))
lua_pushinteger(L, plr->ringweapons);
else if (fastcmp(field,"ammoremoval"))
lua_pushinteger(L, plr->ammoremoval);
else if (fastcmp(field,"ammoremovaltimer"))
lua_pushinteger(L, plr->ammoremovaltimer);
else if (fastcmp(field,"ammoremovalweapon"))
lua_pushinteger(L, plr->ammoremovalweapon);
else if (fastcmp(field,"powers"))
LUA_PushUserdata(L, plr->powers, META_POWERS);
else if (fastcmp(field,"kartstuff"))
@ -421,8 +407,6 @@ static int player_get(lua_State *L)
lua_pushangle(L, plr->awayviewaiming);
else if (fastcmp(field,"spectator"))
lua_pushboolean(L, plr->spectator);
else if (fastcmp(field,"outofcoop"))
lua_pushboolean(L, plr->outofcoop);
else if (fastcmp(field,"bot"))
lua_pushboolean(L, plr->bot);
else if (fastcmp(field,"jointime"))
@ -502,20 +486,6 @@ static int player_set(lua_State *L)
plr->drawangle = luaL_checkangle(L, 3);
else if (fastcmp(field,"rings"))
plr->rings = (INT32)luaL_checkinteger(L, 3);
else if (fastcmp(field,"spheres"))
plr->spheres = (INT32)luaL_checkinteger(L, 3);
else if (fastcmp(field,"pity"))
plr->pity = (SINT8)luaL_checkinteger(L, 3);
else if (fastcmp(field,"currentweapon"))
plr->currentweapon = (INT32)luaL_checkinteger(L, 3);
else if (fastcmp(field,"ringweapons"))
plr->ringweapons = (INT32)luaL_checkinteger(L, 3);
else if (fastcmp(field,"ammoremoval"))
plr->ammoremoval = (UINT16)luaL_checkinteger(L, 3);
else if (fastcmp(field,"ammoremovaltimer"))
plr->ammoremovaltimer = (tic_t)luaL_checkinteger(L, 3);
else if (fastcmp(field,"ammoremovalweapon"))
plr->ammoremovalweapon = (INT32)luaL_checkinteger(L, 3);
else if (fastcmp(field,"powers"))
return NOSET;
else if (fastcmp(field,"pflags"))
@ -751,8 +721,6 @@ static int player_set(lua_State *L)
plr->awayviewaiming = luaL_checkangle(L, 3);
else if (fastcmp(field,"spectator"))
plr->spectator = lua_toboolean(L, 3);
else if (fastcmp(field,"outofcoop"))
plr->outofcoop = lua_toboolean(L, 3);
else if (fastcmp(field,"bot"))
return NOSET;
else if (fastcmp(field,"jointime"))

View file

@ -1147,9 +1147,6 @@ boolean OP_FreezeObjectplace(void)
if (!objectplacing)
return false;
if ((maptol & TOL_NIGHTS) && (players[consoleplayer].powers[pw_carry] == CR_NIGHTSMODE))
return false;
return true;
}
@ -1476,9 +1473,6 @@ void Command_ObjectPlace_f(void)
{
objectplacing = true;
if (players[0].powers[pw_carry] == CR_NIGHTSMODE)
return;
if (!COM_CheckParm("-silent"))
{
HU_SetCEchoFlags(V_RETURN8|V_MONOSPACE|V_AUTOFADEOUT);
@ -1545,9 +1539,8 @@ void Command_ObjectPlace_f(void)
{
objectplacing = false;
// Don't touch the NiGHTS Objectplace stuff.
// ... or if the mo mysteriously vanished.
if (!players[0].mo || (players[0].powers[pw_carry] == CR_NIGHTSMODE))
// Don't touch if the mo mysteriously vanished.
if (!players[0].mo)
return;
// If still in dummy state, get out of it.

View file

@ -3917,15 +3917,15 @@ static void M_DrawPauseMenu(void)
if (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0)
{
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
V_DrawString(40, 28, highlightflags, va("%s %s %s", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum));
if (mapheaderinfo[gamemap-1]->actnum > 0)
V_DrawString(40, 28, highlightflags, va("%s %s %d", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum));
else
V_DrawString(40, 28, highlightflags, va("%s %s", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl));
}
else
{
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
V_DrawString(40, 28, highlightflags, va("%s %s", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum));
if (mapheaderinfo[gamemap-1]->actnum > 0)
V_DrawString(40, 28, highlightflags, va("%s %d", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum));
else
V_DrawString(40, 28, highlightflags, mapheaderinfo[gamemap-1]->lvlttl);
}
@ -7445,11 +7445,11 @@ static void M_DrawStatsMaps(int location)
M_DrawMapEmblems(mnum+1, 295, y);
if (mapheaderinfo[mnum]->levelflags & LF_NOZONE)
V_DrawString(20, y, 0, va("%s %s",
V_DrawString(20, y, 0, va("%s %d",
mapheaderinfo[mnum]->lvlttl,
mapheaderinfo[mnum]->actnum));
else
V_DrawString(20, y, 0, va("%s %s %s",
V_DrawString(20, y, 0, va("%s %s %d",
mapheaderinfo[mnum]->lvlttl,
(mapheaderinfo[mnum]->zonttl[0] ? mapheaderinfo[mnum]->zonttl : "ZONE"),
mapheaderinfo[mnum]->actnum));

View file

@ -824,7 +824,8 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
if (gamestate == GS_LEVEL && mapheaderinfo[gamemap-1]->lvlttl[0] != '\0')
snprintf(lvlttltext, 48, "%s%s%s",
mapheaderinfo[gamemap-1]->lvlttl,
(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " Zone",
(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" :
(mapheaderinfo[gamemap-1]->zonttl[0] != '\0') ? va(" %s",mapheaderinfo[gamemap-1]->zonttl) : " Zone",
(mapheaderinfo[gamemap-1]->actnum > 0) ? va(" %d",mapheaderinfo[gamemap-1]->actnum) : "");
else
snprintf(lvlttltext, 48, "Unknown");

View file

@ -6643,8 +6643,7 @@ void A_MixUp(mobj_t *actor)
// Count the number of players in the game
// and grab their xyz coords
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] && players[i].mo && players[i].mo->health > 0 && players[i].playerstate == PST_LIVE
&& !players[i].exiting && !players[i].powers[pw_super] && players[i].powers[pw_carry] != CR_NIGHTSMODE)
if (playeringame[i] && players[i].mo && players[i].mo->health > 0 && players[i].playerstate == PST_LIVE && !players[i].exiting)
{
if ((netgame || multiplayer) && players[i].spectator) // Ignore spectators
continue;
@ -6774,7 +6773,7 @@ void A_MixUp(mobj_t *actor)
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i] && players[i].playerstate == PST_LIVE
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super] && players[i].powers[pw_carry] != CR_NIGHTSMODE)
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting)
{
if ((netgame || multiplayer) && players[i].spectator)// Ignore spectators
continue;
@ -6826,7 +6825,7 @@ void A_MixUp(mobj_t *actor)
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i] && players[i].playerstate == PST_LIVE
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super] && players[i].powers[pw_carry] != CR_NIGHTSMODE)
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting)
{
if ((netgame || multiplayer) && players[i].spectator)// Ignore spectators
continue;
@ -6858,7 +6857,7 @@ void A_MixUp(mobj_t *actor)
if (teleported[i])
{
if (playeringame[i] && players[i].playerstate == PST_LIVE
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super] && players[i].powers[pw_carry] != CR_NIGHTSMODE)
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting)
{
if ((netgame || multiplayer) && players[i].spectator)// Ignore spectators
continue;
@ -10729,6 +10728,8 @@ void A_OrbitNights(mobj_t* actor)
boolean donotrescale = (var2 & 0x40000);
INT32 xfactor = 32, yfactor = 32, zfactor = 20;
(void)ishelper;
if (LUA_CallAction("A_OrbitNights", actor))
return;
@ -10745,12 +10746,7 @@ void A_OrbitNights(mobj_t* actor)
zfactor = (var2 & 0xFC000000) >> 26;
}
if (!actor->target
|| (actor->target->player &&
// if NiGHTS special stage and not NiGHTSmode.
(((maptol & TOL_NIGHTS) && G_IsSpecialStage(gamemap) && !(actor->target->player->powers[pw_carry] == CR_NIGHTSMODE))
// Also remove this object if they no longer have a NiGHTS helper
|| (ishelper && !actor->target->player->powers[pw_nights_helper]))))
if (!actor->target)
{
if (cv_debug && !(actor->target && actor->target->player))
CONS_Printf("ERROR: Powerup has no target!\n");
@ -10777,15 +10773,6 @@ void A_OrbitNights(mobj_t* actor)
}
P_SetThingPosition(actor);
if (ishelper && actor->target->player) // Flash a helper that's about to be removed.
{
if ((actor->target->player->powers[pw_nights_helper] < TICRATE)
&& (actor->target->player->powers[pw_nights_helper] & 1))
actor->flags2 |= MF2_DONTDRAW;
else
actor->flags2 &= ~MF2_DONTDRAW;
}
if (!donotrescale && actor->destscale != actor->target->destscale)
actor->destscale = actor->target->destscale;
}

View file

@ -1965,9 +1965,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (player->pflags & PF_GODMODE)
return false;
if ((maptol & TOL_NIGHTS) && target->player->powers[pw_carry] != CR_NIGHTSMODE && target->player->powers[pw_carry] != CR_NIGHTSFALL)
return false;
}
// Player hits another player

View file

@ -576,11 +576,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
if ((thing->flags & MF_NOCLIPTHING) || !(thing->flags & (MF_SOLID|MF_SPECIAL|MF_PAIN|MF_SHOOTABLE|MF_SPRING)))
return true;
// Don't collide with your buddies while NiGHTS-flying.
if (tmthing->player && thing->player && (maptol & TOL_NIGHTS)
&& ((tmthing->player->powers[pw_carry] == CR_NIGHTSMODE) || (thing->player->powers[pw_carry] == CR_NIGHTSMODE)))
return true;
blockdist = thing->radius + tmthing->radius;
if (abs(thing->x - tmx) >= blockdist || abs(thing->y - tmy) >= blockdist)

File diff suppressed because it is too large Load diff

View file

@ -116,15 +116,6 @@ static void P_NetArchivePlayers(void)
WRITEANGLE(save_p, players[i].awayviewaiming);
WRITEINT32(save_p, players[i].awayviewtics);
WRITEINT16(save_p, players[i].rings);
WRITEINT16(save_p, players[i].spheres);
WRITESINT8(save_p, players[i].pity);
WRITEINT32(save_p, players[i].currentweapon);
WRITEINT32(save_p, players[i].ringweapons);
WRITEUINT16(save_p, players[i].ammoremoval);
WRITEUINT32(save_p, players[i].ammoremovaltimer);
WRITEINT32(save_p, players[i].ammoremovaltimer);
for (j = 0; j < NUMPOWERS; j++)
WRITEUINT16(save_p, players[i].powers[j]);
@ -329,15 +320,6 @@ static void P_NetUnArchivePlayers(void)
players[i].awayviewaiming = READANGLE(save_p);
players[i].awayviewtics = READINT32(save_p);
players[i].rings = READINT16(save_p);
players[i].spheres = READINT16(save_p);
players[i].pity = READSINT8(save_p);
players[i].currentweapon = READINT32(save_p);
players[i].ringweapons = READINT32(save_p);
players[i].ammoremoval = READUINT16(save_p);
players[i].ammoremovaltimer = READUINT32(save_p);
players[i].ammoremovalweapon = READINT32(save_p);
for (j = 0; j < NUMPOWERS; j++)
players[i].powers[j] = READUINT16(save_p);

View file

@ -3966,9 +3966,6 @@ static void P_InitPlayers(void)
if (!playeringame[i])
continue;
// Start players with pity shields if possible
players[i].pity = -1;
players[i].mo = NULL;
if (!G_RaceGametype())

View file

@ -1602,10 +1602,10 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
if (!playeringame[i] || players[i].spectator)
continue;
if (!players[i].mo || ((maptol & TOL_NIGHTS) ? players[i].spheres : players[i].rings) <= 0)
if (!players[i].mo || players[i].rings <= 0)
continue;
rings += (maptol & TOL_NIGHTS) ? players[i].spheres : players[i].rings;
rings += players[i].rings;
}
}
else
@ -1613,7 +1613,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
if (!(actor && actor->player))
return false; // no player to count rings from here, sorry
rings = (maptol & TOL_NIGHTS) ? actor->player->spheres : actor->player->rings;
rings = actor->player->rings;
}
if (triggerline->flags & ML_NOCLIMB)
@ -4541,15 +4541,7 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers
S_StartSound(player->mo, sfx_itemup);
}
break;
case 11: // Special Stage Damage
if (player->exiting || player->bot) // Don't do anything for bots or players who have just finished
break;
if (!(player->powers[pw_shield] || player->spheres > 0)) // Don't do anything if no shield or spheres anyway
break;
P_SpecialStageDamage(player, NULL, NULL);
break;
case 11: // Unused
case 12: // Wall Sector (Don't step-up/down)
case 13: // Ramp Sector (Increase step-up/down)
case 14: // Non-Ramp Sector (Don't step-down)
@ -8586,7 +8578,7 @@ static inline boolean PIT_PushThing(mobj_t *thing)
return false;
// Allow this to affect pushable objects at some point?
if (thing->player && (!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) || thing->player->powers[pw_carry] == CR_NIGHTSMODE))
if (thing->player && !(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)))
{
INT32 dist;
INT32 speed;
@ -8617,75 +8609,14 @@ static inline boolean PIT_PushThing(mobj_t *thing)
// Written with bits and pieces of P_HomingAttack
if ((speed > 0) && (P_CheckSight(thing, tmpusher->source)))
{
if (thing->player->powers[pw_carry] != CR_NIGHTSMODE)
// only push wrt Z if health & 1 (mapthing has ambush flag)
if (tmpusher->source->health & 1)
{
// only push wrt Z if health & 1 (mapthing has ambush flag)
if (tmpusher->source->health & 1)
{
fixed_t tmpmomx, tmpmomy, tmpmomz;
tmpmomx = FixedMul(FixedDiv(sx - thing->x, dist), speed);
tmpmomy = FixedMul(FixedDiv(sy - thing->y, dist), speed);
tmpmomz = FixedMul(FixedDiv(sz - thing->z, dist), speed);
if (tmpusher->source->type == MT_PUSH) // away!
{
tmpmomx *= -1;
tmpmomy *= -1;
tmpmomz *= -1;
}
thing->momx += tmpmomx;
thing->momy += tmpmomy;
thing->momz += tmpmomz;
if (thing->player)
{
thing->player->cmomx += tmpmomx;
thing->player->cmomy += tmpmomy;
thing->player->cmomx = FixedMul(thing->player->cmomx, ORIG_FRICTION);
thing->player->cmomy = FixedMul(thing->player->cmomy, ORIG_FRICTION);
}
}
else
{
angle_t pushangle;
pushangle = R_PointToAngle2(thing->x, thing->y, sx, sy);
if (tmpusher->source->type == MT_PUSH)
pushangle += ANGLE_180; // away
pushangle >>= ANGLETOFINESHIFT;
thing->momx += FixedMul(speed, FINECOSINE(pushangle));
thing->momy += FixedMul(speed, FINESINE(pushangle));
if (thing->player)
{
thing->player->cmomx += FixedMul(speed, FINECOSINE(pushangle));
thing->player->cmomy += FixedMul(speed, FINESINE(pushangle));
thing->player->cmomx = FixedMul(thing->player->cmomx, ORIG_FRICTION);
thing->player->cmomy = FixedMul(thing->player->cmomy, ORIG_FRICTION);
}
}
}
else
{
//NiGHTS-specific handling.
//By default, pushes and pulls only affect the Z-axis.
//By having the ambush flag, it affects the X-axis.
//By having the object special flag, it affects the Y-axis.
fixed_t tmpmomx, tmpmomy, tmpmomz;
if (tmpusher->source->health & 1)
tmpmomx = FixedMul(FixedDiv(sx - thing->x, dist), speed);
else
tmpmomx = 0;
if (tmpusher->source->health & 2)
tmpmomy = FixedMul(FixedDiv(sy - thing->y, dist), speed);
else
tmpmomy = 0;
tmpmomx = FixedMul(FixedDiv(sx - thing->x, dist), speed);
tmpmomy = FixedMul(FixedDiv(sy - thing->y, dist), speed);
tmpmomz = FixedMul(FixedDiv(sz - thing->z, dist), speed);
if (tmpusher->source->type == MT_PUSH) // away!
{
tmpmomx *= -1;
@ -8705,6 +8636,25 @@ static inline boolean PIT_PushThing(mobj_t *thing)
thing->player->cmomy = FixedMul(thing->player->cmomy, ORIG_FRICTION);
}
}
else
{
angle_t pushangle;
pushangle = R_PointToAngle2(thing->x, thing->y, sx, sy);
if (tmpusher->source->type == MT_PUSH)
pushangle += ANGLE_180; // away
pushangle >>= ANGLETOFINESHIFT;
thing->momx += FixedMul(speed, FINECOSINE(pushangle));
thing->momy += FixedMul(speed, FINESINE(pushangle));
if (thing->player)
{
thing->player->cmomx += FixedMul(speed, FINECOSINE(pushangle));
thing->player->cmomy += FixedMul(speed, FINESINE(pushangle));
thing->player->cmomx = FixedMul(thing->player->cmomx, ORIG_FRICTION);
thing->player->cmomy = FixedMul(thing->player->cmomy, ORIG_FRICTION);
}
}
}
}

View file

@ -328,12 +328,14 @@ static inline void P_RunThinkers(void)
}
/*
//
// P_DoAutobalanceTeams()
//
// Determine if the teams are unbalanced, and if so, move a player to the other team.
//
/*static void P_DoAutobalanceTeams(void)
static void P_DoAutobalanceTeams(void)
{
changeteam_union NetPacket;
UINT16 usvalue;
@ -447,136 +449,6 @@ void P_DoTeamscrambling(void)
CV_SetValue(&cv_teamscramble, 0);
}
static inline void P_DoSpecialStageStuff(void)
{
boolean stillalive = false;
INT32 i;
// Can't drown in a special stage
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator)
continue;
players[i].powers[pw_underwater] = players[i].powers[pw_spacetime] = 0;
}
//if (sstimer < 15*TICRATE+6 && sstimer > 7 && (mapheaderinfo[gamemap-1]->levelflags & LF_SPEEDMUSIC))
//S_SpeedMusic(1.4f);
if (sstimer && !objectplacing)
{
sstimer = 0;
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i])
{
players[i].exiting = raceexittime+1;
players[i].pflags &= ~PF_GLIDING;
}
if (i == consoleplayer)
S_StartSound(NULL, sfx_lose);
}
if (mapheaderinfo[gamemap-1]->levelflags & LF_SPEEDMUSIC)
S_SpeedMusic(1.0f);
stagefailed = true;
}
if (sstimer > 1) // As long as time isn't up...
{
UINT16 countspheres = 0;
// Count up the rings of all the players and see if
// they've collected the required amount.
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i])
{
tic_t oldnightstime = players[i].nightstime;
countspheres += players[i].spheres;
if (!oldnightstime)
continue;
// If in water, deplete timer 6x as fast.
if (players[i].mo->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER) && !(players[i].powers[pw_shield] & SH_PROTECTWATER))
players[i].nightstime -= 5;
if (--players[i].nightstime > 6)
{
if (P_IsLocalPlayer(&players[i]) && oldnightstime > 10*TICRATE && players[i].nightstime <= 10*TICRATE)
S_ChangeMusicInternal("_drown", false);
stillalive = true;
}
else if (!players[i].exiting)
{
players[i].exiting = (14*TICRATE)/5 + 1;
players[i].pflags &= ~(PF_GLIDING|PF_BOUNCING);
players[i].nightstime = 0;
if (P_IsLocalPlayer(&players[i]))
S_StartSound(NULL, sfx_s3k66);
}
}
if (stillalive)
{
if (countspheres >= ssspheres)
{
// Halt all the players
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] && !players[i].exiting)
{
players[i].mo->momx = players[i].mo->momy = 0;
players[i].exiting = (14*TICRATE)/5 + 1;
}
sstimer = 0;
P_GiveEmerald(true);
P_RestoreMusic(&players[consoleplayer]);
}
}
else
sstimer = 0;
}
}
static inline void P_DoTagStuff(void)
{
INT32 i;
// tell the netgame who the initial IT person is.
if (leveltime == TICRATE)
{
for (i = 0; i < MAXPLAYERS; i++)
{
if (players[i].pflags & PF_TAGIT)
{
CONS_Printf(M_GetText("%s is now IT!\n"), player_names[i]); // Tell everyone who is it!
break;
}
}
}
//increment survivor scores
if (leveltime % TICRATE == 0 && leveltime > (hidetime * TICRATE))
{
INT32 participants = 0;
for (i=0; i < MAXPLAYERS; i++)
{
if (playeringame[i] && !players[i].spectator)
participants++;
}
for (i=0; i < MAXPLAYERS; i++)
{
if (playeringame[i] && !players[i].spectator && players[i].playerstate == PST_LIVE
&& !(players[i].pflags & (PF_TAGIT|PF_GAMETYPEOVER)))
//points given is the number of participating players divided by two.
P_AddPlayerScore(&players[i], participants/2);
}
}
}
static inline void P_DoCTFStuff(void)
{
// Automatic team balance for CTF and team match
@ -596,7 +468,9 @@ static inline void P_DoCTFStuff(void)
if (cv_teamscramble.value && server)
P_DoTeamscrambling();
}
}*/
}
*/
//
// P_Ticker

View file

@ -333,8 +333,7 @@ void P_GiveEmerald(boolean spawnObj)
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
// Make sure we're not being carried before our tracer is changed
if (players[i].powers[pw_carry] != CR_NIGHTSMODE)
players[i].powers[pw_carry] = CR_NONE;
players[i].powers[pw_carry] = CR_NONE;
P_SetTarget(&players[i].mo->tracer, emmo);
@ -473,29 +472,9 @@ boolean P_PlayerInPain(player_t *player)
// Useful when you want to kill everything the player is doing.
void P_ResetPlayer(player_t *player)
{
player->pflags &= ~(PF_SPINNING|PF_STARTDASH|PF_STARTJUMP|PF_JUMPED|PF_NOJUMPDAMAGE|PF_GLIDING|PF_THOKKED|PF_CANCARRY|PF_SHIELDABILITY|PF_BOUNCING);
if (player->powers[pw_carry] == CR_ROLLOUT)
{
if (player->mo->tracer && !P_MobjWasRemoved(player->mo->tracer))
{
player->mo->tracer->flags |= MF_PUSHABLE;
P_SetTarget(&player->mo->tracer->tracer, NULL);
}
P_SetTarget(&player->mo->tracer, NULL);
player->powers[pw_carry] = CR_NONE;
}
if (!(player->powers[pw_carry] == CR_NIGHTSMODE || player->powers[pw_carry] == CR_NIGHTSFALL || player->powers[pw_carry] == CR_BRAKGOOP || player->powers[pw_carry] == CR_MINECART))
player->powers[pw_carry] = CR_NONE;
player->secondjump = 0;
player->glidetime = 0;
player->homing = 0;
player->climbing = 0;
player->powers[pw_tailsfly] = 0;
//player->pflags &= ~(PF_);
player->powers[pw_carry] = CR_NONE;
player->onconveyor = 0;
player->skidtime = 0;
}
//
@ -1999,7 +1978,7 @@ static void P_DoBubbleBreath(player_t *player)
fixed_t z = player->mo->z;
mobj_t *bubble = NULL;
if (!(player->mo->eflags & MFE_UNDERWATER) || ((player->powers[pw_shield] & SH_PROTECTWATER) && !(player->powers[pw_carry] == CR_NIGHTSMODE)) || player->spectator)
if (!(player->mo->eflags & MFE_UNDERWATER) || (player->powers[pw_shield] & SH_PROTECTWATER) || player->spectator)
return;
if (player->charflags & SF_MACHINE)
@ -4440,8 +4419,7 @@ void P_PlayerThink(player_t *player)
}
// Even if not NiGHTS, pull in nearby objects when walking around as John Q. Elliot.
if (!objectplacing && !((netgame || multiplayer) && player->spectator)
&& maptol & TOL_NIGHTS && (player->powers[pw_carry] != CR_NIGHTSMODE || player->powers[pw_nights_helper]))
if (!objectplacing && !((netgame || multiplayer) && player->spectator))
{
thinker_t *th;
mobj_t *mo2;
@ -4551,13 +4529,10 @@ void P_PlayerThink(player_t *player)
#endif
// check for use
if (player->powers[pw_carry] != CR_NIGHTSMODE)
{
if (cmd->buttons & BT_BRAKE)
player->pflags |= PF_USEDOWN;
else
player->pflags &= ~PF_USEDOWN;
}
if (cmd->buttons & BT_BRAKE)
player->pflags |= PF_USEDOWN;
else
player->pflags &= ~PF_USEDOWN;
// IF PLAYER NOT HERE THEN FLASH END IF
if (player->quittime && player->powers[pw_flashing] < flashingtics - 1
@ -4567,12 +4542,6 @@ void P_PlayerThink(player_t *player)
// Counters, time dependent power ups.
// Time Bonus & Ring Bonus count settings
if (player->ammoremovaltimer)
{
if (--player->ammoremovaltimer == 0)
player->ammoremoval = 0;
}
// Strength counts up to diminish fade.
if (player->powers[pw_flashing] && player->powers[pw_flashing] < UINT16_MAX &&
(player->spectator || player->powers[pw_flashing] < K_GetKartFlashing(player)))
@ -4700,12 +4669,6 @@ void P_PlayerAfterThink(player_t *player)
return;
}
if (player->powers[pw_carry] == CR_NIGHTSMODE)
{
player->powers[pw_gravityboots] = 0;
//player->mo->eflags &= ~MFE_VERTICALFLIP;
}
if (player->pflags & PF_SLIDING)
P_SetPlayerMobjState(player->mo, player->mo->info->painstate);

View file

@ -1418,13 +1418,18 @@ void R_SkyboxFrame(player_t *player)
boolean R_ViewpointHasChasecam(player_t *player)
{
boolean chasecam = false;
UINT8 i;
if (splitscreen && player == &players[secondarydisplayplayer] && player != &players[consoleplayer])
chasecam = (cv_chasecam2.value != 0);
else
chasecam = (cv_chasecam.value != 0);
for (i = 0; i <= splitscreen; i++)
{
if (player == &players[g_localplayers[i]])
{
chasecam = (cv_chasecam[i].value != 0);
break;
}
}
if (player->climbing || (player->powers[pw_carry] == CR_NIGHTSMODE) || player->playerstate == PST_DEAD || gamestate == GS_TITLESCREEN || tutorialmode)
if (player->playerstate == PST_DEAD || gamestate == GS_TITLESCREEN || tutorialmode)
chasecam = true; // force chasecam on
else if (player->spectator) // no spectator chasecam
chasecam = false; // force chasecam off

View file

@ -226,10 +226,10 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
// set up the levelstring
if (mapheaderinfo[prevmap]->levelflags & LF_NOZONE)
{
if (mapheaderinfo[prevmap]->actnum[0])
if (mapheaderinfo[prevmap]->actnum > 0)
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"* %s %s *",
"* %s %d *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
@ -240,10 +240,10 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
else
{
const char *zonttl = (mapheaderinfo[prevmap]->zonttl[0] ? mapheaderinfo[prevmap]->zonttl : "ZONE");
if (mapheaderinfo[prevmap]->actnum[0])
if (mapheaderinfo[prevmap]->actnum > 0)
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"* %s %s %s *",
"* %s %s %d *",
mapheaderinfo[prevmap]->lvlttl, zonttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
@ -1905,10 +1905,10 @@ void Y_StartVote(void)
// set up the levelstring
if (mapheaderinfo[votelevels[i][0]]->levelflags & LF_NOZONE || !mapheaderinfo[votelevels[i][0]]->zonttl[0])
{
if (mapheaderinfo[votelevels[i][0]]->actnum[0])
if (mapheaderinfo[votelevels[i][0]]->actnum > 0)
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s %s",
"%s %d",
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->actnum);
else
snprintf(levelinfo[i].str,
@ -1918,10 +1918,10 @@ void Y_StartVote(void)
}
else
{
if (mapheaderinfo[votelevels[i][0]]->actnum[0])
if (mapheaderinfo[votelevels[i][0]]->actnum > 0)
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s %s %s",
"%s %s %d",
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl, mapheaderinfo[votelevels[i][0]]->actnum);
else
snprintf(levelinfo[i].str,