Reducing allowable money limit cuz a HUD can't draw more than 999k
This commit is contained in:
s1lent 2019-04-23 19:54:51 +07:00
parent 8c85aeebbc
commit 94f0fdb8a6
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C
6 changed files with 11 additions and 1684 deletions

View File

@ -24,7 +24,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
| mp_freeforall | 0 | 0 | 1 | The style of gameplay where there aren't any teams (FFA mode)<br/>`0` disabled <br/>`1` enabled |
| mp_autoteambalance | 1 | 0 | 2 | Auto balancing of teams.<br/>`0` disabled <br/>`1` on after next round<br/>`2` on next round |
| mp_buytime | 1.5 | 0.0 | - | Designate the desired amount of buy time for each round. (in minutes)<br />`-1` means no time limit<br />`0` disable buy |
| mp_maxmoney | 16000 | 0 | `0x7FFFFFFF` | The maximum allowable amount of money in the game |
| mp_maxmoney | 16000 | 0 | `999999` | The maximum allowable amount of money in the game |
| mp_round_infinite | 0 | 0 | 1 | Flags for fine grained control (choose as many as needed)<br/>`0` disabled<br/>`1` enabled<br/><br/>or flags<br/>`a` block round time round end check<br/>`b` block needed players round end check<br/>`c` block VIP assassination/success round end check<br/>`d` block prison escape round end check<br/>`e` block bomb round end check<br/>`f` block team extermination round end check<br/>`g` block hostage rescue round end check<br/><br/>`Example setting:` "ae" blocks round time and bomb round end checks |
| mp_roundover | 0 | - | - | The round by expired time will be over, if on a map it does not have the scenario of the game.<br/>`0` disabled<br/>`1` enabled |
| mp_round_restart_delay | 5 | - | - | Number of seconds to delay before restarting a round after a win. |

4
dist/game.cfg vendored
View File

@ -1,6 +1,3 @@
// ReGameDLL Configuration File
echo Executing ReGameDLL Configuration File
// The style of gameplay where there aren't any teams (FFA mode)
// 0 - disabled (default behaviour)
// 1 - enabled
@ -24,6 +21,7 @@ mp_autoteambalance 1
mp_buytime 0.25
// The maximum allowable amount of money in the game
// NOTE: Allowable money limit is 999999
//
// Default value: "16000"
mp_maxmoney 16000

View File

@ -588,6 +588,11 @@ void CheckStartMoney()
CVAR_SET_FLOAT("mp_startmoney", 800);
#else
int max_money = int(maxmoney.value);
if (max_money > MAX_MONEY_THRESHOLD)
{
max_money = MAX_MONEY_THRESHOLD;
CVAR_SET_FLOAT("mp_maxmoney", MAX_MONEY_THRESHOLD);
}
if (money > max_money)
CVAR_SET_FLOAT("mp_startmoney", max_money);

View File

@ -34,6 +34,7 @@
const int MAX_RULE_BUFFER = 1024;
const int MAX_VOTE_MAPS = 100;
const int MAX_VIP_QUEUES = 5;
const int MAX_MONEY_THRESHOLD = 999999; // allowable money limit in the game that can be drawn on the HUD
const int MAX_MOTD_CHUNK = 60;
const int MAX_MOTD_LENGTH = 1536; // (MAX_MOTD_CHUNK * 4)

View File

@ -3113,12 +3113,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(AddAccount)(int amount, RewardType type, b
if (bSendMoney)
{
auto nMax = int(maxmoney.value);
if (m_iAccount > nMax)
m_iAccount = nMax;
else if (m_iAccount < 0)
m_iAccount = 0;
m_iAccount = clamp<int>(m_iAccount, 0, maxmoney.value);
// Send money update to HUD
MESSAGE_BEGIN(MSG_ONE, gmsgMoney, nullptr, pev);
@ -3482,12 +3477,12 @@ void CBasePlayer::PlayerDeathThink()
// we aren't calling into any of their code anymore through the player pointer.
PackDeadPlayerItems();
}
#ifdef REGAMEDLL_FIXES
// Clear inclination came from client view
pev->angles.x = 0;
#endif
if (pev->modelindex && !m_fSequenceFinished && pev->deadflag == DEAD_DYING)
{
StudioFrameAdvance();

File diff suppressed because it is too large Load Diff