-some overlooked User’s.

This commit is contained in:
Christoph Oelckers 2021-11-02 18:58:02 +01:00
parent 82b4385ede
commit 3ed3029345
2 changed files with 4 additions and 3 deletions

View file

@ -139,7 +139,7 @@ void AutoPickInventory(PLAYERp pp)
void UseInventoryMedkit(PLAYERp pp)
{
USERp u = User[pp->PlayerSprite].Data();
USERp u = pp->Actor()->u();
short diff;
short inv = INVENTORY_MEDKIT;
short amt;

View file

@ -53,6 +53,7 @@ BEGIN_SW_NS
void SectorLightShade(DSWActor* actor, short intensity)
{
auto u = actor->hasU()? actor->u() : nullptr;
auto sp = &actor->s();
short w, startwall, endwall;
int8_t* wall_shade;
@ -79,8 +80,8 @@ void SectorLightShade(DSWActor* actor, short intensity)
// change wall
if (!TEST_BOOL4(sp))
{
ASSERT(User[sp - sprite].Data() && User[sp - sprite]->WallShade.Data());
wall_shade = User[sp - sprite]->WallShade.Data();
ASSERT(u && u->WallShade.Data());
wall_shade = u->WallShade.Data();
startwall = sector[sp->sectnum].wallptr;
endwall = startwall + sector[sp->sectnum].wallnum - 1;