dedi patches
This commit is contained in:
parent
70b3d380d3
commit
78eb2ac767
20
data/cdata/custom_scripts/cp/patches.gsc
Normal file
20
data/cdata/custom_scripts/cp/patches.gsc
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
main()
|
||||||
|
{
|
||||||
|
replacefunc(scripts\cp\agents\gametype_zombie::get_closest_player_near_interaction_point, ::get_closest_player_near_interaction_point_stub);
|
||||||
|
}
|
||||||
|
|
||||||
|
get_closest_player_near_interaction_point_stub( var_0 )
|
||||||
|
{
|
||||||
|
var_1 = scripts\engine\utility::get_array_of_closest( var_0.origin, level.players )[0];
|
||||||
|
var_2 = scripts\engine\utility::getclosest( var_0.origin, level.current_interaction_structs );
|
||||||
|
|
||||||
|
if( !isDefined( var_1 ) || !isDefined( var_2 ) )
|
||||||
|
{
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !scripts\cp\agents\gametype_zombie::is_player_near_interaction_point( var_1, var_2 ) )
|
||||||
|
var_1 = undefined;
|
||||||
|
|
||||||
|
return var_1;
|
||||||
|
}
|
@ -251,7 +251,7 @@ namespace dedicated
|
|||||||
dvars::override::register_bool("intro", false, game::DVAR_FLAG_READ);
|
dvars::override::register_bool("intro", false, game::DVAR_FLAG_READ);
|
||||||
|
|
||||||
// Stop crashing from sys_errors
|
// Stop crashing from sys_errors
|
||||||
utils::hook::jump(0x140D34180, sys_error_stub, true);
|
//utils::hook::jump(0x140D34180, sys_error_stub, true);
|
||||||
|
|
||||||
// Is party dedicated
|
// Is party dedicated
|
||||||
utils::hook::jump(0x1405DFC10, party_is_server_dedicated_stub);
|
utils::hook::jump(0x1405DFC10, party_is_server_dedicated_stub);
|
||||||
@ -301,12 +301,29 @@ namespace dedicated
|
|||||||
// check the sounddata when server is launched
|
// check the sounddata when server is launched
|
||||||
start_server_hook.create(0x140C56050, start_server_stub);
|
start_server_hook.create(0x140C56050, start_server_stub);
|
||||||
|
|
||||||
// IMAGE patches
|
// AlwaysLoaded
|
||||||
// image stream (pak)
|
utils::hook::set<uint8_t>(0x140A81D40, 0xC3);
|
||||||
|
|
||||||
|
// remove imagefile load
|
||||||
utils::hook::set<uint8_t>(0x140A7DB10, 0xC3); // DB_CreateGfxImageStreamInternal
|
utils::hook::set<uint8_t>(0x140A7DB10, 0xC3); // DB_CreateGfxImageStreamInternal
|
||||||
|
utils::hook::set<uint8_t>(0x140E01F00, 0xC3); // Load_Texture
|
||||||
|
|
||||||
|
// remove assetfile load
|
||||||
|
//utils::hook::jump(0x1409E762F, 0x1409E7713);
|
||||||
|
//utils::hook::set<uint8_t>(0x1403BA0A0, 0xC3);
|
||||||
|
//utils::hook::jump(0x140571E5F, 0x140571EF0);
|
||||||
|
|
||||||
|
// remove transient loads
|
||||||
|
utils::hook::set<uint8_t>(0x140A79AE0, 0xC3);
|
||||||
|
utils::hook::set<uint8_t>(0x1403BB990, 0xC3);
|
||||||
|
utils::hook::set<uint8_t>(0x140A78910, 0xC3);
|
||||||
|
|
||||||
|
// remove emblem stuff
|
||||||
|
utils::hook::set<uint8_t>(0x14003B9A0, 0xC3);
|
||||||
|
|
||||||
// UI patches
|
// UI patches
|
||||||
utils::hook::set<uint8_t>(0x140615090, 0xC3); // LUI_CoD_Init
|
utils::hook::set<uint8_t>(0x140615090, 0xC3); // LUI_CoD_Init
|
||||||
|
utils::hook::set<uint8_t>(0x140348A90, 0xC3); // CL_InitUI
|
||||||
|
|
||||||
// IW7 patches
|
// IW7 patches
|
||||||
utils::hook::set(0x140E06060, 0xC3C033); // directx
|
utils::hook::set(0x140E06060, 0xC3C033); // directx
|
||||||
|
@ -180,6 +180,7 @@ namespace demonware
|
|||||||
lootmap.clear();
|
lootmap.clear();
|
||||||
|
|
||||||
const auto asset = game::DB_FindXAssetHeader(game::ASSET_TYPE_STRINGTABLE, csv.file.data(), 0).stringTable;
|
const auto asset = game::DB_FindXAssetHeader(game::ASSET_TYPE_STRINGTABLE, csv.file.data(), 0).stringTable;
|
||||||
|
if (!asset) return;
|
||||||
|
|
||||||
for (auto row = 0; row < asset->rowCount; row++)
|
for (auto row = 0; row < asset->rowCount; row++)
|
||||||
{
|
{
|
||||||
@ -268,6 +269,7 @@ namespace demonware
|
|||||||
lootcrates.clear();
|
lootcrates.clear();
|
||||||
|
|
||||||
const auto asset = game::DB_FindXAssetHeader(game::ASSET_TYPE_STRINGTABLE, csv::loot_crate.file.data(), 0).stringTable;
|
const auto asset = game::DB_FindXAssetHeader(game::ASSET_TYPE_STRINGTABLE, csv::loot_crate.file.data(), 0).stringTable;
|
||||||
|
if (!asset) return;
|
||||||
|
|
||||||
for (auto row = 0; row < asset->rowCount; row++)
|
for (auto row = 0; row < asset->rowCount; row++)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ namespace demonware
|
|||||||
byte_buffer buffer;
|
byte_buffer buffer;
|
||||||
buffer.write(sizeof bandwidth_iw6, bandwidth_iw6);
|
buffer.write(sizeof bandwidth_iw6, bandwidth_iw6);
|
||||||
|
|
||||||
auto reply = server->create_message(5);
|
auto reply = server->create_message(BD_LSG_SERVICE_TASK_REPLY);
|
||||||
reply.send(&buffer, true);
|
reply.send(&buffer, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "../dw_include.hpp"
|
#include "../dw_include.hpp"
|
||||||
|
|
||||||
#include <utils/io.hpp>
|
#include "game/game.hpp"
|
||||||
|
|
||||||
#include "steam/steam.hpp"
|
#include "steam/steam.hpp"
|
||||||
|
|
||||||
@ -281,6 +281,12 @@ namespace demonware
|
|||||||
|
|
||||||
void bdMarketplace::getInventoryPaginated(service_server* server, byte_buffer* buffer) const
|
void bdMarketplace::getInventoryPaginated(service_server* server, byte_buffer* buffer) const
|
||||||
{
|
{
|
||||||
|
if (game::environment::is_dedi())
|
||||||
|
{
|
||||||
|
server->create_reply(this->task_id()).send();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::string platform;
|
std::string platform;
|
||||||
std::uint32_t itemsPerPage, pageNum;
|
std::uint32_t itemsPerPage, pageNum;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user