Skip to content

Commit 30e74ae

Browse files
committed
Fixed ref/ptr mistakes
1 parent 94db95e commit 30e74ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/modules/commands/client_command_wrap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ PLUGIN_RESULT DispatchClientCommand(edict_t* pEntity, const CCommand &command)
118118
PyObject* pCallable = s_ClientCommandFilters.m_vecCallables[i].ptr();
119119

120120
// Call the callable and store its return value
121-
object returnValue = CALL_PY_FUNC(pCallable, pPlayerInfo, boost::ref(command));
121+
object returnValue = CALL_PY_FUNC(pCallable, ptr(pPlayerInfo), boost::ref(command));
122122

123123
// Does the Client Command Filter want to block the command?
124124
if( !returnValue.is_none() && extract<int>(returnValue) == (int)BLOCK)
@@ -141,7 +141,7 @@ PLUGIN_RESULT DispatchClientCommand(edict_t* pEntity, const CCommand &command)
141141
CClientCommandManager* pCClientCommandManager = commandMapIter->second;
142142

143143
// Does the command need to be blocked?
144-
if( !pCClientCommandManager->Dispatch(pPlayerInfo, boost::ref(command)))
144+
if( !pCClientCommandManager->Dispatch(pPlayerInfo, command))
145145
{
146146
// Block the command
147147
return PLUGIN_STOP;
@@ -215,7 +215,7 @@ CommandReturn CClientCommandManager::Dispatch( IPlayerInfo* pPlayerInfo, const C
215215
PyObject* pCallable = m_vecCallables[i].ptr();
216216

217217
// Call the callable and store its return value
218-
object returnValue = CALL_PY_FUNC(pCallable, pPlayerInfo, boost::ref(command));
218+
object returnValue = CALL_PY_FUNC(pCallable, ptr(pPlayerInfo), boost::ref(command));
219219

220220
// Does the callable wish to block the command?
221221
if( !returnValue.is_none() && extract<int>(returnValue) == (int) BLOCK)

0 commit comments

Comments
 (0)