mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
Fix: bug with mp_buytime in reset always set to 0 because of cast to const int.
This commit is contained in:
parent
6f51a65ae9
commit
08798e0e14
@ -4236,12 +4236,12 @@ bool CBasePlayer::CanPlayerBuy(bool display)
|
||||
return false;
|
||||
}
|
||||
|
||||
int buyTime = (int)(CVAR_GET_FLOAT("mp_buytime") * 60);
|
||||
int buyTime = (int)(CVAR_GET_FLOAT("mp_buytime") * 60.0f);
|
||||
|
||||
if (buyTime < 15)
|
||||
if (buyTime < MIN_BUY_TIME)
|
||||
{
|
||||
buyTime = 15;
|
||||
CVAR_SET_FLOAT("mp_buytime", 1 / (60 / 15));
|
||||
buyTime = MIN_BUY_TIME;
|
||||
CVAR_SET_FLOAT("mp_buytime", (MIN_BUY_TIME / 60.0f));
|
||||
}
|
||||
|
||||
if (gpGlobals->time - mp->m_fRoundCount > buyTime)
|
||||
|
@ -34,7 +34,9 @@
|
||||
|
||||
#include "hintmessage.h"
|
||||
|
||||
#define MAX_BUFFER_MENU 175//?
|
||||
#define MIN_BUY_TIME 15 // the minimum threshold values for cvar mp_buytime 15 sec's
|
||||
|
||||
#define MAX_BUFFER_MENU 175
|
||||
#define MAX_BUFFER_MENU_BRIEFING 50
|
||||
|
||||
#define MAX_PLAYER_NAME_LENGTH 32
|
||||
|
Loading…
Reference in New Issue
Block a user