Merge branch 'scripting'
Conflicts: src/actor.h src/g_doom/a_doomweaps.cpp src/g_hexen/a_blastradius.cpp src/p_enemy.cpp src/p_enemy.h src/thingdef/thingdef.h src/thingdef/thingdef_codeptr.cpp wadsrc/static/actors/constants.txt
This commit is contained in:
commit
b3b0886b64
230 changed files with 24061 additions and 8641 deletions
|
|
@ -2071,7 +2071,7 @@ BYTE *FDynamicBuffer::GetData (int *len)
|
|||
}
|
||||
|
||||
|
||||
static int KillAll(const PClass *cls)
|
||||
static int KillAll(PClassActor *cls)
|
||||
{
|
||||
AActor *actor;
|
||||
int killcount = 0;
|
||||
|
|
@ -2291,7 +2291,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
case DEM_SUMMONFRIEND2:
|
||||
case DEM_SUMMONFOE2:
|
||||
{
|
||||
const PClass *typeinfo;
|
||||
PClassActor *typeinfo;
|
||||
int angle = 0;
|
||||
SWORD tid = 0;
|
||||
BYTE special = 0;
|
||||
|
|
@ -2306,8 +2306,8 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
for(i = 0; i < 5; i++) args[i] = ReadLong(stream);
|
||||
}
|
||||
|
||||
typeinfo = PClass::FindClass (s);
|
||||
if (typeinfo != NULL && typeinfo->ActorInfo != NULL)
|
||||
typeinfo = PClass::FindActor(s);
|
||||
if (typeinfo != NULL)
|
||||
{
|
||||
AActor *source = players[player].mo;
|
||||
if (source != NULL)
|
||||
|
|
@ -2534,7 +2534,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
case DEM_MORPHEX:
|
||||
{
|
||||
s = ReadString (stream);
|
||||
const char *msg = cht_Morph (players + player, PClass::FindClass (s), false);
|
||||
const char *msg = cht_Morph (players + player, dyn_cast<PClassPlayerPawn>(PClass::FindClass (s)), false);
|
||||
if (player == consoleplayer)
|
||||
{
|
||||
Printf ("%s\n", *msg != '\0' ? msg : "Morph failed.");
|
||||
|
|
@ -2566,12 +2566,12 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
{
|
||||
char *classname = ReadString (stream);
|
||||
int killcount = 0;
|
||||
const PClass *cls = PClass::FindClass(classname);
|
||||
PClassActor *cls = PClass::FindActor(classname);
|
||||
|
||||
if (cls != NULL && cls->ActorInfo != NULL)
|
||||
if (cls != NULL)
|
||||
{
|
||||
killcount = KillAll(cls);
|
||||
const PClass *cls_rep = cls->GetReplacement();
|
||||
PClassActor *cls_rep = cls->GetReplacement();
|
||||
if (cls != cls_rep)
|
||||
{
|
||||
killcount += KillAll(cls_rep);
|
||||
|
|
@ -2589,8 +2589,8 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
{
|
||||
char *classname = ReadString(stream);
|
||||
int removecount = 0;
|
||||
const PClass *cls = PClass::FindClass(classname);
|
||||
if (cls != NULL && cls->ActorInfo != NULL)
|
||||
PClassActor *cls = PClass::FindActor(classname);
|
||||
if (cls != NULL && cls->IsKindOf(RUNTIME_CLASS(PClassActor)))
|
||||
{
|
||||
removecount = RemoveClass(cls);
|
||||
const PClass *cls_rep = cls->GetReplacement();
|
||||
|
|
@ -2633,7 +2633,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
}
|
||||
for(i = 0; i < count; ++i)
|
||||
{
|
||||
const PClass *wpn = Net_ReadWeapon(stream);
|
||||
PClassWeapon *wpn = Net_ReadWeapon(stream);
|
||||
players[pnum].weapons.AddSlot(slot, wpn, pnum == consoleplayer);
|
||||
}
|
||||
}
|
||||
|
|
@ -2642,7 +2642,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
case DEM_ADDSLOT:
|
||||
{
|
||||
int slot = ReadByte(stream);
|
||||
const PClass *wpn = Net_ReadWeapon(stream);
|
||||
PClassWeapon *wpn = Net_ReadWeapon(stream);
|
||||
players[player].weapons.AddSlot(slot, wpn, player == consoleplayer);
|
||||
}
|
||||
break;
|
||||
|
|
@ -2650,7 +2650,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
case DEM_ADDSLOTDEFAULT:
|
||||
{
|
||||
int slot = ReadByte(stream);
|
||||
const PClass *wpn = Net_ReadWeapon(stream);
|
||||
PClassWeapon *wpn = Net_ReadWeapon(stream);
|
||||
players[player].weapons.AddSlotDefault(slot, wpn, player == consoleplayer);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue