[Maps] Ignore cull distance for frustum calculation
This commit is contained in:
parent
2df233d694
commit
0e56b345d8
@ -777,8 +777,6 @@ namespace Components
|
|||||||
float* _origin = gameWorld->dpvs.smodelDrawInsts[i].placement.origin;
|
float* _origin = gameWorld->dpvs.smodelDrawInsts[i].placement.origin;
|
||||||
glm::vec2 modelOrigin(_origin[0], _origin[1]);
|
glm::vec2 modelOrigin(_origin[0], _origin[1]);
|
||||||
|
|
||||||
if ((selfOrigin - modelOrigin).length() <= gameWorld->dpvs.smodelDrawInsts[i].cullDist * 1.0f)
|
|
||||||
{
|
|
||||||
// If matrix is singular just draw the models
|
// If matrix is singular just draw the models
|
||||||
glm::mat2x2 matrix(right[0], -(forward[0]), right[1], -(forward[1]));
|
glm::mat2x2 matrix(right[0], -(forward[0]), right[1], -(forward[1]));
|
||||||
if (glm::determinant(matrix) != 0)
|
if (glm::determinant(matrix) != 0)
|
||||||
@ -796,25 +794,24 @@ namespace Components
|
|||||||
gameWorld->dpvs.smodelVisData[1][i] = 1;
|
gameWorld->dpvs.smodelVisData[1][i] = 1;
|
||||||
gameWorld->dpvs.smodelVisData[2][i] = 1;
|
gameWorld->dpvs.smodelVisData[2][i] = 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, HOOK_CALL).install()->quick();
|
}, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
Dvar::OnInit([] ()
|
Dvar::OnInit([]()
|
||||||
{
|
{
|
||||||
Dvar::Register<bool>("isDlcInstalled_All", false, Game::DVAR_FLAG_USERCREATED | Game::DVAR_FLAG_WRITEPROTECTED, "");
|
Dvar::Register<bool>("isDlcInstalled_All", false, Game::DVAR_FLAG_USERCREATED | Game::DVAR_FLAG_WRITEPROTECTED, "");
|
||||||
|
|
||||||
Maps::AddDlc({1, "Stimulus Pack", {"mp_complex", "mp_compact", "mp_storm", "mp_overgrown", "mp_crash"}});
|
Maps::AddDlc({ 1, "Stimulus Pack", {"mp_complex", "mp_compact", "mp_storm", "mp_overgrown", "mp_crash"} });
|
||||||
Maps::AddDlc({2, "Resergence Pack", {"mp_abandon", "mp_vacant", "mp_trailerpark", "mp_strike", "mp_fuel2"}});
|
Maps::AddDlc({ 2, "Resergence Pack", {"mp_abandon", "mp_vacant", "mp_trailerpark", "mp_strike", "mp_fuel2"} });
|
||||||
Maps::AddDlc({3, "Nuketown", {"mp_nuked"}});
|
Maps::AddDlc({ 3, "Nuketown", {"mp_nuked"} });
|
||||||
Maps::AddDlc({4, "Classics Pack", {"mp_cross_fire", "mp_cargoship", "mp_bloc"}});
|
Maps::AddDlc({ 4, "Classics Pack", {"mp_cross_fire", "mp_cargoship", "mp_bloc"} });
|
||||||
Maps::AddDlc({5, "Classics Pack", {"mp_killhouse", "mp_bog_sh"}});
|
Maps::AddDlc({ 5, "Classics Pack", {"mp_killhouse", "mp_bog_sh"} });
|
||||||
Maps::AddDlc({6, "Freighter", {"mp_cargoship_sh"}});
|
Maps::AddDlc({ 6, "Freighter", {"mp_cargoship_sh"} });
|
||||||
Maps::AddDlc({7, "Resurrection Pack", {"mp_shipment_long", "mp_rust_long", "mp_firingrange"}});
|
Maps::AddDlc({ 7, "Resurrection Pack", {"mp_shipment_long", "mp_rust_long", "mp_firingrange"} });
|
||||||
Maps::AddDlc({8, "Recycled Pack", {"mp_bloc_sh", "mp_crash_tropical", "mp_estate_tropical", "mp_fav_tropical", "mp_storm_spring"}});
|
Maps::AddDlc({ 8, "Recycled Pack", {"mp_bloc_sh", "mp_crash_tropical", "mp_estate_tropical", "mp_fav_tropical", "mp_storm_spring"} });
|
||||||
|
|
||||||
Maps::UpdateDlcStatus();
|
Maps::UpdateDlcStatus();
|
||||||
|
|
||||||
UIScript::Add("downloadDLC", [] (UIScript::Token token)
|
UIScript::Add("downloadDLC", [](UIScript::Token token)
|
||||||
{
|
{
|
||||||
int dlc = token.get<int>();
|
int dlc = token.get<int>();
|
||||||
|
|
||||||
@ -900,7 +897,7 @@ namespace Components
|
|||||||
//Maps::AddDependency("mp_shipment", "mp_shipment_long");
|
//Maps::AddDependency("mp_shipment", "mp_shipment_long");
|
||||||
|
|
||||||
#if defined(DEBUG) && defined(ENABLE_DXSDK)
|
#if defined(DEBUG) && defined(ENABLE_DXSDK)
|
||||||
Command::Add("dumpmap", [] (Command::Params*)
|
Command::Add("dumpmap", [](Command::Params*)
|
||||||
{
|
{
|
||||||
if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled())
|
if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled())
|
||||||
{
|
{
|
||||||
@ -909,7 +906,7 @@ namespace Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
Game::GfxWorld* world = nullptr;
|
Game::GfxWorld* world = nullptr;
|
||||||
Game::DB_EnumXAssets(Game::XAssetType::ASSET_TYPE_GFXWORLD, [] (Game::XAssetHeader header, void* world)
|
Game::DB_EnumXAssets(Game::XAssetType::ASSET_TYPE_GFXWORLD, [](Game::XAssetHeader header, void* world)
|
||||||
{
|
{
|
||||||
*reinterpret_cast<Game::GfxWorld**>(world) = header.gfxWorld;
|
*reinterpret_cast<Game::GfxWorld**>(world) = header.gfxWorld;
|
||||||
}, &world, false);
|
}, &world, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user