Merge branch 'EOL-12' into EOL

This commit is contained in:
Alam Ed Arias 2018-11-27 21:10:09 -05:00
commit c43b200221
13 changed files with 113 additions and 90 deletions

View file

@ -1,3 +1,4 @@
# GNU Make makefile for SRB2
#############################################################################
# Copyright (C) 1998-2000 by DooM Legacy Team.
@ -357,7 +358,8 @@ endif
ifdef PROFILEMODE
# build with profiling information
CFLAGS:=-pg $(CFLAGS)
CFLAGS+=-pg
LDFLAGS+=-pg
endif
ifdef ZDEBUG

View file

@ -395,8 +395,7 @@ static void ExtraDataTicker(void)
DEBFILE(va("player %d kicked [gametic=%u] reason as follows:\n", i, gametic));
}
CONS_Alert(CONS_WARNING, M_GetText("Got unknown net command [%s]=%d (max %d)\n"), sizeu1(curpos - bufferstart), *curpos, bufferstart[0]);
D_FreeTextcmd(gametic);
return;
break;
}
}
}
@ -3328,7 +3327,7 @@ void SV_StopServer(void)
localtextcmd[0] = 0;
localtextcmd2[0] = 0;
for (i = 0; i < BACKUPTICS; i++)
for (i = firstticstosend; i < firstticstosend + BACKUPTICS; i++)
D_Clearticcmd(i);
consoleplayer = 0;

View file

@ -1032,15 +1032,6 @@ void D_SRB2Main(void)
if (M_CheckParm("-password") && M_IsNextParm())
D_SetPassword(M_GetNextParm());
else
{
size_t z;
char junkpw[25];
for (z = 0; z < 24; z++)
junkpw[z] = (char)(rand() & 64)+32;
junkpw[24] = '\0';
D_SetPassword(junkpw);
}
// add any files specified on the command line with -file wadfile
// to the wad list

View file

@ -2724,10 +2724,12 @@ static void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt,
#define BASESALT "basepasswordstorage"
static UINT8 adminpassmd5[16];
static boolean adminpasswordset = false;
void D_SetPassword(const char *pw)
{
D_MD5PasswordPass((const UINT8 *)pw, strlen(pw), BASESALT, &adminpassmd5);
adminpasswordset = true;
}
// Remote Administration
@ -2796,6 +2798,12 @@ static void Got_Login(UINT8 **cp, INT32 playernum)
READMEM(*cp, sentmd5, 16);
if (!adminpasswordset)
{
CONS_Printf(M_GetText("Password from %s failed (no password set).\n"), player_names[playernum]);
return;
}
if (client)
return;
@ -4044,7 +4052,7 @@ static void Command_RestartAudio_f(void)
I_ShutdownSound();
I_StartupSound();
I_InitMusic();
// These must be called or no sound and music until manually set.
I_SetSfxVolume(cv_soundvolume.value);
@ -4052,7 +4060,7 @@ static void Command_RestartAudio_f(void)
I_SetMIDIMusicVolume(cv_midimusicvolume.value);
if (Playing()) // Gotta make sure the player is in a level
P_RestoreMusic(&players[consoleplayer]);
}
/** Quits a game and returns to the title screen.

View file

@ -987,7 +987,6 @@ static const char *credits[] = {
"\1Programming",
"Alam \"GBC\" Arias",
"Logan \"GBA\" Arias",
"Colette \"fickle\" Bordelon",
"Callum Dickinson",
"Scott \"Graue\" Feeney",
"Nathan \"Jazz\" Giroux",

View file

@ -2115,27 +2115,34 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
}
else
{
#ifdef ESLOPE // P.S. this is better-organized than the old version
fixed_t offs = sides[(newline ? newline : rover->master)->sidenum[0]].rowoffset;
grTex = HWR_GetTexture(texnum);
wallVerts[3].t = (*rover->topheight - h + offs) * grTex->scaleY;
wallVerts[2].t = (*rover->topheight - hS + offs) * grTex->scaleY;
wallVerts[0].t = (*rover->topheight - l + offs) * grTex->scaleY;
wallVerts[1].t = (*rover->topheight - lS + offs) * grTex->scaleY;
#else
grTex = HWR_GetTexture(texnum);
fixed_t texturevpeg;
// Wow, how was this missing from OpenGL for so long?
// ...Oh well, anyway, Lower Unpegged now changes pegging of FOFs like in software
// -- Monster Iestyn 26/06/18
if (newline)
{
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset) * grTex->scaleY;
wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset)) * grTex->scaleY;
texturevpeg = sides[newline->sidenum[0]].rowoffset;
if (newline->flags & ML_DONTPEGBOTTOM)
texturevpeg -= *rover->topheight - *rover->bottomheight;
}
else
{
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset) * grTex->scaleY;
wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset)) * grTex->scaleY;
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
if (gr_linedef->flags & ML_DONTPEGBOTTOM)
texturevpeg -= *rover->topheight - *rover->bottomheight;
}
grTex = HWR_GetTexture(texnum);
#ifdef ESLOPE
wallVerts[3].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
wallVerts[2].t = (*rover->topheight - hS + texturevpeg) * grTex->scaleY;
wallVerts[0].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
wallVerts[1].t = (*rover->topheight - lS + texturevpeg) * grTex->scaleY;
#else
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
wallVerts[0].t = wallVerts[1].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
#endif
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
@ -4072,7 +4079,7 @@ static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float t
angle_t shadowdir;
// Set direction
if (splitscreen && stplyr != &players[displayplayer])
if (splitscreen && stplyr == &players[secondarydisplayplayer])
shadowdir = localangle2 + FixedAngle(cv_cam2_rotate.value);
else
shadowdir = localangle + FixedAngle(cv_cam_rotate.value);
@ -5480,7 +5487,10 @@ static void HWR_ProjectSprite(mobj_t *thing)
}
heightsec = thing->subsector->sector->heightsec;
phs = players[displayplayer].mo->subsector->sector->heightsec;
if (viewplayer->mo && viewplayer->mo->subsector)
phs = viewplayer->mo->subsector->sector->heightsec;
else
phs = -1;
if (heightsec != -1 && phs != -1) // only clip things which are in special sectors
{

View file

@ -3435,7 +3435,7 @@ state_t states[NUMSTATES] =
{SPR_CACO, 2, 5, {A_JetChase}, 0, 0, S_CACO_CHASE_REPEAT}, // S_CACO_CHASE
{SPR_CACO, 2, 0, {A_Repeat}, 5, S_CACO_CHASE, S_CACO_RANDOM}, // S_CACO_CHASE_REPEAT
{SPR_CACO, 2, 0, {A_RandomState}, S_CACO_PREPARE_SOUND, S_CACO_CHASE, S_CACO_RANDOM}, // S_CACO_RANDOM
{SPR_CACO, 2, 8, {A_PlaySound}, sfx_s3k95, 0, S_CACO_PREPARE1}, // S_CACO_PREPARE_SOUND
{SPR_CACO, 2, 8, {A_PlaySound}, sfx_s3k95, 1, S_CACO_PREPARE1}, // S_CACO_PREPARE_SOUND
{SPR_CACO, 3, 8, {NULL}, 0, 0, S_CACO_PREPARE2}, // S_CACO_PREPARE1
{SPR_CACO, 4|FF_FULLBRIGHT, 8, {NULL}, 0, 0, S_CACO_PREPARE3}, // S_CACO_PREPARE2
{SPR_CACO, 5|FF_FULLBRIGHT, 8, {NULL}, 0, 0, S_CACO_SHOOT_SOUND}, // S_CACO_PREPARE3
@ -4049,7 +4049,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CRUSHSTACEAN
610, //126, // doomednum
126, // doomednum
S_CRUSHSTACEAN_ROAM1, // spawnstate
1, // spawnhealth
S_NULL, // seestate
@ -6825,7 +6825,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_BIGMINE
524, // doomednum
1012, // doomednum
S_BIGMINE_IDLE, // spawnstate
1, // spawnhealth
S_BIGMINE_ALERT1, // seestate
@ -6852,7 +6852,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_BLASTEXECUTOR
1505, // doomednum
756, // doomednum
S_INVISIBLE, // spawnstate
1, // spawnhealth
S_NULL, // seestate
@ -6879,7 +6879,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CANNONLAUNCHER
525, // doomednum
1123, // doomednum
S_CANNONLAUNCHER1, // spawnstate
1, // spawnhealth
S_NULL, // seestate
@ -8634,7 +8634,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CANNONBALLDECOR
526, // doomednum
1124, // doomednum
S_CANNONBALL1, // spawnstate
1, // spawnhealth
S_NULL, // seestate
@ -8958,7 +8958,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CHECKERTREE
810, // doomednum
809, // doomednum
S_CHECKERTREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -8985,7 +8985,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CHECKERSUNSETTREE
811, // doomednum
810, // doomednum
S_CHECKERSUNSETTREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -9012,7 +9012,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FHZTREE
812, // doomednum
2102, // doomednum
S_FHZTREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -9039,7 +9039,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FHZPINKTREE
813, // doomednum
2103, // doomednum
S_FHZPINKTREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -9066,7 +9066,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_POLYGONTREE
814, // doomednum
811, // doomednum
S_POLYGONTREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -9093,7 +9093,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_BUSHTREE
815, // doomednum
812, // doomednum
S_BUSHTREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -9120,7 +9120,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_BUSHREDTREE
816, // doomednum
813, // doomednum
S_BUSHREDTREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -9633,7 +9633,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_DSZ2STALAGMITE
999, // doomednum
1011, // doomednum
S_DSZ2STALAGMITE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -9957,7 +9957,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CUSTOMMACEPOINT
1111, // doomednum
1110, // doomednum
S_INVISIBLE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10281,7 +10281,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CEZPOLE
1113, // doomednum
1117, // doomednum
S_CEZPOLE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10335,7 +10335,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_PINETREE
1041, // doomednum
1114, // doomednum
S_PINETREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10362,7 +10362,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CEZBUSH1
1042, // doomednum
1115, // doomednum
S_CEZBUSH1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10389,7 +10389,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CEZBUSH2
1043, // doomednum
1116, // doomednum
S_CEZBUSH2, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10416,7 +10416,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CANDLE
3330, // doomednum
1119, // doomednum
S_CANDLE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10443,7 +10443,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CANDLEPRICKET
3332, // doomednum
1120, // doomednum
S_CANDLEPRICKET, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10470,7 +10470,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FLAMEHOLDER
3335, // doomednum
1121, // doomednum
S_FLAMEHOLDER, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10497,7 +10497,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FIRETORCH
3336, // doomednum
1122, // doomednum
S_FIRETORCH, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10524,7 +10524,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_WAVINGFLAG
1329, // doomednum
1118, // doomednum
S_WAVINGFLAG, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10578,7 +10578,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CRAWLASTATUE
1120, // doomednum
1111, // doomednum
S_CRAWLASTATUE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10605,7 +10605,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FACESTABBERSTATUE
1331, // doomednum
1112, // doomednum
S_FACESTABBERSTATUE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10632,7 +10632,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_SUSPICIOUSFACESTABBERSTATUE
1332, // doomednum
1113, // doomednum
S_SUSPICIOUSFACESTABBERSTATUE_WAIT, // spawnstate
1000, // spawnhealth
S_SUSPICIOUSFACESTABBERSTATUE_BURST1, // seestate
@ -10902,7 +10902,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FJSPINAXISA
3575, // doomednum
1302, // doomednum
S_FJSPINAXISA1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -10929,7 +10929,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FJSPINAXISB
3576, // doomednum
1303, // doomednum
S_FJSPINAXISB1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11658,7 +11658,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FHZICE1
4028, // doomednum
2100, // doomednum
S_FHZICE1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11685,7 +11685,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_FHZICE2
4029, // doomednum
2101, // doomednum
S_FHZICE2, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11712,7 +11712,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_JACKO1
3520, // doomednum
2006, // doomednum
S_JACKO1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11739,7 +11739,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_JACKO2
3521, // doomednum
2007, // doomednum
S_JACKO2, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11766,7 +11766,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_JACKO3
3522, // doomednum
2008, // doomednum
S_JACKO3, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11793,7 +11793,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HHZTREE_TOP
3540, // doomednum
2010, // doomednum
S_HHZTREE_TOP, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11847,7 +11847,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HHZSHROOM
3530, // doomednum
2009, // doomednum
S_HHZSHROOM_1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11874,7 +11874,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HHZGRASS
3513, // doomednum
2001, // doomednum
S_HHZGRASS, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11901,7 +11901,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HHZTENTACLE1
3515, // doomednum
2002, // doomednum
S_HHZTENT1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11928,7 +11928,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HHZTENTACLE2
3516, // doomednum
2003, // doomednum
S_HHZTENT2, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11955,7 +11955,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HHZSTALAGMITE_TALL
3517, // doomednum
2004, // doomednum
S_HHZSTALAGMITE_TALL, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11982,7 +11982,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HHZSTALAGMITE_SHORT
3518, // doomednum
2005, // doomednum
S_HHZSTALAGMITE_SHORT, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -14964,7 +14964,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_MACHINEAMBIENCE
3405, // doomednum
710, // doomednum
S_INVISIBLE, // spawnstate
24, // spawnhealth: repeat speed
S_NULL, // seestate
@ -16612,7 +16612,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_PENGUINATOR
2017, // doomednum
129, // doomednum
S_PENGUINATOR_LOOK, // spawnstate
1, // spawnhealth
S_PENGUINATOR_WADDLE1, // seestate
@ -16639,7 +16639,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_POPHAT
2018, // doomednum -- happy anniversary!
130, // doomednum -- happy anniversary!
S_POPHAT_LOOK, // spawnstate
1, // spawnhealth
S_POPHAT_SHOOT1, // seestate
@ -16693,7 +16693,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HIVEELEMENTAL
3190, // doomednum
127, // doomednum
S_HIVEELEMENTAL_LOOK, // spawnstate
2, // spawnhealth
S_HIVEELEMENTAL_PREPARE1, // seestate
@ -16720,7 +16720,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_BUMBLEBORE
3191, // doomednum
128, // doomednum
S_BUMBLEBORE_SPAWN, // spawnstate
0, // spawnhealth -- this is how you do drones...
S_BUMBLEBORE_FLY1, // seestate
@ -16774,7 +16774,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_SMASHINGSPIKEBALL
3001, // doomednum
2000, // doomednum
S_SMASHSPIKE_FLOAT, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -16801,7 +16801,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_CACOLANTERN
3102, // doomednum
132, // doomednum
S_CACO_LOOK, // spawnstate
1, // spawnhealth
S_CACO_WAKE1, // seestate
@ -16882,7 +16882,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_SPINBOBERT
3100, // doomednum
131, // doomednum
S_SPINBOBERT_MOVE_FLIPUP, // spawnstate
1, // spawnhealth
S_NULL, // seestate
@ -16963,7 +16963,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_HANGSTER
3195, // doomednum
133, // doomednum
S_HANGSTER_LOOK, // spawnstate
1, // spawnhealth
S_HANGSTER_SWOOP1, // seestate

View file

@ -85,7 +85,9 @@ void Got_Luacmd(UINT8 **cp, INT32 playernum)
deny:
//must be hacked/buggy client
lua_settop(gL, 0); // clear stack
if (gL) // check if Lua is actually turned on first, you dummmy -- Monster Iestyn 04/07/18
lua_settop(gL, 0); // clear stack
CONS_Alert(CONS_WARNING, M_GetText("Illegal lua command received from %s\n"), player_names[playernum]);
if (server)
{

View file

@ -8840,7 +8840,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
break;
S_StartSound(NULL,sfx_menu1); // Tails
l = strlen(setupm_name);
if (l < MAXPLAYERNAME-1)
if (l < MAXPLAYERNAME)
{
setupm_name[l] = (char)choice;
setupm_name[l+1] = 0;

View file

@ -56,7 +56,9 @@ typedef off_t off64_t;
#endif
#endif
#if defined (_WIN32)
#if defined(__MINGW32__) && ((__GNUC__ > 7) || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))
#define PRIdS "u"
#elif defined (_WIN32)
#define PRIdS "Iu"
#elif defined (DJGPP)
#define PRIdS "u"

View file

@ -10884,9 +10884,14 @@ void P_InternalFlickyFly(mobj_t *actor, fixed_t flyspeed, fixed_t targetdist, fi
if (actor->target && abs(chasez - actor->z) > targetdist)
targetdist = P_AproxDistance(actor->target->x - actor->x, actor->target->y - actor->y);
vertangle = (R_PointToAngle2(0, actor->z, targetdist, chasez) >> ANGLETOFINESHIFT) & FINEMASK;
P_InstaThrust(actor, actor->angle, FixedMul(FINECOSINE(vertangle), flyspeed));
actor->momz = FixedMul(FINESINE(vertangle), flyspeed);
if (actor->spawnpoint && (actor->spawnpoint->options & MTF_AMBUSH))
actor->momz = 0;
else
{
vertangle = (R_PointToAngle2(0, actor->z, targetdist, chasez) >> ANGLETOFINESHIFT) & FINEMASK;
P_InstaThrust(actor, actor->angle, FixedMul(FINECOSINE(vertangle), flyspeed));
actor->momz = FixedMul(FINESINE(vertangle), flyspeed);
}
}
// Function: A_FlickyFly

View file

@ -388,6 +388,7 @@ typedef struct precipmobj_s
angle_t angle; // orientation
spritenum_t sprite; // used to find patch_t and flip value
UINT32 frame; // frame number, plus bits see p_pspr.h
UINT8 sprite2; // player sprites
UINT16 anim_duration; // for FF_ANIMATE states
struct mprecipsecnode_s *touching_sectorlist; // a linked list of sectors where this object appears

View file

@ -66,6 +66,7 @@ static boolean midimode;
static Mix_Music *music;
static UINT8 music_volume, midi_volume, sfx_volume;
static float loop_point;
static boolean songpaused;
#ifdef HAVE_LIBGME
static Music_Emu *gme;
@ -102,6 +103,7 @@ void I_StartupSound(void)
}
sound_started = true;
songpaused = false;
Mix_AllocateChannels(256);
}
@ -450,7 +452,7 @@ static void mix_gme(void *udata, Uint8 *stream, int len)
(void)udata;
// no gme? no music.
if (!gme || gme_track_ended(gme))
if (!gme || gme_track_ended(gme) || songpaused)
return;
// play gme into stream
@ -458,7 +460,7 @@ static void mix_gme(void *udata, Uint8 *stream, int len)
// apply volume to stream
for (i = 0, p = (short *)stream; i < len/2; i++, p++)
*p = ((INT32)*p) * music_volume / 31;
*p = ((INT32)*p) * music_volume*2 / 42;
}
#endif
@ -476,12 +478,14 @@ void I_PauseSong(INT32 handle)
{
(void)handle;
Mix_PauseMusic();
songpaused = true;
}
void I_ResumeSong(INT32 handle)
{
(void)handle;
Mix_ResumeMusic();
songpaused = false;
}
//