Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
#include "MW4Headers.hpp"
|
|
|
|
#include "DeathEntity.hpp"
|
|
#include "MWTool.hpp"
|
|
#include "MWDamageObject.hpp"
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
//
|
|
void
|
|
DeathEntity__GameModel::ConstructGameModel(Script *script)
|
|
{
|
|
Check_Object(script);
|
|
|
|
//
|
|
//--------------
|
|
// Set up stream
|
|
//--------------
|
|
//
|
|
MemoryStream *model_stream = script->modelStream;
|
|
Check_Object(model_stream);
|
|
model_stream->AllocateBytes(sizeof(DeathEntity__GameModel));
|
|
Entity__GameModel::ConstructGameModel(script);
|
|
DeathEntity__GameModel *model =
|
|
Cast_Pointer(DeathEntity__GameModel*, model_stream->GetPointer());
|
|
Check_Object(model);
|
|
|
|
NotationFile *model_file = script->modelFile;
|
|
Check_Object(model_file);
|
|
Page *page = model_file->GetPage("GameData");
|
|
Check_Object(page);
|
|
|
|
model->m_craterID = -1;
|
|
const char *crater_string;
|
|
if(page->GetEntry("CraterName", &crater_string))
|
|
{
|
|
MString crater_mstring = crater_string;
|
|
model->m_craterID = crater_mstring.GetHashValue();
|
|
}
|
|
}
|