Added vars to d_clisrv, renamed autoexec.cfg, added menu variables to d_netcmd.h, added powers to dehacked.c for LUA, and made sure things can actually compile correctly as-is (squished two errors).

This commit is contained in:
ZTsukei 2016-02-21 12:39:20 -05:00
parent ebe0c46ccb
commit ba18d968e5
11 changed files with 114 additions and 14 deletions

View file

@ -568,6 +568,18 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
rsp->losstime = (tic_t)LONG(players[i].losstime);
rsp->timeshit = players[i].timeshit;
rsp->onconveyor = LONG(players[i].onconveyor);
rsp->starpostwp = LONG(players[i].starpostwp); // SRB2kart 16/02/21
rsp->position = LONG(players[i].position);
rsp->heldDir = LONG(players[i].heldDir);
rsp->turning = LONG(players[i].turning);
rsp->newfloorz = LONG(players[i].newfloorz);
rsp->lakitu = LONG(players[i].lakitu);
rsp->spinout = LONG(players[i].spinout);
rsp->spinouttype = players[i].spinouttype;
rsp->boosting = players[i].boosting;
rsp->hasmo = false;
//Transfer important mo information if the player has a body.

View file

@ -228,6 +228,18 @@ typedef struct
UINT8 timeshit;
INT32 onconveyor;
INT32 starpostwp; // SRB2kart 16/02/21
INT32 position;
INT32 heldDir;
INT32 turning;
INT32 newfloorz;
INT32 lakitu;
INT32 spinout;
UINT8 spinouttype;
UINT8 boosting;
//player->mo stuff
UINT8 hasmo; //boolean

View file

@ -1241,7 +1241,7 @@ void D_SRB2Main(void)
if (dedicated)
COM_ImmedExecute(va("exec \"%s"PATHSEP"adedserv.cfg\"\n", srb2home));
else
COM_ImmedExecute(va("exec \"%s"PATHSEP"autoexec.cfg\" -noerror\n", srb2home));
COM_ImmedExecute(va("exec \"%s"PATHSEP"kartexec.cfg\" -noerror\n", srb2home));
if (!autostart)
M_PushSpecialParameters(); // push all "+" parameters at the command buffer
@ -1282,11 +1282,13 @@ void D_SRB2Main(void)
return;
}
if (M_CheckParm("-ultimatemode"))
/*
if (M_CheckParm("-ultimatemode")) // SRB2kart 16/02/21 - I don't think we need Ultimate mode
{
autostart = true;
ultimatemode = true;
}
*/
if (autostart || netgame || M_CheckParm("+connect") || M_CheckParm("-connect"))
{

View file

@ -932,7 +932,7 @@ static void CleanupPlayerName(INT32 playernum, const char *newname)
* kicked with a consistency failure.
*
* This function prints a message indicating the name change, unless the game
* is currently showing the intro, e.g. when processing autoexec.cfg.
* is currently showing the intro, e.g. when processing kartexec.cfg.
*
* \param playernum Player number who has requested a name change.
* \param newname New name for that player. Should be good, but won't

View file

@ -96,6 +96,12 @@ extern consvar_t cv_jumpshield, cv_watershield, cv_ringshield, cv_forceshield, c
extern consvar_t cv_1up, cv_eggmanbox;
extern consvar_t cv_recycler;
// SRB2kart settings - basically every item // SRB2kart 21/02/16
extern consvar_t cv_magnet, cv_boo, cv_mushroom, cv_megashroom, cv_goldshroom, cv_star;
extern consvar_t cv_triplebanana, cv_fakeitem, cv_banana, cv_greenshell, cv_redshell;
extern consvar_t cv_laserwisp, cv_triplegreenshell, cv_bobomb, cv_blueshell, cv_jaws;
extern consvar_t cv_tossfeather, cv_fireflower, cv_tripleredshell, cv_bowsershell, cv_lightning;
extern consvar_t cv_itemfinder;
extern consvar_t cv_inttime, cv_advancemap, cv_playersforexit;

View file

@ -228,7 +228,7 @@ typedef enum
pw_ingoop, // In goop
// /////////////// //
// SRB2kart Powers // // SRB2kart 16/02/15 (TODO: Remove Riders powers we don't need.)
// SRB2kart Powers // // SRB2kart 16/02/15
// /////////////// //
// Basic gameplay things
@ -257,7 +257,7 @@ typedef enum
pw_squishedtimer, // Squished frame timer
pw_goldshroomtimer, // Gold Mushroom duration timer
pw_startimer, // Invincibility timer
pw_spinouttimer // Wipe-out from a banana peel or oil slick
pw_spinouttimer, // Wipe-out from a banana peel or oil slick
pw_laserwisptimer, // The duration and relative angle of the laser
pw_fireflowertimer, // Duration of Fire Flower

View file

@ -42,7 +42,7 @@ typedef enum
BT_CUSTOM2 = 1<<14,
BT_CUSTOM3 = 1<<15,
BT_FORWARD = 1<<16, // SRB2kart 16/02/15
BT_BACKWARD = 1<<17,
BT_BACKWARD = 1<<17
} buttoncode_t;
// The data sampled per tick (single player)

View file

@ -7374,7 +7374,69 @@ static const char *const POWERS_LIST[] = {
//for linedef exec 427
"NOCONTROL",
"INGOOP" // In goop
"INGOOP", // In goop
// /////////////// //
// SRB2kart Powers // // SRB2kart 16/02/21
// /////////////// //
// Basic gameplay things
"WAYPOINT", // Waypoints.
"INTROCAM", // Early joiners need this, or a new joiner's camera will randomly rotate
"SOUNDS", // Used this to avoid sounds being played every tic
"PCD", // Past Checkpoint Distance
"NCD", // Next Chekpoint Distance
"DRIFT", // Drifting Left or Right, plus a bigger counter = sharper turn
"DRIFTSPEED", // (Do we still need this?) (was 'pw_exspeed')
"DRIFTCHARGE", // Charge your drift so you can release a burst of speed
"JMP", // In Mario Kart, letting go of the jump button stops the drift
"FISHING", // Lakitu is fishing you out of the pit and you have to wait to be dropped
"KARTITEM", // Used for the roulette when deciding what item to give you
"ITEMSLOT", // If you have X item, and kartitem chose X too, save it
"ITEMCLOSE", // Used to animate the item window closing (was 'pw_psychic')
// Some Items use timers for their duration or relative effects
"MAGNETTIMER", // Duration of Magnet's item-break and item box pull
"BOOTAKETIMER", // You are stealing an item, this is your timer
"BOOSTOLENTIMER", // You are being stolen from, this is your timer
"MUSHROOMTIMER", // Duration of the Mushroom Boost itself
"GROWSHRINKTIMER", // > 0 = Big, < 0 = small
"SQUISHEDTIMER", // Squished frame timer
"GOLDSHROOMTIMER", // Gold Mushroom duration timer
"STARTIMER", // Invincibility timer
"SPINOUTTIMER" // Wipe-out from a banana peel or oil slick
"LASERWISPTIMER", // The duration and relative angle of the laser
"FIREFLOWERTIMER", // Duration of Fire Flower
// Each item needs its own power slot, for the HUD and held use
"MAGNET", // 0x1 = Magnet in inventory
"BOO", // 0x1 = Boo in inventory
"MUSHROOM", // 0x1 = 1 Mushroom in inventory, 0x2 = 2 Mushrooms in inventory
// 0x4 = 3 Mushrooms in inventory
"MEGASHROOM", // 0x1 = Mega Mushroom in inventory
"GOLDSHROOM", // 0x1 = Gold Mushroom in inventory
"STAR", // 0x1 = Star in inventory
"TRIPLEBANANA", // 0x1 = 1 Banana following, 0x2 = 2 Bananas following
// 0x4 = 3 Bananas following, 0x8 = Triple Banana in inventory
"FAKEITEM", // 0x1 = Fake Item being held, 0x2 = Fake Item in inventory
"BANANA", // 0x1 = Banana being held, 0x2 = Banana in inventory
"GREENSHELL", // 0x1 = Green Shell being held, 0x2 = Green Shell in inventory
"REDSHELL", // 0x1 = Red Shell being held, 0x2 = Red Shell in inventory
"LASERWISP", // 0x1 = Laser Wisp in inventory
"TRIPLEGREENSHELL", // 0x1 = 1 Green Shell orbiting, 0x2 = 2 Green Shells orbiting
// 0x4 = 3 Green Shells orbiting, 0x8 = Triple Green Shell in inventory
"BOBOMB", // 0x1 = Bob-omb being held, 0x2 = Bob-omb in inventory
"BLUESHELL", // 0x1 = Blue Shell in inventory
"JAWS", // 0x1 = 1 Jaws orbiting, 0x2 = 2 Jaws orbiting,
// 0x8 = 2x Jaws in inventory
"TOSSFEATHER", // 0x1 = Feather in inventory
"FIREFLOWER", // 0x1 = Fire Flower in inventory
"TRIPLEREDSHELL", // 0x1 = 1 Red Shell orbiting, 0x2 = 2 Red Shells orbiting
// 0x4 = 3 Red Shells orbiting, 0x8 = Triple Red Shell in inventory
"BOWSERSHELL", // 0x1 = Bowser Shell in inventory
"LIGHTNING" // 0x1 = Lightning in inventory
};
static const char *const HUDITEMS_LIST[] = {
@ -7514,6 +7576,8 @@ struct {
{"TOL_NIGHTS",TOL_NIGHTS},
{"TOL_ERZ3",TOL_ERZ3},
{"TOL_XMAS",TOL_XMAS},
{"TOL_RETROKART",TOL_RETROKART}, // SRB2kart 21/02/16
{"TOL_NEOKART",TOL_NEOKART},
// Level flags
{"LF_SCRIPTISFILE",LF_SCRIPTISFILE},
@ -7797,6 +7861,8 @@ struct {
{"BT_CUSTOM1",BT_CUSTOM1}, // Lua customizable
{"BT_CUSTOM2",BT_CUSTOM2}, // Lua customizable
{"BT_CUSTOM3",BT_CUSTOM3}, // Lua customizable
{"BT_FORWARD",BT_FORWARD}, // SRB2kart 16/02/21
{"BT_BACKWARD",BT_BACKWARD},
// cvflags_t
{"CV_SAVE",CV_SAVE},

View file

@ -160,8 +160,9 @@ extern FILE *logstream;
// The string used in the alert that pops up in the event of an update being available.
// Please change to apply to your modification (we don't want everyone asking where your mod is on SRB2.org!).
// SRB2kart 16/02/15 (TODO: Put mod URL here)
#define UPDATE_ALERT_STRING \
"A new update is available for SRB2Kart.\n"\ // SRB2kart 16/02/15 (TODO: Put mod URL here)
"A new update is available for SRB2Kart.\n"\
"Please visit SRB2.org to download it.\n"\
"\n"\
"You are using version: %s\n"\
@ -177,8 +178,9 @@ extern FILE *logstream;
// The string used in the I_Error alert upon trying to host through command line parameters.
// Generally less filled with newlines, since Windows gives you lots more room to work with.
// SRB2kart 16/02/15 (TODO: Put mod URL here)
#define UPDATE_ALERT_STRING_CONSOLE \
"A new update is available for SRB2Kart.\n"\ // SRB2kart 16/02/15 (TODO: Put mod URL here)
"A new update is available for SRB2Kart.\n"\
"Please visit SRB2.org to download it.\n"\
"\n"\
"You are using version: %s\n"\

View file

@ -995,7 +995,7 @@ static const char *credits[] = {
"",
"\1Sprite Artists",
"Odi \"Iceman404\" Atunzu",
"Victor \"VAdaPEGA\" Ara\x1Fjo", // Araújo -- sorry for our limited font! D:
"Victor \"VAdaPEGA\" Ara\x1Fjo", // Araújo -- sorry for our limited font! D:
"Jim \"MotorRoach\" DeMello",
"Desmond \"Blade\" DesJardins",
"Sherman \"CoatRack\" DesJardins",
@ -1317,10 +1317,10 @@ void F_GameEvaluationDrawer(void)
if (ALL7EMERALDS(emeralds))
++timesBeatenWithEmeralds;
if (ultimatemode)
/*
if (ultimatemode) // SRB2kart 16/02/21 - I don't think we need Ultimate mode
++timesBeatenUltimate;
*/
if (M_UpdateUnlockablesAndExtraEmblems())
S_StartSound(NULL, sfx_ncitem);

View file

@ -3601,7 +3601,7 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
// Don't carry over custom music change to another map.
mapmusic |= MUSIC_RELOADRESET;
ultimatemode = pultmode;
//ultimatemode = pultmode; // SRB2kart 21/02/16 - I don't think we need Ultimate mode
playerdeadview = false;
automapactive = false;
imcontinuing = false;