the dulcet tones of eri nobuchika are the only thing separating me from a shallow grave

This commit is contained in:
Antonio Martinez 2025-06-12 00:41:45 -04:00
parent 46d6e4d852
commit c55f52f587
4 changed files with 48 additions and 10 deletions

View file

@ -468,3 +468,25 @@ UINT8 K_RaceLapCount(INT16 mapNum)
return cv_numlaps.value;
}
void K_SpawnFinishEXP(player_t *player, UINT16 exp)
{
CONS_Printf("finish\n");
if (finishBeamLine != NULL)
{
CONS_Printf("fuck me %d\n", exp);
mobj_t *p1 = P_SpawnMobj(finishBeamLine->v1->x, finishBeamLine->v1->y, player->mo->z, MT_THOK);
mobj_t *p2 = P_SpawnMobj(finishBeamLine->v2->x, finishBeamLine->v2->y, player->mo->z, MT_THOK);
p1->fuse = 200;
p2->fuse = 200;
p1->tics = 200;
p2->tics = 200;
K_SpawnEXP(player, exp, p1);
K_SpawnEXP(player, exp, p2);
}
else
{
CONS_Printf("fuck you\n");
K_SpawnEXP(player, exp*2, player->mo);
}
}

View file

@ -85,6 +85,8 @@ void K_RunFinishLineBeam(void);
UINT8 K_RaceLapCount(INT16 mapNum);
void K_SpawnFinishEXP(player_t *player, UINT16 exp);
#ifdef __cplusplus
} // extern "C"

View file

@ -25,6 +25,18 @@
#define EXP_ARCTIME (8)
#define EXP_ORBIT (100)
static void ghostme(mobj_t *exp, player_t *player)
{
if (exp->cusval%2)
return;
mobj_t *ghost = P_SpawnGhostMobj(exp);
ghost->colorized = true;
ghost->color = player->skincolor;
ghost->renderflags |= RF_ADD;
ghost->fuse = 2;
}
void Obj_ExpThink (mobj_t *exp)
{
if (P_MobjWasRemoved(exp->target)
@ -44,19 +56,10 @@ void Obj_ExpThink (mobj_t *exp)
dist = P_AproxDistance(P_AproxDistance(exp->x - mo->x, exp->y - mo->y), exp->z - mo->z);
K_MatchGenericExtraFlags(exp, mo);
// K_MatchGenericExtraFlags(exp, mo);
exp->cusval++;
if (exp->cusval%2)
{
mobj_t *ghost = P_SpawnGhostMobj(exp);
ghost->colorized = true;
ghost->color = player->skincolor;
ghost->renderflags |= RF_ADD;
ghost->fuse = 2;
}
// bullshit copypaste orbit behavior
if (exp->threshold)
{
@ -73,6 +76,8 @@ void Obj_ExpThink (mobj_t *exp)
exp->momy = 0;
exp->momz = 0;
ghostme(exp, player);
exp->angle += ANG30;
exp->extravalue1++;
@ -123,6 +128,8 @@ void Obj_ExpThink (mobj_t *exp)
exp->momy += FixedMul(FINESINE(vang>>ANGLETOFINESHIFT), FixedMul(FINESINE(hang>>ANGLETOFINESHIFT), speed));
exp->momz += FixedMul(FINECOSINE(vang>>ANGLETOFINESHIFT), speed);
ghostme(exp, player);
if (dist < (EXP_ORBIT * exp->scale) && exp->extravalue2)
{
exp->threshold = TICRATE;

View file

@ -54,6 +54,7 @@
#include "music.h"
#include "k_battle.h" // battleprisons
#include "k_endcam.h" // K_EndCameraIsFreezing()
#include "k_race.h" // K_SpawnFinishEXP
// Not sure if this is necessary, but it was in w_wad.c, so I'm putting it here too -Shadow Hog
#include <errno.h>
@ -2153,8 +2154,14 @@ static void K_HandleLapIncrement(player_t *player)
// Update power levels for this lap.
K_UpdatePowerLevels(player, player->laps, false);
UINT16 oldexp = player->exp;
K_CheckpointCrossAward(player);
if (player->exp > oldexp)
{
K_SpawnFinishEXP(player, player->exp - oldexp);
}
if (player->position == 1 && !(gametyperules & GTR_CHECKPOINTS))
{
Obj_DeactivateCheckpoints();