mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-11 20:31:06 +00:00
Merge branch 'remove-prints' into 'master'
Remove most gameplay prints See merge request KartKrew/Kart!42
This commit is contained in:
commit
524ab75a6a
8 changed files with 19 additions and 238 deletions
|
@ -1633,18 +1633,18 @@ static void CL_LoadReceivedSavegame(void)
|
|||
// load a base level
|
||||
if (P_LoadNetGame())
|
||||
{
|
||||
CONS_Printf(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap));
|
||||
CON_LogMessage(va(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap)));
|
||||
if (strlen(mapheaderinfo[gamemap-1]->lvlttl) > 0)
|
||||
{
|
||||
CONS_Printf(": %s", mapheaderinfo[gamemap-1]->lvlttl);
|
||||
CON_LogMessage(va(": %s", mapheaderinfo[gamemap-1]->lvlttl));
|
||||
if (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0)
|
||||
CONS_Printf(" %s", mapheaderinfo[gamemap-1]->zonttl);
|
||||
CON_LogMessage(va(" %s", mapheaderinfo[gamemap-1]->zonttl));
|
||||
else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||
CONS_Printf(M_GetText(" ZONE"));
|
||||
CON_LogMessage(M_GetText(" ZONE"));
|
||||
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
|
||||
CONS_Printf(" %s", mapheaderinfo[gamemap-1]->actnum);
|
||||
CON_LogMessage(va(" %s", mapheaderinfo[gamemap-1]->actnum));
|
||||
}
|
||||
CONS_Printf("\"\n");
|
||||
CON_LogMessage("\"\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -419,9 +419,6 @@ consvar_t cv_numlaps = {"numlaps", "3", CV_NETVAR|CV_CALL|CV_NOINIT, numlaps_con
|
|||
static CV_PossibleValue_t basenumlaps_cons_t[] = {{1, "MIN"}, {50, "MAX"}, {0, "Map default"}, {0, NULL}};
|
||||
consvar_t cv_basenumlaps = {"basenumlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, basenumlaps_cons_t, BaseNumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
// log elemental hazards -- not a netvar, is local to current player
|
||||
consvar_t cv_hazardlog = {"hazardlog", "Yes", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_forceskin = {"forceskin", "-1", CV_NETVAR|CV_CALL|CV_CHEAT, NULL, ForceSkin_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_downloading = {"downloading", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_allowexitlevel = {"allowexitlevel", "No", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -594,8 +591,6 @@ void D_RegisterServerCommands(void)
|
|||
CV_RegisterVar(&cv_numlaps);
|
||||
CV_RegisterVar(&cv_basenumlaps);
|
||||
|
||||
CV_RegisterVar(&cv_hazardlog);
|
||||
|
||||
CV_RegisterVar(&cv_autobalance);
|
||||
CV_RegisterVar(&cv_teamscramble);
|
||||
CV_RegisterVar(&cv_scrambleonchange);
|
||||
|
@ -3217,11 +3212,11 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
CONS_Printf(M_GetText("%s switched to the %c%s%c.\n"), player_names[playernum], '\x84', M_GetText("Blue Team"), '\x80');
|
||||
}
|
||||
else if (NetPacket.packet.newteam == 3)
|
||||
/*CONS_Printf(M_GetText("%s entered the game.\n"), player_names[playernum])*/;
|
||||
CON_LogMessage(va(M_GetText("%s entered the game.\n"), player_names[playernum]));
|
||||
else if (players[playernum].pflags & PF_WANTSTOJOIN)
|
||||
players[playernum].pflags &= ~PF_WANTSTOJOIN;
|
||||
else
|
||||
CONS_Printf(M_GetText("%s became a spectator.\n"), player_names[playernum]);
|
||||
CON_LogMessage(va(M_GetText("%s became a spectator.\n"), player_names[playernum]));
|
||||
|
||||
//reset view if you are changed, or viewing someone who was changed.
|
||||
if (playernum == consoleplayer || displayplayer == playernum)
|
||||
|
|
|
@ -81,8 +81,6 @@ extern consvar_t cv_basenumlaps;
|
|||
extern UINT32 timelimitintics;
|
||||
extern consvar_t cv_allowexitlevel;
|
||||
|
||||
extern consvar_t cv_hazardlog;
|
||||
|
||||
extern consvar_t cv_autobalance;
|
||||
extern consvar_t cv_teamscramble;
|
||||
extern consvar_t cv_scrambleonchange;
|
||||
|
|
|
@ -3051,7 +3051,7 @@ void G_ExitLevel(void)
|
|||
}
|
||||
|
||||
if (netgame || multiplayer)
|
||||
CONS_Printf(M_GetText("The round has ended.\n"));
|
||||
CON_LogMessage(M_GetText("The round has ended.\n"));
|
||||
|
||||
// Remove CEcho text on round end.
|
||||
HU_DoCEcho("");
|
||||
|
@ -4339,13 +4339,13 @@ void G_InitNew(UINT8 pencoremode, const char *mapname, boolean resetplayer, bool
|
|||
{
|
||||
char *title = G_BuildMapTitle(gamemap);
|
||||
|
||||
CONS_Printf(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap));
|
||||
CON_LogMessage(va(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap)));
|
||||
if (title)
|
||||
{
|
||||
CONS_Printf(": %s", title);
|
||||
CON_LogMessage(va(": %s", title));
|
||||
Z_Free(title);
|
||||
}
|
||||
CONS_Printf("\"\n");
|
||||
CON_LogMessage("\"\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2042,13 +2042,8 @@ void K_StealBumper(player_t *player, player_t *victim, boolean force)
|
|||
}
|
||||
}
|
||||
|
||||
if (netgame)
|
||||
{
|
||||
if (player->kartstuff[k_bumper] <= 0)
|
||||
CONS_Printf(M_GetText("%s is back in the game!\n"), player_names[player-players]);
|
||||
else if (cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s stole a bumper from %s!\n"), player_names[player-players], player_names[victim-players]);
|
||||
}
|
||||
if (netgame && player->kartstuff[k_bumper] <= 0)
|
||||
CONS_Printf(M_GetText("%s is back in the game!\n"), player_names[player-players]);
|
||||
|
||||
newbumper = player->kartstuff[k_bumper];
|
||||
if (newbumper <= 1)
|
||||
|
|
202
src/p_inter.c
202
src/p_inter.c
|
@ -510,8 +510,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
|
||||
special->target->player->kartstuff[k_comebackpoints] += 2 * (K_IsPlayerWanted(player) ? 2 : 1);
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s bombed %s!\n"), player_names[special->target->player-players], player_names[player-players]);
|
||||
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
||||
K_StealBumper(special->target->player, player, true);
|
||||
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
@ -527,8 +525,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
special->target->player->kartstuff[k_comebackmode] = 0;
|
||||
special->target->player->kartstuff[k_comebackpoints]++;
|
||||
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[special->target->player-players], player_names[player-players]);
|
||||
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
||||
K_StealBumper(special->target->player, player, true);
|
||||
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
@ -560,8 +556,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
special->target->player->kartstuff[k_comebackmode] = 0;
|
||||
special->target->player->kartstuff[k_comebackpoints]++;
|
||||
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s gave an \"item\" to %s.\n"), player_names[special->target->player-players], player_names[player-players]);
|
||||
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
||||
K_StealBumper(special->target->player, player, true);
|
||||
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
@ -1667,199 +1661,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
/** Prints death messages relating to a dying or hit player.
|
||||
*
|
||||
* \param player Affected player.
|
||||
* \param inflictor The attack weapon used, can be NULL.
|
||||
* \param source The attacker, can be NULL.
|
||||
*/
|
||||
static void P_HitDeathMessages(player_t *player, mobj_t *inflictor, mobj_t *source)
|
||||
{
|
||||
const char *str = NULL;
|
||||
boolean deathonly = false;
|
||||
boolean deadsource = false;
|
||||
boolean deadtarget = false;
|
||||
// player names complete with control codes
|
||||
char targetname[MAXPLAYERNAME+4];
|
||||
char sourcename[MAXPLAYERNAME+4];
|
||||
|
||||
if (G_RaceGametype())
|
||||
return; // Not in coop, etc.
|
||||
|
||||
if (!player)
|
||||
return; // Impossible!
|
||||
|
||||
if (player->spectator)
|
||||
return; // No messages for dying (crushed) spectators.
|
||||
|
||||
if (!netgame)
|
||||
return; // Presumably it's obvious what's happening in splitscreen.
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUAh_HurtMsg(player, inflictor, source))
|
||||
return;
|
||||
#endif
|
||||
|
||||
deadtarget = (player->health <= 0);
|
||||
|
||||
// Target's name
|
||||
snprintf(targetname, sizeof(targetname), "%s%s%s",
|
||||
CTFTEAMCODE(player),
|
||||
player_names[player - players],
|
||||
CTFTEAMENDCODE(player));
|
||||
|
||||
if (source)
|
||||
{
|
||||
// inflictor shouldn't be NULL if source isn't
|
||||
I_Assert(inflictor != NULL);
|
||||
|
||||
if (source->player)
|
||||
{
|
||||
// Source's name (now that we know there is one)
|
||||
snprintf(sourcename, sizeof(sourcename), "%s%s%s",
|
||||
CTFTEAMCODE(source->player),
|
||||
player_names[source->player - players],
|
||||
CTFTEAMENDCODE(source->player));
|
||||
|
||||
// We don't care if it's us.
|
||||
// "Player 1's [redacted] killed Player 1."
|
||||
if (source->player->playerstate == PST_DEAD && source->player != player &&
|
||||
(inflictor->flags2 & MF2_BEYONDTHEGRAVE))
|
||||
deadsource = true;
|
||||
|
||||
if (inflictor->flags & MF_PUSHABLE)
|
||||
{
|
||||
str = M_GetText("%s%s's playtime with heavy objects %s %s.\n");
|
||||
}
|
||||
else switch (inflictor->type)
|
||||
{
|
||||
case MT_PLAYER:
|
||||
if ((inflictor->player->powers[pw_shield] & SH_NOSTACK) == SH_BOMB)
|
||||
str = M_GetText("%s%s's armageddon blast %s %s.\n");
|
||||
else if (inflictor->player->powers[pw_invulnerability])
|
||||
str = M_GetText("%s%s's invincibility aura %s %s.\n");
|
||||
else if (inflictor->player->powers[pw_super])
|
||||
str = M_GetText("%s%s's super aura %s %s.\n");
|
||||
else
|
||||
str = M_GetText("%s%s's tagging hand %s %s.\n");
|
||||
break;
|
||||
case MT_SPINFIRE:
|
||||
str = M_GetText("%s%s's elemental fire trail %s %s.\n");
|
||||
break;
|
||||
case MT_THROWNBOUNCE:
|
||||
str = M_GetText("%s%s's bounce ring %s %s.\n");
|
||||
break;
|
||||
case MT_THROWNINFINITY:
|
||||
str = M_GetText("%s%s's infinity ring %s %s.\n");
|
||||
break;
|
||||
case MT_THROWNAUTOMATIC:
|
||||
str = M_GetText("%s%s's automatic ring %s %s.\n");
|
||||
break;
|
||||
case MT_THROWNSCATTER:
|
||||
str = M_GetText("%s%s's scatter ring %s %s.\n");
|
||||
break;
|
||||
// TODO: For next two, figure out how to determine if it was a direct hit or splash damage. -SH
|
||||
case MT_THROWNEXPLOSION:
|
||||
str = M_GetText("%s%s's explosion ring %s %s.\n");
|
||||
break;
|
||||
case MT_THROWNGRENADE:
|
||||
str = M_GetText("%s%s's grenade ring %s %s.\n");
|
||||
break;
|
||||
case MT_REDRING:
|
||||
if (inflictor->flags2 & MF2_RAILRING)
|
||||
str = M_GetText("%s%s's rail ring %s %s.\n");
|
||||
else
|
||||
str = M_GetText("%s%s's thrown ring %s %s.\n");
|
||||
break;
|
||||
default:
|
||||
str = M_GetText("%s%s %s %s.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
CONS_Printf(str,
|
||||
deadsource ? M_GetText("The late ") : "",
|
||||
sourcename,
|
||||
deadtarget ? M_GetText("killed") : M_GetText("hit"),
|
||||
targetname);
|
||||
return;
|
||||
}
|
||||
else switch (source->type)
|
||||
{
|
||||
case MT_NULL:
|
||||
switch(source->threshold)
|
||||
{
|
||||
case 42:
|
||||
deathonly = true;
|
||||
str = M_GetText("%s drowned.\n");
|
||||
break;
|
||||
case 43:
|
||||
str = M_GetText("%s was %s by spikes.\n");
|
||||
break;
|
||||
case 44:
|
||||
deathonly = true;
|
||||
str = M_GetText("%s was crushed.\n");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MT_EGGMANICO:
|
||||
case MT_EGGMANBOX:
|
||||
str = M_GetText("%s was %s by Eggman's nefarious TV magic.\n");
|
||||
break;
|
||||
case MT_SPIKE:
|
||||
str = M_GetText("%s was %s by spikes.\n");
|
||||
break;
|
||||
default:
|
||||
str = M_GetText("%s was %s by an environmental hazard.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// null source, environment kills
|
||||
// TERRIBLE HACK for hit damage because P_DoPlayerPain moves the player...
|
||||
// I'll put it back, I promise!
|
||||
player->mo->z -= player->mo->momz+1;
|
||||
if (P_PlayerTouchingSectorSpecial(player, 1, 2))
|
||||
str = M_GetText("%s was %s by chemical water.\n");
|
||||
else if (P_PlayerTouchingSectorSpecial(player, 1, 3))
|
||||
str = M_GetText("%s was %s by molten lava.\n");
|
||||
else if (P_PlayerTouchingSectorSpecial(player, 1, 4))
|
||||
str = M_GetText("%s was %s by electricity.\n");
|
||||
else if (deadtarget)
|
||||
{
|
||||
deathonly = true;
|
||||
if (P_PlayerTouchingSectorSpecial(player, 1, 6)
|
||||
|| P_PlayerTouchingSectorSpecial(player, 1, 7))
|
||||
str = M_GetText("%s fell into a bottomless pit.\n");
|
||||
else if (P_PlayerTouchingSectorSpecial(player, 1, 12))
|
||||
str = M_GetText("%s asphyxiated in space.\n");
|
||||
else
|
||||
str = M_GetText("%s died.\n");
|
||||
}
|
||||
if (!str)
|
||||
str = M_GetText("%s was %s by an environmental hazard.\n");
|
||||
|
||||
player->mo->z += player->mo->momz+1;
|
||||
}
|
||||
|
||||
if (!str) // Should not happen! Unless we missed catching something above.
|
||||
return;
|
||||
|
||||
// Don't log every hazard hit if they don't want us to.
|
||||
if (!deadtarget && !cv_hazardlog.value)
|
||||
return;
|
||||
|
||||
if (deathonly)
|
||||
{
|
||||
if (!deadtarget)
|
||||
return;
|
||||
CONS_Printf(str, targetname);
|
||||
}
|
||||
else
|
||||
CONS_Printf(str, targetname, deadtarget ? M_GetText("killed") : M_GetText("hit"));
|
||||
}
|
||||
|
||||
/** Checks if the level timer is over the timelimit and the round should end,
|
||||
* unless you are in overtime. In which case leveltime may stretch out beyond
|
||||
* timelimitintics and overtime's status will be checked here each tick.
|
||||
|
@ -2819,7 +2620,6 @@ static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *sou
|
|||
/*if (source->player->pflags & PF_TAGIT && !(player->pflags & PF_TAGIT))
|
||||
{
|
||||
P_AddPlayerScore(source->player, 1); //award points to tagger.
|
||||
P_HitDeathMessages(player, inflictor, source);
|
||||
|
||||
if (gametype == GT_TAG) //survivor
|
||||
{
|
||||
|
@ -3509,8 +3309,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
if (player->health < 0)
|
||||
player->health = 0;
|
||||
|
||||
P_HitDeathMessages(player, inflictor, source);
|
||||
|
||||
P_ForceFeed(player, 40, 10, TICRATE, 40 + min(damage, 100)*2);
|
||||
}
|
||||
|
||||
|
|
12
src/p_spec.c
12
src/p_spec.c
|
@ -36,6 +36,7 @@
|
|||
#include "lua_hook.h" // LUAh_LinedefExecute
|
||||
|
||||
#include "k_kart.h" // SRB2kart
|
||||
#include "console.h" // CON_LogMessage
|
||||
|
||||
#ifdef HW3SOUND
|
||||
#include "hardware/hw3sound.h"
|
||||
|
@ -4201,15 +4202,8 @@ DoneSection2:
|
|||
if (player->pflags & PF_NIGHTSMODE)
|
||||
player->drillmeter += 48*20;
|
||||
|
||||
if (netgame)
|
||||
{
|
||||
if (player->laps >= (UINT8)cv_numlaps.value)
|
||||
CONS_Printf(M_GetText("%s has finished the race.\n"), player_names[player-players]);
|
||||
else if (player->laps == (UINT8)(cv_numlaps.value - 1))
|
||||
CONS_Printf("%s started the final lap\n", player_names[player-players]);
|
||||
else
|
||||
CONS_Printf(M_GetText("%s started lap %u\n"), player_names[player-players], (UINT32)player->laps+1);
|
||||
}
|
||||
if (netgame && player->laps >= (UINT8)cv_numlaps.value)
|
||||
CON_LogMessage(va(M_GetText("%s has finished the race.\n"), player_names[player-players]));
|
||||
|
||||
// SRB2Kart: save best lap for record attack
|
||||
if (player == &players[consoleplayer])
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
// SRB2kart
|
||||
#include "m_cond.h" // M_UpdateUnlockablesAndExtraEmblems
|
||||
#include "k_kart.h"
|
||||
#include "console.h" // CON_LogMessage
|
||||
|
||||
#ifdef HW3SOUND
|
||||
#include "hardware/hw3sound.h"
|
||||
|
@ -8730,7 +8731,7 @@ boolean P_SpectatorJoinGame(player_t *player)
|
|||
if (P_IsLocalPlayer(player) && displayplayer != consoleplayer)
|
||||
displayplayer = consoleplayer;
|
||||
|
||||
CONS_Printf(M_GetText("%s entered the game.\n"), player_names[player-players]);
|
||||
CON_LogMessage(va(M_GetText("%s entered the game.\n"), player_names[player-players]));
|
||||
return true; // no more player->mo, cannot continue.
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue