mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Delete seenames code
We had SEENAMES disabled before, and vanilla removed the define, so I went ahead and removed it. Repurposed the old seenames console variable for our nametags.
This commit is contained in:
parent
4c9aceded1
commit
20e2c78331
10 changed files with 8 additions and 106 deletions
|
|
@ -134,9 +134,6 @@ static INT16 consistancy[TICQUEUE];
|
||||||
static UINT8 player_joining = false;
|
static UINT8 player_joining = false;
|
||||||
UINT8 hu_redownloadinggamestate = 0;
|
UINT8 hu_redownloadinggamestate = 0;
|
||||||
|
|
||||||
// kart, true when a player is connecting or disconnecting so that the gameplay has stopped in its tracks
|
|
||||||
UINT8 hu_stopped = 0;
|
|
||||||
|
|
||||||
UINT8 adminpassmd5[16];
|
UINT8 adminpassmd5[16];
|
||||||
boolean adminpasswordset = false;
|
boolean adminpasswordset = false;
|
||||||
|
|
||||||
|
|
@ -5320,14 +5317,8 @@ void TryRunTics(tic_t realtics)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (neededtic > gametic)
|
|
||||||
{
|
|
||||||
hu_stopped = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player_joining)
|
if (player_joining)
|
||||||
{
|
{
|
||||||
hu_stopped = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5360,10 +5351,6 @@ void TryRunTics(tic_t realtics)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
hu_stopped = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -258,9 +258,7 @@ consvar_t cv_startinglives = CVAR_INIT ("startinglives", "3", CV_NETVAR|CV_CHEAT
|
||||||
static CV_PossibleValue_t respawntime_cons_t[] = {{1, "MIN"}, {30, "MAX"}, {0, "Off"}, {0, NULL}};
|
static CV_PossibleValue_t respawntime_cons_t[] = {{1, "MIN"}, {30, "MAX"}, {0, "Off"}, {0, NULL}};
|
||||||
consvar_t cv_respawntime = CVAR_INIT ("respawndelay", "1", CV_NETVAR|CV_CHEAT, respawntime_cons_t, NULL);
|
consvar_t cv_respawntime = CVAR_INIT ("respawndelay", "1", CV_NETVAR|CV_CHEAT, respawntime_cons_t, NULL);
|
||||||
|
|
||||||
static CV_PossibleValue_t seenames_cons_t[] = {{0, "Off"}, {1, "Colorless"}, {2, "Team"}, {3, "Ally/Foe"}, {0, NULL}};
|
consvar_t cv_seenames = CVAR_INIT ("seenames", "On", CV_SAVE, CV_OnOff, NULL);
|
||||||
consvar_t cv_seenames = CVAR_INIT ("seenames", "Off", CV_SAVE, seenames_cons_t, NULL);
|
|
||||||
consvar_t cv_allowseenames = CVAR_INIT ("allowseenames", "No", CV_NETVAR, CV_YesNo, NULL);
|
|
||||||
|
|
||||||
// names
|
// names
|
||||||
consvar_t cv_playername[MAXSPLITSCREENPLAYERS] = {
|
consvar_t cv_playername[MAXSPLITSCREENPLAYERS] = {
|
||||||
|
|
@ -742,8 +740,6 @@ void D_RegisterServerCommands(void)
|
||||||
CV_RegisterVar(&cv_showping);
|
CV_RegisterVar(&cv_showping);
|
||||||
CV_RegisterVar(&cv_showviewpointtext);
|
CV_RegisterVar(&cv_showviewpointtext);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_allowseenames);
|
|
||||||
|
|
||||||
CV_RegisterVar(&cv_dummyconsvar);
|
CV_RegisterVar(&cv_dummyconsvar);
|
||||||
|
|
||||||
#ifdef USE_STUN
|
#ifdef USE_STUN
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ extern consvar_t cv_followercolor[MAXSPLITSCREENPLAYERS];
|
||||||
// preferred number of players
|
// preferred number of players
|
||||||
extern consvar_t cv_splitplayers;
|
extern consvar_t cv_splitplayers;
|
||||||
|
|
||||||
extern consvar_t cv_seenames, cv_allowseenames;
|
extern consvar_t cv_seenames;
|
||||||
extern consvar_t cv_usemouse;
|
extern consvar_t cv_usemouse;
|
||||||
extern consvar_t cv_usejoystick[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_usejoystick[MAXSPLITSCREENPLAYERS];
|
||||||
extern consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS];
|
||||||
|
|
|
||||||
|
|
@ -4604,9 +4604,6 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
||||||
"S_DEBTSPIKEC",
|
"S_DEBTSPIKEC",
|
||||||
"S_DEBTSPIKED",
|
"S_DEBTSPIKED",
|
||||||
"S_DEBTSPIKEE",
|
"S_DEBTSPIKEE",
|
||||||
|
|
||||||
// Seenames
|
|
||||||
"S_NAMECHECK",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// RegEx to generate this from info.h: ^\tMT_([^,]+), --> \t"MT_\1",
|
// RegEx to generate this from info.h: ^\tMT_([^,]+), --> \t"MT_\1",
|
||||||
|
|
@ -5690,9 +5687,6 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
||||||
"MT_PAPERITEMSPOT",
|
"MT_PAPERITEMSPOT",
|
||||||
|
|
||||||
"MT_BEAMPOINT",
|
"MT_BEAMPOINT",
|
||||||
|
|
||||||
// Seenames
|
|
||||||
"MT_NAMECHECK",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *const MOBJFLAG_LIST[] = {
|
const char *const MOBJFLAG_LIST[] = {
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,6 @@ void G_AddGametypeConstant(INT16 gtype, const char *newgtconst);
|
||||||
void G_UpdateGametypeSelections(void);
|
void G_UpdateGametypeSelections(void);
|
||||||
void G_AddTOL(UINT32 newtol, const char *tolname);
|
void G_AddTOL(UINT32 newtol, const char *tolname);
|
||||||
void G_AddGametypeTOL(INT16 gtype, UINT32 newtol);
|
void G_AddGametypeTOL(INT16 gtype, UINT32 newtol);
|
||||||
//void G_SetGametypeDescription(INT16 gtype, char *descriptiontext, UINT8 leftcolor, UINT8 rightcolor);
|
|
||||||
INT32 G_GetGametypeByName(const char *gametypestr);
|
INT32 G_GetGametypeByName(const char *gametypestr);
|
||||||
boolean G_IsSpecialStage(INT32 mapnum);
|
boolean G_IsSpecialStage(INT32 mapnum);
|
||||||
boolean G_GametypeUsesLives(void);
|
boolean G_GametypeUsesLives(void);
|
||||||
|
|
|
||||||
29
src/info.c
29
src/info.c
|
|
@ -5194,8 +5194,6 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKED}, // S_DEBTSPIKEC
|
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKED}, // S_DEBTSPIKEC
|
||||||
{SPR_DEBT, 6|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKEE}, // S_DEBTSPIKED
|
{SPR_DEBT, 6|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKEE}, // S_DEBTSPIKED
|
||||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE1}, // S_DEBTSPIKEE
|
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE1}, // S_DEBTSPIKEE
|
||||||
|
|
||||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
|
|
@ -28928,33 +28926,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIPTHING|MF_NOGRAVITY|MF_DONTENCOREMAP, // flags
|
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIPTHING|MF_NOGRAVITY|MF_DONTENCOREMAP, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_NAMECHECK
|
|
||||||
-1, // doomednum
|
|
||||||
S_NAMECHECK, // spawnstate
|
|
||||||
1000, // spawnhealth
|
|
||||||
S_NULL, // seestate
|
|
||||||
sfx_None, // seesound
|
|
||||||
8, // reactiontime
|
|
||||||
sfx_None, // attacksound
|
|
||||||
S_NULL, // painstate
|
|
||||||
0, // painchance
|
|
||||||
sfx_None, // painsound
|
|
||||||
S_NULL, // meleestate
|
|
||||||
S_NULL, // missilestate
|
|
||||||
S_NULL, // deathstate
|
|
||||||
S_NULL, // xdeathstate
|
|
||||||
sfx_None, // deathsound
|
|
||||||
60*FRACUNIT, // speed
|
|
||||||
30*FRACUNIT, // radius
|
|
||||||
40*FRACUNIT, // height
|
|
||||||
0, // display offset
|
|
||||||
100, // mass
|
|
||||||
0, // damage
|
|
||||||
sfx_None, // activesound
|
|
||||||
MF_NOBLOCKMAP|MF_MISSILE|MF_NOGRAVITY|MF_NOSECTOR, // flags
|
|
||||||
S_NULL // raisestate
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
skincolor_t skincolors[MAXSKINCOLORS] = {
|
skincolor_t skincolors[MAXSKINCOLORS] = {
|
||||||
|
|
|
||||||
|
|
@ -5599,8 +5599,6 @@ typedef enum state
|
||||||
S_DEBTSPIKED,
|
S_DEBTSPIKED,
|
||||||
S_DEBTSPIKEE,
|
S_DEBTSPIKEE,
|
||||||
|
|
||||||
S_NAMECHECK,
|
|
||||||
|
|
||||||
S_FIRSTFREESLOT,
|
S_FIRSTFREESLOT,
|
||||||
S_LASTFREESLOT = S_FIRSTFREESLOT + NUMSTATEFREESLOTS - 1,
|
S_LASTFREESLOT = S_FIRSTFREESLOT + NUMSTATEFREESLOTS - 1,
|
||||||
NUMSTATES
|
NUMSTATES
|
||||||
|
|
|
||||||
|
|
@ -2629,6 +2629,11 @@ static void K_drawKartPlayerCheck(void)
|
||||||
|
|
||||||
static boolean K_ShowPlayerNametag(player_t *p)
|
static boolean K_ShowPlayerNametag(player_t *p)
|
||||||
{
|
{
|
||||||
|
if (cv_seenames.value == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (demo.playback == true && demo.freecam == true)
|
if (demo.playback == true && demo.freecam == true)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2639,7 +2644,7 @@ static boolean K_ShowPlayerNametag(player_t *p)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gametype == GT_RACE)
|
if (gametyperules & GTR_CIRCUIT)
|
||||||
{
|
{
|
||||||
if ((p->kartstuff[k_position] < stplyr->kartstuff[k_position]-2)
|
if ((p->kartstuff[k_position] < stplyr->kartstuff[k_position]-2)
|
||||||
|| (p->kartstuff[k_position] > stplyr->kartstuff[k_position]+2))
|
|| (p->kartstuff[k_position] > stplyr->kartstuff[k_position]+2))
|
||||||
|
|
|
||||||
24
src/p_user.c
24
src/p_user.c
|
|
@ -4266,30 +4266,6 @@ void P_PlayerThink(player_t *player)
|
||||||
player->playerstate = PST_DEAD;
|
player->playerstate = PST_DEAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (netgame && player == &players[displayplayers[0]] && !(leveltime % (TICRATE/5)) && !r_splitscreen)
|
|
||||||
{
|
|
||||||
seenplayer = NULL;
|
|
||||||
|
|
||||||
if (cv_seenames.value && cv_allowseenames.value)
|
|
||||||
{
|
|
||||||
mobj_t *mo = P_SpawnNameFinder(player->mo, MT_NAMECHECK);
|
|
||||||
|
|
||||||
if (mo)
|
|
||||||
{
|
|
||||||
short int i;
|
|
||||||
mo->flags |= MF_NOCLIPHEIGHT;
|
|
||||||
for (i = 0; i < 32; i++)
|
|
||||||
{
|
|
||||||
// Debug drawing
|
|
||||||
// if (i&1)
|
|
||||||
// P_SpawnMobj(mo->x, mo->y, mo->z, MT_SPARK);
|
|
||||||
if (P_RailThinker(mo))
|
|
||||||
break; // mobj was removed (missile hit a wall) or couldn't move
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player->mo->hitlag > 0)
|
if (player->mo->hitlag > 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -1033,30 +1033,6 @@ void ST_Drawer(void)
|
||||||
{
|
{
|
||||||
boolean stagetitle = false; // Decide whether to draw the stage title or not
|
boolean stagetitle = false; // Decide whether to draw the stage title or not
|
||||||
|
|
||||||
if (cv_seenames.value && cv_allowseenames.value && displayplayers[0] == consoleplayer && seenplayer && seenplayer->mo)
|
|
||||||
{
|
|
||||||
INT32 c = 0;
|
|
||||||
switch (cv_seenames.value)
|
|
||||||
{
|
|
||||||
case 1: // Colorless
|
|
||||||
break;
|
|
||||||
case 2: // Team
|
|
||||||
if (G_GametypeHasTeams())
|
|
||||||
c = (seenplayer->ctfteam == 1) ? V_REDMAP : V_BLUEMAP;
|
|
||||||
break;
|
|
||||||
case 3: // Ally/Foe
|
|
||||||
default:
|
|
||||||
// Green = Ally, Red = Foe
|
|
||||||
if (G_GametypeHasTeams())
|
|
||||||
c = (players[consoleplayer].ctfteam == seenplayer->ctfteam) ? V_GREENMAP : V_REDMAP;
|
|
||||||
else // Everyone is an ally, or everyone is a foe!
|
|
||||||
c = (G_RingSlingerGametype()) ? V_REDMAP : V_GREENMAP;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF|c, player_names[seenplayer-players]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Doom's status bar only updated if necessary.
|
// Doom's status bar only updated if necessary.
|
||||||
// However, ours updates every frame regardless, so the "refresh" param was removed
|
// However, ours updates every frame regardless, so the "refresh" param was removed
|
||||||
//(void)refresh;
|
//(void)refresh;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue