- some minor stuff

This commit is contained in:
Christoph Oelckers 2021-08-27 16:47:46 +02:00
parent 41316f7f8f
commit cce3d8f440
2 changed files with 8 additions and 6 deletions

View file

@ -2058,7 +2058,7 @@ void genDudeTransform(DBloodActor* actor)
if (actIncarnation == NULL)
{
if (pXSprite->sysData1 == kGenDudeTransformStatus) pXSprite->sysData1 = 0;
trTriggerSprite(pSprite->index, pXSprite, kCmdOff);
trTriggerSprite(actor, kCmdOff);
return;
}
@ -2075,7 +2075,7 @@ void genDudeTransform(DBloodActor* actor)
pXIncarnation->triggerOff = false;
// trigger dude death before transform
trTriggerSprite(pSprite->index, pXSprite, kCmdOff);
trTriggerSprite(actor, kCmdOff);
pSprite->type = pSprite->inittype = pIncarnation->type;
pSprite->flags = pIncarnation->flags;

View file

@ -501,11 +501,13 @@ void returnFlagToBase(DBloodActor* actor, int) // 17
{
if (!actor) return;
spritetype* pSprite = &actor->s();
if (pSprite->owner >= 0 && pSprite->owner < kMaxSprites)
auto owner = actor->GetOwner();
if (owner)
{
spritetype* pOwner = &sprite[pSprite->owner];
XSPRITE* pXOwner = &xsprite[pOwner->extra];
switch (pSprite->type) {
spritetype* pOwner = &owner->s();
XSPRITE* pXOwner = &owner->x();
switch (pSprite->type)
{
case kItemFlagA:
trTriggerSprite(pOwner->index, pXOwner, kCmdOn);
sndStartSample(8003, 255, 2, 0);