2020-08-11 03:55:34 -05:00
# include "framework.h"
# include "lara.h"
# include "input.h"
# include "lara_tests.h"
2021-09-19 23:41:26 +03:00
# include "items.h"
2021-08-28 13:27:58 +02:00
# include "collide.h"
# include "camera.h"
2021-08-31 17:37:15 +02:00
# include "level.h"
2021-09-19 23:41:26 +03:00
2020-09-26 05:06:08 +10:00
/*this file has all the lara_as/lara_col functions related to hanging*/
2020-08-14 04:08:10 -05:00
2020-09-26 05:06:08 +10:00
/*normal hanging and shimmying*/
2021-02-03 01:50:59 -03:00
void lara_as_hang ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 10*/
/*collision: lara_col_hang*/
2020-08-11 03:55:34 -05:00
Lara . isClimbing = false ;
if ( item - > hitPoints < = 0 )
{
item - > goalAnimState = LS_STOP ;
return ;
}
if ( TrInput & IN_LOOK )
LookUpDown ( ) ;
2020-09-26 05:06:08 +10:00
2021-09-10 00:20:59 +03:00
coll - > Setup . EnableObjectPush = false ;
coll - > Setup . EnableSpaz = false ;
2021-10-27 09:48:31 +03:00
coll - > Setup . Mode = COLL_PROBE_MODE : : FREE_FLAT ;
2020-09-26 05:06:08 +10:00
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 45.0f ) ;
2020-08-11 03:55:34 -05:00
}
2021-02-03 01:50:59 -03:00
void lara_col_hang ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 10*/
/*state code: lara_as_hang*/
2020-08-11 03:55:34 -05:00
item - > fallspeed = 0 ;
item - > gravityStatus = false ;
if ( item - > animNumber = = LA_REACH_TO_HANG )
{
if ( TrInput & IN_LEFT | | TrInput & IN_LSTEP )
{
2021-09-14 00:30:44 +03:00
if ( TestLaraHangSideways ( item , coll , - ANGLE ( 90.0f ) ) )
2020-08-11 03:55:34 -05:00
{
item - > goalAnimState = LS_SHIMMY_LEFT ;
return ;
}
2021-10-26 15:44:36 +03:00
switch ( TestLaraHangCorner ( item , coll , - 90.0f ) )
2020-08-11 03:55:34 -05:00
{
2021-10-26 15:44:36 +03:00
case CORNER_RESULT : : INNER :
item - > goalAnimState = LS_SHIMMY_INNER_LEFT ;
2020-08-11 03:55:34 -05:00
return ;
2021-10-26 15:44:36 +03:00
case CORNER_RESULT : : OUTER :
item - > goalAnimState = LS_SHIMMY_OUTER_LEFT ;
return ;
default :
break ;
2020-08-11 03:55:34 -05:00
}
}
if ( TrInput & IN_RIGHT | | TrInput & IN_RSTEP )
{
2021-09-14 00:30:44 +03:00
if ( TestLaraHangSideways ( item , coll , ANGLE ( 90.0f ) ) )
2020-08-11 03:55:34 -05:00
{
item - > goalAnimState = LS_SHIMMY_RIGHT ;
return ;
}
2021-10-26 15:44:36 +03:00
switch ( TestLaraHangCorner ( item , coll , 90.0f ) )
2020-08-11 03:55:34 -05:00
{
2021-10-26 15:44:36 +03:00
case CORNER_RESULT : : INNER :
item - > goalAnimState = LS_SHIMMY_INNER_RIGHT ;
return ;
2020-08-11 03:55:34 -05:00
2021-10-26 15:44:36 +03:00
case CORNER_RESULT : : OUTER :
item - > goalAnimState = LS_SHIMMY_OUTER_RIGHT ;
2020-08-11 03:55:34 -05:00
return ;
2021-10-26 15:44:36 +03:00
default :
break ;
2020-08-11 03:55:34 -05:00
}
}
}
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot ;
2020-08-11 03:55:34 -05:00
2021-09-14 00:30:44 +03:00
TestLaraHang ( item , coll ) ;
2020-08-11 03:55:34 -05:00
2021-10-27 14:18:27 +03:00
if ( item - > animNumber = = LA_REACH_TO_HANG )
2020-08-11 03:55:34 -05:00
{
TestForObjectOnLedge ( item , coll ) ;
if ( TrInput & IN_FORWARD )
{
2021-10-28 03:28:59 +03:00
if ( coll - > Front . Floor > - 850 & & TestValidLedge ( item , coll ) & & ! coll - > HitStatic )
2020-08-11 03:55:34 -05:00
{
2021-09-10 00:18:47 +03:00
if ( coll - > Front . Floor < - 650 & &
coll - > Front . Floor > = coll - > Front . Ceiling & &
2021-11-19 20:31:11 +03:00
coll - > FrontLeft . Floor > = coll - > FrontLeft . Ceiling & &
coll - > FrontRight . Floor > = coll - > FrontRight . Ceiling )
2020-08-11 03:55:34 -05:00
{
2021-10-28 03:28:59 +03:00
if ( TrInput & IN_WALK )
2020-08-11 03:55:34 -05:00
{
2021-10-28 03:28:59 +03:00
item - > goalAnimState = LS_HANDSTAND ;
2020-08-11 03:55:34 -05:00
}
2021-10-28 03:28:59 +03:00
else if ( TrInput & IN_DUCK )
{
item - > goalAnimState = LS_HANG_TO_CRAWL ;
item - > requiredAnimState = LS_CROUCH_IDLE ;
}
else
{
item - > goalAnimState = LS_GRABBING ;
}
return ;
2020-08-11 03:55:34 -05:00
}
2021-09-10 00:18:47 +03:00
if ( coll - > Front . Floor < - 650 & &
coll - > Front . Floor - coll - > Front . Ceiling > = - 256 & &
2021-11-19 20:31:11 +03:00
coll - > FrontLeft . Floor - coll - > FrontLeft . Ceiling > = - 256 & &
coll - > FrontRight . Floor - coll - > FrontRight . Ceiling > = - 256 )
2020-08-11 03:55:34 -05:00
{
2021-10-28 03:28:59 +03:00
item - > goalAnimState = LS_HANG_TO_CRAWL ;
item - > requiredAnimState = LS_CROUCH_IDLE ;
2020-08-11 03:55:34 -05:00
2021-10-28 03:28:59 +03:00
return ;
}
2020-08-11 03:55:34 -05:00
}
if ( Lara . climbStatus ! = 0 & &
2021-09-10 00:18:47 +03:00
coll - > Middle . Ceiling < = - 256 & &
2021-10-27 14:06:17 +03:00
abs ( coll - > FrontLeft . Ceiling - coll - > FrontRight . Ceiling ) < SLOPE_DIFFERENCE )
2020-08-11 03:55:34 -05:00
{
2021-09-14 00:30:44 +03:00
if ( TestLaraClimbStance ( item , coll ) )
2020-08-11 03:55:34 -05:00
{
item - > goalAnimState = LS_LADDER_IDLE ;
}
2021-10-27 14:18:27 +03:00
else if ( TestLastFrame ( item ) )
2020-08-11 03:55:34 -05:00
{
2021-11-16 17:25:17 +03:00
SetAnimation ( item , LA_LADDER_SHIMMY_UP ) ;
2020-08-11 03:55:34 -05:00
}
}
return ;
}
if ( TrInput & IN_BACK & &
Lara . climbStatus & &
2021-09-10 00:18:47 +03:00
coll - > Middle . Floor > 344 & &
2020-08-11 03:55:34 -05:00
item - > animNumber = = LA_REACH_TO_HANG )
{
2021-09-14 00:30:44 +03:00
if ( TestLaraClimbStance ( item , coll ) )
2020-08-11 03:55:34 -05:00
{
item - > goalAnimState = LS_LADDER_IDLE ;
}
2021-10-27 14:18:27 +03:00
else if ( TestLastFrame ( item ) )
2020-08-11 03:55:34 -05:00
{
2021-11-16 17:25:17 +03:00
SetAnimation ( item , LA_LADDER_SHIMMY_DOWN ) ;
2020-08-11 03:55:34 -05:00
}
}
}
}
2021-02-03 01:50:59 -03:00
void lara_as_hangleft ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 30*/
/*collision: lara_col_hangleft*/
2021-09-10 00:20:59 +03:00
coll - > Setup . EnableObjectPush = false ;
coll - > Setup . EnableSpaz = false ;
2021-10-27 09:48:31 +03:00
coll - > Setup . Mode = COLL_PROBE_MODE : : FREE_FLAT ;
2020-09-26 05:06:08 +10:00
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 45.0f ) ;
if ( ! ( TrInput & ( IN_LEFT | IN_LSTEP ) ) )
item - > goalAnimState = LS_HANG ;
2020-09-26 03:28:30 +10:00
}
2020-09-26 05:06:08 +10:00
2021-02-03 01:50:59 -03:00
void lara_col_hangleft ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 30*/
/*state code: lara_as_hangleft*/
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot - ANGLE ( 90 ) ;
2021-09-10 00:20:59 +03:00
coll - > Setup . Radius = LARA_RAD ;
2021-09-14 00:30:44 +03:00
TestLaraHang ( item , coll ) ;
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot - ANGLE ( 90 ) ;
2020-08-11 03:55:34 -05:00
}
2021-02-03 01:50:59 -03:00
void lara_as_hangright ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 31*/
/*collision: lara_col_hangright*/
2021-09-10 00:20:59 +03:00
coll - > Setup . EnableObjectPush = false ;
coll - > Setup . EnableSpaz = false ;
2021-10-27 09:48:31 +03:00
coll - > Setup . Mode = COLL_PROBE_MODE : : FREE_FLAT ;
2020-09-26 05:06:08 +10:00
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 45.0f ) ;
if ( ! ( TrInput & ( IN_RIGHT | IN_RSTEP ) ) )
item - > goalAnimState = LS_HANG ;
2020-08-11 03:55:34 -05:00
}
2021-02-03 01:50:59 -03:00
void lara_col_hangright ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 31*/
/*state code: lara_as_hangright*/
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot + ANGLE ( 90 ) ;
2021-09-10 00:20:59 +03:00
coll - > Setup . Radius = LARA_RAD ;
2021-09-14 00:30:44 +03:00
TestLaraHang ( item , coll ) ;
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot + ANGLE ( 90 ) ;
2020-08-11 03:55:34 -05:00
}
2020-09-26 05:06:08 +10:00
/*go around corners*/
2020-08-11 03:55:34 -05:00
2021-02-03 01:50:59 -03:00
void lara_as_extcornerl ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 107*/
/*collision: lara_default_col*/
2021-01-26 16:41:29 +01:00
Camera . laraNode = LM_TORSO ;
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 33.0f ) ;
2020-08-11 03:55:34 -05:00
SetCornerAnim ( item , coll , ANGLE ( 90.0f ) ,
item - > animNumber = = LA_SHIMMY_LEFT_CORNER_OUTER_END | |
item - > animNumber = = LA_LADDER_LEFT_CORNER_OUTER_END ) ;
}
2021-02-03 01:50:59 -03:00
void lara_as_extcornerr ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 108*/
/*collision: lara_default_col*/
2021-01-26 16:41:29 +01:00
Camera . laraNode = LM_TORSO ;
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 33.0f ) ;
2020-08-11 03:55:34 -05:00
SetCornerAnim ( item , coll , - ANGLE ( 90.0f ) ,
item - > animNumber = = LA_SHIMMY_RIGHT_CORNER_OUTER_END | |
item - > animNumber = = LA_LADDER_RIGHT_CORNER_OUTER_END ) ;
}
2021-02-03 01:50:59 -03:00
void lara_as_intcornerl ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 109*/
/*collision: lara_default_col*/
2021-01-26 16:41:29 +01:00
Camera . targetAngle = 0 ;
Camera . laraNode = LM_TORSO ;
Camera . targetElevation = - ANGLE ( 33.0f ) ;
2020-08-11 03:55:34 -05:00
SetCornerAnim ( item , coll , - ANGLE ( 90.0f ) ,
item - > animNumber = = LA_SHIMMY_LEFT_CORNER_INNER_END | |
item - > animNumber = = LA_LADDER_LEFT_CORNER_INNER_END ) ;
}
2021-02-03 01:50:59 -03:00
void lara_as_intcornerr ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 110*/
/*collision: lara_default_col*/
2021-01-26 16:41:29 +01:00
Camera . laraNode = LM_TORSO ;
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 33.0f ) ;
2020-08-11 03:55:34 -05:00
SetCornerAnim ( item , coll , ANGLE ( 90.0f ) ,
item - > animNumber = = LA_SHIMMY_RIGHT_CORNER_INNER_END | |
item - > animNumber = = LA_LADDER_RIGHT_CORNER_INNER_END ) ;
}
2020-09-26 05:06:08 +10:00
/*feet hanging and shimmying
////obviously, not all animations were made yet, we still need:
2020-08-11 03:55:34 -05:00
- crouch pull up ( works well , tested with placeholder anim )
- corner anims ( works well , tested with placeholder anims )
- handstand ( not tested ) */
2021-07-09 19:41:56 -05:00
void lara_as_hang_feet ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 139*/
2021-07-09 19:41:56 -05:00
//collision: lara_col_hang_feet
2020-09-26 05:06:08 +10:00
Lara . isClimbing = false ;
if ( item - > hitPoints < = 0 )
{
item - > goalAnimState = LS_STOP ;
return ;
}
if ( TrInput & IN_LOOK )
LookUpDown ( ) ;
2021-09-10 00:20:59 +03:00
coll - > Setup . EnableObjectPush = false ;
coll - > Setup . EnableSpaz = false ;
2020-09-26 05:06:08 +10:00
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 45.0f ) ;
2020-08-11 03:55:34 -05:00
}
void lara_col_hang_feet ( ITEM_INFO * item , COLL_INFO * coll )
{
2020-09-26 05:06:08 +10:00
/*state 139*/
2021-07-09 19:41:56 -05:00
//state code: lara_as_hang_feet
2020-08-11 03:55:34 -05:00
item - > fallspeed = 0 ;
item - > gravityStatus = false ;
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot ;
2020-08-11 03:55:34 -05:00
2021-09-14 00:30:44 +03:00
TestLaraHang ( item , coll ) ;
2020-08-11 03:55:34 -05:00
if ( ! ( TrInput & IN_ACTION ) )
item - > goalAnimState = LS_JUMP_UP ;
if ( item - > animNumber = = LA_HANG_FEET_IDLE )
{
if ( TrInput & IN_LEFT | | TrInput & IN_LSTEP )
{
2021-09-14 00:30:44 +03:00
if ( TestLaraHangSideways ( item , coll , - ANGLE ( 90.0f ) ) )
2020-08-11 03:55:34 -05:00
{
item - > goalAnimState = LS_SHIMMY_FEET_LEFT ;
return ;
}
2021-10-26 15:44:36 +03:00
switch ( TestLaraHangCorner ( item , coll , - 90.0f ) )
2020-08-11 03:55:34 -05:00
{
2021-10-26 15:44:36 +03:00
case CORNER_RESULT : : INNER :
item - > goalAnimState = LS_SHIMMY_FEET_INNER_LEFT ;
return ;
case CORNER_RESULT : : OUTER :
item - > goalAnimState = LS_SHIMMY_FEET_OUTER_LEFT ;
2020-08-11 03:55:34 -05:00
return ;
2021-10-26 15:44:36 +03:00
default :
break ;
2020-08-11 03:55:34 -05:00
}
}
if ( TrInput & IN_RIGHT | | TrInput & IN_RSTEP )
{
2021-09-14 00:30:44 +03:00
if ( TestLaraHangSideways ( item , coll , ANGLE ( 90.0f ) ) )
2020-08-11 03:55:34 -05:00
{
item - > goalAnimState = LS_SHIMMY_FEET_RIGHT ;
return ;
}
2021-10-26 15:44:36 +03:00
switch ( TestLaraHangCorner ( item , coll , 90.0f ) )
2020-08-11 03:55:34 -05:00
{
2021-10-26 15:44:36 +03:00
case CORNER_RESULT : : INNER :
item - > goalAnimState = LS_SHIMMY_FEET_INNER_RIGHT ;
return ;
case CORNER_RESULT : : OUTER :
item - > goalAnimState = LS_SHIMMY_FEET_OUTER_RIGHT ;
2020-08-11 03:55:34 -05:00
return ;
2021-10-26 15:44:36 +03:00
default :
break ;
2020-08-11 03:55:34 -05:00
}
}
2020-09-26 05:06:08 +10:00
2020-08-11 03:55:34 -05:00
TestForObjectOnLedge ( item , coll ) ;
if ( TrInput & IN_FORWARD )
{
2021-09-10 00:18:47 +03:00
if ( coll - > Front . Floor > - 850 )
2020-08-11 03:55:34 -05:00
{
2021-09-10 00:18:47 +03:00
if ( coll - > Front . Floor < - 650 & &
coll - > Front . Floor > = coll - > Front . Ceiling & &
coll - > Front . Floor > = coll - > FrontLeft . Ceiling & &
coll - > Front . Floor > = coll - > FrontRight . Ceiling )
2020-08-11 03:55:34 -05:00
{
2021-09-10 00:18:47 +03:00
if ( abs ( coll - > FrontLeft . Floor - coll - > FrontRight . Floor ) < 60 & & ! coll - > HitStatic )
2020-08-11 03:55:34 -05:00
{
if ( TrInput & IN_WALK )
{
//till anim item->goalAnimState = LS_HANDSTAND;
}
else if ( TrInput & IN_DUCK )
{
item - > goalAnimState = LS_HANG_TO_CRAWL ;
item - > requiredAnimState = LS_CROUCH_IDLE ;
}
else
{
item - > goalAnimState = LS_GRABBING ;
}
return ;
}
}
}
2021-09-10 00:18:47 +03:00
if ( coll - > Front . Floor < - 650 & &
coll - > Front . Floor - coll - > Front . Ceiling > = - 256 & &
coll - > Front . Floor - coll - > FrontLeft . Ceiling > = - 256 & &
coll - > Front . Floor - coll - > FrontRight . Ceiling > = - 256 )
2020-08-11 03:55:34 -05:00
{
2021-09-10 00:18:47 +03:00
if ( abs ( coll - > FrontLeft . Floor - coll - > FrontRight . Floor ) < 60 & & ! coll - > HitStatic )
2020-08-11 03:55:34 -05:00
{
item - > goalAnimState = LS_HANG_TO_CRAWL ;
item - > requiredAnimState = LS_CROUCH_IDLE ;
return ;
}
}
}
2021-07-09 19:41:56 -05:00
if ( Lara . climbStatus ! = 0 & &
2021-09-10 00:18:47 +03:00
coll - > Middle . Ceiling < = - 256 & &
abs ( coll - > FrontLeft . Ceiling - coll - > FrontRight . Ceiling ) < 60 )
2021-07-09 19:41:56 -05:00
{
2021-09-14 00:30:44 +03:00
if ( TestLaraClimbStance ( item , coll ) )
2020-08-11 03:55:34 -05:00
{
2021-07-09 19:41:56 -05:00
item - > goalAnimState = LS_LADDER_IDLE ;
2020-08-11 03:55:34 -05:00
}
2021-07-09 19:41:56 -05:00
else
{
2021-11-16 17:25:17 +03:00
SetAnimation ( item , LA_LADDER_SHIMMY_UP ) ;
2021-07-09 19:41:56 -05:00
}
}
return ;
}
2020-08-11 03:55:34 -05:00
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot ;
2021-09-14 00:30:44 +03:00
TestLaraHang ( item , coll ) ;
2020-08-11 03:55:34 -05:00
}
2020-09-26 05:06:08 +10:00
void lara_as_hang_feet_shimmyr ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 140*/
2021-07-09 19:41:56 -05:00
//collision: lara_col_hang_feet_shimmyr
2021-09-10 00:20:59 +03:00
coll - > Setup . EnableObjectPush = false ;
coll - > Setup . EnableSpaz = false ;
2020-09-26 05:06:08 +10:00
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 45.0f ) ;
2020-08-11 03:55:34 -05:00
2020-09-26 05:06:08 +10:00
if ( ! ( TrInput & ( IN_RIGHT | IN_RSTEP ) ) )
item - > goalAnimState = LS_HANG_FEET ;
2020-08-11 03:55:34 -05:00
}
2020-09-26 05:06:08 +10:00
void lara_col_hang_feet_shimmyr ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 140*/
2021-07-09 19:41:56 -05:00
//state code: lara_as_hang_feet_shimmyr
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot + ANGLE ( 90 ) ;
2021-09-10 00:20:59 +03:00
coll - > Setup . Radius = LARA_RAD ;
2021-09-14 00:30:44 +03:00
TestLaraHang ( item , coll ) ;
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot + ANGLE ( 90 ) ;
2020-08-11 03:55:34 -05:00
}
2020-09-26 05:06:08 +10:00
void lara_as_hang_feet_shimmyl ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 141*/
2021-07-09 19:41:56 -05:00
//collision: lara_col_hang_feet_shimmyl
2021-09-10 00:20:59 +03:00
coll - > Setup . EnableObjectPush = false ;
coll - > Setup . EnableSpaz = false ;
2020-09-26 05:06:08 +10:00
Camera . targetAngle = 0 ;
Camera . targetElevation = - ANGLE ( 45.0f ) ;
if ( ! ( TrInput & ( IN_LEFT | IN_LSTEP ) ) )
item - > goalAnimState = LS_HANG_FEET ;
2020-08-11 03:55:34 -05:00
}
2020-09-26 05:06:08 +10:00
void lara_col_hang_feet_shimmyl ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 141*/
2021-07-09 19:41:56 -05:00
//state code: lara_as_hang_feet_shimmyl
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot - ANGLE ( 90 ) ;
2021-09-10 00:20:59 +03:00
coll - > Setup . Radius = LARA_RAD ;
2021-09-14 00:30:44 +03:00
TestLaraHang ( item , coll ) ;
2020-12-19 23:34:52 -03:00
Lara . moveAngle = item - > pos . yRot - ANGLE ( 90 ) ;
2020-08-11 03:55:34 -05:00
}
2021-07-09 19:41:56 -05:00
//go around corners feet
2020-08-11 03:55:34 -05:00
2020-09-26 05:06:08 +10:00
void lara_as_hang_feet_inRcorner ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 142*/
2021-07-09 19:41:56 -05:00
//collision: lara_default_col
2020-08-11 03:55:34 -05:00
Camera . laraNode = 8 ;
Camera . targetElevation = ANGLE ( 33.0f ) ;
if ( item - > frameNumber = = g_Level . Anims [ LA_SHIMMY_FEET_RIGHT_CORNER_INNER ] . frameEnd ) // I don't like this either but it's better than adding 4 new 1 frame anims?
2021-07-09 19:41:56 -05:00
SetCornerAnimFeet ( item , coll , ANGLE ( 90.0f ) , 1 ) ;
2020-08-11 03:55:34 -05:00
}
2020-09-26 05:06:08 +10:00
void lara_as_hang_feet_inLcorner ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 143*/
2021-07-09 19:41:56 -05:00
//collision: lara_default_col
2020-08-11 03:55:34 -05:00
Camera . laraNode = 8 ;
Camera . targetElevation = ANGLE ( 33.0f ) ;
if ( item - > frameNumber = = g_Level . Anims [ LA_SHIMMY_FEET_LEFT_CORNER_INNER ] . frameEnd )
2021-07-09 19:41:56 -05:00
SetCornerAnimFeet ( item , coll , - ANGLE ( 90.0f ) , 1 ) ;
2020-08-11 03:55:34 -05:00
}
2020-09-26 05:06:08 +10:00
void lara_as_hang_feet_outRcorner ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 144*/
2021-07-09 19:41:56 -05:00
//collision: lara_default_col
2020-08-11 03:55:34 -05:00
Camera . laraNode = 8 ;
Camera . targetElevation = ANGLE ( 33.0f ) ;
if ( item - > frameNumber = = g_Level . Anims [ LA_SHIMMY_FEET_RIGHT_CORNER_OUTER ] . frameEnd )
2021-07-09 19:41:56 -05:00
SetCornerAnimFeet ( item , coll , - ANGLE ( 90.0f ) , 1 ) ;
2020-08-11 03:55:34 -05:00
}
2020-09-26 05:06:08 +10:00
void lara_as_hang_feet_outLcorner ( ITEM_INFO * item , COLL_INFO * coll )
2020-08-11 03:55:34 -05:00
{
2020-09-26 05:06:08 +10:00
/*state 145*/
2021-07-09 19:41:56 -05:00
//collision: lara_default_col
2020-08-11 03:55:34 -05:00
Camera . laraNode = 8 ;
Camera . targetElevation = ANGLE ( 33.0f ) ;
if ( item - > frameNumber = = g_Level . Anims [ LA_SHIMMY_FEET_LEFT_CORNER_OUTER ] . frameEnd )
2021-07-09 19:41:56 -05:00
SetCornerAnimFeet ( item , coll , ANGLE ( 90.0f ) , 1 ) ;
}