mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Merge remote-tracking branch 'origin/master' into knuxstuff
Update to master branch
This commit is contained in:
commit
0772ee693c
27 changed files with 1008 additions and 529 deletions
9
.gitattributes
vendored
9
.gitattributes
vendored
|
@ -1,3 +1,12 @@
|
|||
#Source code
|
||||
/src/*.c text=auto
|
||||
/src/*.h text=auto
|
||||
/src/*.s text=auto
|
||||
/src/*.m text=auto
|
||||
/src/*.xpm text=auto
|
||||
/src/Makefile text=auto
|
||||
/src/Make*.cfg text=auto
|
||||
/src/CMakeLists.txt text=auto
|
||||
# Windows EOL
|
||||
*.cs -crlf -whitespace
|
||||
*.mk -crlf -whitespace
|
||||
|
|
|
@ -129,6 +129,7 @@ char srb2home[256] = ".";
|
|||
char srb2path[256] = ".";
|
||||
boolean usehome = true;
|
||||
const char *pandf = "%s" PATHSEP "%s";
|
||||
static char addonsdir[MAX_WADPATH];
|
||||
|
||||
//
|
||||
// EVENT HANDLING
|
||||
|
@ -1039,7 +1040,6 @@ void D_SRB2Main(void)
|
|||
// can't use sprintf since there is %u in savegamename
|
||||
strcatbf(savegamename, srb2home, PATHSEP);
|
||||
|
||||
I_mkdir(srb2home, 0700);
|
||||
#else
|
||||
snprintf(srb2home, sizeof srb2home, "%s", userhome);
|
||||
snprintf(downloaddir, sizeof downloaddir, "%s", userhome);
|
||||
|
@ -1056,6 +1056,10 @@ void D_SRB2Main(void)
|
|||
configfile[sizeof configfile - 1] = '\0';
|
||||
}
|
||||
|
||||
// Create addons dir
|
||||
snprintf(addonsdir, sizeof addonsdir, "%s%s%s", srb2home, PATHSEP, "addons");
|
||||
I_mkdir(addonsdir, 0755);
|
||||
|
||||
// rand() needs seeded regardless of password
|
||||
srand((unsigned int)time(NULL));
|
||||
|
||||
|
|
|
@ -637,6 +637,8 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_screenshot_folder);
|
||||
CV_RegisterVar(&cv_screenshot_colorprofile);
|
||||
CV_RegisterVar(&cv_moviemode);
|
||||
CV_RegisterVar(&cv_movie_option);
|
||||
CV_RegisterVar(&cv_movie_folder);
|
||||
// PNG variables
|
||||
CV_RegisterVar(&cv_zlib_level);
|
||||
CV_RegisterVar(&cv_zlib_memory);
|
||||
|
|
|
@ -5578,14 +5578,12 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_DRIPC1",
|
||||
"S_DRIPC2",
|
||||
|
||||
// Coral 1
|
||||
// Coral
|
||||
"S_CORAL1",
|
||||
|
||||
// Coral 2
|
||||
"S_CORAL2",
|
||||
|
||||
// Coral 3
|
||||
"S_CORAL3",
|
||||
"S_CORAL4",
|
||||
"S_CORAL5",
|
||||
|
||||
// Blue Crystal
|
||||
"S_BLUECRYSTAL1",
|
||||
|
@ -5593,6 +5591,11 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
// Kelp,
|
||||
"S_KELP",
|
||||
|
||||
// Animated algae
|
||||
"S_ANIMALGAETOP1",
|
||||
"S_ANIMALGAETOP2",
|
||||
"S_ANIMALGAESEG",
|
||||
|
||||
// DSZ Stalagmites
|
||||
"S_DSZSTALAGMITE",
|
||||
"S_DSZ2STALAGMITE",
|
||||
|
@ -5739,6 +5742,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_CACTI9",
|
||||
"S_CACTI10",
|
||||
"S_CACTI11",
|
||||
"S_CACTITINYSEG",
|
||||
"S_CACTISMALLSEG",
|
||||
|
||||
// Warning signs sprites
|
||||
"S_ARIDSIGN_CAUTION",
|
||||
|
@ -7457,11 +7462,15 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_SEAWEED", // DSZ Seaweed
|
||||
"MT_WATERDRIP", // Dripping Water source
|
||||
"MT_WATERDROP", // Water drop from dripping water
|
||||
"MT_CORAL1", // Coral 1
|
||||
"MT_CORAL2", // Coral 2
|
||||
"MT_CORAL3", // Coral 3
|
||||
"MT_CORAL1", // Coral
|
||||
"MT_CORAL2",
|
||||
"MT_CORAL3",
|
||||
"MT_CORAL4",
|
||||
"MT_CORAL5",
|
||||
"MT_BLUECRYSTAL", // Blue Crystal
|
||||
"MT_KELP", // Kelp
|
||||
"MT_ANIMALGAETOP", // Animated algae top
|
||||
"MT_ANIMALGAESEG", // Animated algae segment
|
||||
"MT_DSZSTALAGMITE", // Deep Sea 1 Stalagmite
|
||||
"MT_DSZ2STALAGMITE", // Deep Sea 2 Stalagmite
|
||||
"MT_LIGHTBEAM", // DSZ Light beam
|
||||
|
@ -7523,6 +7532,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_CACTI9",
|
||||
"MT_CACTI10",
|
||||
"MT_CACTI11",
|
||||
"MT_CACTITINYSEG",
|
||||
"MT_CACTISMALLSEG",
|
||||
"MT_ARIDSIGN_CAUTION",
|
||||
"MT_ARIDSIGN_CACTI",
|
||||
"MT_ARIDSIGN_SHARPTURN",
|
||||
|
|
|
@ -751,7 +751,7 @@ boolean preparefilemenu(boolean samedepth)
|
|||
}
|
||||
else if (ext == EXT_TXT)
|
||||
{
|
||||
if (!strcmp(dent->d_name, "log.txt") || !strcmp(dent->d_name, "errorlog.txt"))
|
||||
if (!strncmp(dent->d_name, "log-", 4) || !strcmp(dent->d_name, "errorlog.txt"))
|
||||
ext |= EXT_LOADED;
|
||||
}
|
||||
|
||||
|
|
50
src/g_game.c
50
src/g_game.c
|
@ -2100,7 +2100,7 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
|||
// G_PlayerReborn
|
||||
// Called after a player dies. Almost everything is cleared and initialized.
|
||||
//
|
||||
void G_PlayerReborn(INT32 player)
|
||||
void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||
{
|
||||
player_t *p;
|
||||
INT32 score;
|
||||
|
@ -2205,7 +2205,7 @@ void G_PlayerReborn(INT32 player)
|
|||
bot = players[player].bot;
|
||||
pity = players[player].pity;
|
||||
|
||||
if (!G_IsSpecialStage(gamemap))
|
||||
if (betweenmaps || !G_IsSpecialStage(gamemap))
|
||||
{
|
||||
rings = (ultimatemode ? 0 : mapheaderinfo[gamemap-1]->startrings);
|
||||
spheres = 0;
|
||||
|
@ -2284,6 +2284,28 @@ void G_PlayerReborn(INT32 player)
|
|||
//if ((netgame || multiplayer) && !p->spectator) -- moved into P_SpawnPlayer to account for forced changes there
|
||||
//p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
|
||||
|
||||
// Check to make sure their color didn't change somehow...
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (p->ctfteam == 1 && p->skincolor != skincolor_redteam)
|
||||
{
|
||||
if (p == &players[consoleplayer])
|
||||
CV_SetValue(&cv_playercolor, skincolor_redteam);
|
||||
else if (p == &players[secondarydisplayplayer])
|
||||
CV_SetValue(&cv_playercolor2, skincolor_redteam);
|
||||
}
|
||||
else if (p->ctfteam == 2 && p->skincolor != skincolor_blueteam)
|
||||
{
|
||||
if (p == &players[consoleplayer])
|
||||
CV_SetValue(&cv_playercolor, skincolor_blueteam);
|
||||
else if (p == &players[secondarydisplayplayer])
|
||||
CV_SetValue(&cv_playercolor2, skincolor_blueteam);
|
||||
}
|
||||
}
|
||||
|
||||
if (betweenmaps)
|
||||
return;
|
||||
|
||||
if (p-players == consoleplayer)
|
||||
{
|
||||
if (mapmusflags & MUSIC_RELOADRESET)
|
||||
|
@ -2303,9 +2325,6 @@ void G_PlayerReborn(INT32 player)
|
|||
if (gametype == GT_COOP)
|
||||
P_FindEmerald(); // scan for emeralds to hunt for
|
||||
|
||||
// Reset Nights score and max link to 0 on death
|
||||
p->marescore = p->maxlink = 0;
|
||||
|
||||
// If NiGHTS, find lowest mare to start with.
|
||||
p->mare = P_FindLowestMare();
|
||||
|
||||
|
@ -2313,27 +2332,6 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
if (p->mare == 255)
|
||||
p->mare = 0;
|
||||
|
||||
p->marelap = p->marebonuslap = 0;
|
||||
|
||||
// Check to make sure their color didn't change somehow...
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (p->ctfteam == 1 && p->skincolor != skincolor_redteam)
|
||||
{
|
||||
if (p == &players[consoleplayer])
|
||||
CV_SetValue(&cv_playercolor, skincolor_redteam);
|
||||
else if (p == &players[secondarydisplayplayer])
|
||||
CV_SetValue(&cv_playercolor2, skincolor_redteam);
|
||||
}
|
||||
else if (p->ctfteam == 2 && p->skincolor != skincolor_blueteam)
|
||||
{
|
||||
if (p == &players[consoleplayer])
|
||||
CV_SetValue(&cv_playercolor, skincolor_blueteam);
|
||||
else if (p == &players[secondarydisplayplayer])
|
||||
CV_SetValue(&cv_playercolor2, skincolor_blueteam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -100,7 +100,7 @@ extern INT32 localaiming, localaiming2; // should be an angle_t but signed
|
|||
//
|
||||
void G_ChangePlayerReferences(mobj_t *oldmo, mobj_t *newmo);
|
||||
void G_DoReborn(INT32 playernum);
|
||||
void G_PlayerReborn(INT32 player);
|
||||
void G_PlayerReborn(INT32 player, boolean betweenmaps);
|
||||
void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer,
|
||||
boolean skipprecutscene, boolean FLS);
|
||||
char *G_BuildMapTitle(INT32 mapnum);
|
||||
|
|
|
@ -1202,7 +1202,7 @@ static UINT8 P_GetModelSprite2(md2_t *md2, skin_t *skin, UINT8 spr2, player_t *p
|
|||
if (!md2 || !skin)
|
||||
return 0;
|
||||
|
||||
if ((unsigned)(spr2 & ~FF_SPR2SUPER) >= free_spr2)
|
||||
if ((playersprite_t)(spr2 & ~FF_SPR2SUPER) >= free_spr2)
|
||||
return 0;
|
||||
|
||||
while (!(md2->model->spr2frames[spr2*2 + 1])
|
||||
|
|
309
src/info.c
309
src/info.c
|
@ -212,11 +212,11 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"GARG", // Deep Sea Gargoyle
|
||||
"SEWE", // Deep Sea Seaweed
|
||||
"DRIP", // Dripping water
|
||||
"CRL1", // Coral 1
|
||||
"CRL2", // Coral 2
|
||||
"CRL3", // Coral 3
|
||||
"CORL", // Coral
|
||||
"BCRY", // Blue Crystal
|
||||
"KELP", // Kelp
|
||||
"ALGA", // Animated algae top
|
||||
"ALGB", // Animated algae segment
|
||||
"DSTG", // DSZ Stalagmites
|
||||
"LIBE", // DSZ Light beam
|
||||
|
||||
|
@ -246,7 +246,7 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
// Arid Canyon Scenery
|
||||
"BTBL", // Big tumbleweed
|
||||
"STBL", // Small tumbleweed
|
||||
"CACT", // Cacti sprites
|
||||
"CACT", // Cacti
|
||||
"WWSG", // Caution Sign
|
||||
"WWS2", // Cacti Sign
|
||||
"WWS3", // Sharp Turn Sign
|
||||
|
@ -739,7 +739,7 @@ state_t states[NUMSTATES] =
|
|||
|
||||
// CA_FLY/CA_SWIM
|
||||
{SPR_PLAY, SPR2_FLY , 2, {NULL}, 0, 0, S_PLAY_FLY}, // S_PLAY_FLY
|
||||
{SPR_PLAY, SPR2_SWIM, 2, {NULL}, 0, 0, S_PLAY_SWIM}, // S_PLAY_SWIM
|
||||
{SPR_PLAY, SPR2_SWIM, 4, {NULL}, 0, 0, S_PLAY_SWIM}, // S_PLAY_SWIM
|
||||
{SPR_PLAY, SPR2_TIRE, 12, {NULL}, 0, 0, S_PLAY_FLY_TIRED}, // S_PLAY_FLY_TIRED
|
||||
|
||||
// CA_GLIDEANDCLIMB
|
||||
|
@ -2164,14 +2164,12 @@ state_t states[NUMSTATES] =
|
|||
{SPR_DRIP, FF_TRANS30|4, 1, {NULL}, 0, 0, S_DRIPC2}, // S_DRIPC1
|
||||
{SPR_DRIP, FF_TRANS30|5, 1, {NULL}, 0, 0, S_NULL}, // S_DRIPC2
|
||||
|
||||
// Coral 1
|
||||
{SPR_CRL1, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CORAL1
|
||||
|
||||
// Coral 2
|
||||
{SPR_CRL2, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CORAL2
|
||||
|
||||
// Coral 3
|
||||
{SPR_CRL3, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CORAL3
|
||||
// Coral
|
||||
{SPR_CORL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CORAL1
|
||||
{SPR_CORL, 1, -1, {NULL}, 0, 0, S_NULL}, // S_CORAL2
|
||||
{SPR_CORL, 2, -1, {NULL}, 0, 0, S_NULL}, // S_CORAL3
|
||||
{SPR_CORL, 3, -1, {NULL}, 0, 0, S_NULL}, // S_CORAL4
|
||||
{SPR_CORL, 4, -1, {NULL}, 0, 0, S_NULL}, // S_CORAL5
|
||||
|
||||
// Blue Crystal
|
||||
{SPR_BCRY, FF_TRANS30, -1, {NULL}, 0, 0, S_NULL}, // S_BLUECRYSTAL1
|
||||
|
@ -2179,6 +2177,11 @@ state_t states[NUMSTATES] =
|
|||
// Kelp
|
||||
{SPR_KELP, 0, -1, {NULL}, 0, 0, S_NULL}, // S_KELP
|
||||
|
||||
// Animated algae
|
||||
{SPR_ALGA, 0, 1, {A_ConnectToGround}, MT_ANIMALGAESEG, 0, S_ANIMALGAETOP2}, // S_ANIMALGAETOP1
|
||||
{SPR_ALGA, 0|FF_ANIMATE|FF_RANDOMANIM, -1, {NULL}, 11, 4, S_NULL}, // S_ANIMALGAETOP2
|
||||
{SPR_ALGB, 0|FF_ANIMATE|FF_RANDOMANIM, -1, {NULL}, 11, 4, S_NULL}, // S_ANIMALGAESEG
|
||||
|
||||
// DSZ Stalagmites
|
||||
{SPR_DSTG, 0, -1, {NULL}, 0, 0, S_NULL}, // S_DSZSTALAGMITE
|
||||
{SPR_DSTG, 1, -1, {NULL}, 0, 0, S_NULL}, // S_DSZ2STALAGMITE
|
||||
|
@ -2323,18 +2326,20 @@ state_t states[NUMSTATES] =
|
|||
{SPR_STBL, 6, 5, {NULL}, 0, 0, S_LITTLETUMBLEWEED_ROLL8}, // S_LITTLETUMBLEWEED_ROLL7
|
||||
{SPR_STBL, 7, 5, {NULL}, 0, 0, S_LITTLETUMBLEWEED_ROLL1}, // S_LITTLETUMBLEWEED_ROLL8
|
||||
|
||||
// Cacti Sprites
|
||||
{SPR_CACT, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI1
|
||||
{SPR_CACT, 1, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI2
|
||||
{SPR_CACT, 2, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI3
|
||||
{SPR_CACT, 3, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI4
|
||||
// Cacti
|
||||
{SPR_CACT, 0, -1, {A_ConnectToGround}, MT_CACTITINYSEG, 0, S_NULL}, // S_CACTI1
|
||||
{SPR_CACT, 1, -1, {A_ConnectToGround}, MT_CACTISMALLSEG, 0, S_NULL}, // S_CACTI2
|
||||
{SPR_CACT, 2, -1, {A_ConnectToGround}, MT_CACTITINYSEG, 0, S_NULL}, // S_CACTI3
|
||||
{SPR_CACT, 3, -1, {A_ConnectToGround}, MT_CACTISMALLSEG, 0, S_NULL}, // S_CACTI4
|
||||
{SPR_CACT, 4, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI5
|
||||
{SPR_CACT, 5, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI6
|
||||
{SPR_CACT, 6, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI7
|
||||
{SPR_CACT, 7, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI8
|
||||
{SPR_CACT, 8, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI9
|
||||
{SPR_CACT, 9, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI10
|
||||
{SPR_CACT, 10, -1, {NULL}, 0, 0, S_NULL}, // S_CACTI11
|
||||
{SPR_CACT, 9, -1, {A_ConnectToGround}, MT_CACTITINYSEG, 0, S_NULL}, // S_CACTI10
|
||||
{SPR_CACT, 10, -1, {A_ConnectToGround}, MT_CACTISMALLSEG, 0, S_NULL}, // S_CACTI11
|
||||
{SPR_CACT, 11, -1, {NULL}, 0, 0, S_NULL}, // S_CACTITINYSEG
|
||||
{SPR_CACT, 12, -1, {NULL}, 0, 0, S_NULL}, // S_CACTISMALLSEG
|
||||
|
||||
// Warning Signs
|
||||
{SPR_WWSG, FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_ARIDSIGN_CAUTION
|
||||
|
@ -6499,8 +6504,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
8*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
|
@ -6580,8 +6585,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_ncitem, // deathsound
|
||||
1, // speed
|
||||
8*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
16*FRACUNIT, // radius
|
||||
30*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
|
@ -10036,7 +10041,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -10063,7 +10068,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
8, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SPECIAL|MF_SCENERY, // flags
|
||||
MF_SPECIAL|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -10084,13 +10089,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
8*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
29*FRACUNIT, // radius
|
||||
40*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -10111,13 +10116,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
8*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
30*FRACUNIT, // radius
|
||||
53*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -10138,13 +10143,67 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
8*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
28*FRACUNIT, // radius
|
||||
41*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CORAL4
|
||||
1014, // doomednum
|
||||
S_CORAL4, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
56*FRACUNIT, // radius
|
||||
112*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CORAL5
|
||||
1015, // doomednum
|
||||
S_CORAL5, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
56*FRACUNIT, // radius
|
||||
112*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -10171,13 +10230,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_KELP
|
||||
1007, // doomednum
|
||||
S_KELP, // spawnstate
|
||||
S_KELP, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
|
@ -10192,19 +10251,73 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
292*FRACUNIT, // height
|
||||
16*FRACUNIT, // radius
|
||||
292*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SCENERY|MF_NOBLOCKMAP, // flags
|
||||
MF_SCENERY|MF_NOBLOCKMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_ANIMALGAETOP
|
||||
1013, // doomednum
|
||||
S_ANIMALGAETOP1, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
48*FRACUNIT, // radius
|
||||
120*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIP|MF_NOBLOCKMAP|MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_ANIMALGAESEG
|
||||
-1, // doomednum
|
||||
S_ANIMALGAESEG, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
48*FRACUNIT, // radius
|
||||
120*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIP|MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_DSZSTALAGMITE
|
||||
1008, // doomednum
|
||||
S_DSZSTALAGMITE, // spawnstate
|
||||
S_DSZSTALAGMITE,// spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
|
@ -10220,12 +10333,12 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
8*FRACUNIT, // radius
|
||||
116*FRACUNIT, // height
|
||||
116*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SCENERY|MF_SOLID, // flags
|
||||
MF_SCENERY|MF_SOLID, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -10247,18 +10360,18 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
8*FRACUNIT, // radius
|
||||
116*FRACUNIT, // height
|
||||
116*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SCENERY|MF_SOLID, // flags
|
||||
MF_SCENERY|MF_SOLID, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_LIGHTBEAM
|
||||
1010, // doomednum
|
||||
S_LIGHTBEAM1, // spawnstate
|
||||
S_LIGHTBEAM1, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
|
@ -10273,7 +10386,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
16*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
|
@ -10339,7 +10452,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
|
||||
{ // MT_FLAMEPARTICLE
|
||||
-1, // doomednum
|
||||
S_FLAMEPARTICLE, // spawnstate
|
||||
S_FLAMEPARTICLE,// spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
|
@ -11461,13 +11574,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
13*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_SCENERY|MF_PAIN|MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -11488,13 +11601,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
15*FRACUNIT, // radius
|
||||
52*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_SCENERY|MF_PAIN|MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -11515,13 +11628,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
13*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_SCENERY|MF_PAIN|MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -11542,13 +11655,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
80*FRACUNIT, // height
|
||||
15*FRACUNIT, // radius
|
||||
52*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_SCENERY|MF_PAIN|MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -11572,7 +11685,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
32*FRACUNIT, // radius
|
||||
96*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
|
@ -11704,13 +11817,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
13*FRACUNIT, // radius
|
||||
28*FRACUNIT, // height
|
||||
0, // display offset
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
MF_SCENERY|MF_PAIN|MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -11731,13 +11844,67 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
15*FRACUNIT, // radius
|
||||
60*FRACUNIT, // height
|
||||
0, // display offset
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
MF_SCENERY|MF_PAIN|MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CACTITINYSEG
|
||||
-1, // doomednum
|
||||
S_CACTITINYSEG, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
13*FRACUNIT, // radius
|
||||
28*FRACUNIT, // height
|
||||
0, // display offset
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_SCENERY|MF_PAIN|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CACTISMALLSEG
|
||||
-1, // doomednum
|
||||
S_CACTISMALLSEG, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
15*FRACUNIT, // radius
|
||||
60*FRACUNIT, // height
|
||||
0, // display offset
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_SCENERY|MF_PAIN|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
|
61
src/info.h
61
src/info.h
|
@ -458,11 +458,11 @@ typedef enum sprite
|
|||
SPR_GARG, // Deep Sea Gargoyle
|
||||
SPR_SEWE, // Deep Sea Seaweed
|
||||
SPR_DRIP, // Dripping water
|
||||
SPR_CRL1, // Coral 1
|
||||
SPR_CRL2, // Coral 2
|
||||
SPR_CRL3, // Coral 3
|
||||
SPR_CORL, // Coral
|
||||
SPR_BCRY, // Blue Crystal
|
||||
SPR_KELP, // Kelp
|
||||
SPR_ALGA, // Animated algae top
|
||||
SPR_ALGB, // Animated algae segment
|
||||
SPR_DSTG, // DSZ Stalagmites
|
||||
SPR_LIBE, // DSZ Light beam
|
||||
|
||||
|
@ -492,7 +492,7 @@ typedef enum sprite
|
|||
// Arid Canyon Scenery
|
||||
SPR_BTBL, // Big tumbleweed
|
||||
SPR_STBL, // Small tumbleweed
|
||||
SPR_CACT, // Cacti sprites
|
||||
SPR_CACT, // Cacti
|
||||
SPR_WWSG, // Caution Sign
|
||||
SPR_WWS2, // Cacti Sign
|
||||
SPR_WWS3, // Sharp Turn Sign
|
||||
|
@ -2289,14 +2289,12 @@ typedef enum state
|
|||
S_DRIPC1,
|
||||
S_DRIPC2,
|
||||
|
||||
// Coral 1
|
||||
// Coral
|
||||
S_CORAL1,
|
||||
|
||||
// Coral 2
|
||||
S_CORAL2,
|
||||
|
||||
// Coral 3
|
||||
S_CORAL3,
|
||||
S_CORAL4,
|
||||
S_CORAL5,
|
||||
|
||||
// Blue Crystal
|
||||
S_BLUECRYSTAL1,
|
||||
|
@ -2304,6 +2302,11 @@ typedef enum state
|
|||
// Kelp,
|
||||
S_KELP,
|
||||
|
||||
// Animated algae
|
||||
S_ANIMALGAETOP1,
|
||||
S_ANIMALGAETOP2,
|
||||
S_ANIMALGAESEG,
|
||||
|
||||
// DSZ Stalagmites
|
||||
S_DSZSTALAGMITE,
|
||||
S_DSZ2STALAGMITE,
|
||||
|
@ -2438,7 +2441,7 @@ typedef enum state
|
|||
S_LITTLETUMBLEWEED_ROLL7,
|
||||
S_LITTLETUMBLEWEED_ROLL8,
|
||||
|
||||
// Cacti Sprites
|
||||
// Cacti
|
||||
S_CACTI1,
|
||||
S_CACTI2,
|
||||
S_CACTI3,
|
||||
|
@ -2450,8 +2453,10 @@ typedef enum state
|
|||
S_CACTI9,
|
||||
S_CACTI10,
|
||||
S_CACTI11,
|
||||
S_CACTITINYSEG,
|
||||
S_CACTISMALLSEG,
|
||||
|
||||
// Warning signs sprites
|
||||
// Warning signs
|
||||
S_ARIDSIGN_CAUTION,
|
||||
S_ARIDSIGN_CACTI,
|
||||
S_ARIDSIGN_SHARPTURN,
|
||||
|
@ -4190,11 +4195,15 @@ typedef enum mobj_type
|
|||
MT_SEAWEED, // DSZ Seaweed
|
||||
MT_WATERDRIP, // Dripping Water source
|
||||
MT_WATERDROP, // Water drop from dripping water
|
||||
MT_CORAL1, // Coral 1
|
||||
MT_CORAL2, // Coral 2
|
||||
MT_CORAL3, // Coral 3
|
||||
MT_CORAL1, // Coral
|
||||
MT_CORAL2,
|
||||
MT_CORAL3,
|
||||
MT_CORAL4,
|
||||
MT_CORAL5,
|
||||
MT_BLUECRYSTAL, // Blue Crystal
|
||||
MT_KELP, // Kelp
|
||||
MT_ANIMALGAETOP, // Animated algae top
|
||||
MT_ANIMALGAESEG, // Animated algae segment
|
||||
MT_DSZSTALAGMITE, // Deep Sea 1 Stalagmite
|
||||
MT_DSZ2STALAGMITE, // Deep Sea 2 Stalagmite
|
||||
MT_LIGHTBEAM, // DSZ Light beam
|
||||
|
@ -4245,17 +4254,19 @@ typedef enum mobj_type
|
|||
// Arid Canyon Scenery
|
||||
MT_BIGTUMBLEWEED,
|
||||
MT_LITTLETUMBLEWEED,
|
||||
MT_CACTI1,
|
||||
MT_CACTI2,
|
||||
MT_CACTI3,
|
||||
MT_CACTI4,
|
||||
MT_CACTI5, // Harmful Cactus 1
|
||||
MT_CACTI6, // Harmful Cactus 2
|
||||
MT_CACTI7, // Harmful Cactus 3
|
||||
MT_CACTI8, // Harmful Cactus 4
|
||||
MT_CACTI9, // Harmful Cactus 5
|
||||
MT_CACTI10, // Harmful Cactus 6
|
||||
MT_CACTI11, // Harmful Cactus 7
|
||||
MT_CACTI1, // Tiny Red Flower Cactus
|
||||
MT_CACTI2, // Small Red Flower Cactus
|
||||
MT_CACTI3, // Tiny Blue Flower Cactus
|
||||
MT_CACTI4, // Small Blue Flower Cactus
|
||||
MT_CACTI5, // Prickly Pear
|
||||
MT_CACTI6, // Barrel Cactus
|
||||
MT_CACTI7, // Tall Barrel Cactus
|
||||
MT_CACTI8, // Armed Cactus
|
||||
MT_CACTI9, // Ball Cactus
|
||||
MT_CACTI10, // Tiny Cactus
|
||||
MT_CACTI11, // Small Cactus
|
||||
MT_CACTITINYSEG, // Tiny Cactus Segment
|
||||
MT_CACTISMALLSEG, // Small Cactus Segment
|
||||
MT_ARIDSIGN_CAUTION, // Caution Sign
|
||||
MT_ARIDSIGN_CACTI, // Cacti Sign
|
||||
MT_ARIDSIGN_SHARPTURN, // Sharp Turn Sign
|
||||
|
|
140
src/m_menu.c
140
src/m_menu.c
|
@ -118,7 +118,7 @@ const char *quitmsg[NUM_QUITMESSAGES];
|
|||
|
||||
// Stuff for customizing the player select screen Tails 09-22-2003
|
||||
description_t description[MAXSKINS];
|
||||
INT16 char_on = -1, startchar = 1;
|
||||
INT16 char_on = -1, startchar = 0;
|
||||
static char *char_notes = NULL;
|
||||
static fixed_t char_scroll = 0;
|
||||
|
||||
|
@ -276,9 +276,10 @@ menu_t MP_MainDef;
|
|||
// Split into multiple parts due to size
|
||||
// Controls
|
||||
menu_t OP_ChangeControlsDef;
|
||||
menu_t OP_MPControlsDef, OP_CameraControlsDef, OP_MiscControlsDef;
|
||||
menu_t OP_MPControlsDef, OP_MiscControlsDef;
|
||||
menu_t OP_P1ControlsDef, OP_P2ControlsDef, OP_MouseOptionsDef;
|
||||
menu_t OP_Mouse2OptionsDef, OP_Joystick1Def, OP_Joystick2Def;
|
||||
menu_t OP_CameraOptionsDef, OP_Camera2OptionsDef;
|
||||
static void M_VideoModeMenu(INT32 choice);
|
||||
static void M_Setup1PControlsMenu(INT32 choice);
|
||||
static void M_Setup2PControlsMenu(INT32 choice);
|
||||
|
@ -1003,13 +1004,11 @@ static menuitem_t OP_P1ControlsMenu[] =
|
|||
{IT_SUBMENU | IT_STRING, NULL, "Mouse Options...", &OP_MouseOptionsDef, 20},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def , 30},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Third-person Camera" , &cv_chasecam , 50},
|
||||
{IT_STRING | IT_CVAR, NULL, "Flip Camera with Gravity" , &cv_flipcam , 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair, 70},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Camera Options...", &OP_CameraOptionsDef, 50},
|
||||
|
||||
//{IT_STRING | IT_CVAR, NULL, "Analog Control", &cv_useranalog, 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Character angle", &cv_directionchar, 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Automatic braking", &cv_autobrake, 100},
|
||||
//{IT_STRING | IT_CVAR, NULL, "Analog Control", &cv_useranalog, 100},
|
||||
{IT_STRING | IT_CVAR, NULL, "Character angle", &cv_directionchar, 70},
|
||||
{IT_STRING | IT_CVAR, NULL, "Automatic braking", &cv_autobrake, 80},
|
||||
};
|
||||
|
||||
static menuitem_t OP_P2ControlsMenu[] =
|
||||
|
@ -1018,13 +1017,11 @@ static menuitem_t OP_P2ControlsMenu[] =
|
|||
{IT_SUBMENU | IT_STRING, NULL, "Second Mouse Options...", &OP_Mouse2OptionsDef, 20},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Second Gamepad Options...", &OP_Joystick2Def , 30},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Third-person Camera" , &cv_chasecam2 , 50},
|
||||
{IT_STRING | IT_CVAR, NULL, "Flip Camera with Gravity" , &cv_flipcam2 , 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair2, 70},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Camera Options...", &OP_Camera2OptionsDef, 50},
|
||||
|
||||
//{IT_STRING | IT_CVAR, NULL, "Analog Control", &cv_useranalog2, 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Character angle", &cv_directionchar2, 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Automatic braking", &cv_autobrake2, 100},
|
||||
//{IT_STRING | IT_CVAR, NULL, "Analog Control", &cv_useranalog2, 100},
|
||||
{IT_STRING | IT_CVAR, NULL, "Character angle", &cv_directionchar2, 70},
|
||||
{IT_STRING | IT_CVAR, NULL, "Automatic braking", &cv_autobrake2, 80},
|
||||
};
|
||||
|
||||
static menuitem_t OP_ChangeControlsMenu[] =
|
||||
|
@ -1153,6 +1150,34 @@ static menuitem_t OP_Mouse2OptionsMenu[] =
|
|||
NULL, "Mouse Y Sensitivity", &cv_mouseysens2, 80},
|
||||
};
|
||||
|
||||
static menuitem_t OP_CameraOptionsMenu[] =
|
||||
{
|
||||
{IT_STRING | IT_CVAR, NULL, "Third-person Camera" , &cv_chasecam , 10},
|
||||
{IT_STRING | IT_CVAR, NULL, "Flip Camera with Gravity" , &cv_flipcam , 20},
|
||||
{IT_STRING | IT_CVAR, NULL, "Orbital Looking" , &cv_cam_orbit , 30},
|
||||
{IT_STRING | IT_CVAR, NULL, "Downhill Slope Adjustment", &cv_cam_adjust, 40},
|
||||
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Distance", &cv_cam_dist, 60},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Height", &cv_cam_height, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Speed", &cv_cam_speed, 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair, 100},
|
||||
};
|
||||
|
||||
static menuitem_t OP_Camera2OptionsMenu[] =
|
||||
{
|
||||
{IT_STRING | IT_CVAR, NULL, "Third-person Camera" , &cv_chasecam2 , 10},
|
||||
{IT_STRING | IT_CVAR, NULL, "Flip Camera with Gravity" , &cv_flipcam2 , 20},
|
||||
{IT_STRING | IT_CVAR, NULL, "Orbital Looking" , &cv_cam2_orbit , 30},
|
||||
{IT_STRING | IT_CVAR, NULL, "Downhill Slope Adjustment", &cv_cam2_adjust, 40},
|
||||
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Distance", &cv_cam2_dist, 60},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Height", &cv_cam2_height, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Speed", &cv_cam2_speed, 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair2, 100},
|
||||
};
|
||||
|
||||
static menuitem_t OP_VideoOptionsMenu[] =
|
||||
{
|
||||
{IT_HEADER, NULL, "Screen", NULL, 0},
|
||||
|
@ -1363,36 +1388,39 @@ static menuitem_t OP_ScreenshotOptionsMenu[] =
|
|||
{
|
||||
{IT_HEADER, NULL, "General", NULL, 0},
|
||||
{IT_STRING|IT_CVAR, NULL, "Use color profile", &cv_screenshot_colorprofile, 6},
|
||||
{IT_STRING|IT_CVAR, NULL, "Storage Location", &cv_screenshot_option, 11},
|
||||
{IT_STRING|IT_CVAR|IT_CV_STRING, NULL, "Custom Folder", &cv_screenshot_folder, 16},
|
||||
|
||||
{IT_HEADER, NULL, "Screenshots (F8)", NULL, 30},
|
||||
{IT_STRING|IT_CVAR, NULL, "Memory Level", &cv_zlib_memory, 36},
|
||||
{IT_STRING|IT_CVAR, NULL, "Compression Level", &cv_zlib_level, 41},
|
||||
{IT_STRING|IT_CVAR, NULL, "Strategy", &cv_zlib_strategy, 46},
|
||||
{IT_STRING|IT_CVAR, NULL, "Window Size", &cv_zlib_window_bits, 51},
|
||||
{IT_HEADER, NULL, "Screenshots (F8)", NULL, 16},
|
||||
{IT_STRING|IT_CVAR, NULL, "Storage Location", &cv_screenshot_option, 22},
|
||||
{IT_STRING|IT_CVAR|IT_CV_STRING, NULL, "Custom Folder", &cv_screenshot_folder, 27},
|
||||
{IT_STRING|IT_CVAR, NULL, "Memory Level", &cv_zlib_memory, 42},
|
||||
{IT_STRING|IT_CVAR, NULL, "Compression Level", &cv_zlib_level, 47},
|
||||
{IT_STRING|IT_CVAR, NULL, "Strategy", &cv_zlib_strategy, 52},
|
||||
{IT_STRING|IT_CVAR, NULL, "Window Size", &cv_zlib_window_bits, 57},
|
||||
|
||||
{IT_HEADER, NULL, "Movie Mode (F9)", NULL, 60},
|
||||
{IT_STRING|IT_CVAR, NULL, "Capture Mode", &cv_moviemode, 66},
|
||||
{IT_HEADER, NULL, "Movie Mode (F9)", NULL, 64},
|
||||
{IT_STRING|IT_CVAR, NULL, "Storage Location", &cv_movie_option, 70},
|
||||
{IT_STRING|IT_CVAR|IT_CV_STRING, NULL, "Custom Folder", &cv_movie_folder, 75},
|
||||
{IT_STRING|IT_CVAR, NULL, "Capture Mode", &cv_moviemode, 90},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Region Optimizing", &cv_gif_optimize, 71},
|
||||
{IT_STRING|IT_CVAR, NULL, "Downscaling", &cv_gif_downscale, 76},
|
||||
{IT_STRING|IT_CVAR, NULL, "Region Optimizing", &cv_gif_optimize, 95},
|
||||
{IT_STRING|IT_CVAR, NULL, "Downscaling", &cv_gif_downscale, 100},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Memory Level", &cv_zlib_memorya, 71},
|
||||
{IT_STRING|IT_CVAR, NULL, "Compression Level", &cv_zlib_levela, 76},
|
||||
{IT_STRING|IT_CVAR, NULL, "Strategy", &cv_zlib_strategya, 81},
|
||||
{IT_STRING|IT_CVAR, NULL, "Window Size", &cv_zlib_window_bitsa, 86},
|
||||
{IT_STRING|IT_CVAR, NULL, "Memory Level", &cv_zlib_memorya, 95},
|
||||
{IT_STRING|IT_CVAR, NULL, "Compression Level", &cv_zlib_levela, 100},
|
||||
{IT_STRING|IT_CVAR, NULL, "Strategy", &cv_zlib_strategya, 105},
|
||||
{IT_STRING|IT_CVAR, NULL, "Window Size", &cv_zlib_window_bitsa, 110},
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
op_screenshot_colorprofile = 1,
|
||||
op_screenshot_folder = 3,
|
||||
op_screenshot_capture = 10,
|
||||
op_screenshot_gif_start = 11,
|
||||
op_screenshot_gif_end = 12,
|
||||
op_screenshot_apng_start = 13,
|
||||
op_screenshot_apng_end = 16,
|
||||
op_screenshot_folder = 4,
|
||||
op_movie_folder = 11,
|
||||
op_screenshot_capture = 12,
|
||||
op_screenshot_gif_start = 13,
|
||||
op_screenshot_gif_end = 14,
|
||||
op_screenshot_apng_start = 15,
|
||||
op_screenshot_apng_end = 18,
|
||||
};
|
||||
|
||||
static menuitem_t OP_EraseDataMenu[] =
|
||||
|
@ -1887,6 +1915,13 @@ menu_t OP_JoystickSetDef =
|
|||
0,
|
||||
NULL
|
||||
};
|
||||
menu_t OP_CameraOptionsDef = DEFAULTMENUSTYLE(
|
||||
MN_OP_MAIN + (MN_OP_P1CONTROLS << 6) + (MN_OP_P1CAMERA << 12),
|
||||
"M_CONTRO", OP_CameraOptionsMenu, &OP_P1ControlsDef, 35, 30);
|
||||
menu_t OP_Camera2OptionsDef = DEFAULTMENUSTYLE(
|
||||
MN_OP_MAIN + (MN_OP_P2CONTROLS << 6) + (MN_OP_P2CAMERA << 12),
|
||||
"M_CONTRO", OP_Camera2OptionsMenu, &OP_P2ControlsDef, 35, 30);
|
||||
|
||||
|
||||
menu_t OP_VideoOptionsDef =
|
||||
{
|
||||
|
@ -2210,6 +2245,12 @@ void Addons_option_Onchange(void)
|
|||
(cv_addons_option.value == 3 ? IT_CVAR|IT_STRING|IT_CV_STRING : IT_DISABLED);
|
||||
}
|
||||
|
||||
void Moviemode_option_Onchange(void)
|
||||
{
|
||||
OP_ScreenshotOptionsMenu[op_movie_folder].status =
|
||||
(cv_movie_option.value == 3 ? IT_CVAR|IT_STRING|IT_CV_STRING : IT_DISABLED);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// END ORGANIZATION STUFF.
|
||||
// ==========================================================================
|
||||
|
@ -2748,13 +2789,27 @@ static void M_ChangeCvar(INT32 choice)
|
|||
||((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_INVISSLIDER)
|
||||
||((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_NOMOD))
|
||||
{
|
||||
CV_SetValue(cv,cv->value+(choice));
|
||||
if (cv->flags & CV_FLOAT && (currentMenu->menuitems[itemOn].status & IT_CV_FLOATSLIDER) == IT_CV_FLOATSLIDER)
|
||||
{
|
||||
char s[20];
|
||||
sprintf(s,"%f",FIXED_TO_FLOAT(cv->value)+(choice)*(1.0f/16.0f));
|
||||
CV_Set(cv,s);
|
||||
}
|
||||
else
|
||||
CV_SetValue(cv,cv->value+(choice));
|
||||
}
|
||||
else if (cv->flags & CV_FLOAT)
|
||||
{
|
||||
char s[20];
|
||||
sprintf(s,"%f",FIXED_TO_FLOAT(cv->value)+(choice)*(1.0f/16.0f));
|
||||
CV_Set(cv,s);
|
||||
if (currentMenu->menuitems[itemOn].status & IT_CV_INTEGERSTEP)
|
||||
{
|
||||
CV_SetValue(cv,FIXED_TO_FLOAT(cv->value)+(choice));
|
||||
}
|
||||
else
|
||||
{
|
||||
char s[20];
|
||||
sprintf(s,"%f",FIXED_TO_FLOAT(cv->value)+(choice)*(1.0f/16.0f));
|
||||
CV_Set(cv,s);
|
||||
}
|
||||
}
|
||||
else
|
||||
CV_AddValue(cv,choice);
|
||||
|
@ -3644,7 +3699,12 @@ static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv, boolean ontop)
|
|||
|
||||
for (i = 0; cv->PossibleValue[i+1].strvalue; i++);
|
||||
|
||||
if ((range = atoi(cv->defaultvalue)) != cv->value)
|
||||
if (cv->flags & CV_FLOAT)
|
||||
range = (INT32)(atof(cv->defaultvalue)*FRACUNIT);
|
||||
else
|
||||
range = atoi(cv->defaultvalue);
|
||||
|
||||
if (range != cv->value)
|
||||
{
|
||||
range = ((range - cv->PossibleValue[0].value) * 100 /
|
||||
(cv->PossibleValue[i].value - cv->PossibleValue[0].value));
|
||||
|
|
|
@ -72,10 +72,12 @@ typedef enum
|
|||
MN_OP_P1MOUSE,
|
||||
MN_OP_P1JOYSTICK,
|
||||
MN_OP_JOYSTICKSET, // OP_JoystickSetDef shared with P2
|
||||
MN_OP_P1CAMERA,
|
||||
|
||||
MN_OP_P2CONTROLS,
|
||||
MN_OP_P2MOUSE,
|
||||
MN_OP_P2JOYSTICK,
|
||||
MN_OP_P2CAMERA,
|
||||
|
||||
MN_OP_VIDEO,
|
||||
MN_OP_VIDEOMODE,
|
||||
|
@ -242,6 +244,8 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt);
|
|||
#define IT_CV_NOPRINT 1536
|
||||
#define IT_CV_NOMOD 2048
|
||||
#define IT_CV_INVISSLIDER 2560
|
||||
#define IT_CV_INTEGERSTEP 4096 // if IT_CV_NORMAL and cvar is CV_FLOAT, modify it by 1 instead of 0.0625
|
||||
#define IT_CV_FLOATSLIDER 4608 // IT_CV_SLIDER, value modified by 0.0625 instead of 1 (for CV_FLOAT cvars)
|
||||
|
||||
//call/submenu specific
|
||||
// There used to be a lot more here but ...
|
||||
|
@ -397,6 +401,9 @@ void Screenshot_option_Onchange(void);
|
|||
// Addons menu updating
|
||||
void Addons_option_Onchange(void);
|
||||
|
||||
// Moviemode menu updating
|
||||
void Moviemode_option_Onchange(void);
|
||||
|
||||
// These defines make it a little easier to make menus
|
||||
#define DEFAULTMENUSTYLE(id, header, source, prev, x, y)\
|
||||
{\
|
||||
|
|
44
src/m_misc.c
44
src/m_misc.c
|
@ -108,6 +108,9 @@ consvar_t cv_screenshot_colorprofile = {"screenshot_colorprofile", "Yes", CV_SAV
|
|||
static CV_PossibleValue_t moviemode_cons_t[] = {{MM_GIF, "GIF"}, {MM_APNG, "aPNG"}, {MM_SCREENSHOT, "Screenshots"}, {0, NULL}};
|
||||
consvar_t cv_moviemode = {"moviemode_mode", "GIF", CV_SAVE|CV_CALL, moviemode_cons_t, Moviemode_mode_Onchange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_movie_option = {"movie_option", "Default", CV_SAVE|CV_CALL, screenshot_cons_t, Moviemode_option_Onchange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_movie_folder = {"movie_folder", "", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t zlib_mem_level_t[] = {
|
||||
{1, "(Min Memory) 1"},
|
||||
{2, "2"}, {3, "3"}, {4, "4"}, {5, "5"}, {6, "6"}, {7, "7"},
|
||||
|
@ -1124,19 +1127,25 @@ static inline moviemode_t M_StartMovieGIF(const char *pathname)
|
|||
void M_StartMovie(void)
|
||||
{
|
||||
#if NUMSCREENS > 2
|
||||
const char *pathname = ".";
|
||||
char pathname[MAX_WADPATH];
|
||||
|
||||
if (moviemode)
|
||||
return;
|
||||
|
||||
if (cv_screenshot_option.value == 0)
|
||||
pathname = usehome ? srb2home : srb2path;
|
||||
else if (cv_screenshot_option.value == 1)
|
||||
pathname = srb2home;
|
||||
else if (cv_screenshot_option.value == 2)
|
||||
pathname = srb2path;
|
||||
else if (cv_screenshot_option.value == 3 && *cv_screenshot_folder.string != '\0')
|
||||
pathname = cv_screenshot_folder.string;
|
||||
if (cv_movie_option.value == 0)
|
||||
strcpy(pathname, usehome ? srb2home : srb2path);
|
||||
else if (cv_movie_option.value == 1)
|
||||
strcpy(pathname, srb2home);
|
||||
else if (cv_movie_option.value == 2)
|
||||
strcpy(pathname, srb2path);
|
||||
else if (cv_movie_option.value == 3 && *cv_movie_folder.string != '\0')
|
||||
strcpy(pathname, cv_movie_folder.string);
|
||||
|
||||
if (cv_movie_option.value != 3)
|
||||
{
|
||||
strcat(pathname, PATHSEP"movies"PATHSEP);
|
||||
I_mkdir(pathname, 0755);
|
||||
}
|
||||
|
||||
if (rendermode == render_none)
|
||||
I_Error("Can't make a movie without a render system\n");
|
||||
|
@ -1474,7 +1483,8 @@ void M_ScreenShot(void)
|
|||
void M_DoScreenShot(void)
|
||||
{
|
||||
#if NUMSCREENS > 2
|
||||
const char *freename = NULL, *pathname = ".";
|
||||
const char *freename = NULL;
|
||||
char pathname[MAX_WADPATH];
|
||||
boolean ret = false;
|
||||
UINT8 *linear = NULL;
|
||||
|
||||
|
@ -1486,13 +1496,19 @@ void M_DoScreenShot(void)
|
|||
return;
|
||||
|
||||
if (cv_screenshot_option.value == 0)
|
||||
pathname = usehome ? srb2home : srb2path;
|
||||
strcpy(pathname, usehome ? srb2home : srb2path);
|
||||
else if (cv_screenshot_option.value == 1)
|
||||
pathname = srb2home;
|
||||
strcpy(pathname, srb2home);
|
||||
else if (cv_screenshot_option.value == 2)
|
||||
pathname = srb2path;
|
||||
strcpy(pathname, srb2path);
|
||||
else if (cv_screenshot_option.value == 3 && *cv_screenshot_folder.string != '\0')
|
||||
pathname = cv_screenshot_folder.string;
|
||||
strcpy(pathname, cv_screenshot_folder.string);
|
||||
|
||||
if (cv_screenshot_option.value != 3)
|
||||
{
|
||||
strcat(pathname, PATHSEP"screenshots"PATHSEP);
|
||||
I_mkdir(pathname, 0755);
|
||||
}
|
||||
|
||||
#ifdef USE_PNG
|
||||
freename = Newsnapshotfile(pathname,"png");
|
||||
|
|
|
@ -30,7 +30,7 @@ typedef enum {
|
|||
extern moviemode_t moviemode;
|
||||
|
||||
extern consvar_t cv_screenshot_option, cv_screenshot_folder, cv_screenshot_colorprofile;
|
||||
extern consvar_t cv_moviemode;
|
||||
extern consvar_t cv_moviemode, cv_movie_folder, cv_movie_option;
|
||||
extern consvar_t cv_zlib_memory, cv_zlib_level, cv_zlib_strategy, cv_zlib_window_bits;
|
||||
extern consvar_t cv_zlib_memorya, cv_zlib_levela, cv_zlib_strategya, cv_zlib_window_bitsa;
|
||||
extern consvar_t cv_apng_delay;
|
||||
|
|
|
@ -1701,13 +1701,15 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
return;
|
||||
if (mariomode)
|
||||
return;
|
||||
if (special->state-states != S_EXTRALARGEBUBBLE)
|
||||
return; // Don't grab the bubble during its spawn animation
|
||||
else if (toucher->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
if (special->z+special->height < toucher->z + toucher->height / 3
|
||||
|| special->z+special->height > toucher->z + (toucher->height*2/3))
|
||||
if (special->z+special->height < toucher->z
|
||||
|| special->z+special->height > toucher->z + (toucher->height*2/3))
|
||||
return; // Only go in the mouth
|
||||
}
|
||||
else if (special->z < toucher->z + toucher->height / 3
|
||||
else if (special->z < toucher->z
|
||||
|| special->z > toucher->z + (toucher->height*2/3))
|
||||
return; // Only go in the mouth
|
||||
|
||||
|
|
|
@ -115,10 +115,10 @@ typedef struct camera_s
|
|||
|
||||
extern camera_t camera, camera2;
|
||||
extern consvar_t cv_cam_dist, cv_cam_still, cv_cam_height;
|
||||
extern consvar_t cv_cam_speed, cv_cam_rotate, cv_cam_rotspeed;
|
||||
extern consvar_t cv_cam_speed, cv_cam_rotate, cv_cam_rotspeed, cv_cam_orbit, cv_cam_adjust;
|
||||
|
||||
extern consvar_t cv_cam2_dist, cv_cam2_still, cv_cam2_height;
|
||||
extern consvar_t cv_cam2_speed, cv_cam2_rotate, cv_cam2_rotspeed;
|
||||
extern consvar_t cv_cam2_speed, cv_cam2_rotate, cv_cam2_rotspeed, cv_cam2_orbit, cv_cam2_adjust;
|
||||
|
||||
extern fixed_t t_cam_dist, t_cam_height, t_cam_rotate;
|
||||
extern fixed_t t_cam2_dist, t_cam2_height, t_cam2_rotate;
|
||||
|
|
|
@ -2881,11 +2881,8 @@ static boolean P_ThingHeightClip(mobj_t *thing)
|
|||
thing->z = thing->ceilingz - thing->height;
|
||||
}
|
||||
|
||||
if (thing->z != oldz)
|
||||
{
|
||||
if (thing->player)
|
||||
P_PlayerHitFloor(thing->player, !onfloor);
|
||||
}
|
||||
if (P_MobjFlip(thing)*(thing->z - oldz) > 0 && thing->player)
|
||||
P_PlayerHitFloor(thing->player, !onfloor);
|
||||
|
||||
// debug: be sure it falls to the floor
|
||||
thing->eflags &= ~MFE_ONGROUND;
|
||||
|
@ -3199,7 +3196,7 @@ static boolean P_IsClimbingValid(player_t *player, angle_t angle)
|
|||
&& glidesector->sector->ceilingpic == skyflatnum)
|
||||
return false;
|
||||
|
||||
if ((player->mo->z + FixedMul(16*FRACUNIT,player->mo->scale) < ceilingz)
|
||||
if ((player->mo->z + FixedMul(16*FRACUNIT,player->mo->scale) < floorz)
|
||||
|| (player->mo->z >= ceilingz))
|
||||
floorclimb = true;
|
||||
}
|
||||
|
|
57
src/p_mobj.c
57
src/p_mobj.c
|
@ -2381,22 +2381,42 @@ boolean P_CheckDeathPitCollide(mobj_t *mo)
|
|||
|
||||
boolean P_CheckSolidLava(mobj_t *mo, ffloor_t *rover)
|
||||
{
|
||||
fixed_t topheight;
|
||||
|
||||
I_Assert(mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
||||
{
|
||||
fixed_t topheight =
|
||||
#ifdef ESLOPE
|
||||
*rover->t_slope ? P_GetZAt(*rover->t_slope, mo->x, mo->y) :
|
||||
#endif
|
||||
*rover->topheight;
|
||||
// not a lava block with solid planes
|
||||
if (!(rover->flags & FF_SWIMMABLE && GETSECSPECIAL(rover->master->frontsector->special, 1) == 3
|
||||
&& !(rover->master->flags & ML_BLOCKMONSTERS)))
|
||||
return false;
|
||||
|
||||
if (rover->flags & FF_SWIMMABLE && GETSECSPECIAL(rover->master->frontsector->special, 1) == 3
|
||||
&& !(rover->master->flags & ML_BLOCKMONSTERS)
|
||||
&& ((rover->master->flags & ML_EFFECT3) || mo->z-mo->momz > topheight - FixedMul(16*FRACUNIT, mo->scale)))
|
||||
// is solid from the sides
|
||||
if (rover->master->flags & ML_EFFECT3)
|
||||
return true;
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
topheight =
|
||||
#ifdef ESLOPE
|
||||
*rover->b_slope ? P_GetZAt(*rover->b_slope, mo->x, mo->y) :
|
||||
#endif
|
||||
*rover->bottomheight;
|
||||
|
||||
if (mo->z+mo->height-mo->momz < topheight + FixedMul(16*FRACUNIT, mo->scale))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
topheight =
|
||||
#ifdef ESLOPE
|
||||
*rover->t_slope ? P_GetZAt(*rover->t_slope, mo->x, mo->y) :
|
||||
#endif
|
||||
*rover->topheight;
|
||||
|
||||
if (mo->z-mo->momz > topheight - FixedMul(16*FRACUNIT, mo->scale))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3760,7 +3780,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
|
||||
if (thiscam->momx || thiscam->momy)
|
||||
{
|
||||
if (!P_TryCameraMove(thiscam->x + thiscam->momx, thiscam->y + thiscam->momy, thiscam))
|
||||
if (!P_TryCameraMove(thiscam->x + thiscam->momx, thiscam->y + thiscam->momy, thiscam)) // Thanks for the greatly improved camera, Lach -- Sev
|
||||
{ // Never fails for 2D mode.
|
||||
mobj_t dummy;
|
||||
dummy.thinker.function.acp1 = (actionf_p1)P_MobjThinker;
|
||||
|
@ -3770,9 +3790,22 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
dummy.z = thiscam->z;
|
||||
dummy.height = thiscam->height;
|
||||
if (!resetcalled && !(player->pflags & PF_NOCLIP) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead.
|
||||
{
|
||||
P_ResetCamera(player, thiscam);
|
||||
resetcalled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
fixed_t camspeed = P_AproxDistance(thiscam->momx, thiscam->momy);
|
||||
|
||||
P_SlideCameraMove(thiscam);
|
||||
|
||||
if (!resetcalled && P_AproxDistance(thiscam->momx, thiscam->momy) == camspeed)
|
||||
{
|
||||
P_ResetCamera(player, thiscam);
|
||||
resetcalled = true;
|
||||
}
|
||||
}
|
||||
if (resetcalled) // Okay this means the camera is fully reset.
|
||||
return true;
|
||||
}
|
||||
|
@ -3981,6 +4014,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
}
|
||||
else
|
||||
{
|
||||
#if 0 // i don't know why this is here, it's causing a few undesired state glitches, and disabling it doesn't appear to negatively affect the game, but i don't want it gone permanently just in case some obscure bug crops up
|
||||
if (!(mobj->player->powers[pw_carry] == CR_NIGHTSMODE)) // used for drilling
|
||||
mobj->player->pflags &= ~PF_STARTJUMP;
|
||||
mobj->player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||
|
@ -3990,6 +4024,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
mobj->player->powers[pw_tailsfly] = 0;
|
||||
P_SetPlayerMobjState(mobj, S_PLAY_WALK);
|
||||
}
|
||||
#endif
|
||||
mobj->eflags &= ~MFE_JUSTHITFLOOR;
|
||||
}
|
||||
|
||||
|
@ -10412,7 +10447,7 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
mobj_t *mobj;
|
||||
|
||||
if (p->playerstate == PST_REBORN)
|
||||
G_PlayerReborn(playernum);
|
||||
G_PlayerReborn(playernum, false);
|
||||
|
||||
// spawn as spectator determination
|
||||
if (!G_GametypeHasSpectators())
|
||||
|
|
|
@ -2246,6 +2246,8 @@ static void P_LevelInitStuff(void)
|
|||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
G_PlayerReborn(i, true);
|
||||
|
||||
if (canresetlives && (netgame || multiplayer) && playeringame[i] && (gametype == GT_COMPETITION || players[i].lives <= 0))
|
||||
{
|
||||
// In Co-Op, replenish a user's lives if they are depleted.
|
||||
|
@ -2253,42 +2255,18 @@ static void P_LevelInitStuff(void)
|
|||
}
|
||||
|
||||
// obliteration station...
|
||||
players[i].spheres =\
|
||||
players[i].xtralife = players[i].deadtimer =\
|
||||
players[i].numboxes = players[i].totalring =\
|
||||
players[i].laps = players[i].aiming =\
|
||||
players[i].losstime = players[i].timeshit =\
|
||||
players[i].marescore = players[i].lastmarescore =\
|
||||
players[i].maxlink = players[i].startedtime =\
|
||||
players[i].finishedtime = players[i].finishedspheres =\
|
||||
players[i].finishedrings = players[i].lastmare =\
|
||||
players[i].lastmarelap = players[i].lastmarebonuslap =\
|
||||
players[i].totalmarelap = players[i].totalmarebonuslap =\
|
||||
players[i].marebegunat = players[i].textvar =\
|
||||
players[i].texttimer = players[i].linkcount =\
|
||||
players[i].linktimer = players[i].flyangle =\
|
||||
players[i].anotherflyangle = players[i].nightstime =\
|
||||
players[i].oldscale = players[i].mare = players[i].marelap =\
|
||||
players[i].marebonuslap = players[i].lapbegunat =\
|
||||
players[i].lapstartedtime = players[i].totalmarescore =\
|
||||
players[i].realtime = players[i].exiting = 0;
|
||||
players[i].numboxes = players[i].totalring =\
|
||||
players[i].laps = players[i].marescore = players[i].lastmarescore =\
|
||||
players[i].mare = players[i].exiting = 0;
|
||||
|
||||
// i guess this could be part of the above but i feel mildly uncomfortable implicitly casting
|
||||
players[i].gotcontinue = false;
|
||||
|
||||
// aha, the first evidence this shouldn't be a memset!
|
||||
players[i].drillmeter = 40*20;
|
||||
players[i].rings = (ultimatemode ? 0 : mapheaderinfo[gamemap-1]->startrings);
|
||||
|
||||
P_ResetPlayer(&players[i]);
|
||||
// hit these too
|
||||
players[i].pflags &= ~(PF_GAMETYPEOVER|PF_TRANSFERTOCLOSEST);
|
||||
|
||||
// unset ALL the pointers. P_SetTarget isn't needed here because if this
|
||||
// function is being called we're just going to clobber the data anyways
|
||||
players[i].mo = players[i].followmobj = players[i].awayviewmobj =\
|
||||
players[i].capsule = players[i].axis1 = players[i].axis2 = players[i].drone = NULL;
|
||||
players[i].pflags &= ~(PF_GAMETYPEOVER);
|
||||
}
|
||||
|
||||
if (botingame)
|
||||
CV_SetValue(&cv_analog2, true);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
404
src/p_user.c
404
src/p_user.c
|
@ -1109,7 +1109,7 @@ boolean P_PlayerCanDamage(player_t *player, mobj_t *thing)
|
|||
}
|
||||
else if (P_MobjFlip(player->mo)*(topheight - (thing->z + thing->height/2)) < 0)
|
||||
{
|
||||
if (player->charability == CA_FLY && player->panim == PA_ABILITY && (P_MobjFlip(player->mo)*(player->mo->momz - thing->momz) > 0))
|
||||
if (player->charability == CA_FLY && player->panim == PA_ABILITY && !(player->mo->eflags & MFE_UNDERWATER) && (P_MobjFlip(player->mo)*(player->mo->momz - thing->momz) > 0))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2217,148 +2217,153 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
|||
player->pflags &= ~PF_SPINNING;
|
||||
}
|
||||
|
||||
if (player->pflags & PF_SPINNING)
|
||||
{
|
||||
if (player->mo->state-states != S_PLAY_ROLL && !(player->pflags & PF_STARTDASH))
|
||||
{
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||
S_StartSound(player->mo, sfx_spin);
|
||||
}
|
||||
}
|
||||
else if (player->pflags & PF_GLIDING) // ground gliding
|
||||
{
|
||||
if (dorollstuff)
|
||||
{
|
||||
player->skidtime = TICRATE;
|
||||
player->mo->tics = -1;
|
||||
}
|
||||
else if (!player->skidtime)
|
||||
player->pflags &= ~PF_GLIDING;
|
||||
}
|
||||
else if (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
||||
{
|
||||
if (player->mo->state-states != S_PLAY_MELEE_LANDING)
|
||||
{
|
||||
mobjtype_t type = player->revitem;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_MELEE_LANDING);
|
||||
player->mo->tics = (player->mo->movefactor == FRACUNIT) ? TICRATE/2 : (FixedDiv(35<<(FRACBITS-1), FixedSqrt(player->mo->movefactor)))>>FRACBITS;
|
||||
S_StartSound(player->mo, sfx_s3k8b);
|
||||
player->pflags |= PF_FULLSTASIS;
|
||||
|
||||
// hearticles
|
||||
if (type)
|
||||
{
|
||||
UINT8 i = 0;
|
||||
angle_t throwang = -(2*ANG30);
|
||||
fixed_t xo = P_ReturnThrustX(player->mo, player->drawangle, 16*player->mo->scale);
|
||||
fixed_t yo = P_ReturnThrustY(player->mo, player->drawangle, 16*player->mo->scale);
|
||||
fixed_t zo = 6*player->mo->scale;
|
||||
fixed_t mu = FixedMul(player->maxdash, player->mo->scale);
|
||||
fixed_t mu2 = FixedHypot(player->mo->momx, player->mo->momy);
|
||||
fixed_t ev;
|
||||
mobj_t *missile = NULL;
|
||||
if (mu2 < mu)
|
||||
mu2 = mu;
|
||||
ev = (50*FRACUNIT - (mu/25))/50;
|
||||
while (i < 5)
|
||||
{
|
||||
missile = P_SpawnMobjFromMobj(player->mo, xo, yo, zo, type);
|
||||
P_SetTarget(&missile->target, player->mo);
|
||||
missile->angle = throwang + player->drawangle;
|
||||
P_Thrust(missile, player->drawangle + ANGLE_90,
|
||||
P_ReturnThrustY(missile, throwang, mu)); // side to side component
|
||||
P_Thrust(missile, player->drawangle, mu2); // forward component
|
||||
P_SetObjectMomZ(missile, (4 + ((i&1)<<1))*FRACUNIT, true);
|
||||
missile->momz += player->mo->pmomz;
|
||||
missile->fuse = TICRATE/2;
|
||||
missile->extravalue2 = ev;
|
||||
|
||||
i++;
|
||||
throwang += ANG30;
|
||||
}
|
||||
if (mobjinfo[type].seesound && missile)
|
||||
S_StartSound(missile, missile->info->seesound);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (player->charability2 == CA2_GUNSLINGER && player->panim == PA_ABILITY2)
|
||||
;
|
||||
else if (player->panim != PA_IDLE && player->panim != PA_WALK && player->panim != PA_RUN && player->panim != PA_DASH)
|
||||
{
|
||||
if (player->cmomx || player->cmomy)
|
||||
{
|
||||
if (player->charflags & SF_DASHMODE && player->dashmode >= 3*TICRATE && player->panim != PA_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||
else if (player->speed >= FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (player->panim != PA_RUN || player->mo->state-states == S_PLAY_FLOAT_RUN))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
else if ((player->rmomx || player->rmomy)
|
||||
&& (player->panim != PA_WALK || player->mo->state-states == S_PLAY_FLOAT))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
else if (!player->rmomx && !player->rmomy && player->panim != PA_IDLE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->charflags & SF_DASHMODE && player->dashmode >= 3*TICRATE && player->panim != PA_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||
else if (player->speed >= FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (player->panim != PA_RUN || player->mo->state-states == S_PLAY_FLOAT_RUN))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
else if ((player->mo->momx || player->mo->momy)
|
||||
&& (player->panim != PA_WALK || player->mo->state-states == S_PLAY_FLOAT))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
else if (!player->mo->momx && !player->mo->momy && player->panim != PA_IDLE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
}
|
||||
}
|
||||
|
||||
if (!(player->pflags & PF_GLIDING))
|
||||
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||
player->pflags &= ~(PF_STARTJUMP|PF_THOKKED|PF_CANCARRY/*|PF_GLIDING*/);
|
||||
player->secondjump = 0;
|
||||
player->glidetime = 0;
|
||||
player->climbing = 0;
|
||||
player->powers[pw_tailsfly] = 0;
|
||||
|
||||
if (player->pflags & PF_SHIELDABILITY)
|
||||
{
|
||||
player->pflags &= ~PF_SHIELDABILITY;
|
||||
|
||||
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL) // Elemental shield's stomp attack.
|
||||
{
|
||||
if (player->mo->eflags & (MFE_UNDERWATER|MFE_TOUCHWATER)) // play a blunt sound
|
||||
S_StartSound(player->mo, sfx_s3k4c);
|
||||
else // create a fire pattern on the ground
|
||||
{
|
||||
S_StartSound(player->mo, sfx_s3k47);
|
||||
P_ElementalFire(player, true);
|
||||
}
|
||||
P_SetObjectMomZ(player->mo,
|
||||
(player->mo->eflags & MFE_UNDERWATER)
|
||||
? 6*FRACUNIT/5
|
||||
: 5*FRACUNIT/2,
|
||||
false);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||
player->mo->momx = player->mo->momy = 0;
|
||||
clipmomz = false;
|
||||
}
|
||||
else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) // Bubble shield's bounce attack.
|
||||
{
|
||||
P_DoBubbleBounce(player);
|
||||
clipmomz = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (player->pflags & PF_BOUNCING)
|
||||
{
|
||||
P_MobjCheckWater(player->mo);
|
||||
player->mo->momz *= -1;
|
||||
P_DoAbilityBounce(player, true);
|
||||
if (player->scoreadd)
|
||||
player->scoreadd--;
|
||||
if (dorollstuff && player->mo->state-states != S_PLAY_BOUNCE_LANDING)
|
||||
{
|
||||
P_MobjCheckWater(player->mo);
|
||||
player->mo->momz *= -1;
|
||||
P_DoAbilityBounce(player, true);
|
||||
if (player->scoreadd)
|
||||
player->scoreadd--;
|
||||
}
|
||||
clipmomz = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->pflags & PF_SPINNING)
|
||||
{
|
||||
if (player->mo->state-states != S_PLAY_ROLL && !(player->pflags & PF_STARTDASH))
|
||||
{
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||
S_StartSound(player->mo, sfx_spin);
|
||||
}
|
||||
}
|
||||
else if (player->pflags & PF_GLIDING) // ground gliding
|
||||
{
|
||||
if (dorollstuff)
|
||||
{
|
||||
player->skidtime = TICRATE;
|
||||
player->mo->tics = -1;
|
||||
}
|
||||
else if (!player->skidtime)
|
||||
player->pflags &= ~PF_GLIDING;
|
||||
}
|
||||
else if (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
||||
{
|
||||
if (player->mo->state-states != S_PLAY_MELEE_LANDING)
|
||||
{
|
||||
mobjtype_t type = player->revitem;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_MELEE_LANDING);
|
||||
player->mo->tics = (player->mo->movefactor == FRACUNIT) ? TICRATE/2 : (FixedDiv(35<<(FRACBITS-1), FixedSqrt(player->mo->movefactor)))>>FRACBITS;
|
||||
S_StartSound(player->mo, sfx_s3k8b);
|
||||
player->pflags |= PF_FULLSTASIS;
|
||||
|
||||
// hearticles
|
||||
if (type)
|
||||
{
|
||||
UINT8 i = 0;
|
||||
angle_t throwang = -(2*ANG30);
|
||||
fixed_t xo = P_ReturnThrustX(player->mo, player->drawangle, 16*player->mo->scale);
|
||||
fixed_t yo = P_ReturnThrustY(player->mo, player->drawangle, 16*player->mo->scale);
|
||||
fixed_t zo = 6*player->mo->scale;
|
||||
fixed_t mu = FixedMul(player->maxdash, player->mo->scale);
|
||||
fixed_t mu2 = FixedHypot(player->mo->momx, player->mo->momy);
|
||||
fixed_t ev;
|
||||
mobj_t *missile = NULL;
|
||||
if (mu2 < mu)
|
||||
mu2 = mu;
|
||||
ev = (50*FRACUNIT - (mu/25))/50;
|
||||
while (i < 5)
|
||||
{
|
||||
missile = P_SpawnMobjFromMobj(player->mo, xo, yo, zo, type);
|
||||
P_SetTarget(&missile->target, player->mo);
|
||||
missile->angle = throwang + player->drawangle;
|
||||
P_Thrust(missile, player->drawangle + ANGLE_90,
|
||||
P_ReturnThrustY(missile, throwang, mu)); // side to side component
|
||||
P_Thrust(missile, player->drawangle, mu2); // forward component
|
||||
P_SetObjectMomZ(missile, (4 + ((i&1)<<1))*FRACUNIT, true);
|
||||
missile->momz += player->mo->pmomz;
|
||||
missile->fuse = TICRATE/2;
|
||||
missile->extravalue2 = ev;
|
||||
|
||||
i++;
|
||||
throwang += ANG30;
|
||||
}
|
||||
if (mobjinfo[type].seesound && missile)
|
||||
S_StartSound(missile, missile->info->seesound);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (player->charability2 == CA2_GUNSLINGER && player->panim == PA_ABILITY2)
|
||||
;
|
||||
else if (player->panim != PA_IDLE && player->panim != PA_WALK && player->panim != PA_RUN && player->panim != PA_DASH)
|
||||
{
|
||||
if (player->cmomx || player->cmomy)
|
||||
{
|
||||
if (player->charflags & SF_DASHMODE && player->dashmode >= 3*TICRATE && player->panim != PA_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||
else if (player->speed >= FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (player->panim != PA_RUN || player->mo->state-states == S_PLAY_FLOAT_RUN))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
else if ((player->rmomx || player->rmomy)
|
||||
&& (player->panim != PA_WALK || player->mo->state-states == S_PLAY_FLOAT))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
else if (!player->rmomx && !player->rmomy && player->panim != PA_IDLE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->charflags & SF_DASHMODE && player->dashmode >= 3*TICRATE && player->panim != PA_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||
else if (player->speed >= FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (player->panim != PA_RUN || player->mo->state-states == S_PLAY_FLOAT_RUN))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
else if ((player->mo->momx || player->mo->momy)
|
||||
&& (player->panim != PA_WALK || player->mo->state-states == S_PLAY_FLOAT))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
else if (!player->mo->momx && !player->mo->momy && player->panim != PA_IDLE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
}
|
||||
}
|
||||
|
||||
if (!(player->pflags & PF_GLIDING))
|
||||
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||
player->pflags &= ~(PF_STARTJUMP|PF_THOKKED|PF_CANCARRY/*|PF_GLIDING*/);
|
||||
player->secondjump = 0;
|
||||
player->glidetime = 0;
|
||||
player->climbing = 0;
|
||||
player->powers[pw_tailsfly] = 0;
|
||||
|
||||
if (player->pflags & PF_SHIELDABILITY)
|
||||
{
|
||||
player->pflags &= ~PF_SHIELDABILITY;
|
||||
|
||||
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL) // Elemental shield's stomp attack.
|
||||
{
|
||||
if (player->mo->eflags & (MFE_UNDERWATER|MFE_TOUCHWATER)) // play a blunt sound
|
||||
S_StartSound(player->mo, sfx_s3k4c);
|
||||
else // create a fire pattern on the ground
|
||||
{
|
||||
S_StartSound(player->mo, sfx_s3k47);
|
||||
P_ElementalFire(player, true);
|
||||
}
|
||||
P_SetObjectMomZ(player->mo,
|
||||
(player->mo->eflags & MFE_UNDERWATER)
|
||||
? 6*FRACUNIT/5
|
||||
: 5*FRACUNIT/2,
|
||||
false);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||
player->mo->momx = player->mo->momy = 0;
|
||||
clipmomz = false;
|
||||
}
|
||||
else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) // Bubble shield's bounce attack.
|
||||
{
|
||||
P_DoBubbleBounce(player);
|
||||
clipmomz = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return clipmomz;
|
||||
|
@ -2964,22 +2969,19 @@ static void P_DoBubbleBreath(player_t *player)
|
|||
P_SetScale(bubble, bubble->destscale);
|
||||
}
|
||||
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE) // NiGHTS Super doesn't spawn flight bubbles
|
||||
return;
|
||||
|
||||
// Tails stirs up the water while flying in it
|
||||
if (player->powers[pw_tailsfly] && (leveltime & 1) && player->charability != CA_SWIM)
|
||||
{
|
||||
fixed_t radius = (3*player->mo->radius)>>1;
|
||||
fixed_t radius = player->mo->radius;
|
||||
angle_t fa = ((leveltime%45)*FINEANGLES/8) & FINEMASK;
|
||||
fixed_t stirwaterx = FixedMul(FINECOSINE(fa),radius);
|
||||
fixed_t stirwatery = FixedMul(FINESINE(fa),radius);
|
||||
fixed_t stirwaterz;
|
||||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
stirwaterz = player->mo->z + player->mo->height - FixedDiv(player->mo->height,3*FRACUNIT/2);
|
||||
stirwaterz = player->mo->z + player->mo->height - (4<<FRACBITS);
|
||||
else
|
||||
stirwaterz = player->mo->z + FixedDiv(player->mo->height,3*FRACUNIT/2);
|
||||
stirwaterz = player->mo->z + (4<<FRACBITS);
|
||||
|
||||
bubble = P_SpawnMobj(
|
||||
player->mo->x + stirwaterx,
|
||||
|
@ -8105,7 +8107,7 @@ static void P_MovePlayer(player_t *player)
|
|||
}
|
||||
else if (player->pflags & PF_BOUNCING)
|
||||
{
|
||||
if (!(player->pflags & PF_JUMPDOWN) || (onground && P_MobjFlip(player->mo)*player->mo->momz <= 0)) // If not holding the jump button OR on flat ground
|
||||
if (!(player->pflags & PF_JUMPDOWN)) // If not holding the jump button
|
||||
{
|
||||
P_ResetPlayer(player); // down, stop bouncing.
|
||||
player->pflags |= PF_THOKKED;
|
||||
|
@ -8205,12 +8207,18 @@ static void P_MovePlayer(player_t *player)
|
|||
if (P_MobjFlip(player->mo)*player->mo->momz < FixedMul(5*actionspd, player->mo->scale))
|
||||
P_SetObjectMomZ(player->mo, actionspd/2, true);
|
||||
|
||||
P_SetPlayerMobjState(player->mo, player->mo->state->nextstate);
|
||||
|
||||
player->fly1--;
|
||||
}
|
||||
}
|
||||
|
||||
// Tails Put-Put noise
|
||||
if (player->charability == CA_FLY && player->bot != 1 && leveltime % 10 == 0 && !player->spectator)
|
||||
if (player->charability == CA_FLY
|
||||
&& player->bot != 1
|
||||
&& !(player->mo->eflags & MFE_UNDERWATER)
|
||||
&& leveltime % 10 == 0
|
||||
&& !player->spectator)
|
||||
S_StartSound(player->mo, sfx_putput);
|
||||
|
||||
// Descend
|
||||
|
@ -8222,11 +8230,12 @@ static void P_MovePlayer(player_t *player)
|
|||
else
|
||||
{
|
||||
// Tails-gets-tired Stuff
|
||||
if (player->panim == PA_ABILITY)
|
||||
if (player->panim == PA_ABILITY && player->mo->state-states != S_PLAY_FLY_TIRED)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_FLY_TIRED);
|
||||
|
||||
if (player->charability == CA_FLY && (leveltime % 10 == 0)
|
||||
&& player->mo->state-states == S_PLAY_FLY_TIRED
|
||||
&& !(player->mo->eflags & MFE_UNDERWATER)
|
||||
&& !player->spectator)
|
||||
S_StartSound(player->mo, sfx_pudpud);
|
||||
}
|
||||
|
@ -9350,12 +9359,16 @@ consvar_t cv_cam_still = {"cam_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL,
|
|||
consvar_t cv_cam_speed = {"cam_speed", "0.3", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotate = {"cam_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotspeed = {"cam_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_orbit = {"cam_orbit", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_adjust = {"cam_adjust", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_dist = {"cam2_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_height = {"cam2_height", "25", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_still = {"cam2_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_speed = {"cam2_speed", "0.3", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotate = {"cam2_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotspeed = {"cam2_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_orbit = {"cam2_orbit", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_adjust = {"cam2_adjust", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
fixed_t t_cam_dist = -42;
|
||||
fixed_t t_cam_height = -42;
|
||||
|
@ -9409,9 +9422,9 @@ void P_ResetCamera(player_t *player, camera_t *thiscam)
|
|||
boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcalled)
|
||||
{
|
||||
angle_t angle = 0, focusangle = 0, focusaiming = 0;
|
||||
fixed_t x, y, z, dist, checkdist, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight;
|
||||
fixed_t x, y, z, dist, distxy, distz, checkdist, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight, slopez = 0;
|
||||
INT32 camrotate;
|
||||
boolean camstill, cameranoclip;
|
||||
boolean camstill, cameranoclip, camorbit;
|
||||
mobj_t *mo;
|
||||
subsector_t *newsubsec;
|
||||
fixed_t f1, f2;
|
||||
|
@ -9492,6 +9505,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
// force defaults because we have a camera look section
|
||||
camspeed = (INT32)(atof(cv_cam_speed.defaultvalue) * FRACUNIT);
|
||||
camstill = (!stricmp(cv_cam_still.defaultvalue, "off")) ? false : true;
|
||||
camorbit = (!stricmp(cv_cam_orbit.defaultvalue, "off")) ? false : true;
|
||||
camrotate = atoi(cv_cam_rotate.defaultvalue);
|
||||
camdist = FixedMul((INT32)(atof(cv_cam_dist.defaultvalue) * FRACUNIT), mo->scale);
|
||||
camheight = FixedMul((INT32)(atof(cv_cam_height.defaultvalue) * FRACUNIT), FixedMul(player->camerascale, mo->scale));
|
||||
|
@ -9500,6 +9514,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
{
|
||||
camspeed = cv_cam_speed.value;
|
||||
camstill = cv_cam_still.value;
|
||||
camorbit = cv_cam_orbit.value;
|
||||
camrotate = cv_cam_rotate.value;
|
||||
camdist = FixedMul(cv_cam_dist.value, mo->scale);
|
||||
camheight = FixedMul(cv_cam_height.value, FixedMul(player->camerascale, mo->scale));
|
||||
|
@ -9508,6 +9523,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
{
|
||||
camspeed = cv_cam2_speed.value;
|
||||
camstill = cv_cam2_still.value;
|
||||
camorbit = cv_cam2_orbit.value;
|
||||
camrotate = cv_cam2_rotate.value;
|
||||
camdist = FixedMul(cv_cam2_dist.value, mo->scale);
|
||||
camheight = FixedMul(cv_cam2_height.value, FixedMul(player->camerascale, mo->scale));
|
||||
|
@ -9617,13 +9633,50 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
dist <<= 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
checkdist = (dist = FixedMul(dist, player->camerascale));
|
||||
|
||||
if (checkdist < 128*FRACUNIT)
|
||||
checkdist = 128*FRACUNIT;
|
||||
|
||||
x = mo->x - FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
if (!(twodlevel || (mo->flags2 & MF2_TWOD)) && !(player->powers[pw_carry] == CR_NIGHTSMODE)) // This block here is like 90% Lach's work, thanks bud
|
||||
{
|
||||
if ((thiscam == &camera && cv_cam_adjust.value) || (thiscam == &camera2 && cv_cam2_adjust.value))
|
||||
{
|
||||
if (!(mo->eflags & MFE_JUSTHITFLOOR) && (P_IsObjectOnGround(mo)) // Check that player is grounded
|
||||
&& thiscam->ceilingz - thiscam->floorz >= P_GetPlayerHeight(player)) // Check that camera's sector is large enough for the player to fit into, at least
|
||||
{
|
||||
if (mo->eflags & MFE_VERTICALFLIP) // if player is upside-down
|
||||
{
|
||||
//z = min(z, thiscam->ceilingz); // solution 1: change new z coordinate to be at LEAST its ground height
|
||||
slopez += min(thiscam->ceilingz - mo->z, 0); // solution 2: change new z coordinate by the difference between camera's ground and top of player
|
||||
}
|
||||
else // player is not upside-down
|
||||
{
|
||||
//z = max(z, thiscam->floorz); // solution 1: change new z coordinate to be at LEAST its ground height
|
||||
slopez += max(thiscam->floorz - mo->z - mo->height, 0); // solution 2: change new z coordinate by the difference between camera's ground and top of player
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (camorbit) //Sev here, I'm guessing this is where orbital cam lives
|
||||
{
|
||||
if (rendermode == render_opengl)
|
||||
distxy = FixedMul(dist, FINECOSINE((focusaiming>>ANGLETOFINESHIFT) & FINEMASK));
|
||||
else
|
||||
distxy = dist;
|
||||
distz = -FixedMul(dist, FINESINE((focusaiming>>ANGLETOFINESHIFT) & FINEMASK)) + slopez;
|
||||
}
|
||||
else
|
||||
{
|
||||
distxy = dist;
|
||||
distz = slopez;
|
||||
}
|
||||
|
||||
x = mo->x - FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), distxy);
|
||||
y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), distxy);
|
||||
|
||||
#if 0
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD))
|
||||
|
@ -9660,9 +9713,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
pviewheight = FixedMul(41*player->height/48, mo->scale);
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
z = mo->z + mo->height - pviewheight - camheight;
|
||||
z = mo->z + mo->height - pviewheight - camheight + distz;
|
||||
else
|
||||
z = mo->z + pviewheight + camheight;
|
||||
z = mo->z + pviewheight + camheight + distz;
|
||||
|
||||
// move camera down to move under lower ceilings
|
||||
newsubsec = R_IsPointInSubsector(((mo->x>>FRACBITS) + (thiscam->x>>FRACBITS))<<(FRACBITS-1), ((mo->y>>FRACBITS) + (thiscam->y>>FRACBITS))<<(FRACBITS-1));
|
||||
|
@ -9975,6 +10028,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
}
|
||||
|
||||
return (x == thiscam->x && y == thiscam->y && z == thiscam->z && angle == thiscam->aiming);
|
||||
|
||||
}
|
||||
|
||||
boolean P_SpectatorJoinGame(player_t *player)
|
||||
|
@ -10626,7 +10680,8 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
angle_t horizangle = player->drawangle;
|
||||
fixed_t zoffs = 0;
|
||||
fixed_t backwards = -1*FRACUNIT;
|
||||
boolean doroll = (player->panim == PA_ROLL || player->panim == PA_JUMP);
|
||||
boolean doswim = (player->panim == PA_ABILITY && (player->mo->eflags & MFE_UNDERWATER));
|
||||
boolean doroll = (player->panim == PA_ROLL || (player->panim == PA_JUMP && !(player->charflags & SF_NOJUMPSPIN)) || doswim);
|
||||
angle_t rollangle;
|
||||
boolean panimchange;
|
||||
INT32 ticnum = 0;
|
||||
|
@ -10653,17 +10708,25 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
if (testval < FRACUNIT)
|
||||
testval = FRACUNIT;
|
||||
}
|
||||
if (smilesonground && !player->mo->reactiontime)
|
||||
|
||||
if (doswim)
|
||||
zdist = player->mo->momz<<1;
|
||||
else if (smilesonground && !player->mo->reactiontime)
|
||||
zdist = (player->mo->z - tails->threshold);
|
||||
else
|
||||
zdist = player->mo->momz;
|
||||
|
||||
rollangle = R_PointToAngle2(0, 0, testval, -P_MobjFlip(player->mo)*zdist);
|
||||
zoffs = 3*FRACUNIT + 12*FINESINE(rollangle >> ANGLETOFINESHIFT);
|
||||
backwards = -12*FINECOSINE(rollangle >> ANGLETOFINESHIFT);
|
||||
|
||||
if (!doswim)
|
||||
{
|
||||
zoffs = 3*FRACUNIT + 12*FINESINE(rollangle >> ANGLETOFINESHIFT);
|
||||
backwards = -12*FINECOSINE(rollangle >> ANGLETOFINESHIFT);
|
||||
}
|
||||
}
|
||||
else if (player->panim == PA_RUN)
|
||||
backwards = -5*FRACUNIT;
|
||||
else if (player->panim == PA_SPRING)
|
||||
else if (player->panim == PA_SPRING || player->panim == PA_JUMP)
|
||||
{
|
||||
zoffs += 4*FRACUNIT;
|
||||
backwards /= 2;
|
||||
|
@ -10685,7 +10748,7 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
zoffs = -7*FRACUNIT;
|
||||
backwards = -9*FRACUNIT;
|
||||
}
|
||||
else if (player->mo->sprite2 == SPR2_FLY || player->mo->sprite2 == SPR2_TIRE)
|
||||
else if (player->panim == PA_ABILITY)
|
||||
backwards = -5*FRACUNIT;
|
||||
|
||||
// sprite...
|
||||
|
@ -10702,7 +10765,7 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
else
|
||||
chosenstate = S_TAILSOVERLAY_0DEGREES;
|
||||
}
|
||||
else if (player->panim == PA_SPRING)
|
||||
else if (player->panim == PA_SPRING || player->panim == PA_JUMP)
|
||||
chosenstate = S_TAILSOVERLAY_MINUS60DEGREES;
|
||||
else if (player->panim == PA_FALL || player->mo->state-states == S_PLAY_RIDE)
|
||||
chosenstate = S_TAILSOVERLAY_PLUS60DEGREES;
|
||||
|
@ -10725,6 +10788,8 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
}
|
||||
else if (player->mo->sprite2 == SPR2_FLY)
|
||||
chosenstate = S_TAILSOVERLAY_FLY;
|
||||
else if (player->mo->sprite2 == SPR2_SWIM)
|
||||
chosenstate = S_TAILSOVERLAY_FLY;
|
||||
else if (player->mo->sprite2 == SPR2_TIRE)
|
||||
chosenstate = S_TAILSOVERLAY_TIRE;
|
||||
else if (player->panim == PA_ABILITY2)
|
||||
|
@ -10750,8 +10815,10 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (player->fly1 != 0 && player->powers[pw_tailsfly] != 0 && !smilesonground)
|
||||
P_SetMobjState(tails, chosenstate);
|
||||
#endif
|
||||
|
||||
// animation...
|
||||
if (player->panim == PA_SPRING || player->panim == PA_FALL || player->mo->state-states == S_PLAY_RIDE)
|
||||
|
@ -10766,7 +10833,7 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
else if (player->mo->state-states == S_PLAY_GASP)
|
||||
tails->tics = -1;
|
||||
else if (player->mo->sprite2 == SPR2_TIRE)
|
||||
ticnum = 4;
|
||||
ticnum = (doswim ? 2 : 4);
|
||||
else if (player->panim != PA_IDLE)
|
||||
ticnum = player->mo->tics;
|
||||
|
||||
|
@ -10989,7 +11056,8 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
if (player->exiting == 2 || countdown2 == 2)
|
||||
{
|
||||
if (cv_playersforexit.value) // Count to be sure everyone's exited
|
||||
UINT8 numneeded = (G_IsSpecialStage(gamemap) ? 4 : cv_playersforexit.value);
|
||||
if (numneeded) // Count to be sure everyone's exited
|
||||
{
|
||||
INT32 i, total = 0, exiting = 0;
|
||||
|
||||
|
@ -11005,7 +11073,7 @@ void P_PlayerThink(player_t *player)
|
|||
exiting++;
|
||||
}
|
||||
|
||||
if (!total || ((4*exiting)/total) >= cv_playersforexit.value)
|
||||
if (!total || ((4*exiting)/total) >= numneeded)
|
||||
{
|
||||
if (server)
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
|
@ -11299,8 +11367,8 @@ void P_PlayerThink(player_t *player)
|
|||
{
|
||||
boolean currentlyonground = P_IsObjectOnGround(player->mo);
|
||||
|
||||
if (!player->powers[pw_carry]
|
||||
&& ((player->pflags & (PF_AUTOBRAKE|PF_APPLYAUTOBRAKE)) == (PF_AUTOBRAKE|PF_APPLYAUTOBRAKE))
|
||||
if (!player->powers[pw_carry] && !player->powers[pw_nocontrol]
|
||||
&& ((player->pflags & (PF_AUTOBRAKE|PF_APPLYAUTOBRAKE|PF_STASIS)) == (PF_AUTOBRAKE|PF_APPLYAUTOBRAKE))
|
||||
&& !(cmd->forwardmove || cmd->sidemove)
|
||||
&& (player->rmomx || player->rmomy)
|
||||
&& (!player->capsule || (player->capsule->reactiontime != (player-players)+1)))
|
||||
|
@ -11311,7 +11379,7 @@ void P_PlayerThink(player_t *player)
|
|||
if (!currentlyonground)
|
||||
acceleration /= 2;
|
||||
// fake skidding! see P_SkidStuff for reference on conditionals
|
||||
else if (!player->skidtime && !(player->mo->eflags & MFE_GOOWATER) && !(player->pflags & (PF_JUMPED|PF_SPINNING|PF_SLIDING)) && !(player->charflags & SF_NOSKID) && P_AproxDistance(player->mo->momx, player->mo->momy) >= FixedMul(player->runspeed/2, player->mo->scale))
|
||||
else if (!player->skidtime && !(player->mo->eflags & MFE_GOOWATER) && !(player->pflags & (PF_JUMPED|PF_SPINNING|PF_SLIDING)) && !(player->charflags & SF_NOSKID) && P_AproxDistance(player->mo->momx, player->mo->momy) >= FixedMul(player->runspeed, player->mo->scale)) // modified from player->runspeed/2 'cuz the skid was just TOO frequent ngl
|
||||
{
|
||||
if (player->mo->state-states != S_PLAY_SKID)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SKID);
|
||||
|
@ -11842,6 +11910,8 @@ void P_PlayerAfterThink(player_t *player)
|
|||
{
|
||||
if (player->mo->state-states != S_PLAY_RIDE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
||||
if ((tails->skin && ((skin_t *)(tails->skin))->sprites[SPR2_SWIM].numframes) && (tails->eflags & MFE_UNDERWATER))
|
||||
tails->player->powers[pw_tailsfly] = 0;
|
||||
}
|
||||
else
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
|
|
39
src/r_data.c
39
src/r_data.c
|
@ -23,6 +23,7 @@
|
|||
#include "z_zone.h"
|
||||
#include "p_setup.h" // levelflats
|
||||
#include "v_video.h" // pMasterPalette
|
||||
#include "byteptr.h"
|
||||
#include "dehacked.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -2819,18 +2820,14 @@ patch_t *R_PNGToPatch(const UINT8 *png, size_t size, size_t *destsize, boolean t
|
|||
UINT8 *imgptr = imgbuf;
|
||||
UINT8 *colpointers, *startofspan;
|
||||
|
||||
#define WRITE8(buf, a) ({*buf = (a); buf++;})
|
||||
#define WRITE16(buf, a) ({*buf = (a)&255; buf++; *buf = (a)>>8; buf++;})
|
||||
#define WRITE32(buf, a) ({WRITE16(buf, (a)&65535); WRITE16(buf, (a)>>16);})
|
||||
|
||||
if (!raw)
|
||||
I_Error("R_PNGToPatch: conversion failed");
|
||||
|
||||
// Write image size and offset
|
||||
WRITE16(imgptr, width);
|
||||
WRITE16(imgptr, height);
|
||||
WRITE16(imgptr, leftoffset);
|
||||
WRITE16(imgptr, topoffset);
|
||||
WRITEINT16(imgptr, width);
|
||||
WRITEINT16(imgptr, height);
|
||||
WRITEINT16(imgptr, leftoffset);
|
||||
WRITEINT16(imgptr, topoffset);
|
||||
|
||||
// Leave placeholder to column pointers
|
||||
colpointers = imgptr;
|
||||
|
@ -2845,7 +2842,7 @@ patch_t *R_PNGToPatch(const UINT8 *png, size_t size, size_t *destsize, boolean t
|
|||
|
||||
//printf("%d ", x);
|
||||
// Write column pointer (@TODO may be wrong)
|
||||
WRITE32(colpointers, imgptr - imgbuf);
|
||||
WRITEINT32(colpointers, imgptr - imgbuf);
|
||||
|
||||
// Write pixels
|
||||
for (y = 0; y < height; y++)
|
||||
|
@ -2857,7 +2854,7 @@ patch_t *R_PNGToPatch(const UINT8 *png, size_t size, size_t *destsize, boolean t
|
|||
if (!opaque)
|
||||
{
|
||||
if (startofspan)
|
||||
WRITE8(imgptr, 0);
|
||||
WRITEUINT8(imgptr, 0);
|
||||
startofspan = NULL;
|
||||
continue;
|
||||
}
|
||||
|
@ -2869,15 +2866,15 @@ patch_t *R_PNGToPatch(const UINT8 *png, size_t size, size_t *destsize, boolean t
|
|||
|
||||
// If we reached the span size limit, finish the previous span
|
||||
if (startofspan)
|
||||
WRITE8(imgptr, 0);
|
||||
WRITEUINT8(imgptr, 0);
|
||||
|
||||
if (y > 254)
|
||||
{
|
||||
// Make sure we're aligned to 254
|
||||
if (lastStartY < 254)
|
||||
{
|
||||
WRITE8(imgptr, 254);
|
||||
WRITE8(imgptr, 0);
|
||||
WRITEUINT8(imgptr, 254);
|
||||
WRITEUINT8(imgptr, 0);
|
||||
imgptr += 2;
|
||||
lastStartY = 254;
|
||||
}
|
||||
|
@ -2887,15 +2884,15 @@ patch_t *R_PNGToPatch(const UINT8 *png, size_t size, size_t *destsize, boolean t
|
|||
|
||||
while (writeY > 254)
|
||||
{
|
||||
WRITE8(imgptr, 254);
|
||||
WRITE8(imgptr, 0);
|
||||
WRITEUINT8(imgptr, 254);
|
||||
WRITEUINT8(imgptr, 0);
|
||||
imgptr += 2;
|
||||
writeY -= 254;
|
||||
}
|
||||
}
|
||||
|
||||
startofspan = imgptr;
|
||||
WRITE8(imgptr, writeY);///@TODO calculate starting y pos
|
||||
WRITEUINT8(imgptr, writeY);///@TODO calculate starting y pos
|
||||
imgptr += 2;
|
||||
spanSize = 0;
|
||||
|
||||
|
@ -2903,21 +2900,17 @@ patch_t *R_PNGToPatch(const UINT8 *png, size_t size, size_t *destsize, boolean t
|
|||
}
|
||||
|
||||
// Write the pixel
|
||||
WRITE8(imgptr, paletteIndex);
|
||||
WRITEUINT8(imgptr, paletteIndex);
|
||||
spanSize++;
|
||||
startofspan[1] = spanSize;
|
||||
}
|
||||
|
||||
if (startofspan)
|
||||
WRITE8(imgptr, 0);
|
||||
WRITEUINT8(imgptr, 0);
|
||||
|
||||
WRITE8(imgptr, 0xFF);
|
||||
WRITEUINT8(imgptr, 0xFF);
|
||||
}
|
||||
|
||||
#undef WRITE8
|
||||
#undef WRITE16
|
||||
#undef WRITE32
|
||||
|
||||
size = imgptr-imgbuf;
|
||||
img = Z_Malloc(size, PU_STATIC, NULL);
|
||||
memcpy(img, imgbuf, size);
|
||||
|
|
|
@ -1182,6 +1182,8 @@ void R_RegisterEngineStuff(void)
|
|||
CV_RegisterVar(&cv_cam_speed);
|
||||
CV_RegisterVar(&cv_cam_rotate);
|
||||
CV_RegisterVar(&cv_cam_rotspeed);
|
||||
CV_RegisterVar(&cv_cam_orbit);
|
||||
CV_RegisterVar(&cv_cam_adjust);
|
||||
|
||||
CV_RegisterVar(&cv_cam2_dist);
|
||||
CV_RegisterVar(&cv_cam2_still);
|
||||
|
@ -1189,6 +1191,8 @@ void R_RegisterEngineStuff(void)
|
|||
CV_RegisterVar(&cv_cam2_speed);
|
||||
CV_RegisterVar(&cv_cam2_rotate);
|
||||
CV_RegisterVar(&cv_cam2_rotspeed);
|
||||
CV_RegisterVar(&cv_cam2_orbit);
|
||||
CV_RegisterVar(&cv_cam2_adjust);
|
||||
|
||||
CV_RegisterVar(&cv_showhud);
|
||||
CV_RegisterVar(&cv_translucenthud);
|
||||
|
|
|
@ -2524,7 +2524,7 @@ UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player)
|
|||
if (!skin)
|
||||
return 0;
|
||||
|
||||
if ((unsigned)(spr2 & ~FF_SPR2SUPER) >= free_spr2)
|
||||
if ((playersprite_t)(spr2 & ~FF_SPR2SUPER) >= free_spr2)
|
||||
return 0;
|
||||
|
||||
while (!(skin->sprites[spr2].numframes)
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "time.h" // For log timestamps
|
||||
|
||||
#ifdef HAVE_SDL
|
||||
|
||||
#ifdef HAVE_TTF
|
||||
|
@ -114,6 +116,7 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
{
|
||||
const char *logdir = NULL;
|
||||
char logfile[MAX_WADPATH];
|
||||
myargc = argc;
|
||||
myargv = argv; /// \todo pull out path to exe from this string
|
||||
|
||||
|
@ -125,15 +128,36 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
logdir = D_Home();
|
||||
|
||||
#ifdef LOGMESSAGES
|
||||
if (!M_CheckParm("-nolog"))
|
||||
{
|
||||
time_t my_time;
|
||||
struct tm * timeinfo;
|
||||
char buf[26];
|
||||
|
||||
logdir = D_Home();
|
||||
|
||||
my_time = time(NULL);
|
||||
timeinfo = localtime(&my_time);
|
||||
|
||||
strftime(buf, 26, "%Y-%m-%d %H-%M-%S", timeinfo);
|
||||
strcpy(logfile, va("log-%s.txt", buf));
|
||||
|
||||
#ifdef DEFAULTDIR
|
||||
if (logdir)
|
||||
logstream = fopen(va("%s/"DEFAULTDIR"/log.txt",logdir), "wt");
|
||||
else
|
||||
if (logdir)
|
||||
{
|
||||
// Create dirs here because D_SRB2Main() is too late.
|
||||
I_mkdir(va("%s%s"DEFAULTDIR, logdir, PATHSEP), 0755);
|
||||
I_mkdir(va("%s%s"DEFAULTDIR"%slogs",logdir, PATHSEP, PATHSEP), 0755);
|
||||
logstream = fopen(va("%s%s"DEFAULTDIR"%slogs%s%s",logdir, PATHSEP, PATHSEP, PATHSEP, logfile), "wt");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
logstream = fopen("./log.txt", "wt");
|
||||
{
|
||||
I_mkdir("."PATHSEP"logs"PATHSEP, 0755);
|
||||
logstream = fopen(va("."PATHSEP"logs"PATHSEP"%s", logfile), "wt");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//I_OutputMsg("I_StartupSystem() ...\n");
|
||||
|
@ -160,6 +184,10 @@ int main(int argc, char **argv)
|
|||
// startup SRB2
|
||||
CONS_Printf("Setting up SRB2...\n");
|
||||
D_SRB2Main();
|
||||
#ifdef LOGMESSAGES
|
||||
if (!M_CheckParm("-nolog"))
|
||||
CONS_Printf("Logfile: %s\n", logfile);
|
||||
#endif
|
||||
CONS_Printf("Entering main game loop...\n");
|
||||
// never return
|
||||
D_SRB2Loop();
|
||||
|
|
|
@ -2100,39 +2100,43 @@ static void ST_drawTextHUD(void)
|
|||
textHUDdraw(M_GetText("\x82""FIRE:""\x80 Enter game"))
|
||||
}
|
||||
|
||||
if (gametype == GT_COOP && (!stplyr->spectator || (!(maptol & TOL_NIGHTS) && G_IsSpecialStage(gamemap))) && stplyr->exiting && cv_playersforexit.value)
|
||||
if (gametype == GT_COOP && (!stplyr->spectator || (!(maptol & TOL_NIGHTS) && G_IsSpecialStage(gamemap))) && stplyr->exiting)
|
||||
{
|
||||
INT32 i, total = 0, exiting = 0;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
UINT8 numneeded = (G_IsSpecialStage(gamemap) ? 4 : cv_playersforexit.value);
|
||||
if (numneeded)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
continue;
|
||||
if (players[i].lives <= 0)
|
||||
continue;
|
||||
INT32 i, total = 0, exiting = 0;
|
||||
|
||||
total++;
|
||||
if (players[i].exiting)
|
||||
exiting++;
|
||||
}
|
||||
|
||||
if (cv_playersforexit.value != 4)
|
||||
{
|
||||
total *= cv_playersforexit.value;
|
||||
if (total & 3)
|
||||
total += 4; // round up
|
||||
total /= 4;
|
||||
}
|
||||
|
||||
if (exiting < total)
|
||||
{
|
||||
if (!splitscreen && !donef12)
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
textHUDdraw(M_GetText("\x82""VIEWPOINT:""\x80 Switch view"))
|
||||
donef12 = true;
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
continue;
|
||||
if (players[i].lives <= 0)
|
||||
continue;
|
||||
|
||||
total++;
|
||||
if (players[i].exiting)
|
||||
exiting++;
|
||||
}
|
||||
|
||||
if (numneeded != 4)
|
||||
{
|
||||
total *= cv_playersforexit.value;
|
||||
if (total & 3)
|
||||
total += 4; // round up
|
||||
total /= 4;
|
||||
}
|
||||
|
||||
if (exiting < total)
|
||||
{
|
||||
if (!splitscreen && !donef12)
|
||||
{
|
||||
textHUDdraw(M_GetText("\x82""VIEWPOINT:""\x80 Switch view"))
|
||||
donef12 = true;
|
||||
}
|
||||
total -= exiting;
|
||||
textHUDdraw(va(M_GetText("%d player%s remaining"), total, ((total == 1) ? "" : "s")))
|
||||
}
|
||||
total -= exiting;
|
||||
textHUDdraw(va(M_GetText("%d player%s remaining"), total, ((total == 1) ? "" : "s")))
|
||||
}
|
||||
}
|
||||
else if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (!stplyr->spectator))
|
||||
|
|
202
src/w_wad.c
202
src/w_wad.c
|
@ -1686,13 +1686,145 @@ void W_VerifyFileMD5(UINT16 wadfilenum, const char *matchmd5)
|
|||
#endif
|
||||
}
|
||||
|
||||
// Verify versions for different archive
|
||||
// formats. checklist assumed to be valid.
|
||||
|
||||
static int
|
||||
W_VerifyName (const char *name, lumpchecklist_t *checklist, boolean status)
|
||||
{
|
||||
size_t j;
|
||||
for (j = 0; checklist[j].len && checklist[j].name; ++j)
|
||||
{
|
||||
if (( strncmp(name, checklist[j].name,
|
||||
checklist[j].len) != false ) == status)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int
|
||||
W_VerifyWAD (FILE *fp, lumpchecklist_t *checklist, boolean status)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
// assume wad file
|
||||
wadinfo_t header;
|
||||
filelump_t lumpinfo;
|
||||
|
||||
// read the header
|
||||
if (fread(&header, 1, sizeof header, fp) == sizeof header
|
||||
&& header.numlumps < INT16_MAX
|
||||
&& strncmp(header.identification, "ZWAD", 4)
|
||||
&& strncmp(header.identification, "IWAD", 4)
|
||||
&& strncmp(header.identification, "PWAD", 4)
|
||||
&& strncmp(header.identification, "SDLL", 4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
header.numlumps = LONG(header.numlumps);
|
||||
header.infotableofs = LONG(header.infotableofs);
|
||||
|
||||
// let seek to the lumpinfo list
|
||||
if (fseek(fp, header.infotableofs, SEEK_SET) == -1)
|
||||
return true;
|
||||
|
||||
for (i = 0; i < header.numlumps; i++)
|
||||
{
|
||||
// fill in lumpinfo for this wad file directory
|
||||
if (fread(&lumpinfo, sizeof (lumpinfo), 1 , fp) != 1)
|
||||
return true;
|
||||
|
||||
lumpinfo.filepos = LONG(lumpinfo.filepos);
|
||||
lumpinfo.size = LONG(lumpinfo.size);
|
||||
|
||||
if (lumpinfo.size == 0)
|
||||
continue;
|
||||
|
||||
if (! W_VerifyName(lumpinfo.name, checklist, status))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int
|
||||
W_VerifyPK3 (FILE *fp, lumpchecklist_t *checklist, boolean status)
|
||||
{
|
||||
zend_t zend;
|
||||
zentry_t zentry;
|
||||
|
||||
UINT16 numlumps;
|
||||
size_t i;
|
||||
|
||||
char pat_central[] = {0x50, 0x4b, 0x01, 0x02, 0x00};
|
||||
char pat_end[] = {0x50, 0x4b, 0x05, 0x06, 0x00};
|
||||
|
||||
char lumpname[9];
|
||||
|
||||
// Haha the ResGetLumpsZip function doesn't
|
||||
// check for file errors, so neither will I.
|
||||
|
||||
// Central directory bullshit
|
||||
|
||||
fseek(fp, 0, SEEK_END);
|
||||
if (!ResFindSignature(fp, pat_end, max(0, ftell(fp) - (22 + 65536))))
|
||||
return true;
|
||||
|
||||
fseek(fp, -4, SEEK_CUR);
|
||||
if (fread(&zend, 1, sizeof zend, fp) < sizeof zend)
|
||||
return true;
|
||||
|
||||
numlumps = zend.entries;
|
||||
|
||||
fseek(fp, zend.cdiroffset, SEEK_SET);
|
||||
for (i = 0; i < numlumps; i++)
|
||||
{
|
||||
char* fullname;
|
||||
char* trimname;
|
||||
char* dotpos;
|
||||
|
||||
if (fread(&zentry, 1, sizeof(zentry_t), fp) < sizeof(zentry_t))
|
||||
return true;
|
||||
if (memcmp(zentry.signature, pat_central, 4))
|
||||
return true;
|
||||
|
||||
fullname = malloc(zentry.namelen + 1);
|
||||
if (fgets(fullname, zentry.namelen + 1, fp) != fullname)
|
||||
return true;
|
||||
|
||||
// Strip away file address and extension for the 8char name.
|
||||
if ((trimname = strrchr(fullname, '/')) != 0)
|
||||
trimname++;
|
||||
else
|
||||
trimname = fullname; // Care taken for root files.
|
||||
|
||||
if (*trimname) // Ignore directories
|
||||
{
|
||||
if ((dotpos = strrchr(trimname, '.')) == 0)
|
||||
dotpos = fullname + strlen(fullname); // Watch for files without extension.
|
||||
|
||||
memset(lumpname, '\0', 9); // Making sure they're initialized to 0. Is it necessary?
|
||||
strncpy(lumpname, trimname, min(8, dotpos - trimname));
|
||||
|
||||
if (! W_VerifyName(lumpname, checklist, status))
|
||||
return false;
|
||||
}
|
||||
|
||||
free(fullname);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Note: This never opens lumps themselves and therefore doesn't have to
|
||||
// deal with compressed lumps.
|
||||
static int W_VerifyFile(const char *filename, lumpchecklist_t *checklist,
|
||||
boolean status)
|
||||
{
|
||||
FILE *handle;
|
||||
size_t i, j;
|
||||
int goodfile = false;
|
||||
|
||||
if (!checklist)
|
||||
|
@ -1701,66 +1833,18 @@ static int W_VerifyFile(const char *filename, lumpchecklist_t *checklist,
|
|||
if ((handle = W_OpenWadFile(&filename, false)) == NULL)
|
||||
return -1;
|
||||
|
||||
// detect wad file by the absence of the other supported extensions
|
||||
if (stricmp(&filename[strlen(filename) - 4], ".soc")
|
||||
#ifdef HAVE_BLUA
|
||||
&& stricmp(&filename[strlen(filename) - 4], ".lua")
|
||||
#endif
|
||||
&& stricmp(&filename[strlen(filename) - 4], ".pk3"))
|
||||
if (stricmp(&filename[strlen(filename) - 4], ".pk3") == 0)
|
||||
goodfile = W_VerifyPK3(handle, checklist, status);
|
||||
else
|
||||
{
|
||||
// assume wad file
|
||||
wadinfo_t header;
|
||||
filelump_t lumpinfo;
|
||||
|
||||
// read the header
|
||||
if (fread(&header, 1, sizeof header, handle) == sizeof header
|
||||
&& header.numlumps < INT16_MAX
|
||||
&& strncmp(header.identification, "ZWAD", 4)
|
||||
&& strncmp(header.identification, "IWAD", 4)
|
||||
&& strncmp(header.identification, "PWAD", 4)
|
||||
&& strncmp(header.identification, "SDLL", 4))
|
||||
// detect wad file by the absence of the other supported extensions
|
||||
if (stricmp(&filename[strlen(filename) - 4], ".soc")
|
||||
#ifdef HAVE_BLUA
|
||||
&& stricmp(&filename[strlen(filename) - 4], ".lua")
|
||||
#endif
|
||||
)
|
||||
{
|
||||
fclose(handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
header.numlumps = LONG(header.numlumps);
|
||||
header.infotableofs = LONG(header.infotableofs);
|
||||
|
||||
// let seek to the lumpinfo list
|
||||
if (fseek(handle, header.infotableofs, SEEK_SET) == -1)
|
||||
{
|
||||
fclose(handle);
|
||||
return false;
|
||||
}
|
||||
|
||||
goodfile = true;
|
||||
for (i = 0; i < header.numlumps; i++)
|
||||
{
|
||||
// fill in lumpinfo for this wad file directory
|
||||
if (fread(&lumpinfo, sizeof (lumpinfo), 1 , handle) != 1)
|
||||
{
|
||||
fclose(handle);
|
||||
return -1;
|
||||
}
|
||||
|
||||
lumpinfo.filepos = LONG(lumpinfo.filepos);
|
||||
lumpinfo.size = LONG(lumpinfo.size);
|
||||
|
||||
if (lumpinfo.size == 0)
|
||||
continue;
|
||||
|
||||
for (j = 0; j < NUMSPRITES; j++)
|
||||
if (sprnames[j] && !strncmp(lumpinfo.name, sprnames[j], 4)) // Sprites
|
||||
continue;
|
||||
|
||||
goodfile = false;
|
||||
for (j = 0; checklist[j].len && checklist[j].name && !goodfile; j++)
|
||||
if ((strncmp(lumpinfo.name, checklist[j].name, checklist[j].len) != false) == status)
|
||||
goodfile = true;
|
||||
|
||||
if (!goodfile)
|
||||
break;
|
||||
goodfile = W_VerifyWAD(handle, checklist, status);
|
||||
}
|
||||
}
|
||||
fclose(handle);
|
||||
|
|
|
@ -261,7 +261,7 @@ void Y_IntermissionDrawer(void)
|
|||
|
||||
// draw time
|
||||
ST_DrawPatchFromHud(HUD_TIME, sbotime);
|
||||
if (cv_timetic.value == 1)
|
||||
if (cv_timetic.value == 3)
|
||||
ST_DrawNumFromHud(HUD_SECONDS, data.coop.tics);
|
||||
else
|
||||
{
|
||||
|
@ -275,8 +275,7 @@ void Y_IntermissionDrawer(void)
|
|||
ST_DrawPatchFromHud(HUD_TIMECOLON, sbocolon); // Colon
|
||||
ST_DrawPadNumFromHud(HUD_SECONDS, seconds, 2); // Seconds
|
||||
|
||||
// we should show centiseconds on the intermission screen too, if the conditions are right.
|
||||
if (modeattacking || cv_timetic.value == 2)
|
||||
if (cv_timetic.value == 1 || cv_timetic.value == 2 || modeattacking) // there's not enough room for tics in splitscreen, don't even bother trying!
|
||||
{
|
||||
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period
|
||||
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
|
||||
|
|
Loading…
Reference in a new issue