[ZoneBuilder] Check if CSV exists
This commit is contained in:
parent
5c54b864e4
commit
59d8c85640
@ -92,6 +92,12 @@ namespace Components
|
|||||||
|
|
||||||
void ZoneBuilder::Zone::Zone::build()
|
void ZoneBuilder::Zone::Zone::build()
|
||||||
{
|
{
|
||||||
|
if(!this->dataMap.isValid())
|
||||||
|
{
|
||||||
|
Logger::Print("Unable to load CSV for '%s'!\n", this->zoneName.data());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this->loadFastFiles();
|
this->loadFastFiles();
|
||||||
|
|
||||||
Logger::Print("Linking assets...\n");
|
Logger::Print("Linking assets...\n");
|
||||||
|
@ -3135,7 +3135,8 @@ namespace Game
|
|||||||
unsigned int count;
|
unsigned int count;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct __declspec(align(8)) DpvsStaticCellCmd
|
#pragma pack(push, 1)
|
||||||
|
struct DpvsStaticCellCmd
|
||||||
{
|
{
|
||||||
DpvsPlane *planes;
|
DpvsPlane *planes;
|
||||||
GfxAabbTree *tree;
|
GfxAabbTree *tree;
|
||||||
@ -3143,6 +3144,7 @@ namespace Game
|
|||||||
char frustumPlaneCount;
|
char frustumPlaneCount;
|
||||||
unsigned __int16 sceneViewType;
|
unsigned __int16 sceneViewType;
|
||||||
};
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
struct GfxPortal
|
struct GfxPortal
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,7 @@ namespace Utils
|
|||||||
{
|
{
|
||||||
CSV::CSV(std::string file, bool isFile, bool allowComments)
|
CSV::CSV(std::string file, bool isFile, bool allowComments)
|
||||||
{
|
{
|
||||||
|
this->valid = false;
|
||||||
this->parse(file, isFile, allowComments);
|
this->parse(file, isFile, allowComments);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +73,7 @@ namespace Utils
|
|||||||
{
|
{
|
||||||
if (!Utils::IO::FileExists(file)) return;
|
if (!Utils::IO::FileExists(file)) return;
|
||||||
buffer = Utils::IO::ReadFile(file);
|
buffer = Utils::IO::ReadFile(file);
|
||||||
|
this->valid = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,10 @@ namespace Utils
|
|||||||
|
|
||||||
std::string getElementAt(size_t row, size_t column);
|
std::string getElementAt(size_t row, size_t column);
|
||||||
|
|
||||||
|
bool isValid() { return this->valid; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool valid;
|
||||||
std::vector<std::vector<std::string>> dataMap;
|
std::vector<std::vector<std::string>> dataMap;
|
||||||
|
|
||||||
void parse(std::string file, bool isFile = true, bool allowComments = true);
|
void parse(std::string file, bool isFile = true, bool allowComments = true);
|
||||||
|
Loading…
Reference in New Issue
Block a user