Skip to content

Commit 1372d35

Browse files
authored
Add support for CRemoteCall userdata in getUserdataType (PR #2823)
1 parent ba3595e commit 1372d35

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,8 @@ SString GetUserDataClassName(void* ptr, lua_State* luaVM, bool bFindElementType)
873873
return GetClassTypeName(pVar);
874874
if (auto* pVar = UserDataCast((CLuaVector4D*)ptr, luaVM))
875875
return GetClassTypeName(pVar);
876+
if (auto* pVar = UserDataCast((CRemoteCall*)ptr, luaVM))
877+
return GetClassTypeName(pVar);
876878

877879
return "";
878880
}

Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ inline SString GetClassTypeName(CClientPed*)
231231
}
232232
inline SString GetClassTypeName(CRemoteCall*)
233233
{
234-
return "remotecall";
234+
return "request";
235235
}
236236
inline SString GetClassTypeName(CClientProjectile*)
237237
{

Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@ SString GetUserDataClassName(void* ptr, lua_State* luaVM, bool bFindElementType)
519519
return GetClassTypeName(pVar);
520520
if (auto* pVar = UserDataCast((CLuaMatrix*)ptr, luaVM))
521521
return GetClassTypeName(pVar);
522+
if (auto* pVar = UserDataCast((CRemoteCall*)ptr, luaVM))
523+
return GetClassTypeName(pVar);
522524

523525
return "";
524526
}

Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ inline SString GetClassTypeName(CPed*)
172172
}
173173
inline SString GetClassTypeName(class CRemoteCall*)
174174
{
175-
return "remotecall";
175+
return "request";
176176
}
177177
inline SString GetClassTypeName(CColShape*)
178178
{

0 commit comments

Comments
 (0)