Skip to content

Commit bf404c6

Browse files
committed
Updated TF2 data.
Removed annoying signatures. Removed an outdated workaround. Fixed global entity listener removal. Fixed Player.kills and Player.deaths not properly updating the player's state.
1 parent 5aa801c commit bf404c6

File tree

12 files changed

+44
-68
lines changed

12 files changed

+44
-68
lines changed

addons/source-python/data/source-python/entities/orangebox/CBasePlayer.ini

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
[function]
2-
3-
[[increment_frag_count]]
4-
identifier_windows = 55 8B EC 8B 45 08 01 81 38 0E 00 00
5-
identifier_linux = _ZN11CBasePlayer18IncrementFragCountEi
6-
arguments = INT
7-
8-
[[increment_death_count]]
9-
identifier_windows = 55 8B EC 8B 45 08 01 81 3C 0E 00 00
10-
identifier_linux = _ZN11CBasePlayer19IncrementDeathCountEi
11-
arguments = INT
12-
13-
141
[virtual_function]
152

163
# _ZN11CBasePlayer11Weapon_DropEP17CBaseCombatWeaponPK6VectorS4_

addons/source-python/data/source-python/entities/orangebox/tf/CBaseCombatCharacter.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
[[on_take_damage_alive]]
55
offset_linux = 284
66
offset_windows = 283
7-
arguments = POINTER
8-
return_type = INT
97

108
# _ZN20CBaseCombatCharacter13Weapon_SwitchEP17CBaseCombatWeaponi
119
[[weapon_switch]]
12-
offset_linux = 275
13-
offset_windows = 274
10+
offset_linux = 276
11+
offset_windows = 275

addons/source-python/data/source-python/entities/orangebox/tf/CBaseCombatWeapon.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
# _ZN17CBaseCombatWeapon13PrimaryAttackEv
44
[[primary_attack]]
5-
offset_linux = 292
6-
offset_windows = 291
5+
offset_linux = 293
6+
offset_windows = 287
77

88
# _ZN17CBaseCombatWeapon15SecondaryAttackEv
99
[[secondary_attack]]
10-
offset_linux = 293
11-
offset_windows = 292
10+
offset_linux = 294
11+
offset_windows = 288
Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
[virtual_function]
22

3-
# _ZN11CBaseEntity8TeleportEPK6VectorPK6QAngleS2_
4-
[[teleport]]
5-
offset_linux = 115
6-
offset_windows = 114
7-
arguments = POINTER, POINTER, POINTER
8-
93
# _ZN11CBaseEntity10StartTouchEPS_
104
[[start_touch]]
115
offset_linux = 105
126
offset_windows = 104
13-
arguments = POINTER
147

158
# _ZN11CBaseEntity5TouchEPS_
169
[[touch]]
1710
offset_linux = 106
1811
offset_windows = 105
19-
arguments = POINTER
2012

2113
# _ZN11CBaseEntity8EndTouchEPS_
2214
[[end_touch]]
2315
offset_linux = 107
2416
offset_windows = 106
25-
arguments = POINTER
17+
18+
# _ZN11CBaseEntity8TeleportEPK6VectorPK6QAngleS2_
19+
[[teleport]]
20+
offset_linux = 115
21+
offset_windows = 114
2622

2723
# _ZNK11CBasePlayer25PhysicsSolidMaskForEntityEv
2824
[[get_solid_mask]]
29-
offset_linux = 174
30-
offset_windows = 173
31-
return_type = UINT
25+
offset_linux = 175
26+
offset_windows = 174

addons/source-python/data/source-python/entities/orangebox/tf/CBasePlayer.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[[drop_weapon]]
55
offset_linux = 275
66
offset_windows = 274
7-
arguments = POINTER, POINTER, POINTER
87

98
# _ZN11CBasePlayer8PreThinkEv
109
[[pre_think]]
@@ -18,9 +17,8 @@
1817

1918
# _ZN11CBasePlayer16PlayerRunCommandEP8CUserCmdP11IMoveHelper
2019
[[run_command]]
21-
offset_linux = 431
22-
offset_windows = 430
23-
arguments = POINTER, POINTER
20+
offset_linux = 432
21+
offset_windows = 431
2422

2523

2624
[property]

addons/source-python/data/source-python/entities/orangebox/tf/CTFPlayer.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
# _ZN9CTFPlayer10BumpWeaponEP17CBaseCombatWeapon
44
[[bump_weapon]]
5-
offset_linux = 409
6-
offset_windows = 408
5+
offset_linux = 410
6+
offset_windows = 409
77
arguments = POINTER
88
return_type = BOOL
99

addons/source-python/data/source-python/memory/bms/global_pointers.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ../data/source-python/memory/bms/global_pointers.ini
22

3-
# TODO: Removed when outdated.
3+
# TODO: Remove when outdated.
44
[CGlobalEntityList]
55
binary = server
66
identifier_linux = gEntList

addons/source-python/data/source-python/memory/orangebox/global_pointers.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ../data/source-python/memory/orangebox/global_pointers.ini
22

3-
# TODO: Removed when outdated.
3+
# TODO: Remove when outdated.
44
[CGlobalEntityList]
55
binary = server
66
identifier_linux = gEntList

addons/source-python/packages/source-python/__init__.py

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -256,23 +256,6 @@ def setup_exception_hooks():
256256
from hooks.exceptions import except_hooks
257257
from hooks.warnings import warning_hooks
258258

259-
# Temporary workaround for sys.excepthook bug:
260-
# https://bugs.python.org/issue1230540
261-
import sys
262-
import threading
263-
264-
run_old = threading.Thread.run
265-
266-
def run(*args, **kwargs):
267-
try:
268-
run_old(*args, **kwargs)
269-
except (KeyboardInterrupt, SystemExit):
270-
raise
271-
except:
272-
sys.excepthook(*sys.exc_info())
273-
274-
threading.Thread.run = run
275-
276259

277260
# =============================================================================
278261
# >> TRANSLATIONS
@@ -406,13 +389,13 @@ def setup_entities_listener():
406389

407390
from warnings import warn
408391
from _core import _sp_plugin
409-
from memory.manager import manager
410392

411393
try:
412394
from _entities import _global_entity_list
413395
_global_entity_list.add_entity_listener(_sp_plugin)
414396
except ImportError:
415397
try:
398+
from memory.manager import manager
416399
manager.get_global_pointer(
417400
'GlobalEntityList'
418401
).add_entity_listener(_sp_plugin)
@@ -425,13 +408,18 @@ def remove_entities_listener():
425408
_sp_logger.log_debug('Removing entities listener...')
426409

427410
from _core import _sp_plugin
428-
from memory.manager import manager
429411

430412
try:
431-
manager.get_global_pointer('GlobalEntityList').remove_entity_listener(
432-
_sp_plugin)
433-
except NameError:
434-
pass
413+
from _entities import _global_entity_list
414+
_global_entity_list.remove_entity_listener(_sp_plugin)
415+
except ImportError:
416+
try:
417+
from memory.manager import manager
418+
manager.get_global_pointer(
419+
'GlobalEntityList'
420+
).remove_entity_listener(_sp_plugin)
421+
except NameError:
422+
pass
435423

436424

437425
# =============================================================================

src/core/modules/effects/blade/effects_base_wrap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ extern IServerTools *servertools;
4545
// Exports CBaseTempEntity.
4646
//-----------------------------------------------------------------------------
4747
template<class T, class U>
48-
void export_engine_specific_temp_entity(T _effects, U TempEntity)
48+
void export_engine_specific_temp_entity(T _base, U TempEntity)
4949
{
50-
_effects.attr("_first_temp_entity") = object(ptr(servertools->GetTempEntList()));
50+
_base.attr("_first_temp_entity") = object(ptr(servertools->GetTempEntList()));
5151
}
5252

5353

0 commit comments

Comments
 (0)