diff --git a/src/Amalgam/AmalgamTrace.cpp b/src/Amalgam/AmalgamTrace.cpp index 474bc1f4..49d3047c 100644 --- a/src/Amalgam/AmalgamTrace.cpp +++ b/src/Amalgam/AmalgamTrace.cpp @@ -206,6 +206,19 @@ int32_t RunAmalgamTrace(std::istream *in_stream, std::ostream *out_stream, std:: { response = AMALGAM_VERSION_STRING; } + else if(command == "VERIFY_ENTITY") + { + std::vector command_tokens = StringManipulation::SplitArgString(input); + if(command_tokens.size() >= 1) + { + auto status = entint.VerifyEntity(command_tokens[0]); + response = status.loaded ? SUCCESS_RESPONSE : FAILURE_RESPONSE; + } + else + { + response = FAILURE_RESPONSE; + } + } else if(command == "GET_MAX_NUM_THREADS") { #if defined(MULTITHREAD_SUPPORT) diff --git a/src/Amalgam/AssetManager.cpp b/src/Amalgam/AssetManager.cpp index 68a72f35..3a453c61 100644 --- a/src/Amalgam/AssetManager.cpp +++ b/src/Amalgam/AssetManager.cpp @@ -162,7 +162,7 @@ std::tuple AssetManager::GetFileStatus(std::stri if(extension == FILE_EXTENSION_COMPRESSED_AMALGAM_CODE) { - std::ifstream f(path, std::fstream::binary | std::fstream::in); + std::ifstream f(resource_path, std::fstream::binary | std::fstream::in); if(!f.good()) return std::make_tuple("Cannot open file", "", false); @@ -172,12 +172,12 @@ std::tuple AssetManager::GetFileStatus(std::stri if(!success) return std::make_tuple(error_message, version, false); - return std::make_tuple("", version, false); + return std::make_tuple("", version, true); } else if(extension == FILE_EXTENSION_AMALGAM) { //make sure path can be opened - std::ifstream file(path, std::fstream::binary | std::fstream::in); + std::ifstream file(resource_path, std::fstream::binary | std::fstream::in); if(!file.good()) return std::make_tuple("Cannot open file", "", false); @@ -209,7 +209,7 @@ std::tuple AssetManager::GetFileStatus(std::stri } else { - std::ifstream f(path, std::fstream::binary | std::fstream::in); + std::ifstream f(resource_path, std::fstream::binary | std::fstream::in); if(!f.good()) return std::make_tuple("Cannot open file", "", false); diff --git a/src/Amalgam/entity/EntityExternalInterface.cpp b/src/Amalgam/entity/EntityExternalInterface.cpp index a8f5a852..ae799451 100644 --- a/src/Amalgam/entity/EntityExternalInterface.cpp +++ b/src/Amalgam/entity/EntityExternalInterface.cpp @@ -86,7 +86,7 @@ EntityExternalInterface::LoadEntityStatus EntityExternalInterface::VerifyEntity( if(!success) return EntityExternalInterface::LoadEntityStatus(false, error_string, version); - return EntityExternalInterface::LoadEntityStatus(false, "", version); + return EntityExternalInterface::LoadEntityStatus(true, "", version); } bool EntityExternalInterface::CloneEntity(std::string &handle, std::string &cloned_handle, std::string &path,