Skip to content

Commit d0014e0

Browse files
authored
Add support for GMod (#200)
* Start of GMod support. * Patched memalloc.h * Removed memalloc.h patch * Patched ../game/shared/collisionproperty.h * Fixed EmitSound * Patched matlib.lib * Added back _EngineServer.get_cluster_sound * Remove ../game/shared/collisionproperty.h patch * Removed cluster_count from other engines now that it is supported in GMod (therefore, all engines). * Added GetEntityFactoryDictionary to gmod. * Added server_version and create_fake_client_ex to engine_server for gmod. * Updated memory.manager to use GameConfigObj instead of ConfigObj. * Fixed OSError * Added BaseEntityOutput.fire_output data. * Fixed a NameError when unloading * Added data for CGlobalEntityList Requires this PR to be merged: alliedmodders/hl2sdk#29 * Added data for IServer * Fixed compiler and linker errors for GMod on Linux * Added data for CBaseClient * Added data for _WeaponDatabase * Added _WeaponDatabase class Fixed _WeaponDatabase signature * Added effects data * Fixed missing engine specific export function for GMod * Fixed an error when loading GMod * Removed a redundant patch * Fixed compiler errors due to output listener update
1 parent 6d90665 commit d0014e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2279
-25
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ../data/source-python/client/gmod/CBaseClient.ini
2+
3+
[virtual_function]
4+
[[set_name]]
5+
offset_linux = 56
6+
offset_windows = 17
7+
arguments = STRING
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ../effects/gmod/CTEAntlionDust.ini
2+
# Temp Entity Name: AntlionDust
3+
4+
is_spawner_blocked = m_bBlockedSpawner
5+
angles = m_vecAngles
6+
7+
[origin]
8+
name = m_vecOrigin[0]
9+
type = Vector
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ../effects/gmod/CTEConcussiveExplosion.ini
2+
# Temp Entity Name: ConcussiveExplosion
3+
4+
scale = m_flScale
5+
magnitude = m_nMagnitude
6+
radius = m_nRadius
7+
normal = m_vecNormal
8+
9+
[origin]
10+
name = m_vecOrigin[0]
11+
type = Vector
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# ../effects/gmod/CTEEffectDispatch.ini
2+
# Temp Entity Name: EffectDispatch
3+
4+
entity_index = m_EffectData.entindex
5+
particle_attachment = m_EffectData.m_ControlPoint1.m_eParticleAttachment
6+
primary_color = m_EffectData.m_CustomColors.m_vecColor1
7+
secondary_color = m_EffectData.m_CustomColors.m_vecColor2
8+
control_point = m_EffectData.m_bControlPoint1
9+
has_custom_colors = m_EffectData.m_bCustomColors
10+
flags = m_EffectData.m_fFlags
11+
magnitude = m_EffectData.m_flMagnitude
12+
radius = m_EffectData.m_flRadius
13+
scale = m_EffectData.m_flScale
14+
effect_name_index = m_EffectData.m_iEffectName
15+
attachment_index = m_EffectData.m_nAttachmentIndex
16+
color = m_EffectData.m_nColor
17+
damage_type = m_EffectData.m_nDamageType
18+
hitbox = m_EffectData.m_nHitBox
19+
material_index = m_EffectData.m_nMaterial
20+
surface_prop = m_EffectData.m_nSurfaceProp
21+
angles = m_EffectData.m_vAngles
22+
normal = m_EffectData.m_vNormal
23+
allow_override = m_bAllowOverride
24+
25+
[offset]
26+
name = m_EffectData.m_ControlPoint1.m_vecOffset[0]
27+
type = Vector
28+
29+
[origin]
30+
name = m_EffectData.m_vOrigin[0]
31+
type = Vector
32+
33+
[start]
34+
name = m_EffectData.m_vStart[0]
35+
type = Vector
36+
37+
[entity]
38+
name = entity_index
39+
type = Entity
40+
41+
[material]
42+
name = material_index
43+
type = Model
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ../effects/gmod/CTEHL2MPFireBullets.ini
2+
# Temp Entity Name: Shotgun Shot
3+
4+
do_impacts = m_bDoImpacts
5+
do_tracers = m_bDoTracers
6+
spread = m_flSpread
7+
ammo_id = m_iAmmoID
8+
player_index = m_iPlayer
9+
seed = m_iSeed
10+
shots = m_iShots
11+
direction = m_vecDir
12+
origin = m_vecOrigin
13+
tracer_type = m_TracerType
14+
15+
[player]
16+
name = player_index
17+
type = Player
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ../effects/gmod/CTEPhysicProp.ini
2+
# Temp Entity Name: physicsprop
3+
4+
effects = m_nEffects
5+
flags = m_nFlags
6+
model_index = m_nModelIndex
7+
skin = m_nSkin
8+
origin = m_vecOrigin
9+
velocity = m_vecVelocity
10+
11+
[rotation]
12+
name = m_angRotation[0]
13+
type = Vector
14+
15+
[model]
16+
name = model_index
17+
type = Model
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ../effects/gmod/CTEPlayerAnimEvent.ini
2+
# Temp Entity Name: PlayerAnimEvent
3+
4+
player_handle = m_hPlayer
5+
event = m_iEvent
6+
data = m_nData
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ../data/source-python/entity_output/gmod/CBaseEntityOutput.ini
2+
3+
binary = server
4+
5+
[function]
6+
[[fire_output]]
7+
identifier_linux = _ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f
8+
identifier_windows = 55 8B EC 81 EC 20 01 00 00 53 56 8B
9+
arguments_linux = POINTER, POINTER, POINTER, FLOAT
10+
arguments_windows = INT, INT, INT, INT, POINTER, POINTER, POINTER, FLOAT
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ../data/source-python/memory/gmod/global_pointers.ini
2+
3+
[CGlobalEntityList]
4+
binary = server
5+
identifier_linux = gEntList
6+
identifier_windows = 55 8B EC 83 EC 08 56 57 8B 7D 08 6A 00 B9
7+
offset_windows = 14
8+
level_windows = 1
9+
10+
[IServer]
11+
binary = bin/engine
12+
identifier_linux = sv
13+
identifier_windows = 55 8B EC 53 56 8B 75 0C 57 85 F6
14+
offset_windows = 27
15+
level_windows = 1
16+
17+
[CBaseTempEntity]
18+
binary = server
19+
identifier_linux = _ZN15CBaseTempEntity15s_pTempEntitiesE
20+
identifier_windows = 56 8B 35 2A 2A 2A 2A 85 F6 74 2A EB 2A 8D 49 00 8B 06
21+
offset_windows = 3
22+
level_windows = 2
23+
level_linux = 1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ../data/source-python/weapons/scripts/gmod/global_pointers.ini
2+
3+
[_WeaponDatabase]
4+
identifier_linux = _ZL20m_WeaponInfoDatabase
5+
identifier_windows = 55 8B EC 81 EC 88 2A 2A 2A 56 8B 75 10 85 F6 75 07 32 C0 5E
6+
offset_windows = 37
7+
level_windows = 1

0 commit comments

Comments
 (0)