mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
a bunch of stuff I left uncommited
This commit is contained in:
parent
312dd3f57f
commit
b27c709879
11 changed files with 127 additions and 34 deletions
|
|
@ -4327,9 +4327,9 @@ void D_GameTypeChanged(INT32 lastgametype)
|
||||||
case GT_TEAMMATCH:
|
case GT_TEAMMATCH:
|
||||||
if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits
|
if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits
|
||||||
{
|
{
|
||||||
// default settings for match: 3 mins, no pointlimit
|
// default settings for match: 2 mins, no pointlimit
|
||||||
CV_SetValue(&cv_pointlimit, 0);
|
CV_SetValue(&cv_pointlimit, 0);
|
||||||
CV_SetValue(&cv_timelimit, 3);
|
CV_SetValue(&cv_timelimit, 2);
|
||||||
}
|
}
|
||||||
if (!cv_itemrespawntime.changed)
|
if (!cv_itemrespawntime.changed)
|
||||||
CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally
|
CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally
|
||||||
|
|
|
||||||
|
|
@ -7101,6 +7101,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
|
|
||||||
"S_OVERTIMEFOG",
|
"S_OVERTIMEFOG",
|
||||||
"S_OVERTIMEORB",
|
"S_OVERTIMEORB",
|
||||||
|
"S_OVERTIMEBEAM",
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
"S_NAMECHECK",
|
"S_NAMECHECK",
|
||||||
|
|
@ -7891,6 +7892,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
|
|
||||||
"MT_OVERTIMEFOG",
|
"MT_OVERTIMEFOG",
|
||||||
"MT_OVERTIMEORB",
|
"MT_OVERTIMEORB",
|
||||||
|
"MT_OVERTIMEBEAM",
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
"MT_NAMECHECK",
|
"MT_NAMECHECK",
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
extern FILE *logstream;
|
extern FILE *logstream;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
|
#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
#define VERSION 0 // Game version
|
#define VERSION 0 // Game version
|
||||||
#define SUBVERSION 0 // more precise version number
|
#define SUBVERSION 0 // more precise version number
|
||||||
|
|
|
||||||
|
|
@ -476,8 +476,8 @@ extern SINT8 pickedvote;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
UINT8 enabled; ///< Has this been initalized yet?
|
UINT8 enabled; ///< Has this been initalized yet?
|
||||||
UINT16 radius, minradius; ///< Radius of kill field
|
fixed_t radius, minradius; ///< Radius of kill field
|
||||||
fixed_t x, y, z; ///< Position to center on (z is only used for visuals)
|
fixed_t x, y, z; ///< Position to center on
|
||||||
} battleovertime_t;
|
} battleovertime_t;
|
||||||
|
|
||||||
extern battleovertime_t *battleovertime;
|
extern battleovertime_t *battleovertime;
|
||||||
|
|
|
||||||
34
src/info.c
34
src/info.c
|
|
@ -3395,7 +3395,8 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_FWRK, 4|FF_FULLBRIGHT, TICRATE, {NULL}, 0, 0, S_NULL}, // S_KARMAFIREWORKTRAIL
|
{SPR_FWRK, 4|FF_FULLBRIGHT, TICRATE, {NULL}, 0, 0, S_NULL}, // S_KARMAFIREWORKTRAIL
|
||||||
|
|
||||||
{SPR_OTFG, FF_FULLBRIGHT|FF_TRANS50, TICRATE, {NULL}, 0, 0, S_NULL}, // S_OVERTIMEFOG
|
{SPR_OTFG, FF_FULLBRIGHT|FF_TRANS50, TICRATE, {NULL}, 0, 0, S_NULL}, // S_OVERTIMEFOG
|
||||||
{SPR_OTFG, 1|FF_FULLBRIGHT, 8, {NULL}, 0, 0, S_NULL}, // S_OVERTIMEORB
|
{SPR_OTFG, 1|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_NULL}, // S_OVERTIMEORB
|
||||||
|
{SPR_OTFG, 3|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_NULL}, // S_OVERTIMEBEAM
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
||||||
|
|
@ -20072,7 +20073,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL, // xdeathstate
|
S_NULL, // xdeathstate
|
||||||
sfx_None, // deathsound
|
sfx_None, // deathsound
|
||||||
0, // speed
|
0, // speed
|
||||||
16<<FRACBITS, // radius
|
16<<FRACBITS, // radius
|
||||||
32<<FRACBITS, // height
|
32<<FRACBITS, // height
|
||||||
-1, // display offset
|
-1, // display offset
|
||||||
100, // mass
|
100, // mass
|
||||||
|
|
@ -20099,7 +20100,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL, // xdeathstate
|
S_NULL, // xdeathstate
|
||||||
sfx_None, // deathsound
|
sfx_None, // deathsound
|
||||||
0, // speed
|
0, // speed
|
||||||
16<<FRACBITS, // radius
|
16<<FRACBITS, // radius
|
||||||
32<<FRACBITS, // height
|
32<<FRACBITS, // height
|
||||||
-1, // display offset
|
-1, // display offset
|
||||||
100, // mass
|
100, // mass
|
||||||
|
|
@ -20109,6 +20110,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // MT_OVERTIMEBEAM
|
||||||
|
-1, // doomednum
|
||||||
|
S_OVERTIMEBEAM, // 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
|
||||||
|
0, // speed
|
||||||
|
48<<FRACBITS, // radius
|
||||||
|
48<<FRACBITS, // height
|
||||||
|
-1, // display offset
|
||||||
|
100, // mass
|
||||||
|
0, // damage
|
||||||
|
sfx_None, // activesound
|
||||||
|
MF_NOBLOCKMAP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||||
|
S_NULL // raisestate
|
||||||
|
},
|
||||||
|
|
||||||
// ============================================================================================================================//
|
// ============================================================================================================================//
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
|
|
|
||||||
|
|
@ -4056,6 +4056,7 @@ typedef enum state
|
||||||
|
|
||||||
S_OVERTIMEFOG,
|
S_OVERTIMEFOG,
|
||||||
S_OVERTIMEORB,
|
S_OVERTIMEORB,
|
||||||
|
S_OVERTIMEBEAM,
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
S_NAMECHECK,
|
S_NAMECHECK,
|
||||||
|
|
@ -4863,6 +4864,7 @@ typedef enum mobj_type
|
||||||
|
|
||||||
MT_OVERTIMEFOG,
|
MT_OVERTIMEFOG,
|
||||||
MT_OVERTIMEORB,
|
MT_OVERTIMEORB,
|
||||||
|
MT_OVERTIMEBEAM,
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
MT_NAMECHECK,
|
MT_NAMECHECK,
|
||||||
|
|
|
||||||
|
|
@ -1033,6 +1033,10 @@ static fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against)
|
||||||
{
|
{
|
||||||
fixed_t weight = 5<<FRACBITS;
|
fixed_t weight = 5<<FRACBITS;
|
||||||
|
|
||||||
|
// HACK for battle overtime camping on top of items
|
||||||
|
/*if (against->type == MT_RANDOMITEM)
|
||||||
|
return 10<<FRACBITS;*/
|
||||||
|
|
||||||
switch (mobj->type)
|
switch (mobj->type)
|
||||||
{
|
{
|
||||||
case MT_PLAYER:
|
case MT_PLAYER:
|
||||||
|
|
@ -4396,7 +4400,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
player->kartstuff[k_wanted]++;
|
player->kartstuff[k_wanted]++;
|
||||||
if (battleovertime->enabled >= 5*TICRATE)
|
if (battleovertime->enabled >= 5*TICRATE)
|
||||||
{
|
{
|
||||||
if (P_AproxDistance(player->mo->x - battleovertime->x, player->mo->y - battleovertime->y) > (battleovertime->radius<<FRACBITS))
|
if (P_AproxDistance(player->mo->x - battleovertime->x, player->mo->y - battleovertime->y) > battleovertime->radius)
|
||||||
{
|
{
|
||||||
player->kartstuff[k_killfield]++;
|
player->kartstuff[k_killfield]++;
|
||||||
if (player->kartstuff[k_killfield] > 4*TICRATE)
|
if (player->kartstuff[k_killfield] > 4*TICRATE)
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
return;
|
return;
|
||||||
case MT_RANDOMITEM: // SRB2kart
|
case MT_RANDOMITEM: // SRB2kart
|
||||||
if (!P_CanPickupItem(player, 1))
|
if (!P_CanPickupItem(player, 1))
|
||||||
|
{
|
||||||
|
if (G_BattleGametype() && special->threshold == 70 && special->health)
|
||||||
|
{
|
||||||
|
K_KartBouncing(toucher, special, false, false);
|
||||||
|
special->extravalue1 = 6;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0)
|
if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0)
|
||||||
{
|
{
|
||||||
|
|
@ -1792,7 +1799,7 @@ void P_CheckTimeLimit(void)
|
||||||
|
|
||||||
//Optional tie-breaker for Match/CTF
|
//Optional tie-breaker for Match/CTF
|
||||||
else*/
|
else*/
|
||||||
//#define TESTOVERTIMEINFREEPLAY
|
#define TESTOVERTIMEINFREEPLAY
|
||||||
if (cv_overtime.value)
|
if (cv_overtime.value)
|
||||||
{
|
{
|
||||||
#ifndef TESTOVERTIMEINFREEPLAY
|
#ifndef TESTOVERTIMEINFREEPLAY
|
||||||
|
|
@ -1839,8 +1846,8 @@ void P_CheckTimeLimit(void)
|
||||||
battleovertime->x = item->x;
|
battleovertime->x = item->x;
|
||||||
battleovertime->y = item->y;
|
battleovertime->y = item->y;
|
||||||
battleovertime->z = item->z;
|
battleovertime->z = item->z;
|
||||||
battleovertime->radius = 4096;
|
battleovertime->radius = 4096*mapheaderinfo[gamemap-1]->mobj_scale;
|
||||||
battleovertime->minradius = (cv_overtime.value == 2 ? 40 : 512);
|
battleovertime->minradius = (cv_overtime.value == 2 ? 40 : 512)*mapheaderinfo[gamemap-1]->mobj_scale;
|
||||||
battleovertime->enabled++;
|
battleovertime->enabled++;
|
||||||
S_StartSound(NULL, sfx_kc47);
|
S_StartSound(NULL, sfx_kc47);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
84
src/p_mobj.c
84
src/p_mobj.c
|
|
@ -6417,6 +6417,7 @@ static void P_SpawnOvertimeParticles(fixed_t x, fixed_t y, mobjtype_t type, bool
|
||||||
fixed_t flatz[MAXPLANESPERSECTOR];
|
fixed_t flatz[MAXPLANESPERSECTOR];
|
||||||
UINT8 numflats = 0;
|
UINT8 numflats = 0;
|
||||||
mobj_t *mo;
|
mobj_t *mo;
|
||||||
|
fixed_t scale = mapheaderinfo[gamemap-1]->mobj_scale;
|
||||||
subsector_t *ss = R_IsPointInSubsector(x, y);
|
subsector_t *ss = R_IsPointInSubsector(x, y);
|
||||||
sector_t *sec;
|
sector_t *sec;
|
||||||
|
|
||||||
|
|
@ -6424,6 +6425,18 @@ static void P_SpawnOvertimeParticles(fixed_t x, fixed_t y, mobjtype_t type, bool
|
||||||
return;
|
return;
|
||||||
sec = ss->sector;
|
sec = ss->sector;
|
||||||
|
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
case MT_OVERTIMEFOG:
|
||||||
|
scale *= 4;
|
||||||
|
break;
|
||||||
|
case MT_OVERTIMEORB:
|
||||||
|
scale += battleovertime->radius/1024;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// convoluted stuff JUST to get all of the planes we need to draw orbs on :V
|
// convoluted stuff JUST to get all of the planes we need to draw orbs on :V
|
||||||
|
|
||||||
if (sec->floorpic != skyflatnum)
|
if (sec->floorpic != skyflatnum)
|
||||||
|
|
@ -6438,9 +6451,9 @@ static void P_SpawnOvertimeParticles(fixed_t x, fixed_t y, mobjtype_t type, bool
|
||||||
if (sec->ceilingpic != skyflatnum && ceiling)
|
if (sec->ceilingpic != skyflatnum && ceiling)
|
||||||
{
|
{
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
flatz[numflats] = (sec->c_slope ? P_GetZAt(sec->c_slope, x, y) : sec->ceilingheight) - mobjinfo[MT_THOK].height;
|
flatz[numflats] = (sec->c_slope ? P_GetZAt(sec->c_slope, x, y) : sec->ceilingheight) - FixedMul(mobjinfo[type].height, scale);
|
||||||
#else
|
#else
|
||||||
flatz[numflats] = (sec->ceilingheight) - mobjinfo[MT_THOK].height;
|
flatz[numflats] = (sec->ceilingheight) - FixedMul(mobjinfo[type].height, scale);
|
||||||
#endif
|
#endif
|
||||||
numflats++;
|
numflats++;
|
||||||
}
|
}
|
||||||
|
|
@ -6464,9 +6477,9 @@ static void P_SpawnOvertimeParticles(fixed_t x, fixed_t y, mobjtype_t type, bool
|
||||||
if (*rover->bottompic != skyflatnum && ceiling)
|
if (*rover->bottompic != skyflatnum && ceiling)
|
||||||
{
|
{
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
flatz[numflats] = (*rover->b_slope ? P_GetZAt(*rover->b_slope, x, y) : *rover->bottomheight) - mobjinfo[MT_THOK].height;
|
flatz[numflats] = (*rover->b_slope ? P_GetZAt(*rover->b_slope, x, y) : *rover->bottomheight) - FixedMul(mobjinfo[type].height, scale);
|
||||||
#else
|
#else
|
||||||
flatz[numflats] = (*rover->bottomheight) - mobjinfo[MT_THOK].height;
|
flatz[numflats] = (*rover->bottomheight) - FixedMul(mobjinfo[type].height, scale);
|
||||||
#endif
|
#endif
|
||||||
numflats++;
|
numflats++;
|
||||||
}
|
}
|
||||||
|
|
@ -6487,20 +6500,20 @@ static void P_SpawnOvertimeParticles(fixed_t x, fixed_t y, mobjtype_t type, bool
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
P_SetScale(mo, scale);
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case MT_OVERTIMEFOG:
|
case MT_OVERTIMEFOG:
|
||||||
P_SetScale(mo, 4*mo->scale);
|
|
||||||
mo->destscale = 8*mo->scale;
|
mo->destscale = 8*mo->scale;
|
||||||
mo->momz = P_RandomRange(1,8)*mo->scale;
|
mo->momz = P_RandomRange(1,8)*mo->scale;
|
||||||
break;
|
break;
|
||||||
case MT_OVERTIMEORB:
|
case MT_OVERTIMEORB:
|
||||||
P_SetScale(mo, 2*mo->scale);
|
|
||||||
mo->destscale = mo->scale/4;
|
mo->destscale = mo->scale/4;
|
||||||
if ((leveltime/2) & 1)
|
if ((leveltime/2) & 1)
|
||||||
mo->frame++;
|
mo->frame++;
|
||||||
if (battleovertime->enabled < 5*TICRATE)
|
if (battleovertime->enabled < 5*TICRATE)
|
||||||
mo->frame |= FF_TRANS50;
|
mo->flags2 |= MF2_SHADOW;
|
||||||
/*if (i == 0 && !((leveltime/2) % 3 == 0))
|
/*if (i == 0 && !((leveltime/2) % 3 == 0))
|
||||||
S_StartSoundAtVolume(mo, sfx_s1b1, 64);*/
|
S_StartSoundAtVolume(mo, sfx_s1b1, 64);*/
|
||||||
break;
|
break;
|
||||||
|
|
@ -6514,6 +6527,7 @@ static void P_SpawnOvertimeParticles(fixed_t x, fixed_t y, mobjtype_t type, bool
|
||||||
void P_RunBattleOvertime(void)
|
void P_RunBattleOvertime(void)
|
||||||
{
|
{
|
||||||
UINT8 i, j;
|
UINT8 i, j;
|
||||||
|
UINT16 orbs = 16;
|
||||||
|
|
||||||
if (battleovertime->enabled < 5*TICRATE)
|
if (battleovertime->enabled < 5*TICRATE)
|
||||||
{
|
{
|
||||||
|
|
@ -6526,28 +6540,45 @@ void P_RunBattleOvertime(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (battleovertime->radius > battleovertime->minradius)
|
if (battleovertime->radius > battleovertime->minradius)
|
||||||
battleovertime->radius--;
|
battleovertime->radius -= mapheaderinfo[gamemap-1]->mobj_scale;
|
||||||
else
|
else
|
||||||
battleovertime->radius = battleovertime->minradius;
|
battleovertime->radius = battleovertime->minradius;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (leveltime & 1)
|
if (leveltime & 1)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 16; i++) // 16 base orbs
|
UINT8 transparency = tr_trans50;
|
||||||
|
|
||||||
|
if (!splitscreen && players[displayplayer].mo)
|
||||||
{
|
{
|
||||||
angle_t ang = FixedAngle(((45*i) * (FRACUNIT>>1)) + ((leveltime % 360)<<FRACBITS));
|
INT32 dist = P_AproxDistance(battleovertime->x-players[displayplayer].mo->x, battleovertime->y-players[displayplayer].mo->y);
|
||||||
fixed_t dist = (battleovertime->radius - (2*mobjinfo[MT_OVERTIMEORB].radius))<<FRACBITS;
|
transparency = max(0, NUMTRANSMAPS - ((256 + (dist>>FRACBITS)) / 256));
|
||||||
fixed_t x = battleovertime->x + P_ReturnThrustX(NULL, ang, dist);
|
|
||||||
fixed_t y = battleovertime->y + P_ReturnThrustY(NULL, ang, dist);
|
|
||||||
P_SpawnOvertimeParticles(x, y, MT_OVERTIMEORB, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (transparency < NUMTRANSMAPS)
|
||||||
|
{
|
||||||
|
mobj_t *beam = P_SpawnMobj(battleovertime->x, battleovertime->y, battleovertime->z + (mobjinfo[MT_RANDOMITEM].height/2), MT_OVERTIMEBEAM);
|
||||||
|
P_SetScale(beam, beam->scale*2);
|
||||||
|
if (transparency > 0)
|
||||||
|
beam->frame |= transparency<<FF_TRANSSHIFT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 16 orbs at the normal minimum size of 512
|
||||||
|
orbs = max(4, FixedDiv(battleovertime->radius, 16*mapheaderinfo[gamemap-1]->mobj_scale)>>FRACBITS);
|
||||||
|
for (i = 0; i < orbs; i++)
|
||||||
|
{
|
||||||
|
angle_t ang = FixedAngle(((360/orbs) * i * (FRACUNIT>>1)) + (((leveltime*2) % 360)<<FRACBITS));
|
||||||
|
fixed_t x = battleovertime->x + P_ReturnThrustX(NULL, ang, battleovertime->radius);
|
||||||
|
fixed_t y = battleovertime->y + P_ReturnThrustY(NULL, ang, battleovertime->radius);
|
||||||
|
P_SpawnOvertimeParticles(x, y, MT_OVERTIMEORB, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battleovertime->enabled < 5*TICRATE)
|
if (battleovertime->enabled < 5*TICRATE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!S_IdPlaying(sfx_s3kd4s)) // global ambience
|
if (!S_IdPlaying(sfx_s3kd4s)) // global ambience
|
||||||
S_StartSoundAtVolume(NULL, sfx_s3kd4s, min(255, (4096-battleovertime->radius)/2));
|
S_StartSoundAtVolume(NULL, sfx_s3kd4s, min(255, ((4096*mapheaderinfo[gamemap-1]->mobj_scale) - battleovertime->radius)>>FRACBITS / 2));
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -6556,7 +6587,7 @@ void P_RunBattleOvertime(void)
|
||||||
{
|
{
|
||||||
fixed_t x = battleovertime->x + ((P_RandomRange(-64,64) * 128)<<FRACBITS);
|
fixed_t x = battleovertime->x + ((P_RandomRange(-64,64) * 128)<<FRACBITS);
|
||||||
fixed_t y = battleovertime->y + ((P_RandomRange(-64,64) * 128)<<FRACBITS);
|
fixed_t y = battleovertime->y + ((P_RandomRange(-64,64) * 128)<<FRACBITS);
|
||||||
fixed_t closestdist = (battleovertime->radius + (4*mobjinfo[MT_OVERTIMEFOG].radius))<<FRACBITS;
|
fixed_t closestdist = battleovertime->radius + (8*mobjinfo[MT_OVERTIMEFOG].radius);
|
||||||
j++;
|
j++;
|
||||||
if (P_AproxDistance(x-battleovertime->x, y-battleovertime->y) < closestdist)
|
if (P_AproxDistance(x-battleovertime->x, y-battleovertime->y) < closestdist)
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -7172,7 +7203,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
mobj->x = mobj->target->x;
|
mobj->x = mobj->target->x;
|
||||||
mobj->y = mobj->target->y;
|
mobj->y = mobj->target->y;
|
||||||
|
|
||||||
if (!splitscreen)
|
if (!splitscreen && players[displayplayer].mo)
|
||||||
{
|
{
|
||||||
scale = mobj->target->scale + FixedMul(FixedDiv(abs(P_AproxDistance(players[displayplayer].mo->x-mobj->target->x,
|
scale = mobj->target->scale + FixedMul(FixedDiv(abs(P_AproxDistance(players[displayplayer].mo->x-mobj->target->x,
|
||||||
players[displayplayer].mo->y-mobj->target->y)), RING_DIST), mobj->target->scale);
|
players[displayplayer].mo->y-mobj->target->y)), RING_DIST), mobj->target->scale);
|
||||||
|
|
@ -9274,6 +9305,25 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
mobj->color = (1 + (leveltime % (MAXSKINCOLORS-1)));
|
mobj->color = (1 + (leveltime % (MAXSKINCOLORS-1)));
|
||||||
mobj->colorized = true;
|
mobj->colorized = true;
|
||||||
|
if (mobj->extravalue1)
|
||||||
|
mobj->extravalue1--;
|
||||||
|
else if (battleovertime->enabled)
|
||||||
|
{
|
||||||
|
fixed_t dist = P_AproxDistance(P_AproxDistance(battleovertime->x-mobj->x, battleovertime->y-mobj->y), battleovertime->z-mobj->z);
|
||||||
|
if (dist > mobj->scale)
|
||||||
|
{
|
||||||
|
angle_t hang = R_PointToAngle2(mobj->x, mobj->y, battleovertime->x, battleovertime->y);
|
||||||
|
angle_t vang = R_PointToAngle2(mobj->z, 0, battleovertime->z, dist);
|
||||||
|
mobj->momx += FixedMul(FixedMul(mobj->scale, FINECOSINE(hang>>ANGLETOFINESHIFT)), FINECOSINE(vang>>ANGLETOFINESHIFT));
|
||||||
|
mobj->momy += FixedMul(FixedMul(mobj->scale, FINESINE(hang>>ANGLETOFINESHIFT)), FINECOSINE(vang>>ANGLETOFINESHIFT));
|
||||||
|
mobj->momz += FixedMul(mobj->scale, FINESINE(vang>>ANGLETOFINESHIFT));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobj->momx = mobj->momy = mobj->momz = 0;
|
||||||
|
P_TeleportMove(mobj, battleovertime->x, battleovertime->y, battleovertime->z);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3300,8 +3300,8 @@ static void P_NetArchiveMisc(void)
|
||||||
|
|
||||||
// battleovertime_t
|
// battleovertime_t
|
||||||
WRITEUINT8(save_p, battleovertime->enabled);
|
WRITEUINT8(save_p, battleovertime->enabled);
|
||||||
WRITEUINT16(save_p, battleovertime->radius);
|
WRITEFIXED(save_p, battleovertime->radius);
|
||||||
WRITEUINT16(save_p, battleovertime->minradius);
|
WRITEFIXED(save_p, battleovertime->minradius);
|
||||||
WRITEFIXED(save_p, battleovertime->x);
|
WRITEFIXED(save_p, battleovertime->x);
|
||||||
WRITEFIXED(save_p, battleovertime->y);
|
WRITEFIXED(save_p, battleovertime->y);
|
||||||
WRITEFIXED(save_p, battleovertime->z);
|
WRITEFIXED(save_p, battleovertime->z);
|
||||||
|
|
@ -3415,8 +3415,8 @@ static inline boolean P_NetUnArchiveMisc(void)
|
||||||
|
|
||||||
// battleovertime_t
|
// battleovertime_t
|
||||||
battleovertime->enabled = READUINT8(save_p);
|
battleovertime->enabled = READUINT8(save_p);
|
||||||
battleovertime->radius = READUINT16(save_p);
|
battleovertime->radius = READFIXED(save_p);
|
||||||
battleovertime->minradius = READUINT16(save_p);
|
battleovertime->minradius = READFIXED(save_p);
|
||||||
battleovertime->x = READFIXED(save_p);
|
battleovertime->x = READFIXED(save_p);
|
||||||
battleovertime->y = READFIXED(save_p);
|
battleovertime->y = READFIXED(save_p);
|
||||||
battleovertime->z = READFIXED(save_p);
|
battleovertime->z = READFIXED(save_p);
|
||||||
|
|
|
||||||
|
|
@ -1370,7 +1370,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Create a window
|
// Create a window
|
||||||
window = SDL_CreateWindow("SRB2Kart "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
window = SDL_CreateWindow("FortniteKart "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||||
realwidth, realheight, flags);
|
realwidth, realheight, flags);
|
||||||
|
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue