- Added kgsws's SummonActor enhancement and bumped netgame and demo versions

because this submission changes an existing command.



SVN r1749 (trunk)
This commit is contained in:
Christoph Oelckers 2009-08-03 20:40:45 +00:00
parent 54c4e26f7d
commit 00f88610ac
4 changed files with 41 additions and 8 deletions

View File

@ -1,4 +1,8 @@
August 2, 2009 (Changes by Graf Zahl) August 3, 2009 (Changes by Graf Zahl)
- Added kgsws's SummonActor enhancement and bumped netgame and demo versions
because this submission changes an existing command.
August 2, 2009 (Changes by Graf Zahl)
- Changed: DEHACKED parsing is disabled now when a user supplied DEHSUPP lump - Changed: DEHACKED parsing is disabled now when a user supplied DEHSUPP lump
is found. This mimics the old behavior which also disabled DEHACKED when is found. This mimics the old behavior which also disabled DEHACKED when
the DEHSUPP lump was incompatible with the current engine. This behavior is the DEHSUPP lump was incompatible with the current engine. This behavior is

View File

@ -2099,8 +2099,20 @@ void Net_DoCommand (int type, BYTE **stream, int player)
case DEM_SUMMONFOE2: case DEM_SUMMONFOE2:
{ {
const PClass *typeinfo; const PClass *typeinfo;
int angle;
SWORD tid;
BYTE special;
int args[5];
s = ReadString (stream); s = ReadString (stream);
if (type >= DEM_SUMMON2 && type <= DEM_SUMMONFOE2)
{
angle = ReadWord(stream);
tid = ReadWord(stream);
special = ReadByte(stream);
for(i = 0; i < 5; i++) args[i] = ReadLong(stream);
}
typeinfo = PClass::FindClass (s); typeinfo = PClass::FindClass (s);
if (typeinfo != NULL && typeinfo->ActorInfo != NULL) if (typeinfo != NULL && typeinfo->ActorInfo != NULL)
{ {
@ -2140,8 +2152,13 @@ void Net_DoCommand (int type, BYTE **stream, int player)
} }
if (type >= DEM_SUMMON2 && type <= DEM_SUMMONFOE2) if (type >= DEM_SUMMON2 && type <= DEM_SUMMONFOE2)
{ {
int angle = ReadWord(stream);
spawned->angle = source->angle - (ANGLE_1 * angle); spawned->angle = source->angle - (ANGLE_1 * angle);
spawned->tid = tid;
spawned->special = special;
for(i = 0; i < 5; i++) {
spawned->args[i] = args[i];
}
if(tid) spawned->AddToHash();
} }
} }
} }
@ -2406,10 +2423,13 @@ void Net_SkipCommand (int type, BYTE **stream)
case DEM_GIVECHEAT: case DEM_GIVECHEAT:
case DEM_TAKECHEAT: case DEM_TAKECHEAT:
skip = strlen ((char *)(*stream)) + 3;
break;
case DEM_SUMMON2: case DEM_SUMMON2:
case DEM_SUMMONFRIEND2: case DEM_SUMMONFRIEND2:
case DEM_SUMMONFOE2: case DEM_SUMMONFOE2:
skip = strlen ((char *)(*stream)) + 3; skip = strlen ((char *)(*stream)) + 26;
break; break;
case DEM_MUSICCHANGE: case DEM_MUSICCHANGE:

View File

@ -421,8 +421,17 @@ static void SummonActor (int command, int command2, FCommandLine argv)
Net_WriteByte (argv.argc() > 2 ? command2 : command); Net_WriteByte (argv.argc() > 2 ? command2 : command);
Net_WriteString (type->TypeName.GetChars()); Net_WriteString (type->TypeName.GetChars());
if (argv.argc () > 2) if (argv.argc () > 2) {
Net_WriteWord (atoi (argv[2])); Net_WriteWord (atoi (argv[2])); // angle
if (argv.argc () > 3) Net_WriteWord (atoi (argv[3])); // TID
else Net_WriteWord (0);
if (argv.argc () > 4) Net_WriteByte (atoi (argv[4])); // special
else Net_WriteByte (0);
for(int i = 5; i < 10; i++) { // args[5]
if(i < argv.argc()) Net_WriteLong (atoi (argv[i]));
else Net_WriteLong (0);
}
}
} }
} }

View File

@ -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 222 #define NETGAMEVERSION 223
// 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,11 +64,11 @@
// 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 0x210 #define DEMOGAMEVERSION 0x211
// 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.
#define MINDEMOVERSION 0x210 #define MINDEMOVERSION 0x211
// SAVEVER is the version of the information stored in level snapshots. // SAVEVER is the version of the information stored in level snapshots.
// Note that SAVEVER is not directly comparable to VERSION. // Note that SAVEVER is not directly comparable to VERSION.