@@ -1972,56 +1972,56 @@ S32 zNPCGoalAlertMonsoon::Process(en_trantype* trantype, F32 dt, void* updCtxt,
19721972 }
19731973 switch (alertmony)
19741974 {
1975- case MONSOON_ALERT_NOTICE:
1976- alertmony = MONSOON_ALERT_BEGIN;
1977- npc->FacePlayer (dt, 3 * PI);
1978- *trantype = GOAL_TRAN_PUSH;
1979- nextgoal = NPC_GOAL_NOTICE;
1980- break ;
1981- case MONSOON_ALERT_ARENA:
1982- npc->FacePlayer (dt, 3 * PI);
1983- npc->MoveTowardsArena (dt, 4 .0f );
1984- if (npc->arena .PctFromHome (npc->Pos ()) < 0 .5f )
1985- {
1986- alertmony = MONSOON_ALERT_READY;
1987- }
1988- if (subenter)
1989- {
1990- DoAutoAnim (NPC_GSPOT_STARTALT, 0 );
1991- }
1992- break ;
1993- case MONSOON_ALERT_BEGIN:
1975+ case MONSOON_ALERT_NOTICE:
1976+ alertmony = MONSOON_ALERT_BEGIN;
1977+ npc->FacePlayer (dt, 3 * PI);
1978+ *trantype = GOAL_TRAN_PUSH;
1979+ nextgoal = NPC_GOAL_NOTICE;
1980+ break ;
1981+ case MONSOON_ALERT_ARENA:
1982+ npc->FacePlayer (dt, 3 * PI);
1983+ npc->MoveTowardsArena (dt, 4 .0f );
1984+ if (npc->arena .PctFromHome (npc->Pos ()) < 0 .5f )
1985+ {
19941986 alertmony = MONSOON_ALERT_READY;
1987+ }
1988+ if (subenter)
1989+ {
1990+ DoAutoAnim (NPC_GSPOT_STARTALT, 0 );
1991+ }
1992+ break ;
1993+ case MONSOON_ALERT_BEGIN:
1994+ alertmony = MONSOON_ALERT_READY;
1995+ break ;
1996+ case MONSOON_ALERT_READY:
1997+ if (((tmr_reload < 0 .0f ) ? 1 : 0 ) && !(globals.player .DamageTimer > 0 .0f ))
1998+ {
1999+ alertmony = MONSOON_ALERT_SPITCLOUD;
19952000 break ;
1996- case MONSOON_ALERT_READY:
1997- if (((tmr_reload < 0 .0f ) ? 1 : 0 ) && !(globals.player .DamageTimer > 0 .0f ))
1998- {
1999- alertmony = MONSOON_ALERT_SPITCLOUD;
2000- break ;
2001- }
2002- else
2001+ }
2002+ else
2003+ {
2004+ tmr_reload = MAX (-1 .0f , (tmr_reload - dt));
2005+ if (subenter != 0 )
20032006 {
2004- tmr_reload = MAX (-1 .0f , (tmr_reload - dt));
2005- if (subenter != 0 )
2007+ DoAutoAnim (NPC_GSPOT_RESUME, 0 );
2008+ npc->VelStop ();
2009+ if (!npc->arena .IncludesPos (&pos_corner, NULL , NULL ))
20062010 {
2007- DoAutoAnim (NPC_GSPOT_RESUME, 0 );
2008- npc->VelStop ();
2009- if (!npc->arena .IncludesPos (&pos_corner, NULL , NULL ))
2010- {
2011- xVec3Copy (&pos_corner, npc->Pos ());
2012- }
2011+ xVec3Copy (&pos_corner, npc->Pos ());
20132012 }
2014- npc->FacePlayer (dt, 3 * PI);
2015- MoveCorner (dt);
20162013 }
2017- break ;
2018- case MONSOON_ALERT_SPITCLOUD:
2019- F32 rand = xurand ();
2020- nextgoal = NPC_GOAL_ATTACKMONSOON;
2021- tmr_reload = tym_reload + (tym_reload * (0 .25f * (rand - 0 .5f )));
2022- alertmony = MONSOON_ALERT_READY;
2023- *trantype = GOAL_TRAN_PUSH;
2024- break ;
2014+ npc->FacePlayer (dt, 3 * PI);
2015+ MoveCorner (dt);
2016+ }
2017+ break ;
2018+ case MONSOON_ALERT_SPITCLOUD:
2019+ F32 rand = xurand ();
2020+ nextgoal = NPC_GOAL_ATTACKMONSOON;
2021+ tmr_reload = tym_reload + (tym_reload * (0 .25f * (rand - 0 .5f )));
2022+ alertmony = MONSOON_ALERT_READY;
2023+ *trantype = GOAL_TRAN_PUSH;
2024+ break ;
20252025 }
20262026 if (alertmony != old_alertmony)
20272027 {
@@ -2329,7 +2329,7 @@ S32 zNPCGoalAlertChuck::ZoomMove(F32 dt)
23292329 {
23302330 npc->ThrottleAdjust (dt, 6 .0f , -1 .0f );
23312331 }
2332- npc->XYZVecToPos (&dir, npc->arena .Pos () );
2332+ npc->XYZVecToPos (&dir, npc->arena .Pos ());
23332333 dir.x = dir_zoom.x ;
23342334 dir.z = dir_zoom.z ;
23352335 dist = xVec3Length (&dir);
@@ -2345,9 +2345,8 @@ S32 zNPCGoalAlertChuck::ZoomMove(F32 dt)
23452345 {
23462346 xVec3SMulBy (&dir, (1 .0f / dist));
23472347 npc->ThrottleApply (dt, &dir, 0 );
2348- dst_zoom = -((dt * npc->spd_throttle ) *
2349- ((F32)__fabs (dir.x ) + (F32)__fabs (dir.z )) -
2350- dst_zoom);
2348+ dst_zoom =
2349+ -((dt * npc->spd_throttle ) * ((F32)__fabs (dir.x ) + (F32)__fabs (dir.z )) - dst_zoom);
23512350 }
23522351 if (dst_zoom < 0 .0f )
23532352 {
0 commit comments