Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
TYHH10 authored and TYHH10 committed Jul 9, 2024
1 parent 5ed273b commit b8a17d6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/mod/attr/custom_attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ namespace Mod::Attr::Custom_Attributes
void FireInputAttribute(const char *input, const char *filter, const variant_t &defValue, CBaseEntity *inflictor, CBaseEntity *activator, CBaseEntity *caller, float delay)
{
if (input != nullptr && (filter == nullptr || caller->NameMatches(filter) || caller->ClassMatches(filter))) {
char input_tokenized[512];
char input_tokenized[2048];
V_strncpy(input_tokenized, input, sizeof(input_tokenized));

char *target = strtok(input_tokenized,"^");
Expand Down Expand Up @@ -7428,8 +7428,8 @@ namespace Mod::Attr::Custom_Attributes
if (players_informed_about_viewmodel[player->entindex()]) return true;

players_informed_about_viewmodel[player->entindex()] = true;
char pathinfo[512];
snprintf(pathinfo, 512, "%si%llu", disallowed_viewmodel_path.c_str(), player->GetSteamID().ConvertToUint64());
char pathinfo[2048];
snprintf(pathinfo, 2048, "%si%llu", disallowed_viewmodel_path.c_str(), player->GetSteamID().ConvertToUint64());
auto file = fopen(pathinfo, "w");
if (file) {
fclose(file);
Expand All @@ -7443,11 +7443,11 @@ namespace Mod::Attr::Custom_Attributes
DETOUR_DECL_MEMBER(void, CServerGameClients_ClientPutInServer, edict_t *edict, const char *playername)
{
DETOUR_MEMBER_CALL(CServerGameClients_ClientPutInServer)(edict, playername);
char path[512];
char path[2048];
auto player = ((CTFPlayer*) edict->GetUnknown());
snprintf(path, 512, "%s%llu", disallowed_viewmodel_path.c_str(), player->GetSteamID().ConvertToUint64());
char pathinfo[512];
snprintf(pathinfo, 512, "%si%llu", disallowed_viewmodel_path.c_str(), player->GetSteamID().ConvertToUint64());
snprintf(path, 2048, "%s%llu", disallowed_viewmodel_path.c_str(), player->GetSteamID().ConvertToUint64());
char pathinfo[2048];
snprintf(pathinfo, 2048, "%si%llu", disallowed_viewmodel_path.c_str(), player->GetSteamID().ConvertToUint64());

cell_t result = access(path, F_OK) != 0;
viewmodels_enabled_forward->PushCell(edict->m_EdictIndex);
Expand All @@ -7462,8 +7462,8 @@ namespace Mod::Attr::Custom_Attributes
auto &disallowed = players_viewmodel_disallowed[player->entindex()];
disallowed = !disallowed;

char path[512];
snprintf(path, 512, "%s%llu", disallowed_viewmodel_path.c_str(), player->GetSteamID().ConvertToUint64());
char path[2048];
snprintf(path, 2048, "%s%llu", disallowed_viewmodel_path.c_str(), player->GetSteamID().ConvertToUint64());
if (disallowed) {
auto file = fopen(path, "w");
if (file) {
Expand Down

0 comments on commit b8a17d6

Please sign in to comment.