mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-26 08:50:55 +00:00
- target stuff in aiInitSprite
This commit is contained in:
parent
b8d55feb1e
commit
39b9ddc04c
1 changed files with 10 additions and 6 deletions
|
@ -1730,16 +1730,20 @@ void aiInitSprite(DBloodActor* actor)
|
||||||
pDudeExtraE->active = 0;
|
pDudeExtraE->active = 0;
|
||||||
|
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
int stateTimer = -1, targetMarker = -1;
|
int stateTimer = -1;
|
||||||
int targetX = 0, targetY = 0, targetZ = 0;
|
int targetX = 0, targetY = 0, targetZ = 0;
|
||||||
|
DBloodActor* pTargetMarker = nullptr;
|
||||||
|
|
||||||
// dude patrol init
|
// dude patrol init
|
||||||
if (gModernMap)
|
if (gModernMap)
|
||||||
{
|
{
|
||||||
// must keep it in case of loading save
|
// must keep it in case of loading save
|
||||||
if (pXSprite->dudeFlag4 && spriRangeIsFine(pXSprite->target_i) && sprite[pXSprite->target_i].type == kMarkerPath) {
|
if (pXSprite->dudeFlag4 && actor->GetTarget() && actor->GetTarget()->s().type == kMarkerPath)
|
||||||
stateTimer = pXSprite->stateTimer; targetMarker = pXSprite->target_i;
|
{
|
||||||
targetX = pXSprite->targetX; targetY = pXSprite->targetY;
|
stateTimer = pXSprite->stateTimer;
|
||||||
|
pTargetMarker = actor->GetTarget();
|
||||||
|
targetX = pXSprite->targetX;
|
||||||
|
targetY = pXSprite->targetY;
|
||||||
targetZ = pXSprite->targetZ;
|
targetZ = pXSprite->targetZ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1955,9 +1959,9 @@ void aiInitSprite(DBloodActor* actor)
|
||||||
if (pXSprite->dudeFlag4)
|
if (pXSprite->dudeFlag4)
|
||||||
{
|
{
|
||||||
// restore dude's path
|
// restore dude's path
|
||||||
if (spriRangeIsFine(targetMarker))
|
if (pTargetMarker)
|
||||||
{
|
{
|
||||||
pXSprite->target_i = targetMarker;
|
actor->SetTarget(pTargetMarker);
|
||||||
pXSprite->targetX = targetX;
|
pXSprite->targetX = targetX;
|
||||||
pXSprite->targetY = targetY;
|
pXSprite->targetY = targetY;
|
||||||
pXSprite->targetZ = targetZ;
|
pXSprite->targetZ = targetZ;
|
||||||
|
|
Loading…
Reference in a new issue