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
|
|
@ -2754,19 +2754,19 @@ FUNC(LS_SetPlayerProperty)
|
|||
// Add or remove a power
|
||||
if (arg2 >= PROP_INVULNERABILITY && arg2 <= PROP_SPEED)
|
||||
{
|
||||
static const PClass *powers[11] =
|
||||
static PClass * const *powers[11] =
|
||||
{
|
||||
RUNTIME_CLASS(APowerInvulnerable),
|
||||
RUNTIME_CLASS(APowerStrength),
|
||||
RUNTIME_CLASS(APowerInvisibility),
|
||||
RUNTIME_CLASS(APowerIronFeet),
|
||||
&RUNTIME_CLASS_CASTLESS(APowerInvulnerable),
|
||||
&RUNTIME_CLASS_CASTLESS(APowerStrength),
|
||||
&RUNTIME_CLASS_CASTLESS(APowerInvisibility),
|
||||
&RUNTIME_CLASS_CASTLESS(APowerIronFeet),
|
||||
NULL, // MapRevealer
|
||||
RUNTIME_CLASS(APowerLightAmp),
|
||||
RUNTIME_CLASS(APowerWeaponLevel2),
|
||||
RUNTIME_CLASS(APowerFlight),
|
||||
&RUNTIME_CLASS_CASTLESS(APowerLightAmp),
|
||||
&RUNTIME_CLASS_CASTLESS(APowerWeaponLevel2),
|
||||
&RUNTIME_CLASS_CASTLESS(APowerFlight),
|
||||
NULL,
|
||||
NULL,
|
||||
RUNTIME_CLASS(APowerSpeed)
|
||||
&RUNTIME_CLASS_CASTLESS(APowerSpeed)
|
||||
};
|
||||
int power = arg2 - PROP_INVULNERABILITY;
|
||||
|
||||
|
|
@ -2781,7 +2781,7 @@ FUNC(LS_SetPlayerProperty)
|
|||
{ // Give power to activator
|
||||
if (power != 4)
|
||||
{
|
||||
APowerup *item = static_cast<APowerup*>(it->GiveInventoryType (powers[power]));
|
||||
APowerup *item = static_cast<APowerup*>(it->GiveInventoryType(static_cast<PClassActor *>(*powers[power])));
|
||||
if (item != NULL && power == 0 && arg1 == 1)
|
||||
{
|
||||
item->BlendColor = MakeSpecialColormap(INVERSECOLORMAP);
|
||||
|
|
@ -2796,7 +2796,7 @@ FUNC(LS_SetPlayerProperty)
|
|||
{ // Take power from activator
|
||||
if (power != 4)
|
||||
{
|
||||
AInventory *item = it->FindInventory (powers[power], true);
|
||||
AInventory *item = it->FindInventory(static_cast<PClassActor *>(*powers[power]), true);
|
||||
if (item != NULL)
|
||||
{
|
||||
item->Destroy ();
|
||||
|
|
@ -2821,7 +2821,7 @@ FUNC(LS_SetPlayerProperty)
|
|||
{ // Give power
|
||||
if (power != 4)
|
||||
{
|
||||
APowerup *item = static_cast<APowerup*>(players[i].mo->GiveInventoryType (powers[power]));
|
||||
APowerup *item = static_cast<APowerup*>(players[i].mo->GiveInventoryType (static_cast<PClassActor *>(*powers[power])));
|
||||
if (item != NULL && power == 0 && arg1 == 1)
|
||||
{
|
||||
item->BlendColor = MakeSpecialColormap(INVERSECOLORMAP);
|
||||
|
|
@ -2836,7 +2836,7 @@ FUNC(LS_SetPlayerProperty)
|
|||
{ // Take power
|
||||
if (power != 4)
|
||||
{
|
||||
AInventory *item = players[i].mo->FindInventory (powers[power]);
|
||||
AInventory *item = players[i].mo->FindInventory (static_cast<PClassActor *>(*powers[power]));
|
||||
if (item != NULL)
|
||||
{
|
||||
item->Destroy ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue