rules/deathmatch: move precaches into their own dedicated function

This commit is contained in:
Marco Cawthorne 2025-02-13 23:24:43 -08:00
parent 7fc646492d
commit e65f81ae23
5 changed files with 39 additions and 28 deletions

View file

@ -58,6 +58,16 @@ AllowFlashlight(void)
return cvars.GetBool("mp_flashlight");
}
void
CodeCallback_Precache(void)
{
precache.Entity("player_mp");
for (int i = 0; i < g_stockHL2MPPlayerModels.length; i++) {
precache.Model(g_stockHL2MPPlayerModels[i]);
}
}
void
CodeCallback_StartGameType(void)
{
@ -71,9 +81,6 @@ CodeCallback_StartGameType(void)
}
game.SetSpawnPoint("info_player_deathmatch");
for (int i = 0; i < g_stockHL2MPPlayerModels.length; i++) {
precache.Model(g_stockHL2MPPlayerModels[i]);
}
}
void