Merge branch 'next' into ping-stuff-take2

This commit is contained in:
Alam Arias 2019-03-09 22:02:11 -05:00
commit d58cb1aae3
32 changed files with 1151 additions and 478 deletions

View file

@ -649,6 +649,8 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
rsp->jointime = (tic_t)LONG(players[i].jointime); rsp->jointime = (tic_t)LONG(players[i].jointime);
rsp->splitscreenindex = players[i].splitscreenindex;
rsp->hasmo = false; rsp->hasmo = false;
//Transfer important mo information if the player has a body. //Transfer important mo information if the player has a body.
//This lets us resync players even if they are dead. //This lets us resync players even if they are dead.
@ -784,6 +786,8 @@ static void resynch_read_player(resynch_pak *rsp)
players[i].jointime = (tic_t)LONG(rsp->jointime); players[i].jointime = (tic_t)LONG(rsp->jointime);
players[i].splitscreenindex = rsp->splitscreenindex;
//We get a packet for each player in game. //We get a packet for each player in game.
if (!playeringame[i]) if (!playeringame[i])
return; return;
@ -2728,7 +2732,10 @@ static void Command_Ban(void)
else else
{ {
if (server) // only the server is allowed to do this right now if (server) // only the server is allowed to do this right now
{
Ban_Add(COM_Argv(2)); Ban_Add(COM_Argv(2));
D_SaveBan(); // save the ban list
}
if (COM_Argc() == 2) if (COM_Argc() == 2)
{ {
@ -2759,6 +2766,42 @@ static void Command_Ban(void)
} }
static void Command_BanIP(void)
{
if (COM_Argc() < 2)
{
CONS_Printf(M_GetText("banip <ip> <reason>: ban an ip address\n"));
return;
}
if (server) // Only the server can use this, otherwise does nothing.
{
const char *address = (COM_Argv(1));
const char *reason;
if (COM_Argc() == 2)
reason = NULL;
else
reason = COM_Argv(2);
if (I_SetBanAddress && I_SetBanAddress(address, NULL))
{
if (reason)
CONS_Printf("Banned IP address %s for: %s\n", address, reason);
else
CONS_Printf("Banned IP address %s\n", address);
Ban_Add(reason);
D_SaveBan();
}
else
{
return;
}
}
}
static void Command_Kick(void) static void Command_Kick(void)
{ {
if (COM_Argc() < 2) if (COM_Argc() < 2)
@ -3065,6 +3108,7 @@ void D_ClientServerInit(void)
COM_AddCommand("getplayernum", Command_GetPlayerNum); COM_AddCommand("getplayernum", Command_GetPlayerNum);
COM_AddCommand("kick", Command_Kick); COM_AddCommand("kick", Command_Kick);
COM_AddCommand("ban", Command_Ban); COM_AddCommand("ban", Command_Ban);
COM_AddCommand("banip", Command_BanIP);
COM_AddCommand("clearbans", Command_ClearBans); COM_AddCommand("clearbans", Command_ClearBans);
COM_AddCommand("showbanlist", Command_ShowBan); COM_AddCommand("showbanlist", Command_ShowBan);
COM_AddCommand("reloadbans", Command_ReloadBan); COM_AddCommand("reloadbans", Command_ReloadBan);
@ -3319,6 +3363,8 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
addedtogame = true; addedtogame = true;
} }
players[newplayernum].splitscreenindex = splitscreenplayer;
if (netgame) if (netgame)
{ {
if (server && cv_showjoinaddress.value) if (server && cv_showjoinaddress.value)
@ -4356,12 +4402,12 @@ FILESTAMP
//Update client ping table from the server. //Update client ping table from the server.
if (client) if (client)
{ {
INT32 i; UINT8 i;
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i]) if (playeringame[i])
playerpingtable[i] = (tic_t)netbuffer->u.pingtable[i]; playerpingtable[i] = (tic_t)netbuffer->u.pingtable[i];
servermaxping = (tic_t)netbuffer->u.pingtable[i++]; servermaxping = (tic_t)netbuffer->u.pingtable[MAXPLAYERS];
} }
break; break;
@ -5055,6 +5101,8 @@ static inline void PingUpdate(void)
XBOXSTATIC char buf[2]; XBOXSTATIC char buf[2];
pingtimeout[i] = 0; pingtimeout[i] = 0;
pingtimeout[i] = 0;
buf[0] = (char)i; buf[0] = (char)i;
buf[1] = KICK_MSG_PING_HIGH; buf[1] = KICK_MSG_PING_HIGH;
SendNetXCmd(XD_KICK, &buf, 2); SendNetXCmd(XD_KICK, &buf, 2);

View file

@ -283,6 +283,8 @@ typedef struct
tic_t jointime; tic_t jointime;
UINT8 splitscreenindex;
//player->mo stuff //player->mo stuff
UINT8 hasmo; // Boolean UINT8 hasmo; // Boolean
@ -450,10 +452,10 @@ typedef struct
serverrefuse_pak serverrefuse; // 65025 bytes (somehow I feel like those values are garbage...) serverrefuse_pak serverrefuse; // 65025 bytes (somehow I feel like those values are garbage...)
askinfo_pak askinfo; // 61 bytes askinfo_pak askinfo; // 61 bytes
msaskinfo_pak msaskinfo; // 22 bytes msaskinfo_pak msaskinfo; // 22 bytes
plrinfo playerinfo[MAXPLAYERS]; // 1152 bytes (I'd say 36~38) plrinfo playerinfo[MAXPLAYERS]; // 576 bytes(?)
plrconfig playerconfig[MAXPLAYERS]; // (up to) 896 bytes (welp they ARE) plrconfig playerconfig[MAXPLAYERS]; // (up to) 528 bytes(?)
#ifdef NEWPING #ifdef NEWPING
UINT32 pingtable[MAXPLAYERS+1]; // 128 bytes UINT32 pingtable[MAXPLAYERS+1]; // 68 bytes
#endif #endif
} u; // This is needed to pack diff packet types data together } u; // This is needed to pack diff packet types data together
} ATTRPACK doomdata_t; } ATTRPACK doomdata_t;

View file

@ -19,7 +19,7 @@
#define __D_NET__ #define __D_NET__
// Max computers in a game // Max computers in a game
#define MAXNETNODES 16 #define MAXNETNODES (MAXPLAYERS+4)
#define BROADCASTADDR MAXNETNODES #define BROADCASTADDR MAXNETNODES
#define MAXSPLITSCREENPLAYERS 4 // Max number of players on a single computer #define MAXSPLITSCREENPLAYERS 4 // Max number of players on a single computer
#define NETSPLITSCREEN // Kart's splitscreen netgame feature #define NETSPLITSCREEN // Kart's splitscreen netgame feature

View file

@ -378,6 +378,7 @@ consvar_t cv_kartdebughuddrop = {"kartdebughuddrop", "Off", CV_NETVAR|CV_CHEAT|C
consvar_t cv_kartdebugcheckpoint = {"kartdebugcheckpoint", "Off", CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartdebugcheckpoint = {"kartdebugcheckpoint", "Off", CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartdebugnodes = {"kartdebugnodes", "Off", CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartdebugnodes = {"kartdebugnodes", "Off", CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartdebugcolorize = {"kartdebugcolorize", "Off", CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t votetime_cons_t[] = {{10, "MIN"}, {3600, "MAX"}, {0, NULL}}; static CV_PossibleValue_t votetime_cons_t[] = {{10, "MIN"}, {3600, "MAX"}, {0, NULL}};
consvar_t cv_votetime = {"votetime", "20", CV_NETVAR, votetime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_votetime = {"votetime", "20", CV_NETVAR, votetime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};

View file

@ -126,7 +126,7 @@ extern consvar_t cv_karteliminatelast;
extern consvar_t cv_votetime; extern consvar_t cv_votetime;
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartdebugshrink, cv_kartdebugdistribution, cv_kartdebughuddrop; extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartdebugshrink, cv_kartdebugdistribution, cv_kartdebughuddrop;
extern consvar_t cv_kartdebugcheckpoint, cv_kartdebugnodes; extern consvar_t cv_kartdebugcheckpoint, cv_kartdebugnodes, cv_kartdebugcolorize;
extern consvar_t cv_itemfinder; extern consvar_t cv_itemfinder;

View file

@ -354,6 +354,7 @@ typedef enum
k_getsparks, // Disable drift sparks at low speed, JUST enough to give acceleration the actual headstart above speed k_getsparks, // Disable drift sparks at low speed, JUST enough to give acceleration the actual headstart above speed
k_jawztargetdelay, // Delay for Jawz target switching, to make it less twitchy k_jawztargetdelay, // Delay for Jawz target switching, to make it less twitchy
k_spectatewait, // How long have you been waiting as a spectator k_spectatewait, // How long have you been waiting as a spectator
k_growcancel, // Hold the item button down to cancel Grow
NUMKARTSTUFF NUMKARTSTUFF
} kartstufftype_t; } kartstufftype_t;
@ -571,6 +572,8 @@ typedef struct player_s
UINT8 bot; UINT8 bot;
tic_t jointime; // Timer when player joins game to change skin/color tic_t jointime; // Timer when player joins game to change skin/color
UINT8 splitscreenindex;
#ifdef HWRENDER #ifdef HWRENDER
fixed_t fovadd; // adjust FOV for hw rendering fixed_t fovadd; // adjust FOV for hw rendering
#endif #endif

View file

@ -7150,6 +7150,13 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_KARMAFIREWORK4", "S_KARMAFIREWORK4",
"S_KARMAFIREWORKTRAIL", "S_KARMAFIREWORKTRAIL",
// Opaque smoke version, to prevent lag
"S_OPAQUESMOKE1",
"S_OPAQUESMOKE2",
"S_OPAQUESMOKE3",
"S_OPAQUESMOKE4",
"S_OPAQUESMOKE5",
#ifdef SEENAMES #ifdef SEENAMES
"S_NAMECHECK", "S_NAMECHECK",
#endif #endif
@ -8134,89 +8141,152 @@ static const char *const ML_LIST[16] = {
// This DOES differ from r_draw's Color_Names, unfortunately. // This DOES differ from r_draw's Color_Names, unfortunately.
// Also includes Super colors // Also includes Super colors
static const char *COLOR_ENUMS[] = { // Rejigged for Kart. static const char *COLOR_ENUMS[] = { // Rejigged for Kart.
"NONE", // 00 // SKINCOLOR_NONE "NONE", // SKINCOLOR_NONE
"WHITE", // 01 // SKINCOLOR_WHITE "WHITE", // SKINCOLOR_WHITE
"SILVER", // 02 // SKINCOLOR_SILVER "SILVER", // SKINCOLOR_SILVER
"GREY", // 03 // SKINCOLOR_GREY "GREY", // SKINCOLOR_GREY
"NICKEL", // 04 // SKINCOLOR_NICKEL "NICKEL", // SKINCOLOR_NICKEL
"BLACK", // 05 // SKINCOLOR_BLACK "BLACK", // SKINCOLOR_BLACK
"SEPIA", // 06 // SKINCOLOR_SEPIA "FAIRY", // SKINCOLOR_FAIRY
"BEIGE", // 07 // SKINCOLOR_BEIGE "POPCORN", // SKINCOLOR_POPCORN
"BROWN", // 08 // SKINCOLOR_BROWN "SEPIA", // SKINCOLOR_SEPIA
"LEATHER", // 09 // SKINCOLOR_LEATHER "BEIGE", // SKINCOLOR_BEIGE
"SALMON", // 10 // SKINCOLOR_SALMON "BROWN", // SKINCOLOR_BROWN
"PINK", // 11 // SKINCOLOR_PINK "LEATHER", // SKINCOLOR_LEATHER
"ROSE", // 12 // SKINCOLOR_ROSE "SALMON", // SKINCOLOR_SALMON
"RUBY", // 13 // SKINCOLOR_RUBY "PINK", // SKINCOLOR_PINK
"RASPBERRY", // 14 // SKINCOLOR_RASPBERRY "ROSE", // SKINCOLOR_ROSE
"RED", // 15 // SKINCOLOR_RED "BRICK", // SKINCOLOR_BRICK
"CRIMSON", // 16 // SKINCOLOR_CRIMSON "RUBY", // SKINCOLOR_RUBY
"KETCHUP", // 17 // SKINCOLOR_KETCHUP "RASPBERRY", // SKINCOLOR_RASPBERRY
"DAWN", // 18 // SKINCOLOR_DAWN "CHERRY", // SKINCOLOR_CHERRY
"CREAMSICLE", // 19 // SKINCOLOR_CREAMSICLE "RED", // SKINCOLOR_RED
"ORANGE", // 20 // SKINCOLOR_ORANGE "CRIMSON", // SKINCOLOR_CRIMSON
"PUMPKIN", // 21 // SKINCOLOR_PUMPKIN "MAROON", // SKINCOLOR_MAROON
"ROSEWOOD", // 22 // SKINCOLOR_ROSEWOOD "FLAME", // SKINCOLOR_FLAME
"BURGUNDY", // 23 // SKINCOLOR_BURGUNDY "SCARLET", // SKINCOLOR_SCARLET
"TANGERINE", // 24 // SKINCOLOR_TANGERINE "KETCHUP", // SKINCOLOR_KETCHUP
"PEACH", // 25 // SKINCOLOR_PEACH "DAWN", // SKINCOLOR_DAWN
"CARAMEL", // 26 // SKINCOLOR_CARAMEL "SUNSET", // SKINCOLOR_SUNSET
"GOLD", // 27 // SKINCOLOR_GOLD "CREAMSICLE", // SKINCOLOR_CREAMSICLE
"BRONZE", // 28 // SKINCOLOR_BRONZE "ORANGE", // SKINCOLOR_ORANGE
"YELLOW", // 29 // SKINCOLOR_YELLOW "PUMPKIN", // SKINCOLOR_PUMPKIN
"MUSTARD", // 30 // SKINCOLOR_MUSTARD "ROSEWOOD", // SKINCOLOR_ROSEWOOD
"OLIVE", // 31 // SKINCOLOR_OLIVE "BURGUNDY", // SKINCOLOR_BURGUNDY
"VOMIT", // 32 // SKINCOLOR_VOMIT "TANGERINE", // SKINCOLOR_TANGERINE
"GARDEN", // 33 // SKINCOLOR_GARDEN "PEACH", // SKINCOLOR_PEACH
"LIME", // 34 // SKINCOLOR_LIME "CARAMEL", // SKINCOLOR_CARAMEL
"TEA", // 35 // SKINCOLOR_TEA "CREAM", // SKINCOLOR_CREAM
"PISTACHIO", // 36 // SKINCOLOR_PISTACHIO "GOLD", // SKINCOLOR_GOLD
"ROBOHOOD", // 37 // SKINCOLOR_ROBOHOOD "ROYAL", // SKINCOLOR_ROYAL
"MOSS", // 38 // SKINCOLOR_MOSS "BRONZE", // SKINCOLOR_BRONZE
"MINT", // 39 // SKINCOLOR_MINT "COPPER", // SKINCOLOR_COPPER
"GREEN", // 40 // SKINCOLOR_GREEN "YELLOW", // SKINCOLOR_YELLOW
"PINETREE", // 41 // SKINCOLOR_PINETREE "MUSTARD", // SKINCOLOR_MUSTARD
"EMERALD", // 42 // SKINCOLOR_EMERALD "OLIVE", // SKINCOLOR_OLIVE
"SWAMP", // 43 // SKINCOLOR_SWAMP "VOMIT", // SKINCOLOR_VOMIT
"DREAM", // 44 // SKINCOLOR_DREAM "GARDEN", // SKINCOLOR_GARDEN
"AQUA", // 45 // SKINCOLOR_AQUA "LIME", // SKINCOLOR_LIME
"TEAL", // 46 // SKINCOLOR_TEAL "HANDHELD", // SKINCOLOR_HANDHELD
"CYAN", // 47 // SKINCOLOR_CYAN "TEA", // SKINCOLOR_TEA
"JAWZ", // 48 // SKINCOLOR_JAWZ "PISTACHIO", // SKINCOLOR_PISTACHIO
"CERULEAN", // 49 // SKINCOLOR_CERULEAN "MOSS", // SKINCOLOR_MOSS
"NAVY", // 50 // SKINCOLOR_NAVY "CAMOUFLAGE", // SKINCOLOR_CAMOUFLAGE
"SLATE", // 51 // SKINCOLOR_SLATE "ROBOHOOD", // SKINCOLOR_ROBOHOOD
"STEEL", // 52 // SKINCOLOR_STEEL "MINT", // SKINCOLOR_MINT
"JET", // 53 // SKINCOLOR_JET "GREEN", // SKINCOLOR_GREEN
"SAPPHIRE", // 54 // SKINCOLOR_SAPPHIRE "PINETREE", // SKINCOLOR_PINETREE
"PERIWINKLE", // 55 // SKINCOLOR_PERIWINKLE "EMERALD", // SKINCOLOR_EMERALD
"BLUE", // 56 // SKINCOLOR_BLUE "SWAMP", // SKINCOLOR_SWAMP
"BLUEBERRY", // 57 // SKINCOLOR_BLUEBERRY "DREAM", // SKINCOLOR_DREAM
"DUSK", // 58 // SKINCOLOR_DUSK "PLAGUE", // SKINCOLOR_PLAGUE
"PURPLE", // 59 // SKINCOLOR_PURPLE "ALGAE", // SKINCOLOR_ALGAE
"LAVENDER", // 60 // SKINCOLOR_LAVENDER "CARIBBEAN", // SKINCOLOR_CARIBBEAN
"BYZANTIUM", // 61 // SKINCOLOR_BYZANTIUM "AQUA", // SKINCOLOR_AQUA
"POMEGRANATE", // 62 // SKINCOLOR_POMEGRANATE "TEAL", // SKINCOLOR_TEAL
"LILAC", // 63 // SKINCOLOR_LILAC "CYAN", // SKINCOLOR_CYAN
"JAWZ", // SKINCOLOR_JAWZ
"CERULEAN", // SKINCOLOR_CERULEAN
"NAVY", // SKINCOLOR_NAVY
"PLATINUM", // SKINCOLOR_PLATINUM
"SLATE", // SKINCOLOR_SLATE
"STEEL", // SKINCOLOR_STEEL
"RUST", // SKINCOLOR_RUST
"JET", // SKINCOLOR_JET
"SAPPHIRE", // SKINCOLOR_SAPPHIRE
"PERIWINKLE", // SKINCOLOR_PERIWINKLE
"BLUE", // SKINCOLOR_BLUE
"BLUEBERRY", // SKINCOLOR_BLUEBERRY
"NOVA", // SKINCOLOR_NOVA
"PASTEL", // SKINCOLOR_PASTEL
"MOONSLAM", // SKINCOLOR_MOONSLAM
"ULTRAVIOLET", // SKINCOLOR_ULTRAVIOLET
"DUSK", // SKINCOLOR_DUSK
"BUBBLEGUM", // SKINCOLOR_BUBBLEGUM
"PURPLE", // SKINCOLOR_PURPLE
"FUCHSIA", // SKINCOLOR_FUCHSIA
"TOXIC", // SKINCOLOR_TOXIC
"LAVENDER", // SKINCOLOR_LAVENDER
"BYZANTIUM", // SKINCOLOR_BYZANTIUM
"MAUVE", // SKINCOLOR_MAUVE
"POMEGRANATE", // SKINCOLOR_POMEGRANATE
"LILAC", // SKINCOLOR_LILAC
// Super special awesome Super flashing colors! // Special super colors
"SUPER1", // SKINCOLOR_SUPER1 // Super Sonic Yellow
"SUPER2", // SKINCOLOR_SUPER2, "SUPER1", // SKINCOLOR_SUPER1
"SUPER3", // SKINCOLOR_SUPER3, "SUPER2", // SKINCOLOR_SUPER2,
"SUPER4", // SKINCOLOR_SUPER4, "SUPER3", // SKINCOLOR_SUPER3,
"SUPER5", // SKINCOLOR_SUPER5, "SUPER4", // SKINCOLOR_SUPER4,
// Super Tails "SUPER5", // SKINCOLOR_SUPER5,
"TSUPER1", // SKINCOLOR_TSUPER1, // Super Tails Orange
"TSUPER2", // SKINCOLOR_TSUPER2, "TSUPER1", // SKINCOLOR_TSUPER1,
"TSUPER3", // SKINCOLOR_TSUPER3, "TSUPER2", // SKINCOLOR_TSUPER2,
"TSUPER4", // SKINCOLOR_TSUPER4, "TSUPER3", // SKINCOLOR_TSUPER3,
"TSUPER5", // SKINCOLOR_TSUPER5, "TSUPER4", // SKINCOLOR_TSUPER4,
// Super Knuckles "TSUPER5", // SKINCOLOR_TSUPER5,
"KSUPER1", // SKINCOLOR_KSUPER1, // Super Knuckles Red
"KSUPER2", // SKINCOLOR_KSUPER2, "KSUPER1", // SKINCOLOR_KSUPER1,
"KSUPER3", // SKINCOLOR_KSUPER3, "KSUPER2", // SKINCOLOR_KSUPER2,
"KSUPER4", // SKINCOLOR_KSUPER4, "KSUPER3", // SKINCOLOR_KSUPER3,
"KSUPER5" // SKINCOLOR_KSUPER5, "KSUPER4", // SKINCOLOR_KSUPER4,
"KSUPER5", // SKINCOLOR_KSUPER5,
// Hyper Sonic Pink
"PSUPER1", // SKINCOLOR_PSUPER1,
"PSUPER2", // SKINCOLOR_PSUPER2,
"PSUPER3", // SKINCOLOR_PSUPER3,
"PSUPER4", // SKINCOLOR_PSUPER4,
"PSUPER5", // SKINCOLOR_PSUPER5,
// Hyper Sonic Blue
"BSUPER1", // SKINCOLOR_BSUPER1,
"BSUPER2", // SKINCOLOR_BSUPER2,
"BSUPER3", // SKINCOLOR_BSUPER3,
"BSUPER4", // SKINCOLOR_BSUPER4,
"BSUPER5" // SKINCOLOR_BSUPER5,
// Aqua Super
"ASUPER1", // SKINCOLOR_ASUPER1,
"ASUPER2", // SKINCOLOR_ASUPER2,
"ASUPER3", // SKINCOLOR_ASUPER3,
"ASUPER4", // SKINCOLOR_ASUPER4,
"ASUPER5", // SKINCOLOR_ASUPER5,
// Hyper Sonic Green
"GSUPER1", // SKINCOLOR_GSUPER1,
"GSUPER2", // SKINCOLOR_GSUPER2,
"GSUPER3", // SKINCOLOR_GSUPER3,
"GSUPER4", // SKINCOLOR_GSUPER4,
"GSUPER5", // SKINCOLOR_GSUPER5,
// Hyper Sonic White
"WSUPER1", // SKINCOLOR_WSUPER1,
"WSUPER2", // SKINCOLOR_WSUPER2,
"WSUPER3", // SKINCOLOR_WSUPER3,
"WSUPER4", // SKINCOLOR_WSUPER4,
"WSUPER5", // SKINCOLOR_WSUPER5,
// Creamy Super (Shadow?)
"CSUPER1", // SKINCOLOR_CSUPER1,
"CSUPER2", // SKINCOLOR_CSUPER2,
"CSUPER3", // SKINCOLOR_CSUPER3,
"CSUPER4", // SKINCOLOR_CSUPER4,
"CSUPER5" // SKINCOLOR_CSUPER5,
}; };
static const char *const POWERS_LIST[] = { static const char *const POWERS_LIST[] = {
@ -8336,7 +8406,8 @@ static const char *const KARTSTUFF_LIST[] = {
"ITEMBLINKMODE", "ITEMBLINKMODE",
"GETSPARKS", "GETSPARKS",
"JAWZTARGETDELAY", "JAWZTARGETDELAY",
"SPECTATEWAIT" "SPECTATEWAIT",
"GROWCANCEL"
}; };
#endif #endif
@ -9840,6 +9911,9 @@ static inline int lib_getenum(lua_State *L)
} else if (fastcmp(word,"indirectitemcooldown")) { } else if (fastcmp(word,"indirectitemcooldown")) {
lua_pushinteger(L, indirectitemcooldown); lua_pushinteger(L, indirectitemcooldown);
return 1; return 1;
} else if (fastcmp(word,"hyubgone")) {
lua_pushinteger(L, hyubgone);
return 1;
} else if (fastcmp(word,"thwompsactive")) { } else if (fastcmp(word,"thwompsactive")) {
lua_pushboolean(L, thwompsactive); lua_pushboolean(L, thwompsactive);
return 1; return 1;

View file

@ -256,6 +256,8 @@ typedef enum
SKINCOLOR_GREY, SKINCOLOR_GREY,
SKINCOLOR_NICKEL, SKINCOLOR_NICKEL,
SKINCOLOR_BLACK, SKINCOLOR_BLACK,
SKINCOLOR_POPCORN,
SKINCOLOR_FAIRY,
SKINCOLOR_SEPIA, SKINCOLOR_SEPIA,
SKINCOLOR_BEIGE, SKINCOLOR_BEIGE,
SKINCOLOR_BROWN, SKINCOLOR_BROWN,
@ -263,12 +265,18 @@ typedef enum
SKINCOLOR_SALMON, SKINCOLOR_SALMON,
SKINCOLOR_PINK, SKINCOLOR_PINK,
SKINCOLOR_ROSE, SKINCOLOR_ROSE,
SKINCOLOR_BRICK,
SKINCOLOR_RUBY, SKINCOLOR_RUBY,
SKINCOLOR_RASPBERRY, SKINCOLOR_RASPBERRY,
SKINCOLOR_CHERRY,
SKINCOLOR_RED, SKINCOLOR_RED,
SKINCOLOR_CRIMSON, SKINCOLOR_CRIMSON,
SKINCOLOR_MAROON,
SKINCOLOR_FLAME,
SKINCOLOR_SCARLET,
SKINCOLOR_KETCHUP, SKINCOLOR_KETCHUP,
SKINCOLOR_DAWN, SKINCOLOR_DAWN,
SKINCOLOR_SUNSET,
SKINCOLOR_CREAMSICLE, SKINCOLOR_CREAMSICLE,
SKINCOLOR_ORANGE, SKINCOLOR_ORANGE,
SKINCOLOR_PUMPKIN, SKINCOLOR_PUMPKIN,
@ -277,68 +285,130 @@ typedef enum
SKINCOLOR_TANGERINE, SKINCOLOR_TANGERINE,
SKINCOLOR_PEACH, SKINCOLOR_PEACH,
SKINCOLOR_CARAMEL, SKINCOLOR_CARAMEL,
SKINCOLOR_CREAM,
SKINCOLOR_GOLD, SKINCOLOR_GOLD,
SKINCOLOR_ROYAL,
SKINCOLOR_BRONZE, SKINCOLOR_BRONZE,
SKINCOLOR_COPPER,
SKINCOLOR_YELLOW, SKINCOLOR_YELLOW,
SKINCOLOR_MUSTARD, SKINCOLOR_MUSTARD,
SKINCOLOR_OLIVE, SKINCOLOR_OLIVE,
SKINCOLOR_VOMIT, SKINCOLOR_VOMIT,
SKINCOLOR_GARDEN, SKINCOLOR_GARDEN,
SKINCOLOR_LIME, SKINCOLOR_LIME,
SKINCOLOR_HANDHELD,
SKINCOLOR_TEA, SKINCOLOR_TEA,
SKINCOLOR_PISTACHIO, SKINCOLOR_PISTACHIO,
SKINCOLOR_ROBOHOOD,
SKINCOLOR_MOSS, SKINCOLOR_MOSS,
SKINCOLOR_CAMOUFLAGE,
SKINCOLOR_ROBOHOOD,
SKINCOLOR_MINT, SKINCOLOR_MINT,
SKINCOLOR_GREEN, SKINCOLOR_GREEN,
SKINCOLOR_PINETREE, SKINCOLOR_PINETREE,
SKINCOLOR_EMERALD, SKINCOLOR_EMERALD,
SKINCOLOR_SWAMP, SKINCOLOR_SWAMP,
SKINCOLOR_DREAM, SKINCOLOR_DREAM,
SKINCOLOR_PLAGUE,
SKINCOLOR_ALGAE,
SKINCOLOR_CARIBBEAN,
SKINCOLOR_AQUA, SKINCOLOR_AQUA,
SKINCOLOR_TEAL, SKINCOLOR_TEAL,
SKINCOLOR_CYAN, SKINCOLOR_CYAN,
SKINCOLOR_JAWZ, // Oni's torment SKINCOLOR_JAWZ, // Oni's torment
SKINCOLOR_CERULEAN, SKINCOLOR_CERULEAN,
SKINCOLOR_NAVY, SKINCOLOR_NAVY,
SKINCOLOR_PLATINUM,
SKINCOLOR_SLATE, SKINCOLOR_SLATE,
SKINCOLOR_STEEL, SKINCOLOR_STEEL,
SKINCOLOR_RUST,
SKINCOLOR_JET, SKINCOLOR_JET,
SKINCOLOR_SAPPHIRE, // sweet mother, i cannot weave - slender aphrodite has overcome me with longing for a girl SKINCOLOR_SAPPHIRE, // sweet mother, i cannot weave - slender aphrodite has overcome me with longing for a girl
SKINCOLOR_PERIWINKLE, SKINCOLOR_PERIWINKLE,
SKINCOLOR_BLUE, SKINCOLOR_BLUE,
SKINCOLOR_BLUEBERRY, SKINCOLOR_BLUEBERRY,
SKINCOLOR_NOVA,
SKINCOLOR_PASTEL,
SKINCOLOR_MOONSLAM,
SKINCOLOR_ULTRAVIOLET,
SKINCOLOR_DUSK, SKINCOLOR_DUSK,
SKINCOLOR_BUBBLEGUM,
SKINCOLOR_PURPLE, SKINCOLOR_PURPLE,
SKINCOLOR_FUCHSIA,
SKINCOLOR_TOXIC,
SKINCOLOR_MAUVE,
SKINCOLOR_LAVENDER, SKINCOLOR_LAVENDER,
SKINCOLOR_BYZANTIUM, SKINCOLOR_BYZANTIUM,
SKINCOLOR_POMEGRANATE, SKINCOLOR_POMEGRANATE,
SKINCOLOR_LILAC, SKINCOLOR_LILAC,
// Careful! MAXSKINCOLORS cannot be greater than 0x40 -- Which it is now. // "Careful! MAXSKINCOLORS cannot be greater than 0x40 -- Which it is now."
// (This comment is a dirty liar! This is only limited by the integer type, so 255 for UINT8.)
MAXSKINCOLORS, MAXSKINCOLORS,
// Super special awesome Super flashing colors! // Super special awesome Super flashing colors!
// Super Sonic Yellow
SKINCOLOR_SUPER1 = MAXSKINCOLORS, SKINCOLOR_SUPER1 = MAXSKINCOLORS,
SKINCOLOR_SUPER2, SKINCOLOR_SUPER2,
SKINCOLOR_SUPER3, SKINCOLOR_SUPER3,
SKINCOLOR_SUPER4, SKINCOLOR_SUPER4,
SKINCOLOR_SUPER5, SKINCOLOR_SUPER5,
// Super Tails // Super Tails Orange
SKINCOLOR_TSUPER1, SKINCOLOR_TSUPER1,
SKINCOLOR_TSUPER2, SKINCOLOR_TSUPER2,
SKINCOLOR_TSUPER3, SKINCOLOR_TSUPER3,
SKINCOLOR_TSUPER4, SKINCOLOR_TSUPER4,
SKINCOLOR_TSUPER5, SKINCOLOR_TSUPER5,
// Super Knuckles // Super Knuckles Red
SKINCOLOR_KSUPER1, SKINCOLOR_KSUPER1,
SKINCOLOR_KSUPER2, SKINCOLOR_KSUPER2,
SKINCOLOR_KSUPER3, SKINCOLOR_KSUPER3,
SKINCOLOR_KSUPER4, SKINCOLOR_KSUPER4,
SKINCOLOR_KSUPER5, SKINCOLOR_KSUPER5,
// Hyper Sonic Pink
SKINCOLOR_PSUPER1,
SKINCOLOR_PSUPER2,
SKINCOLOR_PSUPER3,
SKINCOLOR_PSUPER4,
SKINCOLOR_PSUPER5,
// Hyper Sonic Blue
SKINCOLOR_BSUPER1,
SKINCOLOR_BSUPER2,
SKINCOLOR_BSUPER3,
SKINCOLOR_BSUPER4,
SKINCOLOR_BSUPER5,
// Aqua Super
SKINCOLOR_ASUPER1,
SKINCOLOR_ASUPER2,
SKINCOLOR_ASUPER3,
SKINCOLOR_ASUPER4,
SKINCOLOR_ASUPER5,
// Hyper Sonic Green
SKINCOLOR_GSUPER1,
SKINCOLOR_GSUPER2,
SKINCOLOR_GSUPER3,
SKINCOLOR_GSUPER4,
SKINCOLOR_GSUPER5,
// Hyper Sonic White
SKINCOLOR_WSUPER1,
SKINCOLOR_WSUPER2,
SKINCOLOR_WSUPER3,
SKINCOLOR_WSUPER4,
SKINCOLOR_WSUPER5,
// Creamy Super (Shadow?)
SKINCOLOR_CSUPER1,
SKINCOLOR_CSUPER2,
SKINCOLOR_CSUPER3,
SKINCOLOR_CSUPER4,
SKINCOLOR_CSUPER5,
MAXTRANSLATIONS MAXTRANSLATIONS
} skincolors_t; } skincolors_t;
@ -471,13 +541,17 @@ INT32 I_GetKey(void);
#define max(x, y) (((x) > (y)) ? (x) : (y)) #define max(x, y) (((x) > (y)) ? (x) : (y))
#endif #endif
#ifndef M_PIl
#define M_PIl 3.1415926535897932384626433832795029L
#endif
// Floating point comparison epsilons from float.h // Floating point comparison epsilons from float.h
#ifndef FLT_EPSILON #ifndef FLT_EPSILON
#define FLT_EPSILON 1.1920928955078125e-7f #define FLT_EPSILON 1.1920928955078125e-7f
#endif #endif
#ifndef DBL_EPSILON #ifndef DBL_EPSILON
#define DBL_EPSILON 2.2204460492503131e-16 #define DBL_EPSILON 2.2204460492503131e-16l
#endif #endif
// An assert-type mechanism. // An assert-type mechanism.

View file

@ -468,6 +468,7 @@ extern boolean comeback;
extern SINT8 battlewanted[4]; extern SINT8 battlewanted[4];
extern tic_t wantedcalcdelay; extern tic_t wantedcalcdelay;
extern tic_t indirectitemcooldown; extern tic_t indirectitemcooldown;
extern tic_t hyubgone;
extern tic_t mapreset; extern tic_t mapreset;
extern UINT8 nospectategrief; extern UINT8 nospectategrief;
extern boolean thwompsactive; extern boolean thwompsactive;

View file

@ -267,6 +267,7 @@ SINT8 pickedvote; // What vote the host rolls
SINT8 battlewanted[4]; // WANTED players in battle, worth x2 points SINT8 battlewanted[4]; // WANTED players in battle, worth x2 points
tic_t wantedcalcdelay; // Time before it recalculates WANTED tic_t wantedcalcdelay; // Time before it recalculates WANTED
tic_t indirectitemcooldown; // Cooldown before any more Shrink, SPB, or any other item that works indirectly is awarded tic_t indirectitemcooldown; // Cooldown before any more Shrink, SPB, or any other item that works indirectly is awarded
tic_t hyubgone; // Cooldown before hyudoro is allowed to be rerolled
tic_t mapreset; // Map reset delay when enough players have joined an empty game tic_t mapreset; // Map reset delay when enough players have joined an empty game
UINT8 nospectategrief; // How many players need to be in-game to eliminate last; for preventing spectate griefing UINT8 nospectategrief; // How many players need to be in-game to eliminate last; for preventing spectate griefing
boolean thwompsactive; // Thwomps activate on lap 2 boolean thwompsactive; // Thwomps activate on lap 2
@ -2162,7 +2163,7 @@ void G_Ticker(boolean run)
G_CopyTiccmd(cmd, &netcmds[buf][i], 1); G_CopyTiccmd(cmd, &netcmds[buf][i], 1);
// Use the leveltime sent in the player's ticcmd to determine control lag // Use the leveltime sent in the player's ticcmd to determine control lag
cmd->latency = modeattacking ? 0 : min((leveltime & 0xFF) - cmd->latency, MAXPREDICTTICS-1); //@TODO add a cvar to allow setting this max cmd->latency = modeattacking ? 0 : min(((leveltime & 0xFF) - cmd->latency) & 0xFF, MAXPREDICTTICS-1); //@TODO add a cvar to allow setting this max
} }
} }
@ -2357,6 +2358,7 @@ void G_PlayerReborn(INT32 player)
UINT8 skincolor; UINT8 skincolor;
INT32 skin; INT32 skin;
tic_t jointime; tic_t jointime;
UINT8 splitscreenindex;
boolean spectator; boolean spectator;
INT16 bot; INT16 bot;
SINT8 pity; SINT8 pity;
@ -2380,6 +2382,7 @@ void G_PlayerReborn(INT32 player)
ctfteam = players[player].ctfteam; ctfteam = players[player].ctfteam;
exiting = players[player].exiting; exiting = players[player].exiting;
jointime = players[player].jointime; jointime = players[player].jointime;
splitscreenindex = players[player].splitscreenindex;
spectator = players[player].spectator; spectator = players[player].spectator;
pflags = (players[player].pflags & (PF_TIMEOVER|PF_FLIPCAM|PF_TAGIT|PF_TAGGED|PF_ANALOGMODE|PF_WANTSTOJOIN)); pflags = (players[player].pflags & (PF_TIMEOVER|PF_FLIPCAM|PF_TAGIT|PF_TAGGED|PF_ANALOGMODE|PF_WANTSTOJOIN));
@ -2476,6 +2479,7 @@ void G_PlayerReborn(INT32 player)
p->pflags = pflags; p->pflags = pflags;
p->ctfteam = ctfteam; p->ctfteam = ctfteam;
p->jointime = jointime; p->jointime = jointime;
p->splitscreenindex = splitscreenindex;
p->spectator = spectator; p->spectator = spectator;
// save player config truth reborn // save player config truth reborn
@ -4763,7 +4767,8 @@ void G_WriteGhostTic(mobj_t *ghost)
// GZT_XYZ is only useful if you've moved 256 FRACUNITS or more in a single tic. // GZT_XYZ is only useful if you've moved 256 FRACUNITS or more in a single tic.
if (abs(ghost->x-oldghost.x) > MAXMOM if (abs(ghost->x-oldghost.x) > MAXMOM
|| abs(ghost->y-oldghost.y) > MAXMOM || abs(ghost->y-oldghost.y) > MAXMOM
|| abs(ghost->z-oldghost.z) > MAXMOM) || abs(ghost->z-oldghost.z) > MAXMOM
|| (leveltime & 255) == 1) // Hack to enable slightly nicer resyncing
{ {
oldghost.x = ghost->x; oldghost.x = ghost->x;
oldghost.y = ghost->y; oldghost.y = ghost->y;
@ -4777,8 +4782,8 @@ void G_WriteGhostTic(mobj_t *ghost)
{ {
// For moving normally: // For moving normally:
// Store one full byte of movement, plus one byte of fractional movement. // Store one full byte of movement, plus one byte of fractional movement.
INT16 momx = (INT16)((ghost->x-oldghost.x)>>8); INT16 momx = (INT16)((ghost->x-oldghost.x + (1<<4))>>8);
INT16 momy = (INT16)((ghost->y-oldghost.y)>>8); INT16 momy = (INT16)((ghost->y-oldghost.y + (1<<4))>>8);
if (momx != oldghost.momx if (momx != oldghost.momx
|| momy != oldghost.momy) || momy != oldghost.momy)
{ {
@ -4788,7 +4793,7 @@ void G_WriteGhostTic(mobj_t *ghost)
WRITEINT16(demo_p,momx); WRITEINT16(demo_p,momx);
WRITEINT16(demo_p,momy); WRITEINT16(demo_p,momy);
} }
momx = (INT16)((ghost->z-oldghost.z)>>8); momx = (INT16)((ghost->z-oldghost.z + (1<<4))>>8);
if (momx != oldghost.momz) if (momx != oldghost.momz)
{ {
oldghost.momz = momx; oldghost.momz = momx;
@ -4892,8 +4897,9 @@ void G_WriteGhostTic(mobj_t *ghost)
void G_ConsGhostTic(void) void G_ConsGhostTic(void)
{ {
UINT8 ziptic; UINT8 ziptic;
UINT16 px,py,pz,gx,gy,gz; fixed_t px,py,pz,gx,gy,gz;
mobj_t *testmo; mobj_t *testmo;
fixed_t syncleeway;
boolean nightsfail = false; boolean nightsfail = false;
if (!demo_p || !demo_start) if (!demo_p || !demo_start)
@ -4910,6 +4916,7 @@ void G_ConsGhostTic(void)
oldghost.x = READFIXED(demo_p); oldghost.x = READFIXED(demo_p);
oldghost.y = READFIXED(demo_p); oldghost.y = READFIXED(demo_p);
oldghost.z = READFIXED(demo_p); oldghost.z = READFIXED(demo_p);
syncleeway = 0;
} }
else else
{ {
@ -4923,6 +4930,7 @@ void G_ConsGhostTic(void)
oldghost.x += oldghost.momx; oldghost.x += oldghost.momx;
oldghost.y += oldghost.momy; oldghost.y += oldghost.momy;
oldghost.z += oldghost.momz; oldghost.z += oldghost.momz;
syncleeway = FRACUNIT;
} }
if (ziptic & GZT_ANGLE) if (ziptic & GZT_ANGLE)
demo_p++; demo_p++;
@ -4988,14 +4996,14 @@ void G_ConsGhostTic(void)
} }
// Re-synchronise // Re-synchronise
px = testmo->x>>FRACBITS; px = testmo->x;
py = testmo->y>>FRACBITS; py = testmo->y;
pz = testmo->z>>FRACBITS; pz = testmo->z;
gx = oldghost.x>>FRACBITS; gx = oldghost.x;
gy = oldghost.y>>FRACBITS; gy = oldghost.y;
gz = oldghost.z>>FRACBITS; gz = oldghost.z;
if (nightsfail || px != gx || py != gy || pz != gz) if (nightsfail || abs(px-gx) > syncleeway || abs(py-gy) > syncleeway || abs(pz-gz) > syncleeway)
{ {
if (demosynced) if (demosynced)
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n")); CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n"));

View file

@ -201,7 +201,7 @@ static polyvertex_t *fracdivline(fdivline_t *bsp, polyvertex_t *v1,
// (do not accept hit with the extensions) // (do not accept hit with the extensions)
num = (v2x - v1x)*v2dy + (v1y - v2y)*v2dx; num = (v2x - v1x)*v2dy + (v1y - v2y)*v2dx;
frac = num / den; frac = num / den;
if (frac < 0.0 || frac > 1.0) if (frac < 0.0l || frac > 1.0l)
return NULL; return NULL;
// now get the frac along the BSP line // now get the frac along the BSP line

View file

@ -61,9 +61,6 @@ typedef void (*I_Error_t) (const char *error, ...) FUNCIERROR;
// ========================================================================== // ==========================================================================
// Constants // Constants
#ifndef M_PIl
#define M_PIl 3.1415926535897932384626433832795029L
#endif
#define DEGREE (0.017453292519943295769236907684883l) // 2*PI/360 #define DEGREE (0.017453292519943295769236907684883l) // 2*PI/360
void DBG_Printf(const char *lpFmt, ...) /*FUNCPRINTF*/; void DBG_Printf(const char *lpFmt, ...) /*FUNCPRINTF*/;

View file

@ -2056,7 +2056,7 @@ EXPORT void HWRAPI(DrawMD2) (INT32 *gl_cmd_buffer, md2_frame_t *frame, FTransfor
EXPORT void HWRAPI(SetTransform) (FTransform *stransform) EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
{ {
static boolean special_splitscreen; static boolean special_splitscreen;
float used_fov; double used_fov;
pglLoadIdentity(); pglLoadIdentity();
if (stransform) if (stransform)
{ {
@ -2088,7 +2088,7 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
pglLoadIdentity(); pglLoadIdentity();
if (special_splitscreen) if (special_splitscreen)
{ {
used_fov = atan(tan(used_fov*M_PI/360)*0.8)*360/M_PI; used_fov = atan(tan(used_fov*M_PIl/360.0l)*0.8l)*360/M_PIl;
GLPerspective(used_fov, 2*ASPECT_RATIO); GLPerspective(used_fov, 2*ASPECT_RATIO);
} }
else else

View file

@ -778,44 +778,139 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
} }
} }
else else
{ {
const UINT8 color = players[playernum].skincolor; const UINT8 color = players[playernum].skincolor;
cstart = "\x83"; cstart = "\x83";
if (color <= SKINCOLOR_SILVER || color == SKINCOLOR_SLATE) switch (color)
cstart = "\x80"; // white {
else if (color <= SKINCOLOR_BLACK || color == SKINCOLOR_JET) case SKINCOLOR_WHITE:
cstart = "\x86"; // V_GRAYMAP case SKINCOLOR_SILVER:
else if (color <= SKINCOLOR_LEATHER) case SKINCOLOR_SLATE:
cstart = "\x8e"; // V_BROWNMAP cstart = "\x80"; // White
else if (color <= SKINCOLOR_ROSE || color == SKINCOLOR_LILAC) break;
cstart = "\x8d"; // V_PINKMAP case SKINCOLOR_GREY:
else if (color <= SKINCOLOR_KETCHUP) case SKINCOLOR_NICKEL:
cstart = "\x85"; // V_REDMAP case SKINCOLOR_BLACK:
else if (color <= SKINCOLOR_TANGERINE) case SKINCOLOR_JET:
cstart = "\x87"; // V_ORANGEMAP cstart = "\x86"; // V_GRAYMAP
else if (color <= SKINCOLOR_CARAMEL) break;
cstart = "\x8f"; // V_PEACHMAP case SKINCOLOR_SEPIA:
else if (color <= SKINCOLOR_BRONZE) case SKINCOLOR_BEIGE:
cstart = "\x8A"; // V_GOLDMAP case SKINCOLOR_BROWN:
else if (color <= SKINCOLOR_OLIVE) case SKINCOLOR_LEATHER:
cstart = "\x82"; // V_YELLOWMAP case SKINCOLOR_RUST:
else if (color <= SKINCOLOR_PISTACHIO) cstart = "\x8e"; // V_BROWNMAP
cstart = "\x8b"; // V_TEAMAP break;
else if (color <= SKINCOLOR_DREAM || color == SKINCOLOR_LIME) case SKINCOLOR_FAIRY:
cstart = "\x83"; // V_GREENMAP case SKINCOLOR_SALMON:
else if (color <= SKINCOLOR_NAVY || color == SKINCOLOR_SAPPHIRE) case SKINCOLOR_PINK:
cstart = "\x88"; // V_SKYMAP case SKINCOLOR_ROSE:
else if (color <= SKINCOLOR_STEEL) case SKINCOLOR_BRICK:
cstart = "\x8c"; // V_STEELMAP case SKINCOLOR_BUBBLEGUM:
else if (color <= SKINCOLOR_BLUEBERRY) case SKINCOLOR_LILAC:
cstart = "\x84"; // V_BLUEMAP cstart = "\x8d"; // V_PINKMAP
else if (color == SKINCOLOR_PURPLE) break;
cstart = "\x81"; // V_PURPLEMAP case SKINCOLOR_RUBY:
else //if (color <= SKINCOLOR_POMEGRANATE) case SKINCOLOR_RASPBERRY:
cstart = "\x89"; // V_LAVENDERMAP case SKINCOLOR_CHERRY:
} case SKINCOLOR_RED:
case SKINCOLOR_CRIMSON:
case SKINCOLOR_MAROON:
case SKINCOLOR_FLAME:
case SKINCOLOR_SCARLET:
case SKINCOLOR_KETCHUP:
cstart = "\x85"; // V_REDMAP
break;
case SKINCOLOR_DAWN:
case SKINCOLOR_SUNSET:
case SKINCOLOR_CREAMSICLE:
case SKINCOLOR_ORANGE:
case SKINCOLOR_PUMPKIN:
case SKINCOLOR_ROSEWOOD:
case SKINCOLOR_BURGUNDY:
case SKINCOLOR_TANGERINE:
cstart = "\x87"; // V_ORANGEMAP
break;
case SKINCOLOR_PEACH:
case SKINCOLOR_CARAMEL:
case SKINCOLOR_CREAM:
cstart = "\x8f"; // V_PEACHMAP
break;
case SKINCOLOR_GOLD:
case SKINCOLOR_ROYAL:
case SKINCOLOR_BRONZE:
case SKINCOLOR_COPPER:
cstart = "\x8A"; // V_GOLDMAP
break;
case SKINCOLOR_POPCORN:
case SKINCOLOR_YELLOW:
case SKINCOLOR_MUSTARD:
case SKINCOLOR_OLIVE:
cstart = "\x82"; // V_YELLOWMAP
break;
case SKINCOLOR_VOMIT:
case SKINCOLOR_GARDEN:
case SKINCOLOR_TEA:
case SKINCOLOR_PISTACHIO:
cstart = "\x8b"; // V_TEAMAP
break;
case SKINCOLOR_LIME:
case SKINCOLOR_HANDHELD:
case SKINCOLOR_MOSS:
case SKINCOLOR_CAMOUFLAGE:
case SKINCOLOR_ROBOHOOD:
case SKINCOLOR_MINT:
case SKINCOLOR_GREEN:
case SKINCOLOR_PINETREE:
case SKINCOLOR_EMERALD:
case SKINCOLOR_SWAMP:
case SKINCOLOR_DREAM:
case SKINCOLOR_PLAGUE:
case SKINCOLOR_ALGAE:
cstart = "\x83"; // V_GREENMAP
break;
case SKINCOLOR_CARIBBEAN:
case SKINCOLOR_AQUA:
case SKINCOLOR_TEAL:
case SKINCOLOR_CYAN:
case SKINCOLOR_JAWZ:
case SKINCOLOR_CERULEAN:
case SKINCOLOR_NAVY:
case SKINCOLOR_SAPPHIRE:
cstart = "\x88"; // V_SKYMAP
break;
case SKINCOLOR_PLATINUM:
case SKINCOLOR_STEEL:
cstart = "\x8c"; // V_STEELMAP
break;
case SKINCOLOR_PERIWINKLE:
case SKINCOLOR_BLUE:
case SKINCOLOR_BLUEBERRY:
case SKINCOLOR_NOVA:
cstart = "\x84"; // V_BLUEMAP
break;
case SKINCOLOR_ULTRAVIOLET:
case SKINCOLOR_PURPLE:
case SKINCOLOR_FUCHSIA:
cstart = "\x81"; // V_PURPLEMAP
break;
case SKINCOLOR_PASTEL:
case SKINCOLOR_MOONSLAM:
case SKINCOLOR_DUSK:
case SKINCOLOR_TOXIC:
case SKINCOLOR_MAUVE:
case SKINCOLOR_LAVENDER:
case SKINCOLOR_BYZANTIUM:
case SKINCOLOR_POMEGRANATE:
cstart = "\x89"; // V_LAVENDERMAP
break;
default:
break;
}
}
prefix = cstart; prefix = cstart;
// Give admins and remote admins their symbols. // Give admins and remote admins their symbols.

View file

@ -3140,11 +3140,11 @@ state_t states[NUMSTATES] =
{SPR_NULL, 0, 1, {A_FZBoomSmoke}, 1, 0, S_FZEROBOOM12}, // S_FZEROBOOM11 {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 1, 0, S_FZEROBOOM12}, // S_FZEROBOOM11
{SPR_NULL, 0, 1, {A_FZBoomSmoke}, 0, 0, S_NULL}, // S_FZEROBOOM12 {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 0, 0, S_NULL}, // S_FZEROBOOM12
{SPR_SMOK, FF_TRANS30, 30, {NULL}, 0, 0, S_FZSLOWSMOKE2}, // S_FZSLOWSMOKE1 {SPR_SMOK, 0, 30, {NULL}, 0, 0, S_FZSLOWSMOKE2}, // S_FZSLOWSMOKE1
{SPR_SMOK, FF_TRANS30|1, 30, {NULL}, 0, 0, S_FZSLOWSMOKE3}, // S_FZSLOWSMOKE2 {SPR_SMOK, 1, 30, {NULL}, 0, 0, S_FZSLOWSMOKE3}, // S_FZSLOWSMOKE2
{SPR_SMOK, FF_TRANS30|2, 30, {NULL}, 0, 0, S_FZSLOWSMOKE4}, // S_FZSLOWSMOKE3 {SPR_SMOK, 2, 30, {NULL}, 0, 0, S_FZSLOWSMOKE4}, // S_FZSLOWSMOKE3
{SPR_SMOK, FF_TRANS30|3, 30, {NULL}, 0, 0, S_FZSLOWSMOKE5}, // S_FZSLOWSMOKE4 {SPR_SMOK, 3, 30, {NULL}, 0, 0, S_FZSLOWSMOKE5}, // S_FZSLOWSMOKE4
{SPR_SMOK, FF_TRANS30|4, 30, {NULL}, 0, 0, S_NULL}, // S_FZSLOWSMOKE5 {SPR_SMOK, 4, 30, {NULL}, 0, 0, S_NULL}, // S_FZSLOWSMOKE5
// Various plants // Various plants
{SPR_SBUS, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SONICBUSH {SPR_SBUS, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SONICBUSH
@ -3394,6 +3394,13 @@ state_t states[NUMSTATES] =
{SPR_FWRK, 3|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK1}, // S_KARMAFIREWORK4 {SPR_FWRK, 3|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK1}, // S_KARMAFIREWORK4
{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
// Opaque smoke
{SPR_SMOK, 0, 4, {NULL}, 0, 0, S_OPAQUESMOKE2}, // S_OPAQUESMOKE1
{SPR_SMOK, 1, 5, {NULL}, 0, 0, S_OPAQUESMOKE3}, // S_OPAQUESMOKE2
{SPR_SMOK, 2, 6, {NULL}, 0, 0, S_OPAQUESMOKE4}, // S_OPAQUESMOKE3
{SPR_SMOK, 3, 7, {NULL}, 0, 0, S_OPAQUESMOKE5}, // S_OPAQUESMOKE4
{SPR_SMOK, 4, 8, {NULL}, 0, 0, S_NULL}, // S_OPAQUESMOKE5
#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
#endif #endif
@ -15574,7 +15581,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
1, // spawnhealth 1, // spawnhealth
S_NULL, // seestate S_NULL, // seestate
sfx_tossed, // seesound sfx_tossed, // seesound
6*TICRATE, // reactiontime 0, // reactiontime
sfx_None, // attacksound sfx_None, // attacksound
S_NULL, // painstate S_NULL, // painstate
192*FRACUNIT, // painchance 192*FRACUNIT, // painchance

View file

@ -4052,6 +4052,12 @@ typedef enum state
S_KARMAFIREWORK4, S_KARMAFIREWORK4,
S_KARMAFIREWORKTRAIL, S_KARMAFIREWORKTRAIL,
S_OPAQUESMOKE1,
S_OPAQUESMOKE2,
S_OPAQUESMOKE3,
S_OPAQUESMOKE4,
S_OPAQUESMOKE5,
#ifdef SEENAMES #ifdef SEENAMES
S_NAMECHECK, S_NAMECHECK,
#endif #endif

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@
#define KART_FULLTURN 800 #define KART_FULLTURN 800
UINT8 colortranslations[MAXSKINCOLORS][16]; UINT8 colortranslations[MAXTRANSLATIONS][16];
extern const char *KartColor_Names[MAXSKINCOLORS]; extern const char *KartColor_Names[MAXSKINCOLORS];
extern const UINT8 KartColor_Opposite[MAXSKINCOLORS*2]; extern const UINT8 KartColor_Opposite[MAXSKINCOLORS*2];
void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor); void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor);
@ -41,6 +41,7 @@ void K_SpawnBoostTrail(player_t *player);
void K_SpawnSparkleTrail(mobj_t *mo); void K_SpawnSparkleTrail(mobj_t *mo);
void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent); void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent);
void K_DriftDustHandling(mobj_t *spawner); void K_DriftDustHandling(mobj_t *spawner);
void K_PuntMine(mobj_t *mine, mobj_t *punter);
void K_DoSneaker(player_t *player, INT32 type); void K_DoSneaker(player_t *player, INT32 type);
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound); void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound);
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source); void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source);

View file

@ -325,6 +325,8 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->bot); lua_pushinteger(L, plr->bot);
else if (fastcmp(field,"jointime")) else if (fastcmp(field,"jointime"))
lua_pushinteger(L, plr->jointime); lua_pushinteger(L, plr->jointime);
else if (fastcmp(field,"splitscreenindex"))
lua_pushinteger(L, plr->splitscreenindex);
#ifdef HWRENDER #ifdef HWRENDER
else if (fastcmp(field,"fovadd")) else if (fastcmp(field,"fovadd"))
lua_pushfixed(L, plr->fovadd); lua_pushfixed(L, plr->fovadd);
@ -613,6 +615,8 @@ static int player_set(lua_State *L)
return NOSET; return NOSET;
else if (fastcmp(field,"jointime")) else if (fastcmp(field,"jointime"))
plr->jointime = (tic_t)luaL_checkinteger(L, 3); plr->jointime = (tic_t)luaL_checkinteger(L, 3);
else if (fastcmp(field,"splitscreenindex"))
return NOSET;
#ifdef HWRENDER #ifdef HWRENDER
else if (fastcmp(field,"fovadd")) else if (fastcmp(field,"fovadd"))
plr->fovadd = luaL_checkfixed(L, 3); plr->fovadd = luaL_checkfixed(L, 3);

View file

@ -1020,7 +1020,7 @@ void LUA_Archive(void)
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
if (!playeringame[i]) if (!playeringame[i] && i > 0) // NEVER skip player 0, this is for dedi servs.
continue; continue;
// all players in game will be archived, even if they just add a 0. // all players in game will be archived, even if they just add a 0.
ArchiveExtVars(&players[i], "player"); ArchiveExtVars(&players[i], "player");
@ -1056,7 +1056,7 @@ void LUA_UnArchive(void)
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
if (!playeringame[i]) if (!playeringame[i] && i > 0) // same here, this is to synch dediservs properly.
continue; continue;
UnArchiveExtVars(&players[i]); UnArchiveExtVars(&players[i]);
} }

View file

@ -411,6 +411,12 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
player->kartstuff[k_roulettetype] = 2; player->kartstuff[k_roulettetype] = 2;
} }
#if 0
// Eggbox snipe!
if (special->type == MT_EGGMANITEM && special->health > 1)
S_StartSound(toucher, sfx_bsnipe);
#endif
{ {
mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE); mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE);
S_StartSound(poof, special->info->deathsound); S_StartSound(poof, special->info->deathsound);

View file

@ -747,6 +747,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
&& !(tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD)) && !(tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD))
return true; return true;
if (thing->player && thing->player->kartstuff[k_hyudorotimer])
return true; // no interaction
if (thing->type == MT_PLAYER) if (thing->type == MT_PLAYER)
{ {
// Player Damage // Player Damage
@ -850,7 +853,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (thing->type == MT_PLAYER) if (thing->type == MT_PLAYER)
{ {
S_StartSound(NULL, sfx_cgot); //let all players hear it. S_StartSound(NULL, sfx_bsnipe); //let all players hear it.
HU_SetCEchoFlags(0); HU_SetCEchoFlags(0);
HU_SetCEchoDuration(5); HU_SetCEchoDuration(5);
HU_DoCEcho(va("%s\\was hit by a kitchen sink.\\\\\\\\", player_names[thing->player-players])); HU_DoCEcho(va("%s\\was hit by a kitchen sink.\\\\\\\\", player_names[thing->player-players]));
@ -912,6 +915,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (thing->type == MT_PLAYER) if (thing->type == MT_PLAYER)
{ {
// Banana snipe!
if (tmthing->type == MT_BANANA && tmthing->health > 1)
S_StartSound(thing, sfx_bsnipe);
// Player Damage // Player Damage
K_SpinPlayer(thing->player, tmthing->target, 0, tmthing, (tmthing->type == MT_BANANA || tmthing->type == MT_BANANA_SHIELD)); K_SpinPlayer(thing->player, tmthing->target, 0, tmthing, (tmthing->type == MT_BANANA || tmthing->type == MT_BANANA_SHIELD));
@ -980,7 +987,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (thing->type == MT_PLAYER) if (thing->type == MT_PLAYER)
{ {
P_KillMobj(tmthing, thing, thing); // Bomb punting
if ((tmthing->state >= &states[S_SSMINE1] && tmthing->state <= &states[S_SSMINE4])
|| (tmthing->state >= &states[S_SSMINE_DEPLOY8] && tmthing->state <= &states[S_SSMINE_DEPLOY13]))
P_KillMobj(tmthing, thing, thing);
else
K_PuntMine(tmthing, thing);
} }
else if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD else if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|| thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD) || thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD)
@ -1021,6 +1033,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
&& !(thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD)) && !(thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD))
return true; return true;
if (tmthing->player && tmthing->player->kartstuff[k_hyudorotimer]) // I thought about doing this for just the objects below but figured it should apply to everything.
return true; // no interaction
if (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD if (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD
|| thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD) || thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD)
{ {
@ -1056,6 +1071,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->health <= 0 || thing->health <= 0) if (tmthing->health <= 0 || thing->health <= 0)
return true; return true;
// Banana snipe!
if (thing->type == MT_BANANA && thing->health > 1)
S_StartSound(tmthing, sfx_bsnipe);
// Player Damage // Player Damage
K_SpinPlayer(tmthing->player, thing->target, 0, tmthing, (thing->type == MT_BANANA || thing->type == MT_BANANA_SHIELD)); K_SpinPlayer(tmthing->player, thing->target, 0, tmthing, (thing->type == MT_BANANA || thing->type == MT_BANANA_SHIELD));
@ -1079,7 +1098,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->health <= 0 || thing->health <= 0) if (tmthing->health <= 0 || thing->health <= 0)
return true; return true;
P_KillMobj(thing, tmthing, tmthing); // Bomb punting
if ((thing->state >= &states[S_SSMINE1] && thing->state <= &states[S_SSMINE4])
|| (thing->state >= &states[S_SSMINE_DEPLOY8] && thing->state <= &states[S_SSMINE_DEPLOY13]))
P_KillMobj(thing, tmthing, tmthing);
else
K_PuntMine(thing, tmthing);
} }
else if (thing->type == MT_MINEEXPLOSION && tmthing->player) else if (thing->type == MT_MINEEXPLOSION && tmthing->player)
{ {

View file

@ -1404,11 +1404,14 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
break; break;
case MT_BANANA: case MT_BANANA:
case MT_EGGMANITEM: case MT_EGGMANITEM:
case MT_SSMINE:
case MT_SINK:
if (mo->extravalue2 > 0)
gravityadd *= mo->extravalue2;
/* FALLTHRU */
case MT_ORBINAUT: case MT_ORBINAUT:
case MT_JAWZ: case MT_JAWZ:
case MT_JAWZ_DUD: case MT_JAWZ_DUD:
case MT_SSMINE:
case MT_SINK:
gravityadd = (5*gravityadd)/2; gravityadd = (5*gravityadd)/2;
break; break;
case MT_SIGN: case MT_SIGN:
@ -3399,8 +3402,8 @@ void P_MobjCheckWater(mobj_t *mobj)
// skipping stone! // skipping stone!
if (p && p->kartstuff[k_waterskip] < 2 if (p && p->kartstuff[k_waterskip] < 2
&& ((p->speed/2 > abs(mobj->momz)) // Going more forward than horizontal, so you can skip across the water. && ((p->speed/3 > abs(mobj->momz)) // Going more forward than horizontal, so you can skip across the water.
|| (p->speed > K_GetKartSpeed(p,false)/4 && p->kartstuff[k_waterskip])) // Already skipped once, so you can skip once more! || (p->speed > K_GetKartSpeed(p,false)/3 && p->kartstuff[k_waterskip])) // Already skipped once, so you can skip once more!
&& ((!(mobj->eflags & MFE_VERTICALFLIP) && thingtop - mobj->momz > mobj->watertop) && ((!(mobj->eflags & MFE_VERTICALFLIP) && thingtop - mobj->momz > mobj->watertop)
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z - mobj->momz < mobj->waterbottom))) || ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z - mobj->momz < mobj->waterbottom)))
{ {
@ -6651,6 +6654,7 @@ void P_MobjThinker(mobj_t *mobj)
fixed_t y = P_RandomRange(-35, 35)*mobj->scale; fixed_t y = P_RandomRange(-35, 35)*mobj->scale;
fixed_t z = P_RandomRange(0, 70)*mobj->scale; fixed_t z = P_RandomRange(0, 70)*mobj->scale;
mobj_t *smoke = P_SpawnMobj(mobj->x + x, mobj->y + y, mobj->z + z, MT_SMOKE); mobj_t *smoke = P_SpawnMobj(mobj->x + x, mobj->y + y, mobj->z + z, MT_SMOKE);
P_SetMobjState(smoke, S_OPAQUESMOKE1);
smoke->scale = mobj->scale * 2; smoke->scale = mobj->scale * 2;
smoke->destscale = mobj->scale * 6; smoke->destscale = mobj->scale * 6;
smoke->momz = P_RandomRange(4, 9)*FRACUNIT; smoke->momz = P_RandomRange(4, 9)*FRACUNIT;
@ -6672,6 +6676,7 @@ void P_MobjThinker(mobj_t *mobj)
else else
{ {
mobj_t *smoke = P_SpawnMobj(mobj->x + x, mobj->y + y, mobj->z + z, MT_SMOKE); mobj_t *smoke = P_SpawnMobj(mobj->x + x, mobj->y + y, mobj->z + z, MT_SMOKE);
P_SetMobjState(smoke, S_OPAQUESMOKE1);
smoke->scale = mobj->scale; smoke->scale = mobj->scale;
smoke->destscale = mobj->scale*2; smoke->destscale = mobj->scale*2;
} }
@ -8190,28 +8195,26 @@ void P_MobjThinker(mobj_t *mobj)
mobj->color = mobj->target->player->skincolor; mobj->color = mobj->target->player->skincolor;
else else
mobj->color = SKINCOLOR_KETCHUP; mobj->color = SKINCOLOR_KETCHUP;
if (mobj->momx || mobj->momy) if (mobj->momx || mobj->momy)
P_SpawnGhostMobj(mobj); P_SpawnGhostMobj(mobj);
if (P_IsObjectOnGround(mobj))
if (P_IsObjectOnGround(mobj) && (mobj->state == &states[S_SSMINE_AIR1] || mobj->state == &states[S_SSMINE_AIR2]))
{ {
if (mobj->state == &states[S_SSMINE_AIR1] || mobj->state == &states[S_SSMINE_AIR2]) if (mobj->extravalue1 > 0)
P_SetMobjState(mobj, S_SSMINE_DEPLOY1); mobj->extravalue1--;
if (mobj->reactiontime >= mobj->info->reactiontime) else
{ {
mobj->momx = mobj->momy = 0; mobj->momx = mobj->momy = 0;
S_StartSound(mobj, mobj->info->activesound); S_StartSound(mobj, mobj->info->activesound);
mobj->reactiontime--; P_SetMobjState(mobj, S_SSMINE_DEPLOY1);
} }
} }
if (mobj->reactiontime && mobj->reactiontime < mobj->info->reactiontime)
{
mobj->reactiontime--;
if (!mobj->reactiontime)
P_KillMobj(mobj, NULL, NULL);
}
if ((mobj->state >= &states[S_SSMINE1] && mobj->state <= &states[S_SSMINE4]) if ((mobj->state >= &states[S_SSMINE1] && mobj->state <= &states[S_SSMINE4])
|| (mobj->state >= &states[S_SSMINE_DEPLOY8] && mobj->state <= &states[S_SSMINE_DEPLOY13])) || (mobj->state >= &states[S_SSMINE_DEPLOY8] && mobj->state <= &states[S_SSMINE_DEPLOY13]))
A_GrenadeRing(mobj); A_GrenadeRing(mobj);
if (mobj->threshold > 0) if (mobj->threshold > 0)
mobj->threshold--; mobj->threshold--;
break; break;

View file

@ -249,6 +249,8 @@ static void P_NetArchivePlayers(void)
WRITEUINT32(save_p, players[i].jointime); WRITEUINT32(save_p, players[i].jointime);
WRITEUINT8(save_p, players[i].splitscreenindex);
WRITEUINT16(save_p, flags); WRITEUINT16(save_p, flags);
if (flags & CAPSULE) if (flags & CAPSULE)
@ -426,6 +428,8 @@ static void P_NetUnArchivePlayers(void)
players[i].jointime = READUINT32(save_p); players[i].jointime = READUINT32(save_p);
players[i].splitscreenindex = READUINT8(save_p);
flags = READUINT16(save_p); flags = READUINT16(save_p);
if (flags & CAPSULE) if (flags & CAPSULE)
@ -3316,6 +3320,7 @@ static void P_NetArchiveMisc(void)
WRITEUINT32(save_p, wantedcalcdelay); WRITEUINT32(save_p, wantedcalcdelay);
WRITEUINT32(save_p, indirectitemcooldown); WRITEUINT32(save_p, indirectitemcooldown);
WRITEUINT32(save_p, hyubgone);
WRITEUINT32(save_p, mapreset); WRITEUINT32(save_p, mapreset);
WRITEUINT8(save_p, nospectategrief); WRITEUINT8(save_p, nospectategrief);
WRITEUINT8(save_p, thwompsactive); WRITEUINT8(save_p, thwompsactive);
@ -3424,6 +3429,7 @@ static inline boolean P_NetUnArchiveMisc(void)
wantedcalcdelay = READUINT32(save_p); wantedcalcdelay = READUINT32(save_p);
indirectitemcooldown = READUINT32(save_p); indirectitemcooldown = READUINT32(save_p);
hyubgone = READUINT32(save_p);
mapreset = READUINT32(save_p); mapreset = READUINT32(save_p);
nospectategrief = READUINT8(save_p); nospectategrief = READUINT8(save_p);
thwompsactive = (boolean)READUINT8(save_p); thwompsactive = (boolean)READUINT8(save_p);

View file

@ -3243,6 +3243,7 @@ boolean P_SetupLevel(boolean skipprecip)
wantedcalcdelay = wantedfrequency*2; wantedcalcdelay = wantedfrequency*2;
indirectitemcooldown = 0; indirectitemcooldown = 0;
hyubgone = 0;
mapreset = 0; mapreset = 0;
nospectategrief = 0; nospectategrief = 0;
thwompsactive = false; thwompsactive = false;

View file

@ -680,6 +680,8 @@ void P_Ticker(boolean run)
if (indirectitemcooldown) if (indirectitemcooldown)
indirectitemcooldown--; indirectitemcooldown--;
if (hyubgone)
hyubgone--;
if (G_BattleGametype()) if (G_BattleGametype())
{ {

View file

@ -6662,7 +6662,7 @@ static void P_MovePlayer(player_t *player)
//CONS_Printf("leftover turn (%s): %5d or %4d%%\n", //CONS_Printf("leftover turn (%s): %5d or %4d%%\n",
// player_names[player-players], // player_names[player-players],
// (INT16) (cmd->angleturn - (player->mo->angle>>16)), // (INT16) (cmd->angleturn - (player->mo->angle>>16)),
// (INT16) (cmd->angleturn - (player->mo->angle>>16)) * 100 / (angle_diff ?: 1)); // (INT16) (cmd->angleturn - (player->mo->angle>>16)) * 100 / (angle_diff ? angle_diff : 1));
} }
} }

View file

@ -1051,7 +1051,7 @@ void R_DrawSinglePlane(visplane_t *pl)
temp = P_GetZAt(pl->slope, pl->viewx, pl->viewy); temp = P_GetZAt(pl->slope, pl->viewx, pl->viewy);
zeroheight = FIXED_TO_FLOAT(temp); zeroheight = FIXED_TO_FLOAT(temp);
#define ANG2RAD(angle) ((float)((angle)*M_PI)/ANGLE_180) #define ANG2RAD(angle) ((float)((angle)*M_PIl)/ANGLE_180)
// p is the texture origin in view space // p is the texture origin in view space
// Don't add in the offsets at this stage, because doing so can result in // Don't add in the offsets at this stage, because doing so can result in

View file

@ -1315,6 +1315,7 @@ static void R_ProjectSprite(mobj_t *thing)
return; return;
scalestep = (yscale2 - yscale)/(x2 - x1); scalestep = (yscale2 - yscale)/(x2 - x1);
scalestep = scalestep ? scalestep : 1;
// The following two are alternate sorting methods which might be more applicable in some circumstances. TODO - maybe enable via MF2? // The following two are alternate sorting methods which might be more applicable in some circumstances. TODO - maybe enable via MF2?
// sortscale = max(yscale, yscale2); // sortscale = max(yscale, yscale2);

View file

@ -815,6 +815,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"chain", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Mementos Reaper {"chain", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Mementos Reaper
{"mkuma", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Trigger Happy Havoc Monokuma {"mkuma", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Trigger Happy Havoc Monokuma
{"toada", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Arid Sands Toad scream {"toada", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Arid Sands Toad scream
{"bsnipe", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Banana sniping
{"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // :shitsfree: {"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // :shitsfree:
{"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Debug notification {"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Debug notification

View file

@ -890,6 +890,7 @@ typedef enum
sfx_chain, sfx_chain,
sfx_mkuma, sfx_mkuma,
sfx_toada, sfx_toada,
sfx_bsnipe,
sfx_itfree, sfx_itfree,
sfx_dbgsal, sfx_dbgsal,

View file

@ -639,9 +639,6 @@ void I_Error(const char *error, ...)
if (!errorcount) if (!errorcount)
{ {
M_SaveConfig(NULL); // save game config, cvars.. M_SaveConfig(NULL); // save game config, cvars..
#ifndef NONET
D_SaveBan(); // save the ban list
#endif
G_SaveGameData(); G_SaveGameData();
} }