mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 23:41:48 +00:00
Lap hands touch-up
This commit is contained in:
parent
6c557407d5
commit
7e9300c420
4 changed files with 38 additions and 28 deletions
|
@ -280,6 +280,7 @@ typedef enum
|
||||||
|
|
||||||
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
||||||
k_lapanimation, // Used to show the lap start wing logo animation
|
k_lapanimation, // Used to show the lap start wing logo animation
|
||||||
|
k_laphand, // Lap hand gfx to use; 0 = none, 1 = :ok_hand:, 2 = :thumbs_up:, 3 = :thumps_down:
|
||||||
k_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics
|
k_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics
|
||||||
k_voices, // Used to stop the player saying more voices than it should
|
k_voices, // Used to stop the player saying more voices than it should
|
||||||
k_tauntvoices, // Used to specifically stop taunt voice spam
|
k_tauntvoices, // Used to specifically stop taunt voice spam
|
||||||
|
|
|
@ -7867,6 +7867,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
||||||
|
|
||||||
"THROWDIR",
|
"THROWDIR",
|
||||||
"LAPANIMATION",
|
"LAPANIMATION",
|
||||||
|
"LAPHAND",
|
||||||
"CARDANIMATION",
|
"CARDANIMATION",
|
||||||
"VOICES",
|
"VOICES",
|
||||||
"TAUNTVOICES",
|
"TAUNTVOICES",
|
||||||
|
|
27
src/k_kart.c
27
src/k_kart.c
|
@ -5577,9 +5577,7 @@ static patch_t *kp_lapanim_lap[7];
|
||||||
static patch_t *kp_lapanim_final[11];
|
static patch_t *kp_lapanim_final[11];
|
||||||
static patch_t *kp_lapanim_number[10][3];
|
static patch_t *kp_lapanim_number[10][3];
|
||||||
static patch_t *kp_lapanim_emblem;
|
static patch_t *kp_lapanim_emblem;
|
||||||
#if 0
|
|
||||||
static patch_t *kp_lapanim_hand[3];
|
static patch_t *kp_lapanim_hand[3];
|
||||||
#endif
|
|
||||||
|
|
||||||
void K_LoadKartHUDGraphics(void)
|
void K_LoadKartHUDGraphics(void)
|
||||||
{
|
{
|
||||||
|
@ -5800,14 +5798,12 @@ void K_LoadKartHUDGraphics(void)
|
||||||
|
|
||||||
kp_lapanim_emblem = (patch_t *) W_CachePatchName("K_LAPE00", PU_HUDGFX);
|
kp_lapanim_emblem = (patch_t *) W_CachePatchName("K_LAPE00", PU_HUDGFX);
|
||||||
|
|
||||||
#if 0
|
|
||||||
sprintf(buffer, "K_LAPH0x");
|
sprintf(buffer, "K_LAPH0x");
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
buffer[7] = '0'+(i+1);
|
buffer[7] = '0'+(i+1);
|
||||||
kp_lapanim_hand[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
|
kp_lapanim_hand[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// For the item toggle menu
|
// For the item toggle menu
|
||||||
|
@ -7389,27 +7385,20 @@ static void K_drawLapStartAnim(void)
|
||||||
// This is an EVEN MORE insanely complicated animation.
|
// This is an EVEN MORE insanely complicated animation.
|
||||||
const UINT8 progress = 80-stplyr->kartstuff[k_lapanimation];
|
const UINT8 progress = 80-stplyr->kartstuff[k_lapanimation];
|
||||||
UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, stplyr->skincolor, 0);
|
UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, stplyr->skincolor, 0);
|
||||||
#if 0
|
|
||||||
UINT8 h = 1;
|
|
||||||
|
|
||||||
if (stplyr->kartstuff[k_position] == 1)
|
|
||||||
h = 0;
|
|
||||||
else if (K_IsPlayerLosing(stplyr))
|
|
||||||
h = 2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
|
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
|
||||||
(48 - (32*max(0, progress-76)))*FRACUNIT,
|
(48 - (32*max(0, progress-76)))*FRACUNIT,
|
||||||
FRACUNIT, V_HUDTRANS,
|
FRACUNIT, V_HUDTRANS,
|
||||||
kp_lapanim_emblem, colormap);
|
kp_lapanim_emblem, colormap);
|
||||||
|
|
||||||
#if 0
|
if (stplyr->kartstuff[k_laphand] >= 1 && stplyr->kartstuff[k_laphand] <= 3)
|
||||||
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
|
{
|
||||||
(48 - (32*max(0, progress-76))
|
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
|
||||||
+ 4 - abs((leveltime % 8) - 4))*FRACUNIT,
|
(48 - (32*max(0, progress-76))
|
||||||
FRACUNIT, V_HUDTRANS,
|
+ 4 - abs((leveltime % 8) - 4))*FRACUNIT,
|
||||||
kp_lapanim_hand[h], NULL);
|
FRACUNIT, V_HUDTRANS,
|
||||||
#endif
|
kp_lapanim_hand[stplyr->kartstuff[k_laphand]-1], NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (stplyr->laps == (UINT8)(cv_numlaps.value - 1))
|
if (stplyr->laps == (UINT8)(cv_numlaps.value - 1))
|
||||||
{
|
{
|
||||||
|
|
37
src/p_spec.c
37
src/p_spec.c
|
@ -4196,7 +4196,34 @@ DoneSection2:
|
||||||
{
|
{
|
||||||
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
||||||
{
|
{
|
||||||
|
UINT8 i;
|
||||||
|
UINT8 nump = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (!playeringame[i] || players[i].spectator)
|
||||||
|
continue;
|
||||||
|
nump++;
|
||||||
|
}
|
||||||
|
|
||||||
player->laps++;
|
player->laps++;
|
||||||
|
|
||||||
|
// Set up lap animation vars
|
||||||
|
if (nump > 1)
|
||||||
|
{
|
||||||
|
if (K_IsPlayerLosing(player))
|
||||||
|
player->kartstuff[k_laphand] = 3;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (nump > 2 && player->kartstuff[k_position] == 1) // 1st place in 1v1 uses thumbs up
|
||||||
|
player->kartstuff[k_laphand] = 1;
|
||||||
|
else
|
||||||
|
player->kartstuff[k_laphand] = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
player->kartstuff[k_laphand] = 0; // No hands in FREE PLAY
|
||||||
|
|
||||||
player->kartstuff[k_lapanimation] = 80;
|
player->kartstuff[k_lapanimation] = 80;
|
||||||
|
|
||||||
if (player->pflags & PF_NIGHTSMODE)
|
if (player->pflags & PF_NIGHTSMODE)
|
||||||
|
@ -4237,15 +4264,7 @@ DoneSection2:
|
||||||
|
|
||||||
// Figure out how many are playing on the last lap, to prevent spectate griefing
|
// Figure out how many are playing on the last lap, to prevent spectate griefing
|
||||||
if (!nospectategrief && player->laps >= (UINT8)(cv_numlaps.value - 1))
|
if (!nospectategrief && player->laps >= (UINT8)(cv_numlaps.value - 1))
|
||||||
{
|
nospectategrief = nump;
|
||||||
UINT8 i;
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (!playeringame[i] || players[i].spectator)
|
|
||||||
continue;
|
|
||||||
nospectategrief++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (player->starpostnum)
|
else if (player->starpostnum)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue