fixes
This commit is contained in:
parent
5c66f8b5de
commit
777f3aaa8d
@ -123,7 +123,7 @@ namespace network
|
|||||||
return a->port == b->port;
|
return a->port == b->port;
|
||||||
|
|
||||||
case game::netadrtype_t::NA_IP:
|
case game::netadrtype_t::NA_IP:
|
||||||
return !memcmp(a->ip, b->ip, 4);
|
return memcmp(a->ip, b->ip, 4) == 0;
|
||||||
case game::netadrtype_t::NA_BROADCAST:
|
case game::netadrtype_t::NA_BROADCAST:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
@ -136,7 +136,7 @@ namespace network
|
|||||||
|
|
||||||
int net_compare_address(const game::netadr_s* a, const game::netadr_s* b)
|
int net_compare_address(const game::netadr_s* a, const game::netadr_s* b)
|
||||||
{
|
{
|
||||||
return net_compare_base_address(a, b) && a->port == b->port;
|
return net_compare_base_address(a, b) != 0 && (a->port == b->port);
|
||||||
}
|
}
|
||||||
|
|
||||||
void string_to_sockaddr(const char* str, sockaddr_in* address)
|
void string_to_sockaddr(const char* str, sockaddr_in* address)
|
||||||
|
@ -262,7 +262,10 @@ namespace party
|
|||||||
|
|
||||||
auto* current_mapname = game::Dvar_FindVar("mapname");
|
auto* current_mapname = game::Dvar_FindVar("mapname");
|
||||||
|
|
||||||
command::execute((dev ? "seta sv_cheats 1" : "seta sv_cheats 0"), true);
|
if (dev)
|
||||||
|
{
|
||||||
|
command::execute("seta sv_cheats 1", true);
|
||||||
|
}
|
||||||
|
|
||||||
if (current_mapname && utils::string::to_lower(current_mapname->current.string) ==
|
if (current_mapname && utils::string::to_lower(current_mapname->current.string) ==
|
||||||
utils::string::to_lower(mapname) && (game::SV_Loaded() && !game::Com_FrontEndScene_IsActive()))
|
utils::string::to_lower(mapname) && (game::SV_Loaded() && !game::Com_FrontEndScene_IsActive()))
|
||||||
|
@ -233,6 +233,7 @@ namespace updater
|
|||||||
if (!list.has_value())
|
if (!list.has_value())
|
||||||
{
|
{
|
||||||
console::error("[Updater] Failed to download file list\n");
|
console::error("[Updater] Failed to download file list\n");
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
rapidjson::Document j;
|
rapidjson::Document j;
|
||||||
@ -313,7 +314,7 @@ namespace updater
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found)
|
if (!found && !std::filesystem::is_directory(file))
|
||||||
{
|
{
|
||||||
console::info("[Updater] Deleting extra file %s\n", file.data());
|
console::info("[Updater] Deleting extra file %s\n", file.data());
|
||||||
utils::io::remove_file(file);
|
utils::io::remove_file(file);
|
||||||
@ -324,6 +325,12 @@ namespace updater
|
|||||||
void run_update()
|
void run_update()
|
||||||
{
|
{
|
||||||
const auto file_list = get_file_list();
|
const auto file_list = get_file_list();
|
||||||
|
if (file_list.empty())
|
||||||
|
{
|
||||||
|
console::info("[Updater] Update aborted\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::thread> download_threads;
|
std::vector<std::thread> download_threads;
|
||||||
|
|
||||||
delete_garbage_files(file_list);
|
delete_garbage_files(file_list);
|
||||||
@ -425,4 +432,6 @@ namespace updater
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GIT_DIRTY
|
||||||
REGISTER_COMPONENT(updater::component)
|
REGISTER_COMPONENT(updater::component)
|
||||||
|
#endif
|
||||||
|
@ -119,8 +119,8 @@ namespace weapon
|
|||||||
}
|
}
|
||||||
|
|
||||||
utils::hook::detour BG_MapWeaponAnimStateToAnimIndex_hook;
|
utils::hook::detour BG_MapWeaponAnimStateToAnimIndex_hook;
|
||||||
game::weapAnimFiles_t BG_MapWeaponAnimStateToAnimIndex_stub(__int64 a1, game::playerState_s* ps, int animState, __int64* weapon, unsigned __int8 isAlternate,
|
game::weapAnimFiles_t BG_MapWeaponAnimStateToAnimIndex_stub(__int64 a1, game::playerState_s* ps, int animState, unsigned __int64* weapon, unsigned __int8 isAlternate,
|
||||||
int handIndex, unsigned __int8 pmoveHandler)
|
int handIndex, unsigned __int64 pmoveHandler)
|
||||||
{
|
{
|
||||||
if (HasAnimState(game::WEAP_INSPECT, animState) && ps->weapState[handIndex].weaponState == WEAP_STATE_INSPECT)
|
if (HasAnimState(game::WEAP_INSPECT, animState) && ps->weapState[handIndex].weaponState == WEAP_STATE_INSPECT)
|
||||||
{
|
{
|
||||||
@ -200,7 +200,7 @@ namespace weapon
|
|||||||
}
|
}
|
||||||
|
|
||||||
utils::hook::detour PM_Weapon_IsInInterruptibleState_hook;
|
utils::hook::detour PM_Weapon_IsInInterruptibleState_hook;
|
||||||
bool PM_Weapon_IsInInterruptibleState_stub(__int64 weaponMap, game::playerState_s* ps, unsigned int hand, unsigned __int8 pmoveHandler)
|
bool PM_Weapon_IsInInterruptibleState_stub(__int64 weaponMap, game::playerState_s* ps, unsigned int hand, unsigned __int64 pmoveHandler)
|
||||||
{
|
{
|
||||||
auto result = PM_Weapon_IsInInterruptibleState_hook.invoke<bool>(weaponMap, ps, hand, pmoveHandler);
|
auto result = PM_Weapon_IsInInterruptibleState_hook.invoke<bool>(weaponMap, ps, hand, pmoveHandler);
|
||||||
|
|
||||||
|
@ -742,14 +742,12 @@ namespace game
|
|||||||
struct playerState_s
|
struct playerState_s
|
||||||
{
|
{
|
||||||
int commandTime;
|
int commandTime;
|
||||||
int serverTime;
|
|
||||||
int inputTime;
|
|
||||||
int pm_type;
|
int pm_type;
|
||||||
int pm_time;
|
int pm_time;
|
||||||
GameModeFlagContainer<PMoveFlagsCommon, PMoveFlagsSP, PMoveFlagsMP, 64> pm_flags;
|
GameModeFlagContainer<PMoveFlagsCommon, PMoveFlagsSP, PMoveFlagsMP, 64> pm_flags;
|
||||||
GameModeFlagContainer<POtherFlagsCommon, POtherFlagsSP, POtherFlagsMP, 64> otherFlags;
|
GameModeFlagContainer<POtherFlagsCommon, POtherFlagsSP, POtherFlagsMP, 64> otherFlags;
|
||||||
GameModeFlagContainer<PLinkFlagsCommon, PLinkFlagsSP, PLinkFlagsMP, 32> linkFlags;
|
GameModeFlagContainer<PLinkFlagsCommon, PLinkFlagsSP, PLinkFlagsMP, 32> linkFlags;
|
||||||
char __pad0[304];
|
char __pad0[312];
|
||||||
GameModeFlagContainer<EntityStateFlagsCommon, EntityStateFlagsSP, EntityStateFlagsMP, 32> eFlags;
|
GameModeFlagContainer<EntityStateFlagsCommon, EntityStateFlagsSP, EntityStateFlagsMP, 32> eFlags;
|
||||||
char __pad1[1272];
|
char __pad1[1272];
|
||||||
PlayerActiveWeaponState weapState[2];
|
PlayerActiveWeaponState weapState[2];
|
||||||
@ -758,7 +756,7 @@ namespace game
|
|||||||
float fWeaponPosFrac;
|
float fWeaponPosFrac;
|
||||||
char __pad3[0x4000];
|
char __pad3[0x4000];
|
||||||
}; // unk size
|
}; // unk size
|
||||||
assert_offsetof(playerState_s, pm_type, 12);
|
assert_offsetof(playerState_s, pm_type, 4);
|
||||||
assert_offsetof(playerState_s, eFlags, 344);
|
assert_offsetof(playerState_s, eFlags, 344);
|
||||||
assert_offsetof(playerState_s, weapState, 1620);
|
assert_offsetof(playerState_s, weapState, 1620);
|
||||||
assert_offsetof(playerState_s, weapFlags, 2188);
|
assert_offsetof(playerState_s, weapFlags, 2188);
|
||||||
@ -912,8 +910,9 @@ namespace game
|
|||||||
|
|
||||||
struct cg_s
|
struct cg_s
|
||||||
{
|
{
|
||||||
|
void* dummy;
|
||||||
playerState_s predictedPlayerState;
|
playerState_s predictedPlayerState;
|
||||||
char __pad0[19160 - sizeof(playerState_s)];
|
char __pad0[19160 - sizeof(playerState_s) - 8];
|
||||||
CubemapShot cubemapShot;
|
CubemapShot cubemapShot;
|
||||||
int cubemapSize;
|
int cubemapSize;
|
||||||
char __pad1[305200];
|
char __pad1[305200];
|
||||||
|
@ -167,7 +167,7 @@ int main()
|
|||||||
return static_cast<int>(entry_point());
|
return static_cast<int>(entry_point());
|
||||||
}
|
}
|
||||||
|
|
||||||
int __stdcall WinMain(HINSTANCE, HINSTANCE, PSTR, int)
|
int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PSTR, _In_ int)
|
||||||
{
|
{
|
||||||
return main();
|
return main();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user