diff --git a/src/globals.c b/src/globals.c index 07a4108..e466659 100644 --- a/src/globals.c +++ b/src/globals.c @@ -10,7 +10,10 @@ game_id this_game_id = HL; vec3_t g_punchAngles = { 0, 0, 0 }; + +/* Weapon info */ float g_flNextAttack = 0.f, g_flNextPrimaryAttack = 0.f; +int g_iClip = 0; void* hw; void** h_client; diff --git a/src/hooks.c b/src/hooks.c index b9bbeaa..98838e9 100644 --- a/src/hooks.c +++ b/src/hooks.c @@ -111,6 +111,7 @@ void h_HUD_PostRunCmd(struct local_state_s* from, struct local_state_s* to, g_flNextAttack = to->client.m_flNextAttack; g_flNextPrimaryAttack = to->weapondata[to->client.m_iId].m_flNextPrimaryAttack; + g_iClip = to->weapondata[to->client.m_iId].m_iClip; } } diff --git a/src/include/globals.h b/src/include/globals.h index 1624985..b89e08c 100644 --- a/src/include/globals.h +++ b/src/include/globals.h @@ -36,6 +36,7 @@ enum game_id { extern game_id this_game_id; extern vec3_t g_punchAngles; extern float g_flNextAttack, g_flNextPrimaryAttack; +extern int g_iClip; extern void* hw; extern void** h_client; /* hClientDLL hander */