rings disable toggle, rebalance rings
This commit is contained in:
parent
e832cf5963
commit
d7dd4f68e2
12 changed files with 150 additions and 79 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include "hu_stuff.h"
|
||||
#include "g_input.h"
|
||||
#include "m_menu.h"
|
||||
#include "p_mobj.h"
|
||||
#include "r_local.h"
|
||||
#include "r_skins.h"
|
||||
#include "p_local.h"
|
||||
|
|
@ -150,6 +151,7 @@ static void KartSpeed_OnChange(void);
|
|||
static void KartEncore_OnChange(void);
|
||||
static void KartComeback_OnChange(void);
|
||||
static void KartEliminateLast_OnChange(void);
|
||||
static void KartRings_OnChange(void);
|
||||
|
||||
static void Schedule_OnChange(void);
|
||||
|
||||
|
|
@ -424,6 +426,9 @@ consvar_t cv_kartbot = CVAR_INIT ("kartbot", "0", CV_NETVAR, kartbot_cons_t, NUL
|
|||
|
||||
consvar_t cv_karteliminatelast = CVAR_INIT ("karteliminatelast", "Yes", CV_NETVAR|CV_CHEAT|CV_CALL, CV_YesNo, KartEliminateLast_OnChange);
|
||||
|
||||
// Toggles for new features
|
||||
consvar_t cv_kartrings = CVAR_INIT ("kartrings", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartRings_OnChange);
|
||||
|
||||
consvar_t cv_kartusepwrlv = CVAR_INIT ("kartusepwrlv", "Yes", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL);
|
||||
|
||||
static CV_PossibleValue_t kartdebugitem_cons_t[] =
|
||||
|
|
@ -6436,6 +6441,23 @@ static void KartEliminateLast_OnChange(void)
|
|||
P_CheckRacers();
|
||||
}
|
||||
|
||||
static void KartRings_OnChange(void)
|
||||
{
|
||||
if (K_CanChangeRules() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (ringsdisabled)
|
||||
{
|
||||
CONS_Printf(M_GetText("Rings will be turned %s Next Round .\n"), cv_kartrings.string);
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Printf(M_GetText("Rings will be turned %s Next Round .\n"), cv_kartrings.string);
|
||||
}
|
||||
}
|
||||
|
||||
static void Schedule_OnChange(void)
|
||||
{
|
||||
size_t i;
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ extern consvar_t cv_kartvoices;
|
|||
extern consvar_t cv_kartbot;
|
||||
extern consvar_t cv_karteliminatelast;
|
||||
extern consvar_t cv_kartusepwrlv;
|
||||
extern consvar_t cv_kartrings;
|
||||
|
||||
extern consvar_t cv_votetime;
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ extern char logfilename[1024];
|
|||
|
||||
#define COLORRAMPSIZE 16
|
||||
#define MAXCOLORNAME 32
|
||||
#define NUMCOLORFREESLOTS 1024
|
||||
#define NUMCOLORFREESLOTS UINT16_MAX
|
||||
|
||||
// Master Server compatibility ONLY
|
||||
#define MSCOMPAT_MAXPLAYERS (32)
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@ void A_InvincSparkleRotate();
|
|||
extern boolean actionsoverridden[NUMACTIONS];
|
||||
|
||||
// ratio of states to sprites to mobj types is roughly 6 : 1 : 1
|
||||
#define NUMMOBJFREESLOTS 1024
|
||||
#define NUMMOBJFREESLOTS 4096
|
||||
#define NUMSPRITEFREESLOTS NUMMOBJFREESLOTS
|
||||
#define NUMSTATEFREESLOTS (NUMMOBJFREESLOTS*8)
|
||||
|
||||
|
|
|
|||
117
src/k_hud.c
117
src/k_hud.c
|
|
@ -15,6 +15,7 @@
|
|||
#include "k_boss.h"
|
||||
#include "k_color.h"
|
||||
#include "k_director.h"
|
||||
#include "p_mobj.h"
|
||||
#include "screen.h"
|
||||
#include "doomtype.h"
|
||||
#include "doomdef.h"
|
||||
|
|
@ -2255,19 +2256,23 @@ static void K_drawKartLapsAndRings(void)
|
|||
rn[0] = ((abs(stplyr->rings) / 10) % 10);
|
||||
rn[1] = (abs(stplyr->rings) % 10);
|
||||
|
||||
if (stplyr->rings <= 0 && (leveltime/5 & 1)) // In debt
|
||||
if (!ringsdisabled)
|
||||
{
|
||||
ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_CRIMSON, GTC_CACHE);
|
||||
colorring = true;
|
||||
}
|
||||
else if (stplyr->rings >= 20) // Maxed out
|
||||
ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_YELLOW, GTC_CACHE);
|
||||
|
||||
if (stplyr->rings <= 0 && (leveltime/5 & 1)) // In debt
|
||||
{
|
||||
ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_CRIMSON, GTC_CACHE);
|
||||
colorring = true;
|
||||
}
|
||||
else if (stplyr->rings >= 20) // Maxed out
|
||||
ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_YELLOW, GTC_CACHE);
|
||||
|
||||
if (stplyr->karthud[khud_ringframe] > RINGANIM_FLIPFRAME)
|
||||
{
|
||||
ringflip = V_FLIP;
|
||||
ringanim_realframe = RINGANIM_NUMFRAMES-stplyr->karthud[khud_ringframe];
|
||||
ringx += SHORT((r_splitscreen > 1) ? kp_smallring[ringanim_realframe]->width : kp_ring[ringanim_realframe]->width);
|
||||
if (stplyr->karthud[khud_ringframe] > RINGANIM_FLIPFRAME)
|
||||
{
|
||||
ringflip = V_FLIP;
|
||||
ringanim_realframe = RINGANIM_NUMFRAMES-stplyr->karthud[khud_ringframe];
|
||||
ringx += SHORT((r_splitscreen > 1) ? kp_smallring[ringanim_realframe]->width : kp_ring[ringanim_realframe]->width);
|
||||
}
|
||||
}
|
||||
|
||||
if (r_splitscreen > 1)
|
||||
|
|
@ -2301,7 +2306,8 @@ static void K_drawKartLapsAndRings(void)
|
|||
fr = fx;
|
||||
|
||||
// Laps
|
||||
V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[1]->width) - 3) : 0), fy, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[0]);
|
||||
if (!ringsdisabled)
|
||||
V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[1]->width) - 3) : 0), fy, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[0]);
|
||||
|
||||
V_DrawScaledPatch(fx, fy, V_HUDTRANS|V_SLIDEIN|splitflags, kp_splitlapflag);
|
||||
V_DrawScaledPatch(fx+22, fy, V_HUDTRANS|V_SLIDEIN|splitflags, frameslash);
|
||||
|
|
@ -2327,27 +2333,31 @@ static void K_drawKartLapsAndRings(void)
|
|||
V_DrawScaledPatch(fx+27, fy, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[(numlaps) % 10]);
|
||||
}
|
||||
|
||||
// Rings
|
||||
if (!uselives)
|
||||
if (!ringsdisabled)
|
||||
{
|
||||
V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[1]->width) - 3) : 0), fy-10, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[1]);
|
||||
if (flipflag)
|
||||
fr += 15;
|
||||
// Rings
|
||||
if (!uselives)
|
||||
{
|
||||
V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[1]->width) - 3) : 0), fy-10, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[1]);
|
||||
if (flipflag)
|
||||
fr += 15;
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[0]->width) - 3) : 0), fy-10, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[0]);
|
||||
|
||||
|
||||
V_DrawMappedPatch(fr+ringx, fy-13, V_HUDTRANS|V_SLIDEIN|splitflags|ringflip, kp_smallring[ringanim_realframe], (colorring ? ringmap : NULL));
|
||||
|
||||
if (stplyr->rings < 0) // Draw the minus for ring debt
|
||||
V_DrawMappedPatch(fr+7, fy-10, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringdebtminussmall, ringmap);
|
||||
|
||||
V_DrawMappedPatch(fr+11, fy-10, V_HUDTRANS|V_SLIDEIN|splitflags, fontv[PINGNUM_FONT].font[rn[0]], ringmap);
|
||||
V_DrawMappedPatch(fr+15, fy-10, V_HUDTRANS|V_SLIDEIN|splitflags, fontv[PINGNUM_FONT].font[rn[1]], ringmap);
|
||||
|
||||
// SPB ring lock
|
||||
if (stplyr->pflags & PF_RINGLOCK)
|
||||
V_DrawScaledPatch(fr-12, fy-23, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringspblocksmall[stplyr->karthud[khud_ringspblock]]);
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[0]->width) - 3) : 0), fy-10, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[0]);
|
||||
|
||||
V_DrawMappedPatch(fr+ringx, fy-13, V_HUDTRANS|V_SLIDEIN|splitflags|ringflip, kp_smallring[ringanim_realframe], (colorring ? ringmap : NULL));
|
||||
|
||||
if (stplyr->rings < 0) // Draw the minus for ring debt
|
||||
V_DrawMappedPatch(fr+7, fy-10, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringdebtminussmall, ringmap);
|
||||
|
||||
V_DrawMappedPatch(fr+11, fy-10, V_HUDTRANS|V_SLIDEIN|splitflags, fontv[PINGNUM_FONT].font[rn[0]], ringmap);
|
||||
V_DrawMappedPatch(fr+15, fy-10, V_HUDTRANS|V_SLIDEIN|splitflags, fontv[PINGNUM_FONT].font[rn[1]], ringmap);
|
||||
|
||||
// SPB ring lock
|
||||
if (stplyr->pflags & PF_RINGLOCK)
|
||||
V_DrawScaledPatch(fr-12, fy-23, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringspblocksmall[stplyr->karthud[khud_ringspblock]]);
|
||||
|
||||
// Lives
|
||||
if (uselives)
|
||||
|
|
@ -2364,29 +2374,32 @@ static void K_drawKartLapsAndRings(void)
|
|||
V_DrawScaledPatch(LAPS_X, LAPS_Y, V_HUDTRANS|V_SLIDEIN|splitflags, kp_lapsticker);
|
||||
V_DrawKartString(LAPS_X+33, LAPS_Y+3, V_HUDTRANS|V_SLIDEIN|splitflags, va("%d/%d", min(stplyr->laps, numlaps), numlaps));
|
||||
|
||||
// Rings
|
||||
if (!uselives)
|
||||
V_DrawScaledPatch(LAPS_X, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringsticker[1]);
|
||||
else
|
||||
V_DrawScaledPatch(LAPS_X, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringsticker[0]);
|
||||
|
||||
V_DrawMappedPatch(LAPS_X+ringx+7, LAPS_Y-16, V_HUDTRANS|V_SLIDEIN|splitflags|ringflip, kp_ring[ringanim_realframe], (colorring ? ringmap : NULL));
|
||||
|
||||
if (stplyr->rings < 0) // Draw the minus for ring debt
|
||||
if (!ringsdisabled)
|
||||
{
|
||||
V_DrawMappedPatch(LAPS_X+23, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringdebtminus, ringmap);
|
||||
V_DrawMappedPatch(LAPS_X+29, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[rn[0]], ringmap);
|
||||
V_DrawMappedPatch(LAPS_X+35, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[rn[1]], ringmap);
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawMappedPatch(LAPS_X+23, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[rn[0]], ringmap);
|
||||
V_DrawMappedPatch(LAPS_X+29, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[rn[1]], ringmap);
|
||||
}
|
||||
// Rings
|
||||
if (!uselives)
|
||||
V_DrawScaledPatch(LAPS_X, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringsticker[1]);
|
||||
else
|
||||
V_DrawScaledPatch(LAPS_X, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringsticker[0]);
|
||||
|
||||
// SPB ring lock
|
||||
if (stplyr->pflags & PF_RINGLOCK)
|
||||
V_DrawScaledPatch(LAPS_X-5, LAPS_Y-28, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringspblock[stplyr->karthud[khud_ringspblock]]);
|
||||
V_DrawMappedPatch(LAPS_X+ringx+7, LAPS_Y-16, V_HUDTRANS|V_SLIDEIN|splitflags|ringflip, kp_ring[ringanim_realframe], (colorring ? ringmap : NULL));
|
||||
|
||||
if (stplyr->rings < 0) // Draw the minus for ring debt
|
||||
{
|
||||
V_DrawMappedPatch(LAPS_X+23, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringdebtminus, ringmap);
|
||||
V_DrawMappedPatch(LAPS_X+29, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[rn[0]], ringmap);
|
||||
V_DrawMappedPatch(LAPS_X+35, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[rn[1]], ringmap);
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawMappedPatch(LAPS_X+23, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[rn[0]], ringmap);
|
||||
V_DrawMappedPatch(LAPS_X+29, LAPS_Y-11, V_HUDTRANS|V_SLIDEIN|splitflags, kp_facenum[rn[1]], ringmap);
|
||||
}
|
||||
|
||||
// SPB ring lock
|
||||
if (stplyr->pflags & PF_RINGLOCK)
|
||||
V_DrawScaledPatch(LAPS_X-5, LAPS_Y-28, V_HUDTRANS|V_SLIDEIN|splitflags, kp_ringspblock[stplyr->karthud[khud_ringspblock]]);
|
||||
}
|
||||
|
||||
// Lives
|
||||
if (uselives)
|
||||
|
|
|
|||
29
src/k_kart.c
29
src/k_kart.c
|
|
@ -253,6 +253,8 @@ void K_RegisterKartStuff(void)
|
|||
CV_RegisterVar(&cv_stagetitle);
|
||||
|
||||
CV_RegisterVar(&cv_lessflicker);
|
||||
|
||||
CV_RegisterVar(&cv_kartrings);
|
||||
}
|
||||
|
||||
//}
|
||||
|
|
@ -2773,12 +2775,9 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
|
||||
if (player->ringboost) // Ring Boost
|
||||
{
|
||||
ADDBOOST(FRACUNIT/5, 4*FRACUNIT, 0); // + 20% top speed, + 400% acceleration, +0% handling
|
||||
}
|
||||
|
||||
if (player->eggmanexplode) // Ready-to-explode
|
||||
{
|
||||
ADDBOOST(3*FRACUNIT/20, FRACUNIT, 0); // + 15% top speed, + 100% acceleration, +0% handling
|
||||
// Make rings additive so they aren't useless with other boosts
|
||||
speedboost += FRACUNIT/6; // 15%
|
||||
accelboost = max(4*FRACUNIT, accelboost); // 400%
|
||||
}
|
||||
|
||||
player->boostpower = boostpower;
|
||||
|
|
@ -6533,10 +6532,18 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->wipeoutslow = 0;
|
||||
}
|
||||
|
||||
if (player->rings > 20)
|
||||
player->rings = 20;
|
||||
else if (player->rings < -20)
|
||||
player->rings = -20;
|
||||
|
||||
if (ringsdisabled)
|
||||
{
|
||||
player->rings = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->rings > 20)
|
||||
player->rings = 20;
|
||||
else if (player->rings < -20)
|
||||
player->rings = -20;
|
||||
}
|
||||
|
||||
if (player->spheres > 40)
|
||||
player->spheres = 40;
|
||||
|
|
@ -8847,7 +8854,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
case KITEM_SUPERRING:
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||
{
|
||||
K_AwardPlayerRings(player, 10, true);
|
||||
K_AwardPlayerRings(player, 15, true);
|
||||
player->itemamount--;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1879,6 +1879,18 @@ static int lib_pFindHighestCeilingSurrounding(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pPlayerTouchingSectorSpecial(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
INT32 section = (INT32)luaL_checkinteger(L, 2);
|
||||
INT32 number = (INT32)luaL_checkinteger(L, 3);
|
||||
//HUDSAFE
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
LUA_PushUserdata(L, P_MobjTouchingSectorSpecial(player->mo, section, number, true), META_SECTOR);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pFindSpecialLineFromTag(lua_State *L)
|
||||
{
|
||||
INT16 special = (INT16)luaL_checkinteger(L, 1);
|
||||
|
|
@ -3938,6 +3950,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_FindNextLowestFloor",lib_pFindNextLowestFloor},
|
||||
{"P_FindLowestCeilingSurrounding",lib_pFindLowestCeilingSurrounding},
|
||||
{"P_FindHighestCeilingSurrounding",lib_pFindHighestCeilingSurrounding},
|
||||
{"P_PlayerTouchingSectorSpecial",lib_pPlayerTouchingSectorSpecial},
|
||||
{"P_FindSpecialLineFromTag",lib_pFindSpecialLineFromTag},
|
||||
{"P_SwitchWeather",lib_pSwitchWeather},
|
||||
{"P_LinedefExecute",lib_pLinedefExecute},
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
/// \file p_mobj.c
|
||||
/// \brief Moving object handling. Spawn functions
|
||||
|
||||
#include "d_netcmd.h"
|
||||
#include "doomdef.h"
|
||||
#include "doomtype.h"
|
||||
#include "g_game.h"
|
||||
|
|
@ -11423,6 +11424,9 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i)
|
|||
return false; // No cheating!!
|
||||
|
||||
break;
|
||||
case MT_RING:
|
||||
if (ringsdisabled)
|
||||
return false;
|
||||
case MT_ITEMCAPSULE:
|
||||
{
|
||||
boolean isRingCapsule = (mthing->angle < 1 || mthing->angle == KITEM_SUPERRING || mthing->angle >= NUMKARTITEMS);
|
||||
|
|
|
|||
|
|
@ -545,6 +545,7 @@ extern boolean runemeraldmanager;
|
|||
extern UINT16 emeraldspawndelay;
|
||||
extern INT32 numstarposts;
|
||||
extern INT32 numbosswaypoints;
|
||||
extern boolean ringsdisabled;
|
||||
extern UINT16 bossdisabled;
|
||||
extern boolean stoppedclock;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "m_random.h"
|
||||
#include "m_misc.h"
|
||||
#include "p_local.h"
|
||||
#include "p_mobj.h"
|
||||
#include "p_setup.h"
|
||||
#include "p_saveg.h"
|
||||
#include "r_data.h"
|
||||
|
|
@ -4448,6 +4449,7 @@ static void P_NetArchiveMisc(boolean resending)
|
|||
WRITEUINT32(save_p, ssspheres);
|
||||
WRITEINT16(save_p, lastmap);
|
||||
WRITEUINT16(save_p, bossdisabled);
|
||||
WRITEUINT8(save_p, ringsdisabled);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
|
|
@ -4609,7 +4611,8 @@ static inline boolean P_NetUnArchiveMisc(boolean reloading)
|
|||
leveltime = READUINT32(save_p);
|
||||
ssspheres = READUINT32(save_p);
|
||||
lastmap = READINT16(save_p);
|
||||
bossdisabled = READUINT16(save_p);
|
||||
bossdisabled = READUINT16(save_p);\
|
||||
ringsdisabled = READUINT16(save_p);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ line_t *spawnlines;
|
|||
side_t *spawnsides;
|
||||
INT32 numstarposts;
|
||||
INT32 numbosswaypoints;
|
||||
boolean ringsdisabled;
|
||||
UINT16 bossdisabled;
|
||||
boolean stoppedclock;
|
||||
boolean levelloading;
|
||||
|
|
@ -3695,6 +3696,11 @@ static void P_InitLevelSettings(boolean reloadinggamestate)
|
|||
nummapboxes = numgotboxes = 0;
|
||||
maptargets = numtargets = 0;
|
||||
battlecapsules = false;
|
||||
|
||||
if (cv_kartrings.value)
|
||||
ringsdisabled = false;
|
||||
else
|
||||
ringsdisabled = true;
|
||||
|
||||
// emerald hunt
|
||||
hunt1 = hunt2 = hunt3 = NULL;
|
||||
|
|
|
|||
27
src/p_user.c
27
src/p_user.c
|
|
@ -22,6 +22,7 @@
|
|||
#include "g_game.h"
|
||||
#include "info.h"
|
||||
#include "p_local.h"
|
||||
#include "p_mobj.h"
|
||||
#include "r_fps.h"
|
||||
#include "r_main.h"
|
||||
#include "s_sound.h"
|
||||
|
|
@ -495,6 +496,9 @@ INT32 P_GivePlayerRings(player_t *player, INT32 num_rings)
|
|||
|
||||
if ((gametyperules & GTR_BUMPERS)) // No rings in Battle Mode
|
||||
return 0;
|
||||
|
||||
if (ringsdisabled) // No rings in when turned off
|
||||
return 0;
|
||||
|
||||
test = player->rings + num_rings;
|
||||
if (test > 20) // Caps at 20 rings, sorry!
|
||||
|
|
@ -685,6 +689,9 @@ boolean P_EvaluateMusicStatus(UINT16 status, const char *musname)
|
|||
|
||||
void P_PlayRinglossSound(mobj_t *source)
|
||||
{
|
||||
if (ringsdisabled)
|
||||
return;
|
||||
|
||||
if (source->player && K_GetShieldFromItem(source->player->itemtype) != KSHIELD_NONE)
|
||||
S_StartSound(source, sfx_s1a3); // Shield hit (no ring loss)
|
||||
else if (source->player && source->player->rings <= 0)
|
||||
|
|
@ -1792,6 +1799,11 @@ static void P_3dMovement(player_t *player)
|
|||
|
||||
if (!player->pogospring)
|
||||
cmd->sidemove = 0;
|
||||
|
||||
if ((player->exiting || mapreset) || player->pflags & PF_STASIS || player->spinouttimer) // pw_introcam?
|
||||
{
|
||||
cmd->forwardmove = cmd->sidemove = 0;
|
||||
}
|
||||
|
||||
// Get the old momentum; this will be needed at the end of the function! -SH
|
||||
oldMagnitude = R_PointToDist2(player->mo->momx - player->cmomx, player->mo->momy - player->cmomy, 0, 0);
|
||||
|
|
@ -1864,6 +1876,8 @@ static void P_3dMovement(player_t *player)
|
|||
// Do not let the player control movement if not onground.
|
||||
// SRB2Kart: pogo spring and speed bumps are supposed to control like you're on the ground
|
||||
onground = (P_IsObjectOnGround(player->mo) || (player->pogospring));
|
||||
|
||||
player->aiming = cmd->aiming<<FRACBITS;
|
||||
|
||||
// Forward movement
|
||||
if (!((player->exiting || mapreset) || (P_PlayerInPain(player) && !onground)))
|
||||
|
|
@ -2040,16 +2054,6 @@ static void P_UpdatePlayerAngle(player_t *player)
|
|||
player->angleturn = anglechange;
|
||||
player->mo->angle = player->angleturn;
|
||||
|
||||
if (!cv_allowmlook.value || player->spectator == false)
|
||||
{
|
||||
player->aiming = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->aiming += (player->cmd.aiming << TICCMD_REDUCE);
|
||||
player->aiming = G_ClipAimingPitch((INT32*) &player->aiming);
|
||||
}
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
if (player == &players[displayplayers[i]])
|
||||
|
|
@ -2204,9 +2208,6 @@ void P_MovePlayer(player_t *player)
|
|||
{
|
||||
INT32 a = (ANGLE_45 / 5) * player->drift;
|
||||
|
||||
if (player->mo->eflags & MFE_UNDERWATER)
|
||||
a /= 2;
|
||||
|
||||
player->drawangle += a;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue