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

Commit

Permalink
clean up shit
Browse files Browse the repository at this point in the history
  • Loading branch information
huoji120 committed Oct 19, 2023
1 parent ea7c896 commit 56cd154
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions csgo2/script_apis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ auto ExcutePlayerAction(int playerIndex,
function(playerController);
} while (false);
}
// �����Ƿ���ֵ����,����ֵ����Ҫ�Լ�push��stack��
auto luaApi_ListenToGameEvent(lua_State* luaVm) -> int {
const auto eventName = lua_tostring(luaVm, 1);
do {
Expand All @@ -73,7 +72,6 @@ auto luaApi_ListenToGameEvent(lua_State* luaVm) -> int {
LOG("luaApi_ListenToGameEvent unknown event name: %s\n", eventName);
break;
}
// ���ص����ӵ�ӳ����
std::unique_lock lock(ScriptCallBacks::mutex_callbackList);
ScriptCallBacks::callbackList[luaVm][callbackType] =
luaL_ref(luaVm, LUA_REGISTRYINDEX);
Expand All @@ -82,7 +80,7 @@ auto luaApi_ListenToGameEvent(lua_State* luaVm) -> int {
eventName);
} while (false);

lua_pop(luaVm, 2); // ������ջ
lua_pop(luaVm, 2);
return 0;
}
auto luaApi_SetPlayerCurrentWeaponAmmo(lua_State* luaVm) -> int {
Expand Down Expand Up @@ -1046,7 +1044,6 @@ auto initFunciton(lua_State* luaVm) -> void {
.addData("weaponIndex", &_luaApi_WeaponInfo::weaponIndex)
.endClass()
.addFunction("luaApi_GetPlayerWeaponInfo", &luaApi_GetPlayerWeaponInfo);
// �Ҳ�ϲ����
luabridge::getGlobalNamespace(luaVm)
.beginClass<_luaApi_WeaponInfo>("WeaponInfo")
.addConstructor<void (*)(void)>()
Expand Down

0 comments on commit 56cd154

Please sign in to comment.