@@ -1605,6 +1605,42 @@ S32 zNPCGoalAlertMonsoon::Resume(F32 dt, void* updCtxt)
16051605 return zNPCGoalCommon::Resume (dt, updCtxt);
16061606}
16071607
1608+ void zNPCGoalAlertMonsoon::MoveCorner (F32 dt)
1609+ {
1610+ zNPCRobot* npc = (zNPCRobot*)(psyche->clt_owner );
1611+ F32 ds2_corn;
1612+ xVec3 dir_corn;
1613+ if (*(U8*)(&npc->npcset .allowChase ) && npc->arena .IsReady () && (npc->arena .Radius (1 .0f ) > 2 .0f ))
1614+ {
1615+ ds2_corn = npc->XYZDstSqToPos (&pos_corner, 0 );
1616+ if (ds2_corn < SQ (0 .5f ))
1617+ {
1618+ npc->CornerOfArena (&pos_corner, -1 .0f );
1619+ ds2_corn = npc->XYZDstSqToPos (&pos_corner, NULL );
1620+ }
1621+ if (npc->DBG_IsNormLog (eNPCDCAT_Ten, 2 ))
1622+ {
1623+ xDrawSetColor (g_BLUE);
1624+ xDrawSphere2 (&pos_corner, 0 .1f , 12 );
1625+ }
1626+ if ((tmr_reload >= 0 .0f ) && (tmr_reload < 1 .0f ))
1627+ {
1628+ npc->ThrottleAdjust (dt, 1.5 , -1.0 );
1629+ }
1630+ else if (ds2_corn < 2 .0f )
1631+ {
1632+ npc->ThrottleAdjust (dt, 1 .5f , -1 .0f );
1633+ }
1634+ else
1635+ {
1636+ npc->ThrottleAdjust (dt, 3 .5f , -1 .0f );
1637+ }
1638+ npc->XYZVecToPos (&dir_corn, &pos_corner);
1639+ xVec3Normalize (&dir_corn, &dir_corn);
1640+ npc->ThrottleApply (dt, &dir_corn, 0 );
1641+ }
1642+ }
1643+
16081644S32 zNPCGoalAlertSleepy::Enter (F32 dt, void * updCtxt)
16091645{
16101646 zNPCRobot* npc = (zNPCRobot*)(psyche->clt_owner );
@@ -2083,6 +2119,42 @@ void zNPCGoalAlertSlick::GetInArena(F32 dt)
20832119 npc->ThrottleApply (dt, &dir, 0 );
20842120}
20852121
2122+ void zNPCGoalAlertSlick::MoveCorner (F32 dt)
2123+ {
2124+ zNPCRobot* npc = (zNPCRobot*)(psyche->clt_owner );
2125+ F32 ds2_corn;
2126+ xVec3 dir_corn;
2127+ if (*(U8*)(&npc->npcset .allowChase ) && npc->arena .IsReady () && (npc->arena .Radius (1 .0f ) > 2 .0f ))
2128+ {
2129+ ds2_corn = npc->XYZDstSqToPos (&pos_corner, 0 );
2130+ if (ds2_corn < SQ (0 .5f ))
2131+ {
2132+ npc->CornerOfArena (&pos_corner, -1 .0f );
2133+ ds2_corn = npc->XYZDstSqToPos (&pos_corner, NULL );
2134+ }
2135+ if (npc->DBG_IsNormLog (eNPCDCAT_Ten, 2 ))
2136+ {
2137+ xDrawSetColor (g_BLUE);
2138+ xDrawSphere2 (&pos_corner, 0 .1f , 12 );
2139+ }
2140+ if ((tmr_reload >= 0 .0f ) && (tmr_reload < 1 .0f ))
2141+ {
2142+ npc->ThrottleAdjust (dt, 1.5 , -1.0 );
2143+ }
2144+ else if (ds2_corn < 2 .0f )
2145+ {
2146+ npc->ThrottleAdjust (dt, 1 .5f , -1 .0f );
2147+ }
2148+ else
2149+ {
2150+ npc->ThrottleAdjust (dt, 3 .5f , -1 .0f );
2151+ }
2152+ npc->XYZVecToPos (&dir_corn, &pos_corner);
2153+ xVec3Normalize (&dir_corn, &dir_corn);
2154+ npc->ThrottleApply (dt, &dir_corn, 0 );
2155+ }
2156+ }
2157+
20862158S32 zNPCGoalAttackCQC::Enter (F32 dt, void * updCtxt)
20872159{
20882160 zNPCCommon* npc = (zNPCCommon*)this ->psyche ->clt_owner ;
0 commit comments