Skip to content

Commit e7ea785

Browse files
committed
First bunch of data updates
1 parent ac3071f commit e7ea785

File tree

13 files changed

+72
-46
lines changed

13 files changed

+72
-46
lines changed

addons/source-python/data/source-python/entities/csgo/CBaseCombatCharacter.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ srv_check = False
55

66
# _ZN20CBaseCombatCharacter13Weapon_SwitchEP17CBaseCombatWeaponi
77
[[weapon_switch]]
8-
offset_linux = 286
9-
offset_windows = 285
8+
offset_linux = 289
9+
offset_windows = 288
1010
arguments = POINTER, INT
1111
return_type = BOOL

addons/source-python/data/source-python/entities/csgo/CBaseCombatWeapon.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ srv_check = False
55

66
# _ZN17CBaseCombatWeapon13PrimaryAttackEv
77
[[primary_attack]]
8+
# TODO
89
offset_linux = 313
910
offset_windows = 307
1011

1112
# _ZN17CBaseCombatWeapon13SecondaryAttackEv
1213
[[secondary_attack]]
14+
# TODO
1315
offset_linux = 314
1416
offset_windows = 308
1517

addons/source-python/data/source-python/entities/csgo/CBaseEntity.ini

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,43 @@ srv_check = False
55

66
# _ZN11CBaseEntity9SetParentEPS_i
77
[[set_parent]]
8-
offset_linux = 39
9-
offset_windows = 38
8+
offset_linux = 40
9+
offset_windows = 39
1010
arguments = POINTER, INT
1111

1212
# _ZN11CBaseEntity12OnTakeDamageERK15CTakeDamageInfo
1313
[[on_take_damage]]
14-
offset_linux = 68
15-
offset_windows = 67
14+
offset_linux = 69
15+
offset_windows = 68
1616
arguments = POINTER
1717
return_type = INT
1818

1919
# _ZN11CBaseEntity8TeleportEPK6VectorPK6QAngleS2_b
2020
[[teleport]]
21-
offset_linux = 114
22-
offset_windows = 113
21+
offset_linux = 115
22+
offset_windows = 114
2323
arguments = POINTER, POINTER, POINTER
2424

2525
# _ZN11CBaseEntity11SetTransmitEP18CCheckTransmitInfob
2626
[[set_transmit]]
27-
offset_linux = 23
28-
offset_windows = 22
27+
offset_linux = 24
28+
offset_windows = 23
2929
arguments = POINTER, BOOL
3030

3131
# _ZN11CBaseEntity10StartTouchEPS_
3232
[[start_touch]]
33-
offset_linux = 102
34-
offset_windows = 101
33+
offset_linux = 103
34+
offset_windows = 102
3535
arguments = POINTER
3636

3737
# _ZN11CBaseEntity5TouchEPS_
3838
[[touch]]
39-
offset_linux = 103
40-
offset_windows = 102
39+
offset_linux = 104
40+
offset_windows = 103
4141
arguments = POINTER
4242

4343
# _ZN11CBaseEntity8EndTouchEPS_
4444
[[end_touch]]
45-
offset_linux = 104
46-
offset_windows = 103
45+
offset_linux = 105
46+
offset_windows = 104
4747
arguments = POINTER

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

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,63 @@ srv_check = False
55

66
# _ZN11CBasePlayer10BumpWeaponEP17CBaseCombatWeapon
77
[[bump_weapon]]
8-
offset_linux = 446
9-
offset_windows = 445
8+
offset_linux = 452
9+
offset_windows = 451
1010
arguments = POINTER
1111
return_type = BOOL
1212

1313
# _ZN11CBasePlayer11Weapon_DropEP17CBaseCombatWeaponPK6VectorS4_
1414
[[drop_weapon]]
15-
offset_linux = 285
16-
offset_windows = 284
15+
offset_linux = 288
16+
offset_windows = 287
1717
arguments = POINTER, POINTER, POINTER
1818

1919
# _ZN11CBasePlayer13GiveNamedItemEPKciP13CEconItemViewb
2020
[[give_named_item]]
21-
offset_linux = 451
22-
offset_windows = 450
23-
arguments = STRING, INT, POINTER, BOOL
21+
offset_linux = 457
22+
offset_windows = 456
23+
arguments = STRING, INT, POINTER, BOOL, POINTER
2424
return_type = POINTER
2525

2626
# _ZN11CBasePlayer21IncrementAssistsCountEi
2727
[[increment_assists_count]]
28-
offset_linux = 493
29-
offset_windows = 492
28+
offset_linux = 499
29+
offset_windows = 498
3030
arguments = INT
3131

3232
# _ZN11CBasePlayer19IncrementDeathCountEi
3333
[[increment_death_count]]
34-
offset_linux = 494
35-
offset_windows = 493
34+
offset_linux = 500
35+
offset_windows = 499
3636
arguments = INT
3737

3838
# _ZN11CBasePlayer18IncrementFragCountEii
3939
[[increment_frag_count]]
40-
offset_linux = 492
41-
offset_windows = 491
40+
offset_linux = 498
41+
offset_windows = 497
4242
arguments = INT, INT
4343

4444
# _ZN11CBasePlayer16PlayerRunCommandEP8CUserCmdP11IMoveHelper
4545
[[run_command]]
46-
offset_linux = 471
47-
offset_windows = 470
46+
offset_linux = 477
47+
offset_windows = 476
4848
arguments = POINTER, POINTER
4949

5050
# _ZN11CBasePlayer8PreThinkEv
5151
[[pre_think]]
52-
offset_linux = 369
53-
offset_windows = 368
52+
offset_linux = 372
53+
offset_windows = 361
5454

5555
# _ZN11CBasePlayer9PostThinkEv
5656
[[post_think]]
57-
offset_linux = 370
58-
offset_windows = 369
57+
offset_linux = 372
58+
offset_windows = 371
5959

6060

6161
[instance_attribute]
6262

6363
[[assists]]
64+
# TODO
6465
offset_windows = 3816
6566
offset_linux = 3840
6667
type = INT

addons/source-python/data/source-python/entities/csgo/CCSPlayer.ini

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,34 @@ srv_check = False
44
[function]
55

66
[[add_account]]
7+
# TODO
78
identifier_windows = 55 8B EC 83 E4 F8 83 EC 44 53 56 8B F1 57 8B 06
89
# identifier_linux = _ZN9CCSPlayer10AddAccountEibbPKc
910
identifier_linux = 55 89 E5 57 56 53 81 EC BC 00 00 00 8B 5D 08 0F B6 45 10
1011
arguments = INT, BOOL, BOOL, STRING
1112

1213
[[buy_internal]]
14+
# TODO
1315
identifier_windows = 55 8B EC 83 E4 F8 83 EC 0C 53 56 57 6A 01
1416
# indentifier_linux = _ZN9CCSPlayer26HandleCommand_Buy_InternalEPKcib
1517
identifier_linux = 55 89 E5 83 EC 68 0F B6 55 14
1618
arguments = INT, STRING, BOOL
1719
return_type = INT
1820

1921
[[deafen]]
22+
# TODO
2023
identifier_windows = 55 8B EC 83 EC 28 56 57 8B F9 F3 0F 11 4D FC
2124
# identifier_linux = _ZN9CCSPlayer6DeafenEf
2225
identifier_linux = 55 89 E5 83 EC 48 89 7D FC 8B 7D 08 89 5D F4 89 75 F8 8B 07
2326

2427
[[_spawn]]
28+
# TODO
2529
identifier_windows = 55 8B EC 83 EC 0C 53 56 8B F1 8B 0D 2A 2A 2A 2A 57 8B 01
2630
# identifier_linux = _ZN9CCSPlayer12RoundRespawnEv
2731
identifier_linux = 55 89 E5 57 56 53 83 EC 4C A1 2A 2A 2A 2A 8B 5D 08 89 04 24
2832

2933
[[switch_team]]
34+
# TODO
3035
identifier_windows = 55 8B EC 83 EC 10 53 56 8B 75 08 57 8B F9 85 F6 0F 2A 2A 2A 2A
3136
# identifier_linux = _ZN9CCSPlayer10SwitchTeamEi
3237
identifier_linux = 55 89 E5 83 EC 68 89 75 F8 8B 75 0C 89 5D F4 8B 5D 08 89 7D FC 89 34 24 E8 2A 2A 2A 2A 85 C0
@@ -37,12 +42,13 @@ srv_check = False
3742

3843
# _ZN9CCSPlayer12Weapon_EquipEP17CBaseCombatWeapon
3944
[[equip_weapon]]
40-
offset_linux = 283
41-
offset_windows = 282
45+
offset_linux = 286
46+
offset_windows = 285
4247
arguments = POINTER
4348

4449
# _ZN9CCSPlayer5BlindEfff
4550
[[blind]]
51+
# TODO
4652
offset_linux = 542
4753
offset_windows = 539
4854
arguments = FLOAT, FLOAT, FLOAT
@@ -56,11 +62,13 @@ srv_check = False
5662
[instance_attribute]
5763

5864
[[mvps]]
65+
# TODO
5966
offset_windows = 11472
6067
offset_linux = 11496
6168
type = INT
6269

6370
[[clan_tag]]
71+
# TODO
6472
offset_windows = 9564
6573
offset_linux = 9588
6674
type = STRING_ARRAY

addons/source-python/data/source-python/entities/csgo/CDecoyProjectile.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ srv_check = False
55

66
# CDecoyProjectile::Think_Detonate
77
[[detonate]]
8+
# TODO
89
identifier_windows = 55 8B EC 83 E4 2A 81 EC 2A 2A 2A 2A 53 56 57 8B F9 8B 87 04 05 2A 2A 85 C0
910
identifier_linux = 55 89 E5 57 56 53 81 EC 2A 2A 2A 2A 8B 5D 08

addons/source-python/data/source-python/entities/csgo/CFlashbangProjectile.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ srv_check = False
55

66
# _ZN20CFlashbangProjectile8DetonateEv
77
[[detonate]]
8+
# TODO
89
offset_linux = 235
910
offset_windows = 234
1011

addons/source-python/data/source-python/entities/csgo/CHEGrenadeProjectile.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ srv_check = False
55

66
# _ZN20CHEGrenadeProjectile8DetonateEv
77
[[detonate]]
8+
# TODO
89
offset_linux = 236
910
offset_windows = 235
1011

addons/source-python/data/source-python/entities/csgo/CMolotovProjectile.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ srv_check = False
55

66
# _ZN18CMolotovProjectile8DetonateEv
77
[[detonate]]
8+
# TODO
89
offset_linux = 236
910
offset_windows = 235
1011

addons/source-python/data/source-python/entities/csgo/CPlantedC4.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ srv_check = False
55

66
# _ZN10CPlantedC47ExplodeEP10CGameTracei
77
[[explode]]
8+
# TODO
89
offset_linux = 236
910
offset_windows = 235
1011
arguments = POINTER, INT

addons/source-python/data/source-python/entities/csgo/CSensorGrenadeProjectile.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ srv_check = False
55

66
# CSensorGrenadeProjectile::Think_Detonate
77
[[detonate]]
8+
# TODO
89
identifier_windows = 55 8B EC 83 E4 2A 51 53 56 57 8B F1 E8 2A 2A 2A 2A 8B F8
910
identifier_linux = 55 89 E5 57 56 53 8E EC 2A 8B 5D 08 89 1C 24

addons/source-python/data/source-python/entities/csgo/CSmokeGrenadeProjectile.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ srv_check = False
55

66
# CSmokeGrenadeProjectile::Think_Detonate
77
[[detonate]]
8+
# TODO
89
identifier_windows = 55 8B EC 83 EC 18 56 8B F1 8B 0D 2A 2A 2A 2A 57
910
identifier_linux = 55 89 E5 57 56 53 83 EC 5C 8B 75 08
1011

addons/source-python/packages/source-python/players/engines/csgo/__init__.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# Filters
1818
from filters.entities import EntityIter
1919
# Memory
20+
from memory import NULL
2021
from memory import get_virtual_function
2122
from memory.hooks import PreHook
2223
# Messages
@@ -77,8 +78,10 @@ def _set_assists(self, value):
7778
def send_convar_value(self, cvar_name, value):
7879
"""Send a convar value.
7980
80-
:param str cvar_name: Name of the convar.
81-
:param str value: Value to send.
81+
:param str cvar_name:
82+
Name of the convar.
83+
:param str value:
84+
Value to send.
8285
"""
8386
buffer_size = 256
8487
buffer = BitBufferWrite(buffer_size)
@@ -112,7 +115,8 @@ def has_c4(self):
112115
def get_projectile_ammo(self, projectile):
113116
"""Return the player's ammo value of the given projectile.
114117
115-
:param str projectile: The name of the projectile to get the ammo of.
118+
:param str projectile:
119+
The name of the projectile to get the ammo of.
116120
:rtype: int
117121
"""
118122
return self.get_property_ushort(
@@ -125,8 +129,10 @@ def get_projectile_ammo(self, projectile):
125129
def set_projectile_ammo(self, projectile, value):
126130
"""Set the player's ammo value for the given projectile.
127131
128-
:param str projectile: The name of the projectile to set the ammo of.
129-
:param int value: The value to set the projectile's ammo to.
132+
:param str projectile:
133+
The name of the projectile to set the ammo of.
134+
:param int value:
135+
The value to set the projectile's ammo to.
130136
"""
131137
self.set_property_ushort(
132138
'{base}{prop:03d}'.format(
@@ -139,7 +145,8 @@ def set_projectile_ammo(self, projectile, value):
139145
def spawn(self, force=False):
140146
"""Spawn the player.
141147
142-
:param bool force: Whether or not the spawn should be forced.
148+
:param bool force:
149+
Whether or not the spawn should be forced.
143150
"""
144151
# Is the player spawnable?
145152
if not force and (self.team <= 1 or not self.dead):
@@ -149,10 +156,11 @@ def spawn(self, force=False):
149156
self._spawn()
150157

151158
@wrap_entity_mem_func
152-
def give_named_item(self, item, sub_type=0, econ_item_view=None, unk=False):
159+
def give_named_item(self, item, sub_type=0, econ_item_view=None, unk=False, unk2=NULL):
153160
"""Give the player a named item."""
154-
# TODO: What's the last argument for?
155-
return [item, sub_type, econ_item_view, unk]
161+
# TODO: What's the unk argument for?
162+
# unk2 is a Vector (position)? Should do some tests...
163+
return [item, sub_type, econ_item_view, unk, unk2]
156164

157165

158166
# =============================================================================

0 commit comments

Comments
 (0)