diff --git a/src/d_main.c b/src/d_main.c index 4ab52233d..f04b80346 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -253,10 +253,7 @@ void D_ProcessEvents(void) #endif if (eaten) - { - hu_keystrokes = true; continue; // ate the event - } G_Responder(ev); } diff --git a/src/d_player.h b/src/d_player.h index 207d9425f..140a4a748 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -551,10 +551,6 @@ typedef struct player_s UINT8 hitemvictim; UINT8 splitscreenindex; - - UINT8 typing_timer : 4; // Counts down while keystrokes are not emitted - UINT8 typing_duration : 6; // How long since resumed timer - #ifdef HWRENDER fixed_t fovadd; // adjust FOV for hw rendering #endif diff --git a/src/d_ticcmd.h b/src/d_ticcmd.h index 223267d95..dab758f8d 100644 --- a/src/d_ticcmd.h +++ b/src/d_ticcmd.h @@ -35,9 +35,6 @@ typedef enum // free: 1<<7 to 1<<12 - TICCMD_TYPING = 1<<9, /* chat window or console open */ - TICCMD_KEYSTROKE = 1<<10,/* chat character input */ - // Lua garbage BT_CUSTOM1 = 1<<13, BT_CUSTOM2 = 1<<14, diff --git a/src/g_game.c b/src/g_game.c index fb7513bb8..a245c8657 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1191,16 +1191,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) camspin[forplayer] = (InputDown(gc_lookback, ssplayer) || (usejoystick && axis > 0)); } - if (chat_on || CON_Ready()) - { - cmd->buttons |= TICCMD_TYPING; - - if (hu_keystrokes) - { - cmd->buttons |= TICCMD_KEYSTROKE; - } - } - /* Lua: Allow this hook to overwrite ticcmd. We check if we're actually in a level because for some reason this Hook would run in menus and on the titlescreen otherwise. Be aware that within this hook, nothing but this player's cmd can be edited (otherwise we'd run in some pretty bad synching problems since this is clientsided, or something) @@ -1342,10 +1332,7 @@ boolean G_Responder(event_t *ev) if (gamestate == GS_LEVEL) { if (HU_Responder(ev)) - { - hu_keystrokes = true; return true; // chat ate the event - } if (AM_Responder(ev)) return true; // automap ate it // map the event (key/mouse/joy) to a gamecontrol @@ -1362,10 +1349,7 @@ boolean G_Responder(event_t *ev) else if (gamestate == GS_CUTSCENE) { if (HU_Responder(ev)) - { - hu_keystrokes = true; return true; // chat ate the event - } if (F_CutsceneResponder(ev)) { @@ -1377,10 +1361,7 @@ boolean G_Responder(event_t *ev) else if (gamestate == GS_CREDITS) { if (HU_Responder(ev)) - { - hu_keystrokes = true; return true; // chat ate the event - } if (F_CreditResponder(ev)) { @@ -1400,10 +1381,7 @@ boolean G_Responder(event_t *ev) else if (gamestate == GS_INTERMISSION || gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS) if (HU_Responder(ev)) - { - hu_keystrokes = true; return true; // chat ate the event - } // allow spy mode changes even during the demo if (gamestate == GS_LEVEL && ev->type == ev_keydown diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 333677002..73f2c23b9 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -88,8 +88,6 @@ patch_t *frameslash; // framerate stuff. Used in screen.c static player_t *plr; boolean chat_on; // entering a chat message? -boolean hu_keystrokes; // :) - static char w_chat_buf[HU_MAXMSGLEN + 1]; static textinput_t w_chat; static boolean headsupactive = false; @@ -1161,8 +1159,6 @@ void HU_Ticker(void) else hu_showscores = false; - hu_keystrokes = false; - if (chat_on) { // count down the scroll timer. diff --git a/src/hu_stuff.h b/src/hu_stuff.h index 31be7a198..66459c716 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -85,9 +85,6 @@ void HU_AddChatText(const char *text, boolean playsound); // set true when entering a chat message extern boolean chat_on; -// keystrokes in the console or chat window -extern boolean hu_keystrokes; - extern patch_t *hu_font[HU_FONTSIZE], *kart_font[KART_FONTSIZE], *tny_font[HU_FONTSIZE]; // SRB2kart extern patch_t *tallnum[10]; extern patch_t *pingnum[10]; diff --git a/src/k_kart.c b/src/k_kart.c index 3959a9b68..081ac8d49 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -7327,9 +7327,6 @@ static patch_t *kp_sadface[2]; static patch_t *kp_check[6]; -static patch_t *kp_talk; -static patch_t *kp_typdot; - static patch_t *kp_eggnum[4]; static patch_t *kp_fpview[3]; @@ -7642,10 +7639,6 @@ void K_LoadKartHUDGraphics(void) kp_check[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX); } - // Typing indicator - kp_talk = W_CachePatchName("K_TALK", PU_HUDGFX); - kp_typdot = W_CachePatchName("K_TYPDOT", PU_HUDGFX); - // Eggman warning numbers sprintf(buffer, "K_EGGNx"); for (i = 0; i < 4; i++) @@ -9385,112 +9378,6 @@ static boolean K_GetScreenCoords(vector2_t *vec, player_t *player, mobj_t *targe return true; } -static boolean K_DrawTypingDot(fixed_t x, fixed_t y, UINT8 duration, player_t *p, INT32 typeflags) -{ - if (p->typing_duration > duration) - { - V_DrawFixedPatch(x<cmd.buttons & TICCMD_TYPING) - { - V_DrawFixedPatch(x<pflags & PF_FLIPCAM) && (stplyr->mo->eflags & MFE_VERTICALFLIP); - - for (i = 0; i < MAXPLAYERS; i++) - { - fixed_t distance = 0; - fixed_t maxdistance = (10*cv_nametagdist.value)* mapobjectscale; - flipped = 0; - fixed_t z; - - if (i > PLAYERSMASK) - continue; - if (!players[i].mo || P_MobjWasRemoved(players[i].mo) || players[i].spectator || !playeringame[i]) - continue; - //if (i == displayplayers[stplyrnum]) - //continue; - if (players[i].kartstuff[k_hyudorotimer]) // player is invisible - continue; - distance = R_PointToDist(players[i].mo->x, players[i].mo->y); - if (distance > maxdistance) - continue; - if (!P_CheckSightFast(stplyr->mo, players[i].mo)) - continue; - - dup = vid.dupy; - - // If flipcam is on, other player is flipped relative to us when we have different - // verticalflip flag value. Otherwise, they are simply flipped when verticalflip flag says - // so - if (flipcam) - flipped = (players[i].mo->eflags & MFE_VERTICALFLIP) != (stplyr->mo->eflags & MFE_VERTICALFLIP); - else - flipped = players[i].mo->eflags & MFE_VERTICALFLIP; - - z = players[i].mo->height; - - //Saltyhop hehe - if (cv_saltyhop.value) - z += lerp(players[i].mo->old_spriteyoffset, players[i].mo->spriteyoffset); - - if (!K_GetScreenCoords(&pos, stplyr, players[i].mo, z, false)) - continue; - - typex = pos.x>>FRACBITS; - typey = pos.y>>FRACBITS; - - vflags = hudtransflag | V_NOSCALESTART | V_SPLITSCREEN; - - if (flipped) - typey += dup*5; - else // small offset - typey -= dup*16; - - //Name - K_DrawTypingNotifier(typex, typey, &players[i], vflags); - } -} - //Slighty fixed by Alug and further rewritten by NepDisk //Decided to port and highly modify sunflower version for the main nametag drawing with additions by NepDisk. My previous one was broken anyway due to the changed screencoords and noscalestart static void K_drawNameTags(void) @@ -10923,8 +10810,6 @@ void K_drawKartHUD(void) K_drawNameTags(); } - K_DrawTypingStuff(); - // If not splitscreen, draw... if (!splitscreen && !demo.title) { diff --git a/src/p_user.c b/src/p_user.c index 2882ef6a9..bb20a6046 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4614,37 +4614,6 @@ void P_PlayerThink(player_t *player) player->mo->tracer->flags2 &= ~MF2_DONTDRAW; }*/ - if (cmd->buttons & TICCMD_TYPING) - { - if (cmd->buttons & TICCMD_KEYSTROKE) - { - player->typing_timer = 15; - } - else if (player->typing_timer > 0) - { - player->typing_timer--; - } - - if (player->typing_timer + player->typing_duration > 0) - { - /* lag a little bit so we always get more than just a singular dot */ - if (player->typing_timer == 0 && - (player->typing_duration < 16 || player->typing_duration > 39)) - { - player->typing_duration = 0; - } - else - { - player->typing_duration++; - } - } - } - else - { - player->typing_timer = 0; - player->typing_duration = 0; - } - player->pflags &= ~PF_SLIDING; K_KartPlayerThink(player, cmd); // SRB2kart