Permalink
Browse files

Move Precache stuff to OnMapStart

Maybe those models don't change directly after they got changed in the config.
  • Loading branch information...
good-live committed Dec 13, 2017
1 parent 5cbac99 commit ca3dc8ddb91ae097794a7cccfee2ba8ac5b7424b
Showing with 7 additions and 7 deletions.
  1. +7 −7 addons/sourcemod/scripting/ttt/ttt.sp
@@ -183,13 +183,6 @@ public void OnConfigsExecuted()
LogMessage("Log File: \"%s\"", g_sLogFile);
LogMessage("Error File :\"%s\"", g_sErrorFile);
}
// Precache models
char sModel[PLATFORM_MAX_PATH + 1];
g_cmodelCT.GetString(sModel, sizeof(sModel));
PrecacheModel(sModel, true);
g_cmodelT.GetString(sModel, sizeof(sModel));
PrecacheModel(sModel, true);
}
public void TTT_OnSQLConnect(Database db)
@@ -450,6 +443,13 @@ public void OnMapStart()
g_iBadNameCount = 0;
LoadBadNames();
// Precache models
char sModel[PLATFORM_MAX_PATH + 1];
g_cmodelCT.GetString(sModel, sizeof(sModel));
PrecacheModel(sModel, true);
g_cmodelT.GetString(sModel, sizeof(sModel));
PrecacheModel(sModel, true);
g_iBeamSprite = PrecacheModel("materials/sprites/bomb_planted_ring.vmt");
g_iHaloSprite = PrecacheModel("materials/sprites/halo.vtf");

0 comments on commit ca3dc8d

Please sign in to comment.