mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 23:33:00 +00:00
- Added Karate Chris's patch to optionally specify an angle offset for
summoning. - Added Karate Chris's fix for Serpent Staff vampirism on teammates. - Locks and teleporters now take precedence over one-sidedness for automap coloring. SVN r1317 (trunk)
This commit is contained in:
parent
f435576f1d
commit
49120f59d4
7 changed files with 94 additions and 95 deletions
|
@ -1,4 +1,9 @@
|
||||||
December 15, 2008
|
December 15, 2008
|
||||||
|
- Added Karate Chris's patch to optionally specify an angle offset for
|
||||||
|
summoning.
|
||||||
|
- Added Karate Chris's fix for Serpent Staff vampirism on teammates.
|
||||||
|
- Locks and teleporters now take precedence over one-sidedness for automap
|
||||||
|
coloring.
|
||||||
- Increased maximum number of per-pattern rows for the XM loader from
|
- Increased maximum number of per-pattern rows for the XM loader from
|
||||||
256 to 1024 to deal with a module that otherwise would not load.
|
256 to 1024 to deal with a module that otherwise would not load.
|
||||||
- Removed the artificial restriction on not supporting Vorbis-compressed
|
- Removed the artificial restriction on not supporting Vorbis-compressed
|
||||||
|
|
|
@ -1377,15 +1377,9 @@ void AM_drawWalls (bool allmap)
|
||||||
// map secret sectors like Boom
|
// map secret sectors like Boom
|
||||||
AM_drawMline(&l, SecretSectorColor);
|
AM_drawMline(&l, SecretSectorColor);
|
||||||
}
|
}
|
||||||
else if (!lines[i].backsector)
|
else if (lines[i].flags & ML_SECRET)
|
||||||
{
|
|
||||||
AM_drawMline(&l, WallColor);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (lines[i].flags & ML_SECRET)
|
|
||||||
{ // secret door
|
{ // secret door
|
||||||
if (am_cheat != 0)
|
if (am_cheat != 0 && lines[i].backsector != NULL)
|
||||||
AM_drawMline(&l, SecretWallColor);
|
AM_drawMline(&l, SecretWallColor);
|
||||||
else
|
else
|
||||||
AM_drawMline(&l, WallColor);
|
AM_drawMline(&l, WallColor);
|
||||||
|
@ -1410,14 +1404,13 @@ void AM_drawWalls (bool allmap)
|
||||||
else if (lines[i].special == Door_LockedRaise ||
|
else if (lines[i].special == Door_LockedRaise ||
|
||||||
lines[i].special == ACS_LockedExecute ||
|
lines[i].special == ACS_LockedExecute ||
|
||||||
lines[i].special == ACS_LockedExecuteDoor ||
|
lines[i].special == ACS_LockedExecuteDoor ||
|
||||||
(lines[i].special == Generic_Door && lines[i].args[4]!=0))
|
(lines[i].special == Generic_Door && lines[i].args[4] !=0 ))
|
||||||
{
|
{
|
||||||
if (am_colorset == 0)
|
if (am_colorset == 0)
|
||||||
{
|
{
|
||||||
int P_GetMapColorForLock(int lock);
|
int P_GetMapColorForLock(int lock);
|
||||||
int lock;
|
int lock;
|
||||||
|
|
||||||
|
|
||||||
if (lines[i].special==Door_LockedRaise) lock=lines[i].args[3];
|
if (lines[i].special==Door_LockedRaise) lock=lines[i].args[3];
|
||||||
else lock=lines[i].args[4];
|
else lock=lines[i].args[4];
|
||||||
|
|
||||||
|
@ -1431,8 +1424,14 @@ void AM_drawWalls (bool allmap)
|
||||||
AM_drawMline (&l, c);
|
AM_drawMline (&l, c);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
AM_drawMline (&l, LockedColor); // locked special
|
AM_drawMline (&l, LockedColor); // locked special
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (lines[i].backsector == NULL)
|
||||||
|
{
|
||||||
|
AM_drawMline(&l, WallColor); // one-sided wall
|
||||||
|
}
|
||||||
else if (lines[i].backsector->floorplane
|
else if (lines[i].backsector->floorplane
|
||||||
!= lines[i].frontsector->floorplane)
|
!= lines[i].frontsector->floorplane)
|
||||||
{
|
{
|
||||||
|
@ -1448,7 +1447,6 @@ void AM_drawWalls (bool allmap)
|
||||||
AM_drawMline(&l, TSWallColor);
|
AM_drawMline(&l, TSWallColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (allmap)
|
else if (allmap)
|
||||||
{
|
{
|
||||||
if (!(lines[i].flags & ML_DONTDRAW))
|
if (!(lines[i].flags & ML_DONTDRAW))
|
||||||
|
|
|
@ -2113,6 +2113,9 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
||||||
case DEM_SUMMON:
|
case DEM_SUMMON:
|
||||||
case DEM_SUMMONFRIEND:
|
case DEM_SUMMONFRIEND:
|
||||||
case DEM_SUMMONFOE:
|
case DEM_SUMMONFOE:
|
||||||
|
case DEM_SUMMON2:
|
||||||
|
case DEM_SUMMONFRIEND2:
|
||||||
|
case DEM_SUMMONFOE2:
|
||||||
{
|
{
|
||||||
const PClass *typeinfo;
|
const PClass *typeinfo;
|
||||||
|
|
||||||
|
@ -2136,7 +2139,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
||||||
source->z + 8 * FRACUNIT, ALLOW_REPLACE);
|
source->z + 8 * FRACUNIT, ALLOW_REPLACE);
|
||||||
if (spawned != NULL)
|
if (spawned != NULL)
|
||||||
{
|
{
|
||||||
if (type == DEM_SUMMONFRIEND)
|
if (type == DEM_SUMMONFRIEND || type == DEM_SUMMONFRIEND2)
|
||||||
{
|
{
|
||||||
if (spawned->CountsAsKill())
|
if (spawned->CountsAsKill())
|
||||||
{
|
{
|
||||||
|
@ -2146,12 +2149,17 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
||||||
spawned->flags |= MF_FRIENDLY;
|
spawned->flags |= MF_FRIENDLY;
|
||||||
spawned->LastHeard = players[player].mo;
|
spawned->LastHeard = players[player].mo;
|
||||||
}
|
}
|
||||||
else if (type == DEM_SUMMONFOE)
|
else if (type == DEM_SUMMONFOE || type == DEM_SUMMONFOE2)
|
||||||
{
|
{
|
||||||
spawned->FriendPlayer = 0;
|
spawned->FriendPlayer = 0;
|
||||||
spawned->flags &= ~MF_FRIENDLY;
|
spawned->flags &= ~MF_FRIENDLY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (type >= DEM_SUMMON2 && type <= DEM_SUMMONFOE2)
|
||||||
|
{
|
||||||
|
int angle = ReadWord(stream);
|
||||||
|
spawned->angle = source->angle - (ANGLE_1 * angle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2383,6 +2391,9 @@ void Net_SkipCommand (int type, BYTE **stream)
|
||||||
|
|
||||||
case DEM_GIVECHEAT:
|
case DEM_GIVECHEAT:
|
||||||
case DEM_TAKECHEAT:
|
case DEM_TAKECHEAT:
|
||||||
|
case DEM_SUMMON2:
|
||||||
|
case DEM_SUMMONFRIEND2:
|
||||||
|
case DEM_SUMMONFOE2:
|
||||||
skip = strlen ((char *)(*stream)) + 3;
|
skip = strlen ((char *)(*stream)) + 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,9 @@ enum EDemoCommand
|
||||||
DEM_DELCONTROLLER, // 49 Player to remove from the controller list.
|
DEM_DELCONTROLLER, // 49 Player to remove from the controller list.
|
||||||
DEM_KILLCLASSCHEAT, // 50 String: Class to kill.
|
DEM_KILLCLASSCHEAT, // 50 String: Class to kill.
|
||||||
DEM_CONVERSATION, // 51 Make conversations work.
|
DEM_CONVERSATION, // 51 Make conversations work.
|
||||||
|
DEM_SUMMON2, // 52 String: Thing to fabricate, WORD: angle offset
|
||||||
|
DEM_SUMMONFRIEND2, // 53
|
||||||
|
DEM_SUMMONFOE2, // 54
|
||||||
};
|
};
|
||||||
|
|
||||||
// The following are implemented by cht_DoCheat in m_cheat.cpp
|
// The following are implemented by cht_DoCheat in m_cheat.cpp
|
||||||
|
|
|
@ -72,7 +72,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheck)
|
||||||
P_LineAttack (pmo, angle, fixed_t(1.5*MELEERANGE), slope, damage, NAME_Melee, PClass::FindClass ("CStaffPuff"));
|
P_LineAttack (pmo, angle, fixed_t(1.5*MELEERANGE), slope, damage, NAME_Melee, PClass::FindClass ("CStaffPuff"));
|
||||||
pmo->angle = R_PointToAngle2 (pmo->x, pmo->y,
|
pmo->angle = R_PointToAngle2 (pmo->x, pmo->y,
|
||||||
linetarget->x, linetarget->y);
|
linetarget->x, linetarget->y);
|
||||||
if ((linetarget->player || linetarget->flags3&MF3_ISMONSTER)
|
if (((linetarget->player && (!linetarget->IsTeammate (pmo) || level.teamdamage != 0))|| linetarget->flags3&MF3_ISMONSTER)
|
||||||
&& (!(linetarget->flags2&(MF2_DORMANT+MF2_INVULNERABLE))))
|
&& (!(linetarget->flags2&(MF2_DORMANT+MF2_INVULNERABLE))))
|
||||||
{
|
{
|
||||||
newLife = player->health+(damage>>3);
|
newLife = player->health+(damage>>3);
|
||||||
|
@ -96,7 +96,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheck)
|
||||||
P_LineAttack (pmo, angle, fixed_t(1.5*MELEERANGE), slope, damage, NAME_Melee, PClass::FindClass ("CStaffPuff"));
|
P_LineAttack (pmo, angle, fixed_t(1.5*MELEERANGE), slope, damage, NAME_Melee, PClass::FindClass ("CStaffPuff"));
|
||||||
pmo->angle = R_PointToAngle2 (pmo->x, pmo->y,
|
pmo->angle = R_PointToAngle2 (pmo->x, pmo->y,
|
||||||
linetarget->x, linetarget->y);
|
linetarget->x, linetarget->y);
|
||||||
if (linetarget->player || linetarget->flags3&MF3_ISMONSTER)
|
if ((linetarget->player && (!linetarget->IsTeammate (pmo) || level.teamdamage != 0)) || linetarget->flags3&MF3_ISMONSTER)
|
||||||
{
|
{
|
||||||
newLife = player->health+(damage>>4);
|
newLife = player->health+(damage>>4);
|
||||||
newLife = newLife > 100 ? 100 : newLife;
|
newLife = newLife > 100 ? 100 : newLife;
|
||||||
|
|
42
src/info.cpp
42
src/info.cpp
|
@ -371,7 +371,7 @@ CCMD (dumpmapthings)
|
||||||
|
|
||||||
bool CheckCheatmode ();
|
bool CheckCheatmode ();
|
||||||
|
|
||||||
CCMD (summon)
|
static void SummonActor (int command, int command2, FCommandLine argv)
|
||||||
{
|
{
|
||||||
if (CheckCheatmode ())
|
if (CheckCheatmode ())
|
||||||
return;
|
return;
|
||||||
|
@ -384,43 +384,25 @@ CCMD (summon)
|
||||||
Printf ("Unknown class '%s'\n", argv[1]);
|
Printf ("Unknown class '%s'\n", argv[1]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Net_WriteByte (DEM_SUMMON);
|
Net_WriteByte (argv.argc() > 2 ? command2 : command);
|
||||||
Net_WriteString (type->TypeName.GetChars());
|
Net_WriteString (type->TypeName.GetChars());
|
||||||
|
|
||||||
|
if (argv.argc () > 2)
|
||||||
|
Net_WriteWord (atoi (argv[2]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CCMD (summon)
|
||||||
|
{
|
||||||
|
SummonActor (DEM_SUMMON, DEM_SUMMON2, argv);
|
||||||
|
}
|
||||||
|
|
||||||
CCMD (summonfriend)
|
CCMD (summonfriend)
|
||||||
{
|
{
|
||||||
if (CheckCheatmode ())
|
SummonActor (DEM_SUMMONFRIEND, DEM_SUMMONFRIEND2, argv);
|
||||||
return;
|
|
||||||
|
|
||||||
if (argv.argc() > 1)
|
|
||||||
{
|
|
||||||
const PClass *type = PClass::FindClass (argv[1]);
|
|
||||||
if (type == NULL)
|
|
||||||
{
|
|
||||||
Printf ("Unknown class '%s'\n", argv[1]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Net_WriteByte (DEM_SUMMONFRIEND);
|
|
||||||
Net_WriteString (type->TypeName.GetChars());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (summonfoe)
|
CCMD (summonfoe)
|
||||||
{
|
{
|
||||||
if (CheckCheatmode ())
|
SummonActor (DEM_SUMMONFOE, DEM_SUMMONFOE2, argv);
|
||||||
return;
|
|
||||||
|
|
||||||
if (argv.argc() > 1)
|
|
||||||
{
|
|
||||||
const PClass *type = PClass::FindClass (argv[1]);
|
|
||||||
if (type == NULL)
|
|
||||||
{
|
|
||||||
Printf ("Unknown class '%s'\n", argv[1]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Net_WriteByte (DEM_SUMMONFOE);
|
|
||||||
Net_WriteString (type->TypeName.GetChars());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
// Version identifier for network games.
|
// Version identifier for network games.
|
||||||
// Bump it every time you do a release unless you're certain you
|
// Bump it every time you do a release unless you're certain you
|
||||||
// didn't change anything that will affect sync.
|
// didn't change anything that will affect sync.
|
||||||
#define NETGAMEVERSION 217
|
#define NETGAMEVERSION 218
|
||||||
|
|
||||||
// Version stored in the ini's [LastRun] section.
|
// Version stored in the ini's [LastRun] section.
|
||||||
// Bump it if you made some configuration change that you want to
|
// Bump it if you made some configuration change that you want to
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
// Protocol version used in demos.
|
// Protocol version used in demos.
|
||||||
// Bump it if you change existing DEM_ commands or add new ones.
|
// Bump it if you change existing DEM_ commands or add new ones.
|
||||||
// Otherwise, it should be safe to leave it alone.
|
// Otherwise, it should be safe to leave it alone.
|
||||||
#define DEMOGAMEVERSION 0x20D
|
#define DEMOGAMEVERSION 0x20E
|
||||||
|
|
||||||
// Minimum demo version we can play.
|
// Minimum demo version we can play.
|
||||||
// Bump it whenever you change or remove existing DEM_ commands.
|
// Bump it whenever you change or remove existing DEM_ commands.
|
||||||
|
|
Loading…
Reference in a new issue