Removed more literal references to AInventory.

This commit is contained in:
Christoph Oelckers 2018-12-04 17:00:48 +01:00
parent 3d28006eda
commit cd563cc4db
29 changed files with 80 additions and 93 deletions

View file

@ -2966,7 +2966,6 @@ void AM_drawKeys ()
// Find the key's own color.
// Only works correctly if single-key locks have lower numbers than any-key locks.
// That is the case for all default keys, however.
int P_GetMapColorForKey (AInventory * key);
int c = P_GetMapColorForKey(key);
if (c >= 0) color.FromRGB(RPART(c), GPART(c), BPART(c));
@ -3066,8 +3065,7 @@ void AM_drawThings ()
}
else if (am_showkeys)
{
int P_GetMapColorForKey (AInventory * key);
int c = P_GetMapColorForKey(static_cast<AInventory *>(t));
int c = P_GetMapColorForKey(t);
if (c >= 0) color.FromRGB(RPART(c), GPART(c), BPART(c));
else color = AMColors[AMColors.ThingColor_CountItem];

View file

@ -99,7 +99,7 @@ using BotInfoMap = TMap<FName, BotInfoData>;
extern BotInfoMap BotInfo;
inline BotInfoData GetBotInfo(AInventory *weap)
inline BotInfoData GetBotInfo(AActor *weap)
{
if (weap == nullptr) return BotInfoData();
auto k = BotInfo.CheckKey(weap->GetClass()->TypeName);
@ -145,7 +145,7 @@ public:
botinfo_t *botinfo;
int spawn_tries;
int wanted_botnum;
TObjPtr<AInventory*> firstthing;
TObjPtr<AActor*> firstthing;
TObjPtr<AActor*> body1;
TObjPtr<AActor*> body2;

View file

@ -2249,11 +2249,11 @@ void Net_DoCommand (int type, uint8_t **stream, int player)
case DEM_INVUSEALL:
if (gamestate == GS_LEVEL && !paused)
{
auto item = players[player].mo->Inventory;
AActor *item = players[player].mo->Inventory;
auto pitype = PClass::FindActor(NAME_PuzzleItem);
while (item != NULL)
while (item != nullptr)
{
auto next = item->Inventory;
AActor *next = item->Inventory;
IFVIRTUALPTR(item, AInventory, UseAll)
{
VMValue param[] = { item, players[player].mo };

View file

@ -94,8 +94,7 @@ public:
bool ResetAirSupply (bool playgasp = true);
int GetMaxHealth(bool withupgrades = false) const;
AInventory *PickNewWeapon (PClassActor *ammotype);
AInventory *BestWeapon (PClassActor *ammotype);
AActor *PickNewWeapon (PClassActor *ammotype);
void GiveDeathmatchInventory ();
void GiveDefaultInventory ();
@ -124,8 +123,8 @@ public:
int RunHealth;
int PlayerFlags;
double FullHeight;
TObjPtr<AInventory*> InvFirst; // first inventory item displayed on inventory bar
TObjPtr<AInventory*> InvSel; // selected inventory item
TObjPtr<AActor*> InvFirst; // first inventory item displayed on inventory bar
TObjPtr<AActor*> InvSel; // selected inventory item
// [GRB] Player class properties
double JumpZ;

View file

@ -377,8 +377,6 @@ T* Create(Args&&... args)
}
class AInventory;//
// When you write to a pointer to an Object, you must call this for
// proper bookkeeping in case the Object holding this pointer has
// already been processed by the GC.

View file

@ -216,7 +216,7 @@ FString savename;
FString BackupSaveName;
bool SendLand;
const AInventory *SendItemUse, *SendItemDrop;
const AActor *SendItemUse, *SendItemDrop;
int SendItemDropAmount;
EXTERN_CVAR (Int, team)
@ -414,7 +414,7 @@ CCMD(invprev)
CCMD (invuseall)
{
SendItemUse = (const AInventory *)1;
SendItemUse = (const AActor *)1;
}
CCMD (invuse)
@ -428,7 +428,7 @@ CCMD (invuse)
CCMD(invquery)
{
AInventory *inv = players[consoleplayer].mo->InvSel;
AActor *inv = players[consoleplayer].mo->InvSel;
if (inv != NULL)
{
Printf(PRINT_HIGH, "%s (%dx)\n", inv->GetTag(), inv->IntVar(NAME_Amount));
@ -735,7 +735,7 @@ void G_BuildTiccmd (ticcmd_t *cmd)
Net_WriteString (savedescription);
savegamefile = "";
}
if (SendItemUse == (const AInventory *)1)
if (SendItemUse == (const AActor *)1)
{
Net_WriteByte (DEM_INVUSEALL);
SendItemUse = NULL;
@ -2898,4 +2898,4 @@ DEFINE_GLOBAL(gametic)
DEFINE_GLOBAL(demoplayback)
DEFINE_GLOBAL(automapactive);
DEFINE_GLOBAL(Net_Arbitrator);
DEFINE_GLOBAL(netgame);
DEFINE_GLOBAL(netgame);

View file

@ -32,6 +32,9 @@ struct event_t;
#include "dobjgc.h"
class AActor;
//
// GAME
//
@ -96,7 +99,7 @@ void G_AddViewPitch (int look, bool mouse = false);
void G_AddViewAngle (int yaw, bool mouse = false);
class AInventory;
extern const AInventory *SendItemUse, *SendItemDrop;
extern const AActor *SendItemUse, *SendItemDrop;
extern int SendItemDropAmount;
const int SAVEPICWIDTH = 216;

View file

@ -63,9 +63,7 @@ struct OneKey
if (owner->IsA(key) || owner->GetSpecies() == key->TypeName) return true;
// Other calls check an actor that may have a key in its inventory.
AInventory *item;
for (item = owner->Inventory; item != NULL; item = item->Inventory)
for (AActor *item = owner->Inventory; item != NULL; item = item->Inventory)
{
if (item->IsA(key))
{
@ -129,7 +127,7 @@ struct Lock
if (!keylist.Size())
{
auto kt = PClass::FindActor(NAME_Key);
for (AInventory * item = owner->Inventory; item != NULL; item = item->Inventory)
for (AActor *item = owner->Inventory; item != NULL; item = item->Inventory)
{
if (item->IsKindOf (kt))
{
@ -430,9 +428,9 @@ static void CreateSortedKeyList()
if (ti->IsDescendantOf(kt))
{
AInventory *key = (AInventory*)(GetDefaultByType(ti));
auto key = GetDefaultByType(ti);
if (key->Icon.isValid() && key->special1 > 0)
if (key->special1 > 0)
{
KeyTypes.Push(ti);
}
@ -587,7 +585,7 @@ int P_GetMapColorForLock (int lock)
//
//==========================================================================
int P_GetMapColorForKey (AInventory * key)
int P_GetMapColorForKey (AActor * key)
{
int i;

View file

@ -2,14 +2,13 @@
#define A_KEYS_H
class AActor;
class AInventory;
class PClassActor;
int P_CheckKeys (AActor *owner, int keynum, bool remote, bool quiet = false);
void P_InitKeyMessages ();
void P_DeinitKeyMessages ();
int P_GetMapColorForLock (int lock);
int P_GetMapColorForKey (AInventory *key);
int P_GetMapColorForKey (AActor *key);
int P_GetKeyTypeCount();
PClassActor *P_GetKeyType(int num);

View file

@ -132,9 +132,9 @@ DEFINE_ACTION_FUNCTION(AInventory, PrintPickupMessage)
//
//===========================================================================
void DepleteOrDestroy (AInventory *item)
void DepleteOrDestroy (AActor *item)
{
IFVIRTUALPTR(item, AInventory, DepleteOrDestroy)
IFVIRTUALPTRNAME(item, NAME_Inventory, DepleteOrDestroy)
{
VMValue params[1] = { item };
VMCall(func, params, 1, nullptr, 0);
@ -147,7 +147,7 @@ void DepleteOrDestroy (AInventory *item)
//
//===========================================================================
bool CallTryPickup(AInventory *item, AActor *toucher, AActor **toucher_return)
bool CallTryPickup(AActor *item, AActor *toucher, AActor **toucher_return)
{
static VMFunction *func = nullptr;
if (func == nullptr) PClass::FindFunction(&func, NAME_Inventory, NAME_CallTryPickup);

View file

@ -89,7 +89,7 @@ public:
FSoundIDNoInit PickupSound;
};
bool CallTryPickup(AInventory *item, AActor *toucher, AActor **toucher_return = nullptr);
void DepleteOrDestroy(AInventory *item); // virtual on the script side.
bool CallTryPickup(AActor *item, AActor *toucher, AActor **toucher_return = nullptr);
void DepleteOrDestroy(AActor *item); // virtual on the script side.
#endif //__A_PICKUPS_H__

View file

@ -351,7 +351,7 @@ void FWeaponSlots::AddExtraWeapons()
{
continue;
}
auto weapdef = ((AInventory*)GetDefaultByType(cls));
auto weapdef = GetDefaultByType(cls);
// Let the weapon decide for itself if it wants to get added to a slot.
IFVIRTUALPTRNAME(weapdef, NAME_Weapon, CheckAddToSlots)

View file

@ -1282,7 +1282,7 @@ void G_StartTravel ()
if (playeringame[i])
{
AActor *pawn = players[i].mo;
AInventory *inv;
AActor *inv;
players[i].camera = NULL;
// Only living players travel. Dead ones get a new body on the new level.
@ -1321,7 +1321,7 @@ int G_FinishTravel ()
{
TThinkerIterator<APlayerPawn> it (STAT_TRAVELLING);
APlayerPawn *pawn, *pawndup, *oldpawn, *next;
AInventory *inv;
AActor *inv;
FPlayerStart *start;
int pnum;
int failnum = 0;
@ -1409,7 +1409,7 @@ int G_FinishTravel ()
inv->ChangeStatNum (STAT_INVENTORY);
inv->LinkToWorld (nullptr);
IFVIRTUALPTR(inv, AInventory, Travelled)
IFVIRTUALPTRNAME(inv, NAME_Inventory, Travelled)
{
VMValue params[1] = { inv };
VMCall(func, params, 1, nullptr, 0);

View file

@ -460,7 +460,7 @@ private:
public:
AInventory *ValidateInvFirst (int numVisible) const;
AActor *ValidateInvFirst (int numVisible) const;
void DrawCrosshair ();
// Sizing info for ths status bar.
@ -522,8 +522,7 @@ void ST_Clear();
void ST_CreateStatusBar(bool bTitleLevel);
extern FTexture *CrosshairImage;
//FTextureID GetInventoryIcon(AInventory *item, uint32_t flags, int *applyscale = nullptr);
int GetInventoryIcon(AInventory *item, uint32_t flags, int *applyscale = nullptr);
int GetInventoryIcon(AActor *item, uint32_t flags, int *applyscale = nullptr);
enum DI_Flags

View file

@ -619,7 +619,7 @@ class CommandDrawSwitchableImage : public CommandDrawImage
}
else //check the inventory items and draw selected sprite
{
AInventory* item = statusBar->CPlayer->mo->FindInventory(inventoryItem[0]);
auto item = statusBar->CPlayer->mo->FindInventory(inventoryItem[0]);
if(item == NULL || !EvaluateOperation(conditionalOperator[0], conditionalValue[0], item->IntVar(NAME_Amount)))
drawAlt = 1;
if(conditionAnd)
@ -1351,7 +1351,7 @@ class CommandDrawNumber : public CommandDrawString
break;
case AMMO:
{
AInventory* item = statusBar->CPlayer->mo->FindInventory(inventoryItem);
auto item = statusBar->CPlayer->mo->FindInventory(inventoryItem);
if(item != NULL)
num = item->IntVar(NAME_Amount);
else
@ -1378,11 +1378,11 @@ class CommandDrawNumber : public CommandDrawString
break;
case AMMOCAPACITY:
{
AInventory* item = statusBar->CPlayer->mo->FindInventory(inventoryItem);
auto item = statusBar->CPlayer->mo->FindInventory(inventoryItem);
if(item != NULL)
num = item->IntVar(NAME_MaxAmount);
else
num = ((AInventory *)GetDefaultByType(inventoryItem))->IntVar(NAME_MaxAmount);
num = GetDefaultByType(inventoryItem)->IntVar(NAME_MaxAmount);
break;
}
case FRAGS:
@ -1449,7 +1449,7 @@ class CommandDrawNumber : public CommandDrawString
}
case INVENTORY:
{
AInventory* item = statusBar->CPlayer->mo->FindInventory(inventoryItem);
auto item = statusBar->CPlayer->mo->FindInventory(inventoryItem);
if(item != NULL)
num = item->IntVar(NAME_Amount);
else
@ -2085,9 +2085,9 @@ class CommandDrawInventoryBar : public SBarInfoCommand
}
}
AInventory *PrevInv(AInventory *item)
AActor *PrevInv(AActor *item)
{
AInventory *retval = nullptr;
AActor *retval = nullptr;
IFVM(Inventory, PrevInv)
{
VMValue param = item;
@ -2097,9 +2097,9 @@ class CommandDrawInventoryBar : public SBarInfoCommand
return retval;
}
AInventory *NextInv(AInventory *item)
AActor *NextInv(AActor *item)
{
AInventory *retval = nullptr;
AActor *retval = nullptr;
IFVM(Inventory, NextInv)
{
VMValue param = item;
@ -2117,7 +2117,7 @@ class CommandDrawInventoryBar : public SBarInfoCommand
if(translucent)
bgalpha *= HX_SHADOW;
AInventory *item;
AActor *item;
unsigned int i = 0;
// If the player has no artifacts, don't draw the bar
statusBar->CPlayer->mo->InvFirst = statusBar->wrapper->ValidateInvFirst(size);
@ -3074,7 +3074,7 @@ class CommandHasWeaponPiece : public SBarInfoCommandFlowControl
{
SBarInfoCommandFlowControl::Tick(block, statusBar, hudChanged);
for(AInventory *inv = statusBar->CPlayer->mo->Inventory;inv != NULL;inv=inv->Inventory)
for(auto inv = statusBar->CPlayer->mo->Inventory;inv != NULL;inv=inv->Inventory)
{
auto hc = PClass::FindActor("WeaponHolder");
if(inv->IsKindOf(hc))
@ -3360,7 +3360,7 @@ class CommandInInventory : public SBarInfoNegatableFlowControl
{
SBarInfoNegatableFlowControl::Tick(block, statusBar, hudChanged);
AInventory *invItem[2] = { statusBar->CPlayer->mo->FindInventory(item[0]), statusBar->CPlayer->mo->FindInventory(item[1]) };
AActor *invItem[2] = { statusBar->CPlayer->mo->FindInventory(item[0]), statusBar->CPlayer->mo->FindInventory(item[1]) };
if (invItem[0] != NULL && Amount[0] > 0 && invItem[0]->IntVar(NAME_Amount) < Amount[0]) invItem[0] = NULL;
if (invItem[1] != NULL && Amount[1] > 0 && invItem[1]->IntVar(NAME_Amount) < Amount[1]) invItem[1] = NULL;

View file

@ -1266,12 +1266,12 @@ void DBaseStatusBar::CallScreenSizeChanged()
//
//---------------------------------------------------------------------------
AInventory *DBaseStatusBar::ValidateInvFirst (int numVisible) const
AActor *DBaseStatusBar::ValidateInvFirst (int numVisible) const
{
IFVM(BaseStatusBar, ValidateInvFirst)
{
VMValue params[] = { (AInventory*)this, numVisible };
AInventory *item;
VMValue params[] = { const_cast<DBaseStatusBar*>(this), numVisible };
AActor *item;
VMReturn ret((void**)&item);
VMCall(func, params, 2, &ret, 1);
return item;
@ -1757,8 +1757,7 @@ void FormatNumber(int number, int minsize, int maxsize, int flags, const FString
//
//---------------------------------------------------------------------------
//FTextureID GetInventoryIcon(AInventory *item, uint32_t flags, int *applyscale)
int GetInventoryIcon(AInventory *item, uint32_t flags, int *applyscale)
int GetInventoryIcon(AActor *item, uint32_t flags, int *applyscale)
{
if (applyscale != NULL)
{

View file

@ -280,7 +280,7 @@ int HWDrawInfo::SetFullbrightFlags(player_t *player)
{
auto torchtype = PClass::FindActor(NAME_PowerTorch);
auto litetype = PClass::FindActor(NAME_PowerLightAmp);
for (AInventory * in = cplayer->mo->Inventory; in; in = in->Inventory)
for (AActor *in = cplayer->mo->Inventory; in; in = in->Inventory)
{
// Need special handling for light amplifiers
if (in->IsKindOf(torchtype))

View file

@ -1017,6 +1017,7 @@ xx(YAdjust)
xx(Crosshair)
xx(WeaponFlags)
xx(DropTime)
xx(PickupSound)
xx(BlueCard)
xx(YellowCard)

View file

@ -9329,7 +9329,7 @@ scriptwait:
case PCD_GETSIGILPIECES:
{
AInventory *sigil;
AActor *sigil;
if (activator == NULL || (sigil = activator->FindInventory(NAME_Sigil)) == NULL)
{
@ -9346,11 +9346,10 @@ scriptwait:
if (activator != NULL)
{
PClass *type = PClass::FindClass (FBehavior::StaticLookupString (STACK(1)));
AInventory *item;
if (type != NULL && type->ParentClass == PClass::FindActor(NAME_Ammo))
{
item = activator->FindInventory (static_cast<PClassActor *>(type));
auto item = activator->FindInventory (static_cast<PClassActor *>(type));
if (item != NULL)
{
STACK(1) = item->IntVar(NAME_MaxAmount);
@ -9375,11 +9374,10 @@ scriptwait:
if (activator != NULL)
{
PClassActor *type = PClass::FindActor (FBehavior::StaticLookupString (STACK(2)));
AInventory *item;
if (type != NULL && type->ParentClass == PClass::FindActor(NAME_Ammo))
{
item = activator->FindInventory (type);
auto item = activator->FindInventory (type);
if (item != NULL)
{
item->IntVar(NAME_MaxAmount) = STACK(1);

View file

@ -1541,7 +1541,7 @@ enum SW_Flags
DEFINE_ACTION_FUNCTION(AActor, A_SelectWeapon)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_CLASS(cls, AInventory);
PARAM_CLASS(cls, AActor);
PARAM_INT(flags);
bool selectPriority = !!(flags & SWF_SELECTPRIORITY);
@ -2109,7 +2109,7 @@ DEFINE_ACTION_FUNCTION(AActor, CheckRange)
DEFINE_ACTION_FUNCTION(AActor, A_DropInventory)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_CLASS(drop, AInventory);
PARAM_CLASS(drop, AActor);
PARAM_INT(amount);
if (drop)

View file

@ -603,12 +603,10 @@ static int FindNode (const FStrifeDialogueNode *node)
static bool CheckStrifeItem (player_t *player, PClassActor *itemtype, int amount=-1)
{
AInventory *item;
if (itemtype == NULL || amount == 0)
return true;
item = player->ConversationPC->FindInventory (itemtype);
auto item = player->ConversationPC->FindInventory (itemtype);
if (item == NULL)
return false;

View file

@ -6,7 +6,6 @@
struct sector_t;
class AActor;
class AInventory;
class PClass;

View file

@ -324,9 +324,9 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags, FName MeansOf
//flags &= ~MF_INVINCIBLE;
// [RH] Notify this actor's items.
for (auto item = Inventory; item != NULL; )
for (AActor *item = Inventory; item != NULL; )
{
AInventory *next = item->Inventory;
AActor *next = item->Inventory;
IFVIRTUALPTR(item, AInventory, OwnerDied)
{
VMValue params[1] = { item };

View file

@ -3450,9 +3450,9 @@ bool AActor::AdjustReflectionAngle (AActor *thing, DAngle &angle)
int AActor::AbsorbDamage(int damage, FName dmgtype)
{
for (auto item = Inventory; item != nullptr; item = item->Inventory)
for (AActor *item = Inventory; item != nullptr; item = item->Inventory)
{
IFVIRTUALPTR(item, AInventory, AbsorbDamage)
IFVIRTUALPTRNAME(item, NAME_Inventory, AbsorbDamage)
{
VMValue params[4] = { item, damage, dmgtype.GetIndex(), &damage };
VMCall(func, params, 4, nullptr, 0);
@ -3464,15 +3464,15 @@ int AActor::AbsorbDamage(int damage, FName dmgtype)
void AActor::AlterWeaponSprite(visstyle_t *vis)
{
int changed = 0;
TArray<AInventory *> items;
TArray<AActor *> items;
// This needs to go backwards through the items but the list has no backlinks.
for (auto item = Inventory; item != nullptr; item = item->Inventory)
for (AActor *item = Inventory; item != nullptr; item = item->Inventory)
{
items.Push(item);
}
for(int i=items.Size()-1;i>=0;i--)
{
IFVIRTUALPTR(items[i], AInventory, AlterWeaponSprite)
IFVIRTUALPTRNAME(items[i], NAME_Inventory, AlterWeaponSprite)
{
VMValue params[3] = { items[i], vis, &changed };
VMCall(func, params, 3, nullptr, 0);
@ -3785,11 +3785,11 @@ void AActor::Tick ()
{
// Handle powerup effects here so that the order is controlled
// by the order in the inventory, not the order in the thinker table
auto item = Inventory;
AActor *item = Inventory;
while (item != NULL)
{
IFVIRTUALPTR(item, AInventory, DoEffect)
IFVIRTUALPTRNAME(item, NAME_Inventory, DoEffect)
{
VMValue params[1] = { item };
VMCall(func, params, 1, nullptr, 0);
@ -8129,7 +8129,7 @@ void PrintMiscActorInfo(AActor *query)
/*for (flagi = 0; flagi < 31; flagi++)
if (query->BounceFlags & 1<<flagi) Printf(" %s", flagnamesb[flagi]);*/
Printf("\nRender style = %i:%s, alpha %f\nRender flags: %x",
querystyle, (querystyle < countof(renderstyles) ? renderstyles[querystyle] : "Custom"),
querystyle, ((unsigned)querystyle < countof(renderstyles) ? renderstyles[querystyle] : "Custom"),
query->Alpha, query->renderflags.GetValue());
/*for (flagi = 0; flagi < 31; flagi++)
if (query->renderflags & 1<<flagi) Printf(" %s", flagnamesr[flagi]);*/

View file

@ -39,7 +39,6 @@
#define WEAPONTOP 32.
#define WEAPON_FUDGE_Y 0.375
class AInventory;
struct FTranslatedLineTarget;
//

View file

@ -948,9 +948,9 @@ void APlayerPawn::PostBeginPlay()
//
//===========================================================================
AInventory *APlayerPawn::PickNewWeapon(PClassActor *ammotype)
AActor *APlayerPawn::PickNewWeapon(PClassActor *ammotype)
{
AInventory *best = nullptr;
AActor *best = nullptr;
IFVM(PlayerPawn, PickNewWeapon)
{
VMValue param[] = { player->mo, ammotype };
@ -976,10 +976,10 @@ void APlayerPawn::GiveDeathmatchInventory()
{
if (PClassActor::AllActorClasses[i]->IsDescendantOf (PClass::FindActor(NAME_Key)))
{
AInventory *key = (AInventory*)GetDefaultByType (PClassActor::AllActorClasses[i]);
auto key = GetDefaultByType (PClassActor::AllActorClasses[i]);
if (key->special1 != 0)
{
key = (AInventory*)Spawn(PClassActor::AllActorClasses[i]);
key = Spawn(PClassActor::AllActorClasses[i]);
if (!CallTryPickup (key, this))
{
key->Destroy ();
@ -1981,7 +1981,7 @@ void P_UnPredictPlayer ()
APlayerPawn *act = player->mo;
AActor *savedcamera = player->camera;
TObjPtr<AInventory*> InvSel = act->InvSel;
TObjPtr<AActor*> InvSel = act->InvSel;
int inventorytics = player->inventorytics;
*player = PredictionPlayerBackup;

View file

@ -313,7 +313,6 @@ void ParseOldDecoration(FScanner &sc, EDefinitionType def, PNamespace *ns)
static void ParseInsideDecoration (Baggage &bag, AActor *defaults,
FExtraInfo &extra, EDefinitionType def, FScanner &sc, TArray<FState> &StateArray, TArray<FScriptPosition> &SourceLines)
{
AInventory *const inv = static_cast<AInventory *>(defaults);
char sprite[5] = "TNT1";
sc.MustGetString ();
@ -532,16 +531,16 @@ static void ParseInsideDecoration (Baggage &bag, AActor *defaults,
else if (def == DEF_Pickup && sc.Compare ("PickupSound"))
{
sc.MustGetString ();
inv->PickupSound = sc.String;
defaults->IntVar(NAME_PickupSound) = FSoundID(sc.String);
}
else if (def == DEF_Pickup && sc.Compare ("PickupMessage"))
{
sc.MustGetString ();
inv->StringVar(NAME_PickupMsg) = sc.String;
defaults->StringVar(NAME_PickupMsg) = sc.String;
}
else if (def == DEF_Pickup && sc.Compare ("Respawns"))
{
inv->BoolVar(NAME_Respawnable) = true;
defaults->BoolVar(NAME_Respawnable) = true;
}
else if (def == DEF_BreakableDecoration && sc.Compare ("SolidOnDeath"))
{

View file

@ -95,11 +95,11 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
int cnt;
// [RH] All powerups can affect the screen blending now
for (auto item = CPlayer->mo->Inventory; item != NULL; item = item->Inventory)
for (AActor *item = CPlayer->mo->Inventory; item != NULL; item = item->Inventory)
{
PalEntry color = 0;
IFVIRTUALPTR(item, AInventory, GetBlend)
IFVIRTUALPTRNAME(item, NAME_Inventory, GetBlend)
{
VMValue params[1] = { item };
VMReturn ret((int*)&color.d);

View file

@ -1496,7 +1496,7 @@ void DFrameBuffer::DrawBlend(sector_t * viewsector)
auto torchtype = PClass::FindActor(NAME_PowerTorch);
auto litetype = PClass::FindActor(NAME_PowerLightAmp);
PalEntry color = 0xffffffff;
for (AInventory * in = player->mo->Inventory; in; in = in->Inventory)
for (AActor *in = player->mo->Inventory; in; in = in->Inventory)
{
// Need special handling for light amplifiers
if (in->IsKindOf(torchtype))