diff --git a/docs/progress.svg b/docs/progress.svg
index ffe8f54..d446b08 100644
--- a/docs/progress.svg
+++ b/docs/progress.svg
@@ -69,10 +69,10 @@
Tomb2.exe progress according to the physical function order:
-12.92% (155) · 84.67% (1016) · 0.67% (8) · 1.75% (21)
+13% (156) · 84.58% (1015) · 0.67% (8) · 1.75% (21)
-
-
+
+
@@ -601,7 +601,7 @@
void __cdecl Lara_State_ClimbEnd(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_State_ClimbDown(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_Col_ClimbLeft(struct ITEM_INFO *item, struct COLL_INFO *coll);
-void __cdecl Lara_Col_ClimbRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
+void __cdecl Lara_Col_ClimbRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_Col_ClimbStance(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_Col_Climbing(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_Col_ClimbDown(struct ITEM_INFO *item, struct COLL_INFO *coll);
@@ -1281,10 +1281,10 @@
Tomb2.exe progress according to the function sizes:
-6.71% · 92.96% · 0.02% · 0.31%
+6.73% · 92.94% · 0.02% · 0.31%
-
-
+
+
@@ -2033,7 +2033,7 @@
int16_t __cdecl DoBloodSplat(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE direction, int16_t room_num);
void __cdecl DoChimeSound(struct ITEM_INFO *item);
void __cdecl Lara_Col_Splat(struct ITEM_INFO *item, struct COLL_INFO *coll);
-void __cdecl Lara_Col_ClimbRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
+void __cdecl Lara_Col_ClimbRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl HWR_ResetZBuffer(void);
void __cdecl InitialiseXianLord(int16_t item_num);
void __cdecl ClearBodyBag(void);
diff --git a/docs/progress.txt b/docs/progress.txt
index 7dfb0f5..a10c80a 100644
--- a/docs/progress.txt
+++ b/docs/progress.txt
@@ -1659,7 +1659,7 @@ typedef enum LARA_GUN_STATE {
0042D970 0000001E + void __cdecl Lara_State_ClimbEnd(struct ITEM_INFO *item, struct COLL_INFO *coll);
0042D990 00000014 + void __cdecl Lara_State_ClimbDown(struct ITEM_INFO *item, struct COLL_INFO *coll);
0042D9B0 0000005D + void __cdecl Lara_Col_ClimbLeft(struct ITEM_INFO *item, struct COLL_INFO *coll);
-0042DA10 00000059 - void __cdecl Lara_Col_ClimbRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
+0042DA10 00000059 + void __cdecl Lara_Col_ClimbRight(struct ITEM_INFO *item, struct COLL_INFO *coll);
0042DA70 0000020D - void __cdecl Lara_Col_ClimbStance(struct ITEM_INFO *item, struct COLL_INFO *coll);
0042DC80 0000014D - void __cdecl Lara_Col_Climbing(struct ITEM_INFO *item, struct COLL_INFO *coll);
0042DDD0 0000019C - void __cdecl Lara_Col_ClimbDown(struct ITEM_INFO *item, struct COLL_INFO *coll);
diff --git a/src/game/lara/lara_col.c b/src/game/lara/lara_col.c
index 34b3087..cb3acd0 100644
--- a/src/game/lara/lara_col.c
+++ b/src/game/lara/lara_col.c
@@ -793,8 +793,22 @@ void __cdecl Lara_Col_ClimbLeft(struct ITEM_INFO *item, struct COLL_INFO *coll)
int32_t shift;
int32_t result = Lara_TestClimbPos(
- item, coll->radius, -(coll->radius + LARA_CLIMB_WIDTH),
+ item, coll->radius, -(coll->radius + LARA_CLIMB_WIDTH_LEFT),
-LARA_CLIMB_HIT_ELEVATION, LARA_CLIMB_HIT_ELEVATION, &shift);
Lara_DoClimbLeftRight(item, coll, result, shift);
}
+
+void __cdecl Lara_Col_ClimbRight(struct ITEM_INFO *item, struct COLL_INFO *coll)
+{
+ if (Lara_CheckForLetGo(item, coll)) {
+ return;
+ }
+ g_Lara.move_angle = item->pos.y_rot + PHD_90;
+
+ int32_t shift;
+ int32_t result = Lara_TestClimbPos(
+ item, coll->radius, coll->radius + LARA_CLIMB_WIDTH_RIGHT,
+ -LARA_CLIMB_HIT_ELEVATION, LARA_CLIMB_HIT_ELEVATION, &shift);
+ Lara_DoClimbLeftRight(item, coll, result, shift);
+}
diff --git a/src/game/lara/lara_col.h b/src/game/lara/lara_col.h
index c247868..762c021 100644
--- a/src/game/lara/lara_col.h
+++ b/src/game/lara/lara_col.h
@@ -38,3 +38,5 @@ void __cdecl Lara_Col_Wade(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_Col_Default(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_Col_Jumper(struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_Col_ClimbLeft(struct ITEM_INFO *item, struct COLL_INFO *coll);
+void __cdecl Lara_Col_ClimbRight(
+ struct ITEM_INFO *item, struct COLL_INFO *coll);
diff --git a/src/global/const.h b/src/global/const.h
index 763d16c..ae90d15 100644
--- a/src/global/const.h
+++ b/src/global/const.h
@@ -43,7 +43,8 @@
#define LARA_LEAN_MAX ((10 * PHD_DEGREE) + LARA_LEAN_UNDO) // = 2002
#define LARA_JUMP_TURN ((PHD_DEGREE * 1) + LARA_TURN_UNDO) // = 546
#define LARA_FAST_FALL_SPEED (FAST_FALL_SPEED + 3) // = 131
-#define LARA_CLIMB_WIDTH 80
+#define LARA_CLIMB_WIDTH_LEFT 80
+#define LARA_CLIMB_WIDTH_RIGHT 120
#define LARA_CLIMB_HIT_ELEVATION (WALL_L / 2) // = 512
#define CAM_HANG_ANGLE 0
diff --git a/src/global/funcs.h b/src/global/funcs.h
index 5a11058..0380694 100644
--- a/src/global/funcs.h
+++ b/src/global/funcs.h
@@ -417,7 +417,6 @@
#define undraw_pistol_mesh_right ((void __cdecl (*)(int32_t weapon_type))0x0042D350)
#define PistolHandler ((void __cdecl (*)(int32_t weapon_type))0x0042D390)
#define AnimatePistols ((void __cdecl (*)(int32_t weapon_type))0x0042D520)
-#define Lara_Col_ClimbRight ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x0042DA10)
#define Lara_Col_ClimbStance ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x0042DA70)
#define Lara_Col_Climbing ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x0042DC80)
#define Lara_Col_ClimbDown ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x0042DDD0)
diff --git a/src/inject_exec.c b/src/inject_exec.c
index 5ea33b2..7a1a0a4 100644
--- a/src/inject_exec.c
+++ b/src/inject_exec.c
@@ -178,6 +178,7 @@ static void Inject_Lara_Col(void)
INJECT(1, 0x00429FE0, Lara_Col_Default);
INJECT(1, 0x0042A020, Lara_Col_Jumper);
INJECT(1, 0x0042D9B0, Lara_Col_ClimbLeft);
+ INJECT(1, 0x0042DA10, Lara_Col_ClimbRight);
}
static void Inject_S_Audio_Sample(void)