CSGO: disable "Game_Commencing"
Posted: Sat Aug 08, 2015 7:34 am
by nullable
Hello,
Please help me to disable Game_Commencing.
Code: Select all
L 08/08/2015 - 07:23:11: World triggered "Game_Commencing"
Is it possible?
Posted: Sat Aug 08, 2015 10:02 am
by nullable
After change from player.switch_team(team_id) to player.set_team(team_id) in player_activate event the problem has been resolved. Is it new feature in new sourcepython or it's bug?
Posted: Mon Aug 10, 2015 5:28 am
by satoon101
Is 'what' a new feature or bug in Source.Python? I don't really understand what you are asking here.
set_team is calling the internal
IPlayerInfo::ChangeTeam member function. This function is exposed to us directly in the SDK.
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/players/entity.py#L126
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/players/players_wrap.cpp#L86
switch_team is calling the internal CCSPlayer::SwitchTeam member function. This function is not exposed to us directly, so we have to find the function dynamically with its symbol (Linux) or signature (Windows):
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/data/source-python/entities/orangebox/cstrike/CCSPlayer.ini#L20
There are differences between the two functions, which is why the second was added. For instance, switch_team does not kill the player when switching teams, and you can only use it to switch to an actual team, not spectate.