Skip to content

Commit

Permalink
Fixed a bug where player didn't download content after map change.
Browse files Browse the repository at this point in the history
  • Loading branch information
alongubkin committed Feb 15, 2013
1 parent 80e5d49 commit 1beb7de
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripting/store-equipment.sp
Expand Up @@ -98,6 +98,21 @@ public OnPluginStart()
Store_RegisterItemType("equipment", OnEquip, LoadItem);
}

/**
* Map is starting
*/
public OnMapStart()
{
for (new item = 0; item < g_equipmentCount; item++)
{
if (strcmp(g_equipment[item][EquipmentModelPath], "") != 0 && (FileExists(g_equipment[item][EquipmentModelPath]) || FileExists(g_equipment[item][EquipmentModelPath], true)))
{
PrecacheModel(g_equipment[item][EquipmentModelPath]);
Downloader_AddFileToDownloadsTable(g_equipment[item][EquipmentModelPath]);
}
}
}

/**
* Called when a new API library is loaded.
*/
Expand Down

0 comments on commit 1beb7de

Please sign in to comment.