pool issue with exiting table while not even in it, fixed
This commit is contained in:
parent
e493eca59e
commit
9f81391323
@ -247,7 +247,7 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
if ( g_poolTableData[ poolid ] [ E_STARTED ] )
|
||||
{
|
||||
// quit table
|
||||
if ( HOLDING( KEY_SECONDARY_ATTACK ) ) {
|
||||
if ( HOLDING( KEY_SECONDARY_ATTACK ) && IsPlayerPlayingPool( playerid ) ) {
|
||||
if ( PRESSED( KEY_CROUCH ) ) {
|
||||
HidePlayerHelpDialog( playerid );
|
||||
Pool_SendTableMessage( poolid, COLOR_GREY, "-- "COL_WHITE" %s(%d) has left the table", ReturnPlayerName( playerid ), playerid );
|
||||
@ -260,6 +260,7 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
// make pressing key fire annoying
|
||||
if ( RELEASED( KEY_FIRE ) && g_poolTableData[ poolid ] [ E_AIMER ] != playerid && ! p_PoolChalking{ playerid } )
|
||||
{
|
||||
// reset anims of player
|
||||
if ( IsPlayerPlayingPool( playerid ) )
|
||||
{
|
||||
p_PoolChalking{ playerid } = true;
|
||||
@ -275,6 +276,11 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
{
|
||||
ClearAnimations( playerid );
|
||||
}
|
||||
|
||||
// reset ball positions just in-case they hit it
|
||||
if ( Pool_AreBallsStopped( poolid ) ) {
|
||||
Pool_ResetBallPositions( poolid );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#pragma option -d3
|
||||
#pragma dynamic 7200000
|
||||
|
||||
#define DEBUG_MODE
|
||||
//#define DEBUG_MODE
|
||||
|
||||
#if defined DEBUG_MODE
|
||||
#pragma option -d3
|
||||
|
Loading…
Reference in New Issue
Block a user