Skip to content

Commit

Permalink
fix: spawns count for gamedll (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov authored Apr 14, 2024
1 parent 977baf2 commit 7cd2144
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cstrike/addons/amxmodx/scripting/redm_spawns.sma
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public plugin_init() {
}

get_mapname(g_mapName, charsmax(g_mapName))
GameDLLSpawnsCountFix()
RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound", .post = true)

register_clcmd("enter_spawnGroup", "ClCmd_EnterSpawnGroup")

Expand Down Expand Up @@ -872,10 +872,14 @@ static ConvertOldSpawnsFile(const file[]) {
return spawnsCount
}

public CSGameRules_RestartRound() {
GameDLLSpawnsCountFix()
}

static GameDLLSpawnsCountFix() {
set_member_game(m_bLevelInitialized, true)
set_member_game(m_iSpawnPointCount_CT, 32)
set_member_game(m_iSpawnPointCount_Terrorist, 32)
set_member_game(m_iSpawnPointCount_CT, 64)
set_member_game(m_iSpawnPointCount_Terrorist, 64)
}

public bool: SpawnPreset_Random(const player) {
Expand Down

0 comments on commit 7cd2144

Please sign in to comment.