update sdk, fix weapon drop bug, update gamevent struct from hl2sdk

This commit is contained in:
Huoji's
2023-10-11 03:58:34 +08:00
parent 2f654c5d92
commit 79bc2cf89d
11 changed files with 266 additions and 156 deletions

View File

@@ -11,7 +11,8 @@ enum class _CallbackNames {
kOnPlayerSpawn,
kOnRoundStart,
kOnRoundEnd,
kOnPlayerHurt
kOnPlayerHurt,
kOnPlayerTeamChange
};
extern std::unordered_map<lua_State*, std::unordered_map<_CallbackNames, int>>
callbackList;
@@ -33,4 +34,5 @@ auto luaCall_onRoundEnd(int winnerTeam, int reason, const char* message)
auto luaCall_onPlayerHurt(int userid, int attacker, int health, int armor,
const char* weapon, int dmg_health, int dmg_armor,
int hitgroup) -> void;
auto luaCall_onPlayerTeamChange(int userid, int team, int oldteam, bool disconnect, bool slient, bool isBot) -> bool;
} // namespace ScriptCallBacks