2014-03-15 16:59:03 +00:00
|
|
|
// SONIC ROBO BLAST 2
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
2018-11-25 12:35:38 +00:00
|
|
|
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
2014-03-15 16:59:03 +00:00
|
|
|
//
|
|
|
|
// This program is free software distributed under the
|
|
|
|
// terms of the GNU General Public License, version 2.
|
|
|
|
// See the 'LICENSE' file for more details.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
/// \file d_netcmd.h
|
|
|
|
/// \brief host/client network commands
|
|
|
|
/// commands are executed through the command buffer
|
|
|
|
/// like console commands
|
|
|
|
|
|
|
|
#ifndef __D_NETCMD__
|
|
|
|
#define __D_NETCMD__
|
|
|
|
|
|
|
|
#include "command.h"
|
|
|
|
|
|
|
|
// console vars
|
|
|
|
extern consvar_t cv_playername;
|
|
|
|
extern consvar_t cv_playercolor;
|
2017-04-14 18:56:51 +00:00
|
|
|
extern consvar_t cv_skin;
|
|
|
|
// secondary splitscreen player
|
|
|
|
extern consvar_t cv_playername2;
|
|
|
|
extern consvar_t cv_playercolor2;
|
|
|
|
extern consvar_t cv_skin2;
|
2018-11-07 21:15:14 +00:00
|
|
|
// third splitscreen player
|
|
|
|
extern consvar_t cv_playername3;
|
|
|
|
extern consvar_t cv_playercolor3;
|
|
|
|
extern consvar_t cv_skin3;
|
|
|
|
// fourth splitscreen player
|
|
|
|
extern consvar_t cv_playername4;
|
|
|
|
extern consvar_t cv_playercolor4;
|
|
|
|
extern consvar_t cv_skin4;
|
2019-01-18 09:30:38 +00:00
|
|
|
// preferred number of players
|
|
|
|
extern consvar_t cv_splitplayers;
|
2017-04-14 18:56:51 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
#ifdef SEENAMES
|
|
|
|
extern consvar_t cv_seenames, cv_allowseenames;
|
|
|
|
#endif
|
|
|
|
extern consvar_t cv_usemouse;
|
|
|
|
extern consvar_t cv_usejoystick;
|
|
|
|
extern consvar_t cv_usejoystick2;
|
2017-12-08 07:29:01 +00:00
|
|
|
extern consvar_t cv_usejoystick3;
|
|
|
|
extern consvar_t cv_usejoystick4;
|
2014-03-15 16:59:03 +00:00
|
|
|
#ifdef LJOYSTICK
|
|
|
|
extern consvar_t cv_joyport;
|
|
|
|
extern consvar_t cv_joyport2;
|
|
|
|
#endif
|
|
|
|
extern consvar_t cv_joyscale;
|
|
|
|
extern consvar_t cv_joyscale2;
|
2017-12-08 07:29:01 +00:00
|
|
|
extern consvar_t cv_joyscale3;
|
|
|
|
extern consvar_t cv_joyscale4;
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
// splitscreen with second mouse
|
|
|
|
extern consvar_t cv_mouse2port;
|
|
|
|
extern consvar_t cv_usemouse2;
|
|
|
|
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON)
|
|
|
|
extern consvar_t cv_mouse2opt;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// normally in p_mobj but the .h is not read
|
|
|
|
extern consvar_t cv_itemrespawntime;
|
|
|
|
extern consvar_t cv_itemrespawn;
|
|
|
|
|
|
|
|
extern consvar_t cv_flagtime;
|
|
|
|
extern consvar_t cv_suddendeath;
|
|
|
|
|
|
|
|
extern consvar_t cv_touchtag;
|
|
|
|
extern consvar_t cv_hidetime;
|
|
|
|
|
|
|
|
extern consvar_t cv_friendlyfire;
|
|
|
|
extern consvar_t cv_pointlimit;
|
|
|
|
extern consvar_t cv_timelimit;
|
|
|
|
extern consvar_t cv_numlaps;
|
2018-06-29 16:49:02 +00:00
|
|
|
extern consvar_t cv_basenumlaps;
|
2014-03-15 16:59:03 +00:00
|
|
|
extern UINT32 timelimitintics;
|
|
|
|
extern consvar_t cv_allowexitlevel;
|
|
|
|
|
|
|
|
extern consvar_t cv_autobalance;
|
|
|
|
extern consvar_t cv_teamscramble;
|
|
|
|
extern consvar_t cv_scrambleonchange;
|
|
|
|
|
|
|
|
extern consvar_t cv_netstat;
|
2016-07-06 04:09:17 +00:00
|
|
|
#ifdef WALLSPLATS
|
2014-03-15 16:59:03 +00:00
|
|
|
extern consvar_t cv_splats;
|
2016-07-06 04:09:17 +00:00
|
|
|
#endif
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
extern consvar_t cv_countdowntime;
|
|
|
|
extern consvar_t cv_runscripts;
|
|
|
|
extern consvar_t cv_mute;
|
|
|
|
extern consvar_t cv_killingdead;
|
|
|
|
extern consvar_t cv_pause;
|
|
|
|
|
2019-02-03 21:43:11 +00:00
|
|
|
extern consvar_t cv_restrictskinchange, cv_allowteamchange, cv_ingamecap, cv_respawntime;
|
2014-03-15 16:59:03 +00:00
|
|
|
|
2018-06-07 23:46:48 +00:00
|
|
|
/*extern consvar_t cv_teleporters, cv_superring, cv_supersneakers, cv_invincibility;
|
2014-03-15 16:59:03 +00:00
|
|
|
extern consvar_t cv_jumpshield, cv_watershield, cv_ringshield, cv_forceshield, cv_bombshield;
|
|
|
|
extern consvar_t cv_1up, cv_eggmanbox;
|
2018-06-07 23:46:48 +00:00
|
|
|
extern consvar_t cv_recycler;*/
|
2014-03-15 16:59:03 +00:00
|
|
|
|
2016-08-15 03:51:08 +00:00
|
|
|
// SRB2kart items
|
2018-02-05 23:55:52 +00:00
|
|
|
extern consvar_t cv_sneaker, cv_rocketsneaker, cv_invincibility, cv_banana;
|
2018-03-14 01:07:08 +00:00
|
|
|
extern consvar_t cv_eggmanmonitor, cv_orbinaut, cv_jawz, cv_mine;
|
2018-02-10 06:19:33 +00:00
|
|
|
extern consvar_t cv_ballhog, cv_selfpropelledbomb, cv_grow, cv_shrink;
|
2018-08-31 17:18:19 +00:00
|
|
|
extern consvar_t cv_thundershield, cv_hyudoro, cv_pogospring, cv_kitchensink;
|
2018-02-05 23:55:52 +00:00
|
|
|
|
2018-08-31 17:18:19 +00:00
|
|
|
extern consvar_t cv_triplesneaker, cv_triplebanana, cv_decabanana;
|
|
|
|
extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz;
|
2016-08-15 03:51:08 +00:00
|
|
|
|
Lots of changes
- Menus now have all of the Kart cvars
- Removed any cvars that aren't useful for Kart from the menu (they
still exist in the console, though)
- Removed SP and NiGHTS Mode options from the main menu
- "kartcc" is renamed "kartspeed", uses values 0-2 instead of multiples
of 50, or the terms "Relaxed", "Standard", and "Turbo"
- Many gametype options (game speed, frantic, mirror, & karma comeback)
are now changed on map load instead of instantly
- New cvar, "kartminimap", for disabling the minimap
- The maxplayers cvar now actually matches up with our 16 player limit
- Game now keeps track of matches played. Has a condition type
associated with it, as well.
- Game checks for unlocks and saves gamedata when finishing a match,
even in MP
- Removed most of the normal emblems, added a single emblem for Green
Hills. Didn't know what to do with extra emblems and such so I just left
them (FOR NOW c:<)
2018-01-16 03:31:14 +00:00
|
|
|
extern consvar_t cv_kartminimap;
|
2017-11-02 04:35:10 +00:00
|
|
|
extern consvar_t cv_kartcheck;
|
2018-06-15 00:18:29 +00:00
|
|
|
extern consvar_t cv_kartinvinsfx;
|
Lots of changes
- Menus now have all of the Kart cvars
- Removed any cvars that aren't useful for Kart from the menu (they
still exist in the console, though)
- Removed SP and NiGHTS Mode options from the main menu
- "kartcc" is renamed "kartspeed", uses values 0-2 instead of multiples
of 50, or the terms "Relaxed", "Standard", and "Turbo"
- Many gametype options (game speed, frantic, mirror, & karma comeback)
are now changed on map load instead of instantly
- New cvar, "kartminimap", for disabling the minimap
- The maxplayers cvar now actually matches up with our 16 player limit
- Game now keeps track of matches played. Has a condition type
associated with it, as well.
- Game checks for unlocks and saves gamedata when finishing a match,
even in MP
- Removed most of the normal emblems, added a single emblem for Green
Hills. Didn't know what to do with extra emblems and such so I just left
them (FOR NOW c:<)
2018-01-16 03:31:14 +00:00
|
|
|
extern consvar_t cv_kartspeed;
|
2018-07-03 19:14:47 +00:00
|
|
|
extern consvar_t cv_kartbumpers;
|
2017-11-01 22:46:35 +00:00
|
|
|
extern consvar_t cv_kartfrantic;
|
2017-11-14 01:45:57 +00:00
|
|
|
extern consvar_t cv_kartcomeback;
|
2018-07-23 22:50:41 +00:00
|
|
|
extern consvar_t cv_kartencore;
|
Do a bunch of major modifications to the voting system's rule change system!
* Add `kartvoterulechanges`, or "Voting Rule Changes" on the menu, to allow some user control over event frequency.
* "Never" - does what it says on the tin.
* "Sometimes" - 1/8 chance of Encore if host has unlocked it, only gametype change when buffer is full
* "Frequent" - 1/2 chance of Encore if host has unlocked it, gametype change every 5 maps
* "Always" - If host has unlocked Encore, alternates between Encore and Gametype. Otherwise, always a gametype change
* There's probably room for a setting between "Sometimes" and "Frequent", but I didn't want to overload the host with options and these were the ones that made sense.
* Better handling of buffer refreshes, to prevent two of the same map appearing next to each other in the voting unless there literally aren't that many maps.
* Mostly unrelated: Minor bugfix for Y_SetupVoteFinish, preventing music changes/random sounds playing on the You Will Join Next Race screen. (Branch-appropriate, at least.)
2018-09-11 14:41:41 +00:00
|
|
|
extern consvar_t cv_kartvoterulechanges;
|
2018-06-15 00:18:29 +00:00
|
|
|
extern consvar_t cv_kartspeedometer;
|
2018-07-29 17:35:56 +00:00
|
|
|
extern consvar_t cv_kartvoices;
|
2017-04-17 17:18:51 +00:00
|
|
|
|
2018-07-25 20:33:03 +00:00
|
|
|
extern consvar_t cv_karteliminatelast;
|
|
|
|
|
2018-01-28 04:52:01 +00:00
|
|
|
extern consvar_t cv_votetime;
|
|
|
|
|
Dropping items!
* Shield Drop...
* Whatever you've got orbiting or trailing you, DROP THEM WHERE THEY STAND. (Except for the ghost sink. That one's OK.)
* Pops your Thunder Shield.
* Happens upon ANY hit, except for deathpits.
* HUD Drop...
* Also does the above, except for the Thunder Shield thing.
* If there's any item left in your item box, pop it out as a little hovering, rotating Minecraft item!
* You can pick up the Minecraft item by driving over it if your item box is sufficiently empty, or the item which is contained within it is of the same type.
* Happens upon Size Down and battle elimination.
* Can also be forced on with `cv_kartdebughuddrop on`!
* Some other random stuff.
* Fix a bunch of `a->scale = b`'s into `P_SetScale(a, b)` form, for maximum validity.
* Make K_CleanHnextList and K_UpdateHnextList one function, since they only differed by one continue clause (and the type of their input parameter).
* Allow shrunken players to pick up item boxes again.
* Fix MF_NOCLIPTHING. (Gonna pass this fix to vanilla when I get the chance, too.)
* Break NiGHTS a little through my machinations.
2018-09-06 21:17:29 +00:00
|
|
|
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartdebugshrink, cv_kartdebugdistribution, cv_kartdebughuddrop;
|
Modify a few colors
- The following colors were given either more noticeable highlights or deeper shading for better colorized WANTED poster appearance: Nickel, Black, Beige, Brown, Leather, Salmon, Red, Crimson, Pumpkin, Rosewood, Burgundy, Pinetree, Swamp, Periwinkle, Blue, Blueberry, Dusk, Purple, Lavender, and Byzantium.
- Fixed an off-looking purple tone on Ruby.
- Salmon's outline & shading was made darker, to make it slightly easier on the eyes.
- Peach recieved a complete overhaul, featuring high contrast and yellow highlights.
- Add kartdebugcolorize for taking a quick glance at all of the colorizations
2019-02-26 09:30:51 +00:00
|
|
|
extern consvar_t cv_kartdebugcheckpoint, cv_kartdebugnodes, cv_kartdebugcolorize;
|
2016-08-15 03:51:08 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
extern consvar_t cv_itemfinder;
|
|
|
|
|
|
|
|
extern consvar_t cv_inttime, cv_advancemap, cv_playersforexit;
|
|
|
|
extern consvar_t cv_soniccd;
|
|
|
|
extern consvar_t cv_match_scoring;
|
|
|
|
extern consvar_t cv_overtime;
|
|
|
|
extern consvar_t cv_startinglives;
|
|
|
|
|
|
|
|
// for F_finale.c
|
2014-04-14 05:14:58 +00:00
|
|
|
extern consvar_t cv_rollingdemos;
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
extern consvar_t cv_ringslinger, cv_soundtest;
|
|
|
|
|
|
|
|
extern consvar_t cv_specialrings, cv_powerstones, cv_matchboxes, cv_competitionboxes;
|
|
|
|
|
|
|
|
extern consvar_t cv_maxping;
|
2019-02-16 02:51:44 +00:00
|
|
|
extern consvar_t cv_pingtimeout;
|
|
|
|
extern consvar_t cv_showping;
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
extern consvar_t cv_skipmapcheck;
|
|
|
|
|
2017-04-14 17:14:15 +00:00
|
|
|
extern consvar_t cv_sleep;
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
XD_NAMEANDCOLOR = 1,
|
|
|
|
XD_WEAPONPREF, // 2
|
|
|
|
XD_KICK, // 3
|
|
|
|
XD_NETVAR, // 4
|
|
|
|
XD_SAY, // 5
|
|
|
|
XD_MAP, // 6
|
|
|
|
XD_EXITLEVEL, // 7
|
|
|
|
XD_ADDFILE, // 8
|
|
|
|
XD_PAUSE, // 9
|
|
|
|
XD_ADDPLAYER, // 10
|
|
|
|
XD_TEAMCHANGE, // 11
|
|
|
|
XD_CLEARSCORES, // 12
|
|
|
|
XD_LOGIN, // 13
|
|
|
|
XD_VERIFIED, // 14
|
|
|
|
XD_RANDOMSEED, // 15
|
|
|
|
XD_RUNSOC, // 16
|
|
|
|
XD_REQADDFILE, // 17
|
|
|
|
XD_DELFILE, // 18
|
|
|
|
XD_SETMOTD, // 19
|
2018-11-05 19:02:34 +00:00
|
|
|
XD_RESPAWN, // 20
|
2017-12-08 04:45:39 +00:00
|
|
|
XD_DEMOTED, // 21
|
2018-01-30 21:42:44 +00:00
|
|
|
XD_SETUPVOTE, // 22
|
2018-02-04 04:47:47 +00:00
|
|
|
XD_MODIFYVOTE, // 23
|
|
|
|
XD_PICKVOTE, // 24
|
2018-09-30 20:20:01 +00:00
|
|
|
XD_REMOVEPLAYER,// 25
|
2014-03-15 16:59:03 +00:00
|
|
|
#ifdef HAVE_BLUA
|
2018-09-30 20:20:01 +00:00
|
|
|
XD_LUACMD, // 26
|
|
|
|
XD_LUAVAR, // 27
|
2014-03-15 16:59:03 +00:00
|
|
|
#endif
|
|
|
|
MAXNETXCMD
|
|
|
|
} netxcmd_t;
|
|
|
|
|
2016-12-31 18:26:33 +00:00
|
|
|
extern const char *netxcmdnames[MAXNETXCMD - 1];
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#pragma pack(1)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(disable : 4214)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//Packet composition for Command_TeamChange_f() ServerTeamChange, etc.
|
|
|
|
//bitwise structs make packing bits a little easier, but byte alignment harder?
|
|
|
|
//todo: decide whether to make the other netcommands conform, or just get rid of this experiment.
|
|
|
|
typedef struct {
|
|
|
|
UINT32 playernum : 5; // value 0 to 31
|
|
|
|
UINT32 newteam : 5; // value 0 to 31
|
|
|
|
UINT32 verification : 1; // value 0 to 1
|
|
|
|
UINT32 autobalance : 1; // value 0 to 1
|
|
|
|
UINT32 scrambled : 1; // value 0 to 1
|
|
|
|
} ATTRPACK changeteam_packet_t;
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(default : 4214)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
UINT16 l; // liitle endian
|
|
|
|
UINT16 b; // big enian
|
|
|
|
} ATTRPACK changeteam_value_t;
|
|
|
|
|
|
|
|
//Since we do not want other files/modules to know about this data buffer we union it here with a Short Int.
|
|
|
|
//Other files/modules will hand the INT16 back to us and we will decode it here.
|
|
|
|
//We don't have to use a union, but we would then send four bytes instead of two.
|
|
|
|
typedef union {
|
|
|
|
changeteam_packet_t packet;
|
|
|
|
changeteam_value_t value;
|
|
|
|
} ATTRPACK changeteam_union;
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#pragma pack()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// add game commands, needs cleanup
|
|
|
|
void D_RegisterServerCommands(void);
|
|
|
|
void D_RegisterClientCommands(void);
|
|
|
|
void D_SendPlayerConfig(void);
|
|
|
|
void Command_ExitGame_f(void);
|
|
|
|
void Command_Retry_f(void);
|
|
|
|
void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore
|
2018-08-11 21:23:40 +00:00
|
|
|
void D_MapChange(INT32 pmapnum, INT32 pgametype, boolean pencoremode, boolean presetplayers, INT32 pdelay, boolean pskipprecutscene, boolean pfromlevelselect);
|
2018-01-30 21:42:44 +00:00
|
|
|
void D_SetupVote(void);
|
2018-05-31 22:49:19 +00:00
|
|
|
void D_ModifyClientVote(SINT8 voted, UINT8 splitplayer);
|
2018-02-04 04:47:47 +00:00
|
|
|
void D_PickVote(void);
|
2014-03-15 16:59:03 +00:00
|
|
|
void ObjectPlace_OnChange(void);
|
2017-11-11 05:34:37 +00:00
|
|
|
boolean IsPlayerAdmin(INT32 playernum);
|
|
|
|
void SetAdminPlayer(INT32 playernum);
|
|
|
|
void ClearAdminPlayers(void);
|
|
|
|
void RemoveAdminPlayer(INT32 playernum);
|
2014-03-15 16:59:03 +00:00
|
|
|
void ItemFinder_OnChange(void);
|
|
|
|
void D_SetPassword(const char *pw);
|
|
|
|
|
|
|
|
// used for the player setup menu
|
|
|
|
UINT8 CanChangeSkin(INT32 playernum);
|
|
|
|
|
2018-11-14 15:52:16 +00:00
|
|
|
#endif
|