File tree 4 files changed +30
-23
lines changed
data/source-python/entities/csgo
packages/source-python/weapons 4 files changed +30
-23
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ srv_check = False
5
5
6
6
# _ZN17CBaseCombatWeapon13PrimaryAttackEv
7
7
[[primary_attack]]
8
- offset_linux = 314
9
- offset_windows = 308
8
+ offset_linux = 313
9
+ offset_windows = 307
10
10
11
11
# _ZN17CBaseCombatWeapon13SecondaryAttackEv
12
12
[[secondary_attack]]
13
- offset_linux = 315
14
- offset_windows = 309
13
+ offset_linux = 314
14
+ offset_windows = 308
15
15
16
16
17
17
[property]
Original file line number Diff line number Diff line change @@ -18,27 +18,27 @@ srv_check = False
18
18
19
19
# _ZN11CBasePlayer13GiveNamedItemEPKciP13CEconItemViewb
20
20
[[give_named_item]]
21
- offset_linux = 450
22
- offset_windows = 449
21
+ offset_linux = 451
22
+ offset_windows = 450
23
23
arguments = STRING, INT, POINTER, BOOL
24
24
return_type = POINTER
25
25
26
26
# _ZN11CBasePlayer21IncrementAssistsCountEi
27
27
[[increment_assists_count]]
28
- offset_linux = 492
29
- offset_windows = 491
28
+ offset_linux = 493
29
+ offset_windows = 492
30
30
arguments = INT
31
31
32
32
# _ZN11CBasePlayer19IncrementDeathCountEi
33
33
[[increment_death_count]]
34
- offset_linux = 493
35
- offset_windows = 492
34
+ offset_linux = 494
35
+ offset_windows = 493
36
36
arguments = INT
37
37
38
38
# _ZN11CBasePlayer18IncrementFragCountEii
39
39
[[increment_frag_count]]
40
- offset_linux = 491
41
- offset_windows = 490
40
+ offset_linux = 492
41
+ offset_windows = 491
42
42
arguments = INT, INT
43
43
44
44
# _ZN11CBasePlayer16PlayerRunCommandEP8CUserCmdP11IMoveHelper
@@ -61,8 +61,8 @@ srv_check = False
61
61
[instance_attribute]
62
62
63
63
[[assists]]
64
- offset_windows = 3908
65
- offset_linux = 3932
64
+ offset_windows = 3816
65
+ offset_linux = 3840
66
66
type = INT
67
67
68
68
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ srv_check = False
12
12
[[buy_internal]]
13
13
identifier_windows = 55 8B EC 83 E4 F8 81 EC 7C 01 00 00 53 56 57
14
14
# indentifier_linux = _ZN9CCSPlayer26HandleCommand_Buy_InternalEPKcib
15
- identifier_linux = 55 89 E5 57 56 53 81 EC 9C 01 00 00 0F B6 55 14
16
- arguments = STRING, INT , BOOL
15
+ identifier_linux = 55 89 E5 83 EC 68 0F B6 55 14
16
+ arguments = INT, STRING , BOOL
17
17
return_type = INT
18
18
19
19
[[deafen]]
@@ -43,8 +43,8 @@ srv_check = False
43
43
44
44
# _ZN9CCSPlayer5BlindEfff
45
45
[[blind]]
46
- offset_linux = 541
47
- offset_windows = 538
46
+ offset_linux = 542
47
+ offset_windows = 539
48
48
arguments = FLOAT, FLOAT, FLOAT
49
49
50
50
@@ -56,13 +56,13 @@ srv_check = False
56
56
[instance_attribute]
57
57
58
58
[[mvps]]
59
- offset_windows = 11752
60
- offset_linux = 11776
59
+ offset_windows = 11472
60
+ offset_linux = 11496
61
61
type = INT
62
62
63
63
[[clan_tag]]
64
- offset_windows = 10588
65
- offset_linux = 10612
64
+ offset_windows = 9524
65
+ offset_linux = 9548
66
66
type = STRING_ARRAY
67
67
68
68
Original file line number Diff line number Diff line change 12
12
# Source.Python Imports
13
13
# Core
14
14
from core import AutoUnload
15
+ from core import SOURCE_ENGINE
15
16
# Entities
16
17
from entities .constants import INVALID_ENTITY_INDEX
17
18
from entities .helpers import edict_from_pointer
@@ -391,8 +392,14 @@ def _on_weapon_bump(args):
391
392
@EntityPreHook (EntityCondition .is_player , 'buy_internal' )
392
393
def _on_weapon_purchase (args ):
393
394
"""Return whether the player is allowed to purchase the weapon."""
395
+ # TODO:
396
+ # In CS:GO it seems like the weapon isn't passed as a string anymore.
397
+ # Instead it's rather a pointer that might be NULL. If it's not NULL, the
398
+ # function sets it to some value:
399
+ #if ( a3 )
400
+ # *(_DWORD *)a3 = v16;
394
401
return weapon_restriction_manager .on_player_purchasing_weapon (
395
- make_object (Player , args [0 ]), args [1 ])
402
+ make_object (Player , args [0 ]), args [1 if SOURCE_ENGINE != 'csgo' else 2 ])
396
403
397
404
398
405
# =============================================================================
You can’t perform that action at this time.
0 commit comments