From 356c425e1e20d30c0022a2c16f78dcc5aee01408 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 16 Oct 2023 00:29:38 +0200 Subject: [PATCH] some last changes. --- source/games/blood/src/aicdud.cpp | 14 +++++++------- wadsrc/static/zscript/games/blood/bloodactor.zs | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/source/games/blood/src/aicdud.cpp b/source/games/blood/src/aicdud.cpp index e67e8cf32..ef3d205a3 100644 --- a/source/games/blood/src/aicdud.cpp +++ b/source/games/blood/src/aicdud.cpp @@ -910,7 +910,7 @@ void thinkChase(DBloodActor* pSpr) nHeigh = (pInfo->eyeHeight * pSpr->yrepeat) << 2; if (thinkTime && !inAttack) - aiChooseDirection(pSpr, pXSpr, getangle(dx, dy)); + aiChooseDirection(pSpr, getangle(dx, dy)); // is the target visible? if (nDist > pInfo->seeDist || !cansee(pTarget->x, pTarget->y, pTarget->z, pTarget->sectnum, pSpr->x, pSpr->y, pSpr->z - nHeigh, pSpr->sectnum)) @@ -1196,9 +1196,9 @@ void enterSleep(DBloodActor* pSpr) moveStop(pSpr); // reduce distances while sleeping - pDude->seeDist = kCdudeMinSeeDist; - pDude->hearDist = kCdudeMinHearDist; - pDude->periphery = kAng360; + pDude->_seeDist = kCdudeMinSeeDist; + pDude->_hearDist = kCdudeMinHearDist; + pDude->periphery = DAngle360; } void enterWake(DBloodActor* pSpr) @@ -1209,9 +1209,9 @@ void enterWake(DBloodActor* pSpr) pDude->StatusRem(kCdudeStatusSleep); // restore distances when awaked - pDude->seeDist = pDude->pInfo->seeDist; - pDude->hearDist = pDude->pInfo->hearDist; - pDude->periphery = pDude->pInfo->periphery; + pDude->_seeDist = pDude->pInfo->SeeDist(); + pDude->_hearDist = pDude->pInfo->HearDist(); + pDude->periphery = pDude->pInfo->Periphery(); } pDude->PlaySound(kCdudeSndWake); diff --git a/wadsrc/static/zscript/games/blood/bloodactor.zs b/wadsrc/static/zscript/games/blood/bloodactor.zs index c9a7c0d9f..32e6620ed 100644 --- a/wadsrc/static/zscript/games/blood/bloodactor.zs +++ b/wadsrc/static/zscript/games/blood/bloodactor.zs @@ -348,10 +348,9 @@ native void callbackMissileBurst(); // nnext stuff. For now not exported to scripting. //SPRITEMASS spriteMass; - //GENDUDEEXTRA genDudeExtra; //TObjPtr prevmarker; // needed by the nnext marker code. This originally hijacked targetX in XSPRITE //DVector3 basePoint; - //EventObject condition[2]; + //EventObject condition[4]; // transient data (not written to savegame) native int cumulDamage;