Skip to content

Commit 59acc68

Browse files
committed
update(schema): CPlayerPawnComponent update
1 parent 70a817b commit 59acc68

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/core/entrypoint.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,9 @@ void UpdatePlayers()
322322
if (steamId)
323323
{
324324
auto controller = g_pEntitySystem->GetEntityInstance(CEntityIndex(i + 1));
325-
if (controller)
325+
if (controller) {
326326
g_SteamAPI.SteamGameServer()->BUpdateUserData(*steamId, schema::GetPropPtr<char>(controller, "CBasePlayerController", "m_iszPlayerName"), gameclients->GetPlayerScore(CPlayerSlot(i)));
327+
}
327328
}
328329
}
329330
}

src/scripting/sdk/schema.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ void SchemaCallback(PluginObject plugin, EContext* ctx) {
307307

308308
ADD_CLASS_FUNCTION("SDKClass", "GetPawn", [](FunctionContext* context, ClassData* data) -> void {
309309
CPlayerPawnComponent* instance = (CPlayerPawnComponent*)data->GetData<void*>("class_ptr");
310-
context->SetReturn(MakeSDKClassInstance("CBasePlayerPawn", instance->m_pPawn, context->GetPluginContext()));
310+
context->SetReturn(MakeSDKClassInstance("CBasePlayerPawn", instance->GetPawn(), context->GetPluginContext()));
311311
});
312312

313313
auto fields = g_sdk.GetProcessedFieldNames();

0 commit comments

Comments
 (0)