From 44b9b1d1e396e01e52dd4f25919d74fe5eff8a4a Mon Sep 17 00:00:00 2001 From: Pichai Lertwachirakul <46616744+zekodef@users.noreply.github.com> Date: Tue, 1 Oct 2019 14:22:18 +0700 Subject: [PATCH] Fix mining face position Fixed : https://github.com/zeelorenc/sf-cnr/issues/64 Reported-by: Stanislav Gromov ( Daniel-Cortez ) Signed-off-by: Pichai Lertwachirakul ( zekodef ) --- gamemodes/irresistible/cnr/features/minijobs/mining.pwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gamemodes/irresistible/cnr/features/minijobs/mining.pwn b/gamemodes/irresistible/cnr/features/minijobs/mining.pwn index c6508a7..14de165 100644 --- a/gamemodes/irresistible/cnr/features/minijobs/mining.pwn +++ b/gamemodes/irresistible/cnr/features/minijobs/mining.pwn @@ -272,6 +272,7 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) { static Float: X, Float: Y, Float: Z; + static Float: offset = 0.0; foreach ( new m : miningrock ) { @@ -283,7 +284,8 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) if ( g_miningData[ m ] [ E_ORES ] <= 0 ) return SendError( playerid, "There are no ores left in this rock." ); - SetPlayerFacePoint( playerid, X, Y, Z ); + GetDynamicObjectPos( g_miningData[ m ] [ E_OBJECT ], X, Y, Z ); + SetPlayerFacePoint( playerid, X, Y, offset ); SetPlayerMineOre( playerid, m ); SendServerMessage( playerid, "You're now mining a rock." ); return 1;