mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-28 02:32:48 +00:00
Development cheat to disable pickmeup
This commit is contained in:
parent
03d9430bb9
commit
f434549eef
3 changed files with 12 additions and 1 deletions
|
|
@ -809,6 +809,7 @@ consvar_t cv_debugencorevote = OnlineCheat("debugencorevote", "Off").on_off().de
|
|||
consvar_t cv_debuglapcheat = OnlineCheat("debuglapcheat", "Off").on_off().description("Permit far waypoint jumps and disable lap cheat prevention");
|
||||
consvar_t cv_debugnewchallenger = OnlineCheat("debugnewchallenger", "Off").on_off().description("Do not restart the map to toggle Duel mode");
|
||||
consvar_t cv_forcebots = OnlineCheat("forcebots", "No").yes_no().description("Force bots to appear, even in wrong game modes");
|
||||
consvar_t cv_debugpickmeup = OnlineCheat("debugpickmeup", "Off").on_off().description("Don't protect players from self/team damage");
|
||||
|
||||
void ForceSkin_OnChange(void);
|
||||
consvar_t cv_forceskin = OnlineCheat("forcecharacter", "None").onchange(ForceSkin_OnChange).description("Force all players to use one character");
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
using namespace srb2;
|
||||
|
||||
extern "C" consvar_t cv_debughudtracker, cv_battleufotest, cv_kartdebugwaypoints;
|
||||
extern "C" consvar_t cv_debughudtracker, cv_battleufotest, cv_kartdebugwaypoints, cv_debugpickmeup;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
@ -402,6 +402,8 @@ bool is_object_tracking_target(const mobj_t* mobj)
|
|||
case MT_BUBBLESHIELDTRAP:
|
||||
case MT_EGGMANITEM:
|
||||
case MT_EGGMANITEM_SHIELD:
|
||||
if (cv_debugpickmeup.value)
|
||||
return false;
|
||||
return (mobj->target && !P_MobjWasRemoved(mobj->target) && (
|
||||
(mobj->target->player && stplyr == mobj->target->player)
|
||||
|| (mobj->target->player && G_SameTeam(stplyr, mobj->target->player))
|
||||
|
|
|
|||
|
|
@ -15835,6 +15835,10 @@ void K_BotHitPenalty(player_t *player)
|
|||
|
||||
boolean K_IsPickMeUpItem(mobjtype_t type)
|
||||
{
|
||||
extern consvar_t cv_debugpickmeup;
|
||||
if (cv_debugpickmeup.value)
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case MT_JAWZ:
|
||||
|
|
@ -15948,6 +15952,10 @@ static boolean K_PickUp(player_t *player, mobj_t *picked)
|
|||
// ACHTUNG this destroys items when returning true, make sure to bail out
|
||||
boolean K_TryPickMeUp(mobj_t *m1, mobj_t *m2, boolean allowHostile)
|
||||
{
|
||||
extern consvar_t cv_debugpickmeup;
|
||||
if (cv_debugpickmeup.value)
|
||||
return false;
|
||||
|
||||
if (!m1 || P_MobjWasRemoved(m1))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue