From b1dfb05acfd3ab8bc15b012227052839613e32d6 Mon Sep 17 00:00:00 2001
From: luttje <2738114+luttje@users.noreply.github.com>
Date: Sun, 11 Aug 2024 10:04:14 +0200
Subject: [PATCH] Add CBaseCombatWeapon docs
---
docs/classes/CBaseCombatWeapon/AbortReload.md | 23 +
.../CBaseCombatWeapon/ActivityListCount.md | 24 +
.../CBaseCombatWeapon/ActivityOverride.md | 28 +
docs/classes/CBaseCombatWeapon/AddViewKick.md | 23 +
.../CBaseCombatWeapon/AllowsAutoSwitchFrom.md | 24 +
.../CBaseCombatWeapon/AllowsAutoSwitchTo.md | 24 +
.../CBaseCombatWeapon/CalcViewmodelBob.md | 24 +
.../CBaseCombatWeapon/CanBePickedUpByNPCs.md | 24 +
.../CBaseCombatWeapon/CanBeSelected.md | 24 +
docs/classes/CBaseCombatWeapon/CanDeploy.md | 24 +
docs/classes/CBaseCombatWeapon/CanHolster.md | 24 +
docs/classes/CBaseCombatWeapon/CanLower.md | 24 +
docs/classes/CBaseCombatWeapon/CheckReload.md | 23 +
docs/classes/CBaseCombatWeapon/Clip1.md | 24 +
docs/classes/CBaseCombatWeapon/Clip2.md | 24 +
.../CBaseCombatWeapon/DefaultDeploy.md | 32 +
.../CBaseCombatWeapon/DefaultReload.md | 30 +
.../classes/CBaseCombatWeapon/DefaultTouch.md | 25 +
docs/classes/CBaseCombatWeapon/Deploy.md | 24 +
.../DisplayAltFireHudHint.md | 23 +
.../CBaseCombatWeapon/DisplayReloadHudHint.md | 23 +
docs/classes/CBaseCombatWeapon/Drop.md | 26 +
.../classes/CBaseCombatWeapon/FinishReload.md | 23 +
docs/classes/CBaseCombatWeapon/GetActivity.md | 24 +
.../CBaseCombatWeapon/GetAnimPrefix.md | 24 +
.../CBaseCombatWeapon/GetBulletType.md | 24 +
.../classes/CBaseCombatWeapon/GetClassName.md | 24 +
docs/classes/CBaseCombatWeapon/GetDamage.md | 28 +
.../CBaseCombatWeapon/GetDeathNoticeName.md | 24 +
.../CBaseCombatWeapon/GetDefaultAnimSpeed.md | 24 +
.../CBaseCombatWeapon/GetDefaultClip1.md | 24 +
.../CBaseCombatWeapon/GetDefaultClip2.md | 24 +
.../CBaseCombatWeapon/GetDrawActivity.md | 24 +
docs/classes/CBaseCombatWeapon/GetFireRate.md | 24 +
.../CBaseCombatWeapon/GetIdealActivity.md | 24 +
.../CBaseCombatWeapon/GetIdealSequence.md | 24 +
.../GetMaxAutoAimDeflection.md | 24 +
docs/classes/CBaseCombatWeapon/GetMaxBurst.md | 24 +
docs/classes/CBaseCombatWeapon/GetMaxClip1.md | 24 +
docs/classes/CBaseCombatWeapon/GetMaxClip2.md | 24 +
.../CBaseCombatWeapon/GetMaxRestTime.md | 24 +
docs/classes/CBaseCombatWeapon/GetMinBurst.md | 24 +
.../CBaseCombatWeapon/GetMinRestTime.md | 24 +
docs/classes/CBaseCombatWeapon/GetOwner.md | 24 +
docs/classes/CBaseCombatWeapon/GetPosition.md | 24 +
.../CBaseCombatWeapon/GetPrimaryAmmoCount.md | 24 +
.../CBaseCombatWeapon/GetPrimaryAmmoType.md | 24 +
.../GetPrimaryAttackActivity.md | 24 +
.../classes/CBaseCombatWeapon/GetPrintName.md | 24 +
.../CBaseCombatWeapon/GetRandomBurst.md | 24 +
.../CBaseCombatWeapon/GetRumbleEffect.md | 24 +
.../GetSecondaryAmmoCount.md | 24 +
.../CBaseCombatWeapon/GetSecondaryAmmoType.md | 24 +
.../GetSecondaryAttackActivity.md | 24 +
.../CBaseCombatWeapon/GetShootSound.md | 26 +
docs/classes/CBaseCombatWeapon/GetSlot.md | 24 +
docs/classes/CBaseCombatWeapon/GetSubType.md | 24 +
.../classes/CBaseCombatWeapon/GetViewModel.md | 27 +
.../GetViewModelSequenceDuration.md | 24 +
.../CBaseCombatWeapon/GetWeaponData.md | 24 +
.../CBaseCombatWeapon/GetWeaponFlags.md | 24 +
.../CBaseCombatWeapon/GetWeaponIdleTime.md | 24 +
docs/classes/CBaseCombatWeapon/GetWeight.md | 24 +
.../CBaseCombatWeapon/GetWorldModel.md | 24 +
.../CBaseCombatWeapon/GiveDefaultAmmo.md | 23 +
.../CBaseCombatWeapon/HandleFireOnEmpty.md | 23 +
docs/classes/CBaseCombatWeapon/HasAmmo.md | 24 +
docs/classes/CBaseCombatWeapon/HasAnyAmmo.md | 24 +
.../CBaseCombatWeapon/HasPrimaryAmmo.md | 24 +
.../CBaseCombatWeapon/HasSecondaryAmmo.md | 24 +
.../HasWeaponIdleTimeElapsed.md | 24 +
docs/classes/CBaseCombatWeapon/HideThink.md | 23 +
.../CBaseCombatWeapon/IsAllowedToSwitch.md | 24 +
docs/classes/CBaseCombatWeapon/IsLocked.md | 26 +
.../CBaseCombatWeapon/IsMeleeWeapon.md | 24 +
docs/classes/CBaseCombatWeapon/IsPredicted.md | 24 +
docs/classes/CBaseCombatWeapon/IsScripted.md | 24 +
.../IsViewModelSequenceFinished.md | 24 +
.../CBaseCombatWeapon/IsWeaponVisible.md | 24 +
.../CBaseCombatWeapon/IsWeaponZoomed.md | 24 +
.../CBaseCombatWeapon/ItemBusyFrame.md | 23 +
.../CBaseCombatWeapon/ItemHolsterFrame.md | 23 +
.../CBaseCombatWeapon/ItemPostFrame.md | 23 +
.../classes/CBaseCombatWeapon/ItemPreFrame.md | 23 +
docs/classes/CBaseCombatWeapon/Lock.md | 27 +
docs/classes/CBaseCombatWeapon/Lower.md | 24 +
.../MaintainIdealActivity.md | 23 +
.../CBaseCombatWeapon/OnActiveStateChanged.md | 25 +
.../CBaseCombatWeapon/PrimaryAttack.md | 23 +
docs/classes/CBaseCombatWeapon/Ready.md | 24 +
docs/classes/CBaseCombatWeapon/Reload.md | 23 +
.../ReloadOrSwitchWeapons.md | 23 +
.../RescindAltFireHudHint.md | 23 +
.../CBaseCombatWeapon/RescindReloadHudHint.md | 23 +
.../CBaseCombatWeapon/SecondaryAttack.md | 23 +
.../CBaseCombatWeapon/SendViewModelAnim.md | 25 +
.../CBaseCombatWeapon/SendWeaponAnim.md | 25 +
docs/classes/CBaseCombatWeapon/SetActivity.md | 25 +
.../CBaseCombatWeapon/SetIdealActivity.md | 25 +
.../CBaseCombatWeapon/SetPickupTouch.md | 23 +
.../CBaseCombatWeapon/SetPrimaryAmmoCount.md | 25 +
.../SetSecondaryAmmoCount.md | 25 +
docs/classes/CBaseCombatWeapon/SetSubType.md | 25 +
.../classes/CBaseCombatWeapon/SetViewModel.md | 23 +
.../CBaseCombatWeapon/SetViewModelIndex.md | 25 +
.../CBaseCombatWeapon/SetWeaponIdleTime.md | 25 +
.../CBaseCombatWeapon/SetWeaponVisible.md | 25 +
.../ShouldDisplayAltFireHUDHint.md | 24 +
.../ShouldDisplayReloadHUDHint.md | 24 +
.../ShouldShowControlPanels.md | 24 +
.../CBaseCombatWeapon/StartSprinting.md | 24 +
.../CBaseCombatWeapon/StopSprinting.md | 24 +
.../CBaseCombatWeapon/StopWeaponSound.md | 25 +
.../CBaseCombatWeapon/UsesClipsForAmmo1.md | 24 +
.../CBaseCombatWeapon/UsesClipsForAmmo2.md | 24 +
.../CBaseCombatWeapon/UsesPrimaryAmmo.md | 24 +
.../CBaseCombatWeapon/UsesSecondaryAmmo.md | 24 +
.../VisibleInWeaponSelection.md | 24 +
.../CBaseCombatWeapon/WeaponAutoAimScale.md | 24 +
docs/classes/CBaseCombatWeapon/WeaponIdle.md | 23 +
docs/classes/CBaseCombatWeapon/WeaponSound.md | 28 +
docs/classes/CBaseCombatWeapon/WeaponState.md | 24 +
docs/classes/CBaseCombatWeapon/__eq.md | 26 +
docs/classes/CBaseCombatWeapon/__tostring.md | 24 +
.../modules/gmod_compatibility/sh_init.lua | 1 -
.../gamemodes/deathmatch/gamemode/init.lua | 2 +-
src/game/client/lc_baseanimating.cpp | 2 +-
src/game/server/lbaseanimating.cpp | 1 -
src/game/shared/lbasecombatweapon_shared.cpp | 1247 +++++++++--------
src/game/shared/lbaseentity_shared.cpp | 4 +-
src/game/shared/lbaseplayer_shared.cpp | 7 -
src/game/shared/lsrcinit.cpp | 2 +-
132 files changed, 3696 insertions(+), 576 deletions(-)
create mode 100644 docs/classes/CBaseCombatWeapon/AbortReload.md
create mode 100644 docs/classes/CBaseCombatWeapon/ActivityListCount.md
create mode 100644 docs/classes/CBaseCombatWeapon/ActivityOverride.md
create mode 100644 docs/classes/CBaseCombatWeapon/AddViewKick.md
create mode 100644 docs/classes/CBaseCombatWeapon/AllowsAutoSwitchFrom.md
create mode 100644 docs/classes/CBaseCombatWeapon/AllowsAutoSwitchTo.md
create mode 100644 docs/classes/CBaseCombatWeapon/CalcViewmodelBob.md
create mode 100644 docs/classes/CBaseCombatWeapon/CanBePickedUpByNPCs.md
create mode 100644 docs/classes/CBaseCombatWeapon/CanBeSelected.md
create mode 100644 docs/classes/CBaseCombatWeapon/CanDeploy.md
create mode 100644 docs/classes/CBaseCombatWeapon/CanHolster.md
create mode 100644 docs/classes/CBaseCombatWeapon/CanLower.md
create mode 100644 docs/classes/CBaseCombatWeapon/CheckReload.md
create mode 100644 docs/classes/CBaseCombatWeapon/Clip1.md
create mode 100644 docs/classes/CBaseCombatWeapon/Clip2.md
create mode 100644 docs/classes/CBaseCombatWeapon/DefaultDeploy.md
create mode 100644 docs/classes/CBaseCombatWeapon/DefaultReload.md
create mode 100644 docs/classes/CBaseCombatWeapon/DefaultTouch.md
create mode 100644 docs/classes/CBaseCombatWeapon/Deploy.md
create mode 100644 docs/classes/CBaseCombatWeapon/DisplayAltFireHudHint.md
create mode 100644 docs/classes/CBaseCombatWeapon/DisplayReloadHudHint.md
create mode 100644 docs/classes/CBaseCombatWeapon/Drop.md
create mode 100644 docs/classes/CBaseCombatWeapon/FinishReload.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetActivity.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetAnimPrefix.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetBulletType.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetClassName.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetDamage.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetDeathNoticeName.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetDefaultAnimSpeed.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetDefaultClip1.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetDefaultClip2.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetDrawActivity.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetFireRate.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetIdealActivity.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetIdealSequence.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetMaxAutoAimDeflection.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetMaxBurst.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetMaxClip1.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetMaxClip2.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetMaxRestTime.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetMinBurst.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetMinRestTime.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetOwner.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetPosition.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetPrimaryAmmoCount.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetPrimaryAmmoType.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetPrimaryAttackActivity.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetPrintName.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetRandomBurst.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetRumbleEffect.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetSecondaryAmmoCount.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetSecondaryAmmoType.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetSecondaryAttackActivity.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetShootSound.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetSlot.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetSubType.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetViewModel.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetViewModelSequenceDuration.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetWeaponData.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetWeaponFlags.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetWeaponIdleTime.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetWeight.md
create mode 100644 docs/classes/CBaseCombatWeapon/GetWorldModel.md
create mode 100644 docs/classes/CBaseCombatWeapon/GiveDefaultAmmo.md
create mode 100644 docs/classes/CBaseCombatWeapon/HandleFireOnEmpty.md
create mode 100644 docs/classes/CBaseCombatWeapon/HasAmmo.md
create mode 100644 docs/classes/CBaseCombatWeapon/HasAnyAmmo.md
create mode 100644 docs/classes/CBaseCombatWeapon/HasPrimaryAmmo.md
create mode 100644 docs/classes/CBaseCombatWeapon/HasSecondaryAmmo.md
create mode 100644 docs/classes/CBaseCombatWeapon/HasWeaponIdleTimeElapsed.md
create mode 100644 docs/classes/CBaseCombatWeapon/HideThink.md
create mode 100644 docs/classes/CBaseCombatWeapon/IsAllowedToSwitch.md
create mode 100644 docs/classes/CBaseCombatWeapon/IsLocked.md
create mode 100644 docs/classes/CBaseCombatWeapon/IsMeleeWeapon.md
create mode 100644 docs/classes/CBaseCombatWeapon/IsPredicted.md
create mode 100644 docs/classes/CBaseCombatWeapon/IsScripted.md
create mode 100644 docs/classes/CBaseCombatWeapon/IsViewModelSequenceFinished.md
create mode 100644 docs/classes/CBaseCombatWeapon/IsWeaponVisible.md
create mode 100644 docs/classes/CBaseCombatWeapon/IsWeaponZoomed.md
create mode 100644 docs/classes/CBaseCombatWeapon/ItemBusyFrame.md
create mode 100644 docs/classes/CBaseCombatWeapon/ItemHolsterFrame.md
create mode 100644 docs/classes/CBaseCombatWeapon/ItemPostFrame.md
create mode 100644 docs/classes/CBaseCombatWeapon/ItemPreFrame.md
create mode 100644 docs/classes/CBaseCombatWeapon/Lock.md
create mode 100644 docs/classes/CBaseCombatWeapon/Lower.md
create mode 100644 docs/classes/CBaseCombatWeapon/MaintainIdealActivity.md
create mode 100644 docs/classes/CBaseCombatWeapon/OnActiveStateChanged.md
create mode 100644 docs/classes/CBaseCombatWeapon/PrimaryAttack.md
create mode 100644 docs/classes/CBaseCombatWeapon/Ready.md
create mode 100644 docs/classes/CBaseCombatWeapon/Reload.md
create mode 100644 docs/classes/CBaseCombatWeapon/ReloadOrSwitchWeapons.md
create mode 100644 docs/classes/CBaseCombatWeapon/RescindAltFireHudHint.md
create mode 100644 docs/classes/CBaseCombatWeapon/RescindReloadHudHint.md
create mode 100644 docs/classes/CBaseCombatWeapon/SecondaryAttack.md
create mode 100644 docs/classes/CBaseCombatWeapon/SendViewModelAnim.md
create mode 100644 docs/classes/CBaseCombatWeapon/SendWeaponAnim.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetActivity.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetIdealActivity.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetPickupTouch.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetPrimaryAmmoCount.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetSecondaryAmmoCount.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetSubType.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetViewModel.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetViewModelIndex.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetWeaponIdleTime.md
create mode 100644 docs/classes/CBaseCombatWeapon/SetWeaponVisible.md
create mode 100644 docs/classes/CBaseCombatWeapon/ShouldDisplayAltFireHUDHint.md
create mode 100644 docs/classes/CBaseCombatWeapon/ShouldDisplayReloadHUDHint.md
create mode 100644 docs/classes/CBaseCombatWeapon/ShouldShowControlPanels.md
create mode 100644 docs/classes/CBaseCombatWeapon/StartSprinting.md
create mode 100644 docs/classes/CBaseCombatWeapon/StopSprinting.md
create mode 100644 docs/classes/CBaseCombatWeapon/StopWeaponSound.md
create mode 100644 docs/classes/CBaseCombatWeapon/UsesClipsForAmmo1.md
create mode 100644 docs/classes/CBaseCombatWeapon/UsesClipsForAmmo2.md
create mode 100644 docs/classes/CBaseCombatWeapon/UsesPrimaryAmmo.md
create mode 100644 docs/classes/CBaseCombatWeapon/UsesSecondaryAmmo.md
create mode 100644 docs/classes/CBaseCombatWeapon/VisibleInWeaponSelection.md
create mode 100644 docs/classes/CBaseCombatWeapon/WeaponAutoAimScale.md
create mode 100644 docs/classes/CBaseCombatWeapon/WeaponIdle.md
create mode 100644 docs/classes/CBaseCombatWeapon/WeaponSound.md
create mode 100644 docs/classes/CBaseCombatWeapon/WeaponState.md
create mode 100644 docs/classes/CBaseCombatWeapon/__eq.md
create mode 100644 docs/classes/CBaseCombatWeapon/__tostring.md
diff --git a/docs/classes/CBaseCombatWeapon/AbortReload.md b/docs/classes/CBaseCombatWeapon/AbortReload.md
new file mode 100644
index 0000000000..0a20b4d7f0
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/AbortReload.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: AbortReload
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: AbortReload
+ realm: shared
+ description: "Abort reload."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:AbortReload – Abort reload.
+
diff --git a/docs/classes/CBaseCombatWeapon/ActivityListCount.md b/docs/classes/CBaseCombatWeapon/ActivityListCount.md
new file mode 100644
index 0000000000..162e385157
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ActivityListCount.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: ActivityListCount
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ActivityListCount
+ realm: shared
+ description: "Activity list count."
+
+
+ returns:
+ - type: integer
+ description: "Number of activities in the list."
+---
+
+
+CBaseCombatWeapon:ActivityListCount – Activity list count.
+
diff --git a/docs/classes/CBaseCombatWeapon/ActivityOverride.md b/docs/classes/CBaseCombatWeapon/ActivityOverride.md
new file mode 100644
index 0000000000..41f7348434
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ActivityOverride.md
@@ -0,0 +1,28 @@
+---
+template: lua-class-function.html
+title: ActivityOverride
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ActivityOverride
+ realm: shared
+ description: "Asks which Activity override the weapon wants."
+
+ arguments:
+ - name: "activity"
+ type: number
+ returns:
+ - type: integer
+ description: "Override activity ID."
+ - type: boolean
+ description: "Whether the activity is required."
+---
+
+
+CBaseCombatWeapon:ActivityOverride – Asks which Activity override the weapon wants.
+
diff --git a/docs/classes/CBaseCombatWeapon/AddViewKick.md b/docs/classes/CBaseCombatWeapon/AddViewKick.md
new file mode 100644
index 0000000000..255596ebc2
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/AddViewKick.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: AddViewKick
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: AddViewKick
+ realm: shared
+ description: "Add view kick."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:AddViewKick – Add view kick.
+
diff --git a/docs/classes/CBaseCombatWeapon/AllowsAutoSwitchFrom.md b/docs/classes/CBaseCombatWeapon/AllowsAutoSwitchFrom.md
new file mode 100644
index 0000000000..a55fee4133
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/AllowsAutoSwitchFrom.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: AllowsAutoSwitchFrom
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: AllowsAutoSwitchFrom
+ realm: shared
+ description: "Allows auto switch from."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon allows auto switch from."
+---
+
+
+CBaseCombatWeapon:AllowsAutoSwitchFrom – Allows auto switch from.
+
diff --git a/docs/classes/CBaseCombatWeapon/AllowsAutoSwitchTo.md b/docs/classes/CBaseCombatWeapon/AllowsAutoSwitchTo.md
new file mode 100644
index 0000000000..d06ee1c91c
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/AllowsAutoSwitchTo.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: AllowsAutoSwitchTo
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: AllowsAutoSwitchTo
+ realm: shared
+ description: "Allows auto switch to."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon allows auto switch to."
+---
+
+
+CBaseCombatWeapon:AllowsAutoSwitchTo – Allows auto switch to.
+
diff --git a/docs/classes/CBaseCombatWeapon/CalcViewmodelBob.md b/docs/classes/CBaseCombatWeapon/CalcViewmodelBob.md
new file mode 100644
index 0000000000..bf2129f148
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/CalcViewmodelBob.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: CalcViewmodelBob
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: CalcViewmodelBob
+ realm: shared
+ description: "Calculate viewmodel bob."
+
+
+ returns:
+ - type: number
+ description: "Viewmodel bob."
+---
+
+
+CBaseCombatWeapon:CalcViewmodelBob – Calculate viewmodel bob.
+
diff --git a/docs/classes/CBaseCombatWeapon/CanBePickedUpByNPCs.md b/docs/classes/CBaseCombatWeapon/CanBePickedUpByNPCs.md
new file mode 100644
index 0000000000..e1365192a9
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/CanBePickedUpByNPCs.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: CanBePickedUpByNPCs
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: CanBePickedUpByNPCs
+ realm: shared
+ description: "Can be picked up by NPCs."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon can be picked up by NPCs."
+---
+
+
+CBaseCombatWeapon:CanBePickedUpByNPCs – Can be picked up by NPCs.
+
diff --git a/docs/classes/CBaseCombatWeapon/CanBeSelected.md b/docs/classes/CBaseCombatWeapon/CanBeSelected.md
new file mode 100644
index 0000000000..335b2173ac
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/CanBeSelected.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: CanBeSelected
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: CanBeSelected
+ realm: shared
+ description: "Can be selected."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon can be selected."
+---
+
+
+CBaseCombatWeapon:CanBeSelected – Can be selected.
+
diff --git a/docs/classes/CBaseCombatWeapon/CanDeploy.md b/docs/classes/CBaseCombatWeapon/CanDeploy.md
new file mode 100644
index 0000000000..855a852366
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/CanDeploy.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: CanDeploy
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: CanDeploy
+ realm: shared
+ description: "Can deploy."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon can deploy."
+---
+
+
+CBaseCombatWeapon:CanDeploy – Can deploy.
+
diff --git a/docs/classes/CBaseCombatWeapon/CanHolster.md b/docs/classes/CBaseCombatWeapon/CanHolster.md
new file mode 100644
index 0000000000..6f15aa94c8
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/CanHolster.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: CanHolster
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: CanHolster
+ realm: shared
+ description: "Can holster."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon can holster."
+---
+
+
+CBaseCombatWeapon:CanHolster – Can holster.
+
diff --git a/docs/classes/CBaseCombatWeapon/CanLower.md b/docs/classes/CBaseCombatWeapon/CanLower.md
new file mode 100644
index 0000000000..30c19c86fa
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/CanLower.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: CanLower
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: CanLower
+ realm: shared
+ description: "Can lower."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon can lower."
+---
+
+
+CBaseCombatWeapon:CanLower – Can lower.
+
diff --git a/docs/classes/CBaseCombatWeapon/CheckReload.md b/docs/classes/CBaseCombatWeapon/CheckReload.md
new file mode 100644
index 0000000000..c669d76236
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/CheckReload.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: CheckReload
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: CheckReload
+ realm: shared
+ description: "Check reload."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:CheckReload – Check reload.
+
diff --git a/docs/classes/CBaseCombatWeapon/Clip1.md b/docs/classes/CBaseCombatWeapon/Clip1.md
new file mode 100644
index 0000000000..ad0956067c
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/Clip1.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: Clip1
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: Clip1
+ realm: shared
+ description: "The amount of ammo in the primary clip."
+
+
+ returns:
+ - type: integer
+ description: "The amount of ammo in the primary clip."
+---
+
+
+CBaseCombatWeapon:Clip1 – The amount of ammo in the primary clip.
+
diff --git a/docs/classes/CBaseCombatWeapon/Clip2.md b/docs/classes/CBaseCombatWeapon/Clip2.md
new file mode 100644
index 0000000000..8346bd0c7f
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/Clip2.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: Clip2
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: Clip2
+ realm: shared
+ description: "The amount of ammo in the secondary clip."
+
+
+ returns:
+ - type: integer
+ description: "The amount of ammo in the secondary clip."
+---
+
+
+CBaseCombatWeapon:Clip2 – The amount of ammo in the secondary clip.
+
diff --git a/docs/classes/CBaseCombatWeapon/DefaultDeploy.md b/docs/classes/CBaseCombatWeapon/DefaultDeploy.md
new file mode 100644
index 0000000000..5ba2272074
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/DefaultDeploy.md
@@ -0,0 +1,32 @@
+---
+template: lua-class-function.html
+title: DefaultDeploy
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: DefaultDeploy
+ realm: shared
+ description: "Default deploy."
+
+ arguments:
+ - name: "viewModel"
+ type: string
+ - name: "worldModel"
+ type: string
+ - name: "activity"
+ type: number
+ - name: "animationExtension"
+ type: string
+ returns:
+ - type: boolean
+ description: "Whether the weapon was successfully deployed."
+---
+
+
+CBaseCombatWeapon:DefaultDeploy – Default deploy.
+
diff --git a/docs/classes/CBaseCombatWeapon/DefaultReload.md b/docs/classes/CBaseCombatWeapon/DefaultReload.md
new file mode 100644
index 0000000000..fefed070ca
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/DefaultReload.md
@@ -0,0 +1,30 @@
+---
+template: lua-class-function.html
+title: DefaultReload
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: DefaultReload
+ realm: shared
+ description: "Default reload."
+
+ arguments:
+ - name: "clipSize1"
+ type: number
+ - name: "clipSize2"
+ type: number
+ - name: "activity"
+ type: number
+ returns:
+ - type: boolean
+ description: "Whether the weapon was successfully reloaded."
+---
+
+
+CBaseCombatWeapon:DefaultReload – Default reload.
+
diff --git a/docs/classes/CBaseCombatWeapon/DefaultTouch.md b/docs/classes/CBaseCombatWeapon/DefaultTouch.md
new file mode 100644
index 0000000000..03b4e7a155
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/DefaultTouch.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: DefaultTouch
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: DefaultTouch
+ realm: shared
+ description: "Default touch."
+
+ arguments:
+ - name: "touchingEntity"
+ type: Entity
+ returns:
+
+---
+
+
+CBaseCombatWeapon:DefaultTouch – Default touch.
+
diff --git a/docs/classes/CBaseCombatWeapon/Deploy.md b/docs/classes/CBaseCombatWeapon/Deploy.md
new file mode 100644
index 0000000000..3afca4dec1
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/Deploy.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: Deploy
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: Deploy
+ realm: shared
+ description: "Deploy."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon was successfully deployed."
+---
+
+
+CBaseCombatWeapon:Deploy – Deploy.
+
diff --git a/docs/classes/CBaseCombatWeapon/DisplayAltFireHudHint.md b/docs/classes/CBaseCombatWeapon/DisplayAltFireHudHint.md
new file mode 100644
index 0000000000..cc557fee24
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/DisplayAltFireHudHint.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: DisplayAltFireHudHint
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: DisplayAltFireHudHint
+ realm: shared
+ description: "Display alt fire HUD hint."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:DisplayAltFireHudHint – Display alt fire HUD hint.
+
diff --git a/docs/classes/CBaseCombatWeapon/DisplayReloadHudHint.md b/docs/classes/CBaseCombatWeapon/DisplayReloadHudHint.md
new file mode 100644
index 0000000000..10b6194d1e
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/DisplayReloadHudHint.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: DisplayReloadHudHint
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: DisplayReloadHudHint
+ realm: shared
+ description: "Display reload HUD hint."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:DisplayReloadHudHint – Display reload HUD hint.
+
diff --git a/docs/classes/CBaseCombatWeapon/Drop.md b/docs/classes/CBaseCombatWeapon/Drop.md
new file mode 100644
index 0000000000..05d23f1bc4
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/Drop.md
@@ -0,0 +1,26 @@
+---
+template: lua-class-function.html
+title: Drop
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: Drop
+ realm: shared
+ description: "Drop."
+
+ arguments:
+ - name: "velocity"
+ type: Vector
+ nillable: true
+ returns:
+
+---
+
+
+CBaseCombatWeapon:Drop – Drop.
+
diff --git a/docs/classes/CBaseCombatWeapon/FinishReload.md b/docs/classes/CBaseCombatWeapon/FinishReload.md
new file mode 100644
index 0000000000..ec19ea56e7
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/FinishReload.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: FinishReload
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: FinishReload
+ realm: shared
+ description: "Finish reload."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:FinishReload – Finish reload.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetActivity.md b/docs/classes/CBaseCombatWeapon/GetActivity.md
new file mode 100644
index 0000000000..67d69d8905
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetActivity.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetActivity
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetActivity
+ realm: shared
+ description: "Get activity."
+
+
+ returns:
+ - type: integer
+ description: "Activity ID."
+---
+
+
+CBaseCombatWeapon:GetActivity – Get activity.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetAnimPrefix.md b/docs/classes/CBaseCombatWeapon/GetAnimPrefix.md
new file mode 100644
index 0000000000..afb0ec70ae
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetAnimPrefix.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetAnimPrefix
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetAnimPrefix
+ realm: shared
+ description: "Get animation prefix."
+
+
+ returns:
+ - type: string
+ description: "Animation prefix."
+---
+
+
+CBaseCombatWeapon:GetAnimPrefix – Get animation prefix.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetBulletType.md b/docs/classes/CBaseCombatWeapon/GetBulletType.md
new file mode 100644
index 0000000000..65e2aecc7a
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetBulletType.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetBulletType
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetBulletType
+ realm: shared
+ description: "Get bullet type."
+
+
+ returns:
+ - type: integer
+ description: "Bullet type."
+---
+
+
+CBaseCombatWeapon:GetBulletType – Get bullet type.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetClassName.md b/docs/classes/CBaseCombatWeapon/GetClassName.md
new file mode 100644
index 0000000000..8cb59e3626
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetClassName.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetClassName
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetClassName
+ realm: shared
+ description: "Get class name."
+
+
+ returns:
+ - type: string
+ description: "Class name."
+---
+
+
+CBaseCombatWeapon:GetClassName – Get class name.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetDamage.md b/docs/classes/CBaseCombatWeapon/GetDamage.md
new file mode 100644
index 0000000000..50c399bb96
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetDamage.md
@@ -0,0 +1,28 @@
+---
+template: lua-class-function.html
+title: GetDamage
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetDamage
+ realm: shared
+ description: "Get damage."
+
+ arguments:
+ - name: "damage"
+ type: number
+ - name: "location"
+ type: number
+ returns:
+ - type: number
+ description: "Damage."
+---
+
+
+CBaseCombatWeapon:GetDamage – Get damage.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetDeathNoticeName.md b/docs/classes/CBaseCombatWeapon/GetDeathNoticeName.md
new file mode 100644
index 0000000000..969fe5ec86
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetDeathNoticeName.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetDeathNoticeName
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetDeathNoticeName
+ realm: shared
+ description: "Get death notice name."
+
+
+ returns:
+ - type: string
+ description: "Death notice name."
+---
+
+
+CBaseCombatWeapon:GetDeathNoticeName – Get death notice name.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetDefaultAnimSpeed.md b/docs/classes/CBaseCombatWeapon/GetDefaultAnimSpeed.md
new file mode 100644
index 0000000000..6e83ec3a4b
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetDefaultAnimSpeed.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetDefaultAnimSpeed
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetDefaultAnimSpeed
+ realm: shared
+ description: "Get default animation speed."
+
+
+ returns:
+ - type: number
+ description: "Default animation speed."
+---
+
+
+CBaseCombatWeapon:GetDefaultAnimSpeed – Get default animation speed.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetDefaultClip1.md b/docs/classes/CBaseCombatWeapon/GetDefaultClip1.md
new file mode 100644
index 0000000000..0f343fc86e
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetDefaultClip1.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetDefaultClip1
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetDefaultClip1
+ realm: shared
+ description: "Get default clip 1."
+
+
+ returns:
+ - type: integer
+ description: "Default clip 1."
+---
+
+
+CBaseCombatWeapon:GetDefaultClip1 – Get default clip 1.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetDefaultClip2.md b/docs/classes/CBaseCombatWeapon/GetDefaultClip2.md
new file mode 100644
index 0000000000..26254cb041
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetDefaultClip2.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetDefaultClip2
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetDefaultClip2
+ realm: shared
+ description: "Get default clip 2."
+
+
+ returns:
+ - type: integer
+ description: "Default clip 2."
+---
+
+
+CBaseCombatWeapon:GetDefaultClip2 – Get default clip 2.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetDrawActivity.md b/docs/classes/CBaseCombatWeapon/GetDrawActivity.md
new file mode 100644
index 0000000000..6cbf4b664f
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetDrawActivity.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetDrawActivity
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetDrawActivity
+ realm: shared
+ description: "Get draw activity."
+
+
+ returns:
+ - type: integer
+ description: "Draw activity ID."
+---
+
+
+CBaseCombatWeapon:GetDrawActivity – Get draw activity.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetFireRate.md b/docs/classes/CBaseCombatWeapon/GetFireRate.md
new file mode 100644
index 0000000000..80e50de7d5
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetFireRate.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetFireRate
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetFireRate
+ realm: shared
+ description: "Get fire rate."
+
+
+ returns:
+ - type: number
+ description: "Fire rate."
+---
+
+
+CBaseCombatWeapon:GetFireRate – Get fire rate.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetIdealActivity.md b/docs/classes/CBaseCombatWeapon/GetIdealActivity.md
new file mode 100644
index 0000000000..7cb18e00ee
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetIdealActivity.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetIdealActivity
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetIdealActivity
+ realm: shared
+ description: "Get ideal activity."
+
+
+ returns:
+ - type: integer
+ description: "Ideal activity ID."
+---
+
+
+CBaseCombatWeapon:GetIdealActivity – Get ideal activity.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetIdealSequence.md b/docs/classes/CBaseCombatWeapon/GetIdealSequence.md
new file mode 100644
index 0000000000..7e5ce439e7
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetIdealSequence.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetIdealSequence
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetIdealSequence
+ realm: shared
+ description: "Get ideal sequence."
+
+
+ returns:
+ - type: integer
+ description: "Ideal sequence ID."
+---
+
+
+CBaseCombatWeapon:GetIdealSequence – Get ideal sequence.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetMaxAutoAimDeflection.md b/docs/classes/CBaseCombatWeapon/GetMaxAutoAimDeflection.md
new file mode 100644
index 0000000000..9047d67b0d
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetMaxAutoAimDeflection.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetMaxAutoAimDeflection
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetMaxAutoAimDeflection
+ realm: shared
+ description: "Get max auto aim deflection."
+
+
+ returns:
+ - type: number
+ description: "Max auto aim deflection."
+---
+
+
+CBaseCombatWeapon:GetMaxAutoAimDeflection – Get max auto aim deflection.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetMaxBurst.md b/docs/classes/CBaseCombatWeapon/GetMaxBurst.md
new file mode 100644
index 0000000000..aaed8cf933
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetMaxBurst.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetMaxBurst
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetMaxBurst
+ realm: shared
+ description: "Get max burst."
+
+
+ returns:
+ - type: integer
+ description: "Max burst."
+---
+
+
+CBaseCombatWeapon:GetMaxBurst – Get max burst.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetMaxClip1.md b/docs/classes/CBaseCombatWeapon/GetMaxClip1.md
new file mode 100644
index 0000000000..8655969e98
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetMaxClip1.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetMaxClip1
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetMaxClip1
+ realm: shared
+ description: "Get max clip 1."
+
+
+ returns:
+ - type: integer
+ description: "Max clip 1."
+---
+
+
+CBaseCombatWeapon:GetMaxClip1 – Get max clip 1.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetMaxClip2.md b/docs/classes/CBaseCombatWeapon/GetMaxClip2.md
new file mode 100644
index 0000000000..038a6b2e29
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetMaxClip2.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetMaxClip2
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetMaxClip2
+ realm: shared
+ description: "Get max clip 2."
+
+
+ returns:
+ - type: integer
+ description: "Max clip 2."
+---
+
+
+CBaseCombatWeapon:GetMaxClip2 – Get max clip 2.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetMaxRestTime.md b/docs/classes/CBaseCombatWeapon/GetMaxRestTime.md
new file mode 100644
index 0000000000..8c3fe4800e
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetMaxRestTime.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetMaxRestTime
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetMaxRestTime
+ realm: shared
+ description: "Get max rest time."
+
+
+ returns:
+ - type: number
+ description: "Max rest time."
+---
+
+
+CBaseCombatWeapon:GetMaxRestTime – Get max rest time.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetMinBurst.md b/docs/classes/CBaseCombatWeapon/GetMinBurst.md
new file mode 100644
index 0000000000..aa7997ed47
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetMinBurst.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetMinBurst
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetMinBurst
+ realm: shared
+ description: "Get min burst."
+
+
+ returns:
+ - type: integer
+ description: "Min burst."
+---
+
+
+CBaseCombatWeapon:GetMinBurst – Get min burst.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetMinRestTime.md b/docs/classes/CBaseCombatWeapon/GetMinRestTime.md
new file mode 100644
index 0000000000..04cef3bda5
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetMinRestTime.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetMinRestTime
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetMinRestTime
+ realm: shared
+ description: "Get min rest time."
+
+
+ returns:
+ - type: number
+ description: "Min rest time."
+---
+
+
+CBaseCombatWeapon:GetMinRestTime – Get min rest time.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetOwner.md b/docs/classes/CBaseCombatWeapon/GetOwner.md
new file mode 100644
index 0000000000..035c0f8d5d
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetOwner.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetOwner
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetOwner
+ realm: shared
+ description: "Get owner."
+
+
+ returns:
+ - type: entity
+ description: "Owner entity."
+---
+
+
+CBaseCombatWeapon:GetOwner – Get owner.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetPosition.md b/docs/classes/CBaseCombatWeapon/GetPosition.md
new file mode 100644
index 0000000000..6fcb937809
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetPosition.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetPosition
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetPosition
+ realm: shared
+ description: "Get the weapon position in the selection screen."
+
+
+ returns:
+ - type: integer
+ description: "Position in the selection screen."
+---
+
+
+CBaseCombatWeapon:GetPosition – Get the weapon position in the selection screen.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetPrimaryAmmoCount.md b/docs/classes/CBaseCombatWeapon/GetPrimaryAmmoCount.md
new file mode 100644
index 0000000000..d09be42ec0
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetPrimaryAmmoCount.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetPrimaryAmmoCount
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetPrimaryAmmoCount
+ realm: shared
+ description: "Get the amount of primary ammo."
+
+
+ returns:
+ - type: integer
+ description: "Amount of primary ammo."
+---
+
+
+CBaseCombatWeapon:GetPrimaryAmmoCount – Get the amount of primary ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetPrimaryAmmoType.md b/docs/classes/CBaseCombatWeapon/GetPrimaryAmmoType.md
new file mode 100644
index 0000000000..d7e97ee643
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetPrimaryAmmoType.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetPrimaryAmmoType
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetPrimaryAmmoType
+ realm: shared
+ description: "Get the primary ammo type."
+
+
+ returns:
+ - type: integer
+ description: "Primary ammo type."
+---
+
+
+CBaseCombatWeapon:GetPrimaryAmmoType – Get the primary ammo type.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetPrimaryAttackActivity.md b/docs/classes/CBaseCombatWeapon/GetPrimaryAttackActivity.md
new file mode 100644
index 0000000000..2161715d1d
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetPrimaryAttackActivity.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetPrimaryAttackActivity
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetPrimaryAttackActivity
+ realm: shared
+ description: "Get the primary attack activity."
+
+
+ returns:
+ - type: integer
+ description: "Primary attack activity ID."
+---
+
+
+CBaseCombatWeapon:GetPrimaryAttackActivity – Get the primary attack activity.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetPrintName.md b/docs/classes/CBaseCombatWeapon/GetPrintName.md
new file mode 100644
index 0000000000..0aad42b3df
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetPrintName.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetPrintName
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetPrintName
+ realm: shared
+ description: "Get the print name."
+
+
+ returns:
+ - type: string
+ description: "Print name."
+---
+
+
+CBaseCombatWeapon:GetPrintName – Get the print name.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetRandomBurst.md b/docs/classes/CBaseCombatWeapon/GetRandomBurst.md
new file mode 100644
index 0000000000..f991da2013
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetRandomBurst.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetRandomBurst
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetRandomBurst
+ realm: shared
+ description: "Get a random burst."
+
+
+ returns:
+ - type: integer
+ description: "Random burst."
+---
+
+
+CBaseCombatWeapon:GetRandomBurst – Get a random burst.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetRumbleEffect.md b/docs/classes/CBaseCombatWeapon/GetRumbleEffect.md
new file mode 100644
index 0000000000..e15012903c
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetRumbleEffect.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetRumbleEffect
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetRumbleEffect
+ realm: shared
+ description: "Get the rumble effect."
+
+
+ returns:
+ - type: integer
+ description: "Rumble effect."
+---
+
+
+CBaseCombatWeapon:GetRumbleEffect – Get the rumble effect.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetSecondaryAmmoCount.md b/docs/classes/CBaseCombatWeapon/GetSecondaryAmmoCount.md
new file mode 100644
index 0000000000..9c59e8b138
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetSecondaryAmmoCount.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetSecondaryAmmoCount
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetSecondaryAmmoCount
+ realm: shared
+ description: "Get the amount of secondary ammo."
+
+
+ returns:
+ - type: integer
+ description: "Amount of secondary ammo."
+---
+
+
+CBaseCombatWeapon:GetSecondaryAmmoCount – Get the amount of secondary ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetSecondaryAmmoType.md b/docs/classes/CBaseCombatWeapon/GetSecondaryAmmoType.md
new file mode 100644
index 0000000000..6e83e76cd0
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetSecondaryAmmoType.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetSecondaryAmmoType
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetSecondaryAmmoType
+ realm: shared
+ description: "Get the secondary ammo type."
+
+
+ returns:
+ - type: integer
+ description: "Secondary ammo type."
+---
+
+
+CBaseCombatWeapon:GetSecondaryAmmoType – Get the secondary ammo type.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetSecondaryAttackActivity.md b/docs/classes/CBaseCombatWeapon/GetSecondaryAttackActivity.md
new file mode 100644
index 0000000000..e77518c273
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetSecondaryAttackActivity.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetSecondaryAttackActivity
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetSecondaryAttackActivity
+ realm: shared
+ description: "Get the secondary attack activity."
+
+
+ returns:
+ - type: integer
+ description: "Secondary attack activity ID."
+---
+
+
+CBaseCombatWeapon:GetSecondaryAttackActivity – Get the secondary attack activity.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetShootSound.md b/docs/classes/CBaseCombatWeapon/GetShootSound.md
new file mode 100644
index 0000000000..e385e9c10e
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetShootSound.md
@@ -0,0 +1,26 @@
+---
+template: lua-class-function.html
+title: GetShootSound
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetShootSound
+ realm: shared
+ description: "Get the shoot sound."
+
+ arguments:
+ - name: "index"
+ type: number
+ returns:
+ - type: string
+ description: "Shoot sound."
+---
+
+
+CBaseCombatWeapon:GetShootSound – Get the shoot sound.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetSlot.md b/docs/classes/CBaseCombatWeapon/GetSlot.md
new file mode 100644
index 0000000000..1294ddff46
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetSlot.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetSlot
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetSlot
+ realm: shared
+ description: "Get the slot."
+
+
+ returns:
+ - type: integer
+ description: "Slot."
+---
+
+
+CBaseCombatWeapon:GetSlot – Get the slot.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetSubType.md b/docs/classes/CBaseCombatWeapon/GetSubType.md
new file mode 100644
index 0000000000..4d1e66d541
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetSubType.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetSubType
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetSubType
+ realm: shared
+ description: "Get the sub type."
+
+
+ returns:
+ - type: integer
+ description: "Sub type."
+---
+
+
+CBaseCombatWeapon:GetSubType – Get the sub type.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetViewModel.md b/docs/classes/CBaseCombatWeapon/GetViewModel.md
new file mode 100644
index 0000000000..00c3de947c
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetViewModel.md
@@ -0,0 +1,27 @@
+---
+template: lua-class-function.html
+title: GetViewModel
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetViewModel
+ realm: shared
+ description: "Get the view model."
+
+ arguments:
+ - name: "index"
+ type: number
+ default: "0"
+ returns:
+ - type: string
+ description: "View model."
+---
+
+
+CBaseCombatWeapon:GetViewModel – Get the view model.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetViewModelSequenceDuration.md b/docs/classes/CBaseCombatWeapon/GetViewModelSequenceDuration.md
new file mode 100644
index 0000000000..6d6286fbed
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetViewModelSequenceDuration.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetViewModelSequenceDuration
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetViewModelSequenceDuration
+ realm: shared
+ description: "Get the view model sequence duration."
+
+
+ returns:
+ - type: number
+ description: "View model sequence duration."
+---
+
+
+CBaseCombatWeapon:GetViewModelSequenceDuration – Get the view model sequence duration.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetWeaponData.md b/docs/classes/CBaseCombatWeapon/GetWeaponData.md
new file mode 100644
index 0000000000..283dfde3c2
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetWeaponData.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetWeaponData
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetWeaponData
+ realm: shared
+ description: "Get weapon data"
+
+
+ returns:
+ - type: table
+ description: "Weapon data."
+---
+
+
+CBaseCombatWeapon:GetWeaponData – Get weapon data
+
diff --git a/docs/classes/CBaseCombatWeapon/GetWeaponFlags.md b/docs/classes/CBaseCombatWeapon/GetWeaponFlags.md
new file mode 100644
index 0000000000..71224443fa
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetWeaponFlags.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetWeaponFlags
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetWeaponFlags
+ realm: shared
+ description: "Get the weapon flags."
+
+
+ returns:
+ - type: integer
+ description: "Weapon flags."
+---
+
+
+CBaseCombatWeapon:GetWeaponFlags – Get the weapon flags.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetWeaponIdleTime.md b/docs/classes/CBaseCombatWeapon/GetWeaponIdleTime.md
new file mode 100644
index 0000000000..42226bc7f0
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetWeaponIdleTime.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetWeaponIdleTime
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetWeaponIdleTime
+ realm: shared
+ description: "Get the weapon idle time."
+
+
+ returns:
+ - type: number
+ description: "Weapon idle time."
+---
+
+
+CBaseCombatWeapon:GetWeaponIdleTime – Get the weapon idle time.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetWeight.md b/docs/classes/CBaseCombatWeapon/GetWeight.md
new file mode 100644
index 0000000000..ddabd8c87d
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetWeight.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetWeight
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetWeight
+ realm: shared
+ description: "Get the weight."
+
+
+ returns:
+ - type: integer
+ description: "Weight."
+---
+
+
+CBaseCombatWeapon:GetWeight – Get the weight.
+
diff --git a/docs/classes/CBaseCombatWeapon/GetWorldModel.md b/docs/classes/CBaseCombatWeapon/GetWorldModel.md
new file mode 100644
index 0000000000..bea3e983fd
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GetWorldModel.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: GetWorldModel
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GetWorldModel
+ realm: shared
+ description: "Get the world model."
+
+
+ returns:
+ - type: string
+ description: "World model."
+---
+
+
+CBaseCombatWeapon:GetWorldModel – Get the world model.
+
diff --git a/docs/classes/CBaseCombatWeapon/GiveDefaultAmmo.md b/docs/classes/CBaseCombatWeapon/GiveDefaultAmmo.md
new file mode 100644
index 0000000000..7b9428f941
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/GiveDefaultAmmo.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: GiveDefaultAmmo
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: GiveDefaultAmmo
+ realm: shared
+ description: "Give default ammo."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:GiveDefaultAmmo – Give default ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/HandleFireOnEmpty.md b/docs/classes/CBaseCombatWeapon/HandleFireOnEmpty.md
new file mode 100644
index 0000000000..2b55aa9e30
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/HandleFireOnEmpty.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: HandleFireOnEmpty
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: HandleFireOnEmpty
+ realm: shared
+ description: "Handle fire on empty."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:HandleFireOnEmpty – Handle fire on empty.
+
diff --git a/docs/classes/CBaseCombatWeapon/HasAmmo.md b/docs/classes/CBaseCombatWeapon/HasAmmo.md
new file mode 100644
index 0000000000..9093812392
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/HasAmmo.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: HasAmmo
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: HasAmmo
+ realm: shared
+ description: "Check if the weapon has ammo."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon has ammo."
+---
+
+
+CBaseCombatWeapon:HasAmmo – Check if the weapon has ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/HasAnyAmmo.md b/docs/classes/CBaseCombatWeapon/HasAnyAmmo.md
new file mode 100644
index 0000000000..66698486b1
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/HasAnyAmmo.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: HasAnyAmmo
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: HasAnyAmmo
+ realm: shared
+ description: "Check if the weapon has any ammo."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon has any ammo."
+---
+
+
+CBaseCombatWeapon:HasAnyAmmo – Check if the weapon has any ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/HasPrimaryAmmo.md b/docs/classes/CBaseCombatWeapon/HasPrimaryAmmo.md
new file mode 100644
index 0000000000..4f979c622e
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/HasPrimaryAmmo.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: HasPrimaryAmmo
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: HasPrimaryAmmo
+ realm: shared
+ description: "Check if the weapon has primary ammo."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon has primary ammo."
+---
+
+
+CBaseCombatWeapon:HasPrimaryAmmo – Check if the weapon has primary ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/HasSecondaryAmmo.md b/docs/classes/CBaseCombatWeapon/HasSecondaryAmmo.md
new file mode 100644
index 0000000000..c067c3d62b
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/HasSecondaryAmmo.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: HasSecondaryAmmo
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: HasSecondaryAmmo
+ realm: shared
+ description: "Check if the weapon has secondary ammo."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon has secondary ammo."
+---
+
+
+CBaseCombatWeapon:HasSecondaryAmmo – Check if the weapon has secondary ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/HasWeaponIdleTimeElapsed.md b/docs/classes/CBaseCombatWeapon/HasWeaponIdleTimeElapsed.md
new file mode 100644
index 0000000000..f89be055a0
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/HasWeaponIdleTimeElapsed.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: HasWeaponIdleTimeElapsed
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: HasWeaponIdleTimeElapsed
+ realm: shared
+ description: "Check if the weapon idle time has elapsed."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon idle time has elapsed."
+---
+
+
+CBaseCombatWeapon:HasWeaponIdleTimeElapsed – Check if the weapon idle time has elapsed.
+
diff --git a/docs/classes/CBaseCombatWeapon/HideThink.md b/docs/classes/CBaseCombatWeapon/HideThink.md
new file mode 100644
index 0000000000..c3fc110ca5
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/HideThink.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: HideThink
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: HideThink
+ realm: shared
+ description: "Hide think."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:HideThink – Hide think.
+
diff --git a/docs/classes/CBaseCombatWeapon/IsAllowedToSwitch.md b/docs/classes/CBaseCombatWeapon/IsAllowedToSwitch.md
new file mode 100644
index 0000000000..f736caa7bc
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/IsAllowedToSwitch.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: IsAllowedToSwitch
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: IsAllowedToSwitch
+ realm: shared
+ description: "Check if the weapon is allowed to switch."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon is allowed to switch."
+---
+
+
+CBaseCombatWeapon:IsAllowedToSwitch – Check if the weapon is allowed to switch.
+
diff --git a/docs/classes/CBaseCombatWeapon/IsLocked.md b/docs/classes/CBaseCombatWeapon/IsLocked.md
new file mode 100644
index 0000000000..66fb6228b9
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/IsLocked.md
@@ -0,0 +1,26 @@
+---
+template: lua-class-function.html
+title: IsLocked
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: IsLocked
+ realm: shared
+ description: "Check if the weapon is locked."
+
+ arguments:
+ - name: "asker"
+ type: Entity
+ returns:
+ - type: boolean
+ description: "Whether the weapon is locked."
+---
+
+
+CBaseCombatWeapon:IsLocked – Check if the weapon is locked.
+
diff --git a/docs/classes/CBaseCombatWeapon/IsMeleeWeapon.md b/docs/classes/CBaseCombatWeapon/IsMeleeWeapon.md
new file mode 100644
index 0000000000..d56ac71656
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/IsMeleeWeapon.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: IsMeleeWeapon
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: IsMeleeWeapon
+ realm: shared
+ description: "Check if the weapon is a melee weapon."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon is a melee weapon."
+---
+
+
+CBaseCombatWeapon:IsMeleeWeapon – Check if the weapon is a melee weapon.
+
diff --git a/docs/classes/CBaseCombatWeapon/IsPredicted.md b/docs/classes/CBaseCombatWeapon/IsPredicted.md
new file mode 100644
index 0000000000..6280e0bf25
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/IsPredicted.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: IsPredicted
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: IsPredicted
+ realm: shared
+ description: "Check if the weapon is predicted."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon is predicted."
+---
+
+
+CBaseCombatWeapon:IsPredicted – Check if the weapon is predicted.
+
diff --git a/docs/classes/CBaseCombatWeapon/IsScripted.md b/docs/classes/CBaseCombatWeapon/IsScripted.md
new file mode 100644
index 0000000000..ba0f249cea
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/IsScripted.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: IsScripted
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: IsScripted
+ realm: shared
+ description: "Check if the weapon is scripted."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon is scripted."
+---
+
+
+CBaseCombatWeapon:IsScripted – Check if the weapon is scripted.
+
diff --git a/docs/classes/CBaseCombatWeapon/IsViewModelSequenceFinished.md b/docs/classes/CBaseCombatWeapon/IsViewModelSequenceFinished.md
new file mode 100644
index 0000000000..5c78941d34
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/IsViewModelSequenceFinished.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: IsViewModelSequenceFinished
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: IsViewModelSequenceFinished
+ realm: shared
+ description: "Check if the view model sequence is finished."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the view model sequence is finished."
+---
+
+
+CBaseCombatWeapon:IsViewModelSequenceFinished – Check if the view model sequence is finished.
+
diff --git a/docs/classes/CBaseCombatWeapon/IsWeaponVisible.md b/docs/classes/CBaseCombatWeapon/IsWeaponVisible.md
new file mode 100644
index 0000000000..5f236c2cd8
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/IsWeaponVisible.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: IsWeaponVisible
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: IsWeaponVisible
+ realm: shared
+ description: "Check if the weapon is visible."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon is visible."
+---
+
+
+CBaseCombatWeapon:IsWeaponVisible – Check if the weapon is visible.
+
diff --git a/docs/classes/CBaseCombatWeapon/IsWeaponZoomed.md b/docs/classes/CBaseCombatWeapon/IsWeaponZoomed.md
new file mode 100644
index 0000000000..b1b93145e4
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/IsWeaponZoomed.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: IsWeaponZoomed
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: IsWeaponZoomed
+ realm: shared
+ description: "Check if the weapon is zoomed."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon is zoomed."
+---
+
+
+CBaseCombatWeapon:IsWeaponZoomed – Check if the weapon is zoomed.
+
diff --git a/docs/classes/CBaseCombatWeapon/ItemBusyFrame.md b/docs/classes/CBaseCombatWeapon/ItemBusyFrame.md
new file mode 100644
index 0000000000..e871e7206d
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ItemBusyFrame.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: ItemBusyFrame
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ItemBusyFrame
+ realm: shared
+ description: "Item busy frame."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:ItemBusyFrame – Item busy frame.
+
diff --git a/docs/classes/CBaseCombatWeapon/ItemHolsterFrame.md b/docs/classes/CBaseCombatWeapon/ItemHolsterFrame.md
new file mode 100644
index 0000000000..e2a7d2c182
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ItemHolsterFrame.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: ItemHolsterFrame
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ItemHolsterFrame
+ realm: shared
+ description: "Item holster frame."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:ItemHolsterFrame – Item holster frame.
+
diff --git a/docs/classes/CBaseCombatWeapon/ItemPostFrame.md b/docs/classes/CBaseCombatWeapon/ItemPostFrame.md
new file mode 100644
index 0000000000..af31c82d9f
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ItemPostFrame.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: ItemPostFrame
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ItemPostFrame
+ realm: shared
+ description: "Item post frame."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:ItemPostFrame – Item post frame.
+
diff --git a/docs/classes/CBaseCombatWeapon/ItemPreFrame.md b/docs/classes/CBaseCombatWeapon/ItemPreFrame.md
new file mode 100644
index 0000000000..759cae1c63
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ItemPreFrame.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: ItemPreFrame
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ItemPreFrame
+ realm: shared
+ description: "Item pre frame."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:ItemPreFrame – Item pre frame.
+
diff --git a/docs/classes/CBaseCombatWeapon/Lock.md b/docs/classes/CBaseCombatWeapon/Lock.md
new file mode 100644
index 0000000000..73f417c6c3
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/Lock.md
@@ -0,0 +1,27 @@
+---
+template: lua-class-function.html
+title: Lock
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: Lock
+ realm: shared
+ description: "Lock the weapon."
+
+ arguments:
+ - name: "lockTime"
+ type: number
+ - name: "locker"
+ type: Entity
+ returns:
+
+---
+
+
+CBaseCombatWeapon:Lock – Lock the weapon.
+
diff --git a/docs/classes/CBaseCombatWeapon/Lower.md b/docs/classes/CBaseCombatWeapon/Lower.md
new file mode 100644
index 0000000000..2aeac115c2
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/Lower.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: Lower
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: Lower
+ realm: shared
+ description: "Lower the weapon."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon was lowered."
+---
+
+
+CBaseCombatWeapon:Lower – Lower the weapon.
+
diff --git a/docs/classes/CBaseCombatWeapon/MaintainIdealActivity.md b/docs/classes/CBaseCombatWeapon/MaintainIdealActivity.md
new file mode 100644
index 0000000000..5e98875f69
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/MaintainIdealActivity.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: MaintainIdealActivity
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: MaintainIdealActivity
+ realm: shared
+ description: "Maintain ideal activity."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:MaintainIdealActivity – Maintain ideal activity.
+
diff --git a/docs/classes/CBaseCombatWeapon/OnActiveStateChanged.md b/docs/classes/CBaseCombatWeapon/OnActiveStateChanged.md
new file mode 100644
index 0000000000..9bfed71338
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/OnActiveStateChanged.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: OnActiveStateChanged
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: OnActiveStateChanged
+ realm: shared
+ description: "On active state changed."
+
+ arguments:
+ - name: "oldState"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:OnActiveStateChanged – On active state changed.
+
diff --git a/docs/classes/CBaseCombatWeapon/PrimaryAttack.md b/docs/classes/CBaseCombatWeapon/PrimaryAttack.md
new file mode 100644
index 0000000000..ef04757911
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/PrimaryAttack.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: PrimaryAttack
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: PrimaryAttack
+ realm: shared
+ description: "Primary attack."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:PrimaryAttack – Primary attack.
+
diff --git a/docs/classes/CBaseCombatWeapon/Ready.md b/docs/classes/CBaseCombatWeapon/Ready.md
new file mode 100644
index 0000000000..e9297871e6
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/Ready.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: Ready
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: Ready
+ realm: shared
+ description: "Ready."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon is ready."
+---
+
+
+CBaseCombatWeapon:Ready – Ready.
+
diff --git a/docs/classes/CBaseCombatWeapon/Reload.md b/docs/classes/CBaseCombatWeapon/Reload.md
new file mode 100644
index 0000000000..fc73e69c0d
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/Reload.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: Reload
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: Reload
+ realm: shared
+ description: "Reload."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:Reload – Reload.
+
diff --git a/docs/classes/CBaseCombatWeapon/ReloadOrSwitchWeapons.md b/docs/classes/CBaseCombatWeapon/ReloadOrSwitchWeapons.md
new file mode 100644
index 0000000000..1fe36578ca
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ReloadOrSwitchWeapons.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: ReloadOrSwitchWeapons
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ReloadOrSwitchWeapons
+ realm: shared
+ description: "Reload or switch weapons."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:ReloadOrSwitchWeapons – Reload or switch weapons.
+
diff --git a/docs/classes/CBaseCombatWeapon/RescindAltFireHudHint.md b/docs/classes/CBaseCombatWeapon/RescindAltFireHudHint.md
new file mode 100644
index 0000000000..e82d4f6822
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/RescindAltFireHudHint.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: RescindAltFireHudHint
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: RescindAltFireHudHint
+ realm: shared
+ description: "Rescind alt fire HUD hint."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:RescindAltFireHudHint – Rescind alt fire HUD hint.
+
diff --git a/docs/classes/CBaseCombatWeapon/RescindReloadHudHint.md b/docs/classes/CBaseCombatWeapon/RescindReloadHudHint.md
new file mode 100644
index 0000000000..5e1fe229cc
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/RescindReloadHudHint.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: RescindReloadHudHint
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: RescindReloadHudHint
+ realm: shared
+ description: "Rescind reload HUD hint."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:RescindReloadHudHint – Rescind reload HUD hint.
+
diff --git a/docs/classes/CBaseCombatWeapon/SecondaryAttack.md b/docs/classes/CBaseCombatWeapon/SecondaryAttack.md
new file mode 100644
index 0000000000..bbf910a7dd
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SecondaryAttack.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: SecondaryAttack
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SecondaryAttack
+ realm: shared
+ description: "Secondary attack."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SecondaryAttack – Secondary attack.
+
diff --git a/docs/classes/CBaseCombatWeapon/SendViewModelAnim.md b/docs/classes/CBaseCombatWeapon/SendViewModelAnim.md
new file mode 100644
index 0000000000..d6c0af0df4
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SendViewModelAnim.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SendViewModelAnim
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SendViewModelAnim
+ realm: shared
+ description: "Send view model animation."
+
+ arguments:
+ - name: "sequence"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SendViewModelAnim – Send view model animation.
+
diff --git a/docs/classes/CBaseCombatWeapon/SendWeaponAnim.md b/docs/classes/CBaseCombatWeapon/SendWeaponAnim.md
new file mode 100644
index 0000000000..f3d203cf8b
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SendWeaponAnim.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SendWeaponAnim
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SendWeaponAnim
+ realm: shared
+ description: "Send weapon animation."
+
+ arguments:
+ - name: "activity"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SendWeaponAnim – Send weapon animation.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetActivity.md b/docs/classes/CBaseCombatWeapon/SetActivity.md
new file mode 100644
index 0000000000..8e69c3e3de
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetActivity.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SetActivity
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetActivity
+ realm: shared
+ description: "Set activity."
+
+ arguments:
+ - name: "activity"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetActivity – Set activity.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetIdealActivity.md b/docs/classes/CBaseCombatWeapon/SetIdealActivity.md
new file mode 100644
index 0000000000..5e40f9d227
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetIdealActivity.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SetIdealActivity
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetIdealActivity
+ realm: shared
+ description: "Set ideal activity."
+
+ arguments:
+ - name: "activity"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetIdealActivity – Set ideal activity.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetPickupTouch.md b/docs/classes/CBaseCombatWeapon/SetPickupTouch.md
new file mode 100644
index 0000000000..905d5a5fa0
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetPickupTouch.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: SetPickupTouch
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetPickupTouch
+ realm: shared
+ description: "Set pickup touch."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetPickupTouch – Set pickup touch.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetPrimaryAmmoCount.md b/docs/classes/CBaseCombatWeapon/SetPrimaryAmmoCount.md
new file mode 100644
index 0000000000..08dba7c9a9
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetPrimaryAmmoCount.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SetPrimaryAmmoCount
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetPrimaryAmmoCount
+ realm: shared
+ description: "Set primary ammo count."
+
+ arguments:
+ - name: "count"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetPrimaryAmmoCount – Set primary ammo count.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetSecondaryAmmoCount.md b/docs/classes/CBaseCombatWeapon/SetSecondaryAmmoCount.md
new file mode 100644
index 0000000000..4a14122cb1
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetSecondaryAmmoCount.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SetSecondaryAmmoCount
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetSecondaryAmmoCount
+ realm: shared
+ description: "Set secondary ammo count."
+
+ arguments:
+ - name: "count"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetSecondaryAmmoCount – Set secondary ammo count.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetSubType.md b/docs/classes/CBaseCombatWeapon/SetSubType.md
new file mode 100644
index 0000000000..a12596cc72
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetSubType.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SetSubType
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetSubType
+ realm: shared
+ description: "Set sub type."
+
+ arguments:
+ - name: "subType"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetSubType – Set sub type.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetViewModel.md b/docs/classes/CBaseCombatWeapon/SetViewModel.md
new file mode 100644
index 0000000000..3edfb32b15
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetViewModel.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: SetViewModel
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetViewModel
+ realm: shared
+ description: "Set view model."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetViewModel – Set view model.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetViewModelIndex.md b/docs/classes/CBaseCombatWeapon/SetViewModelIndex.md
new file mode 100644
index 0000000000..890d11b2df
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetViewModelIndex.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SetViewModelIndex
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetViewModelIndex
+ realm: shared
+ description: "Set view model index."
+
+ arguments:
+ - name: "index"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetViewModelIndex – Set view model index.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetWeaponIdleTime.md b/docs/classes/CBaseCombatWeapon/SetWeaponIdleTime.md
new file mode 100644
index 0000000000..1b5c1d81a4
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetWeaponIdleTime.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SetWeaponIdleTime
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetWeaponIdleTime
+ realm: shared
+ description: "Set weapon idle time."
+
+ arguments:
+ - name: "time"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetWeaponIdleTime – Set weapon idle time.
+
diff --git a/docs/classes/CBaseCombatWeapon/SetWeaponVisible.md b/docs/classes/CBaseCombatWeapon/SetWeaponVisible.md
new file mode 100644
index 0000000000..34f8720447
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/SetWeaponVisible.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: SetWeaponVisible
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: SetWeaponVisible
+ realm: shared
+ description: "Set weapon visible."
+
+ arguments:
+ - name: "visible"
+ type: boolean
+ returns:
+
+---
+
+
+CBaseCombatWeapon:SetWeaponVisible – Set weapon visible.
+
diff --git a/docs/classes/CBaseCombatWeapon/ShouldDisplayAltFireHUDHint.md b/docs/classes/CBaseCombatWeapon/ShouldDisplayAltFireHUDHint.md
new file mode 100644
index 0000000000..49e43479b2
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ShouldDisplayAltFireHUDHint.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: ShouldDisplayAltFireHUDHint
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ShouldDisplayAltFireHUDHint
+ realm: shared
+ description: "Should display alt fire HUD hint."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the alt fire HUD hint should be displayed."
+---
+
+
+CBaseCombatWeapon:ShouldDisplayAltFireHUDHint – Should display alt fire HUD hint.
+
diff --git a/docs/classes/CBaseCombatWeapon/ShouldDisplayReloadHUDHint.md b/docs/classes/CBaseCombatWeapon/ShouldDisplayReloadHUDHint.md
new file mode 100644
index 0000000000..578644b230
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ShouldDisplayReloadHUDHint.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: ShouldDisplayReloadHUDHint
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ShouldDisplayReloadHUDHint
+ realm: shared
+ description: "Should display reload HUD hint."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the reload HUD hint should be displayed."
+---
+
+
+CBaseCombatWeapon:ShouldDisplayReloadHUDHint – Should display reload HUD hint.
+
diff --git a/docs/classes/CBaseCombatWeapon/ShouldShowControlPanels.md b/docs/classes/CBaseCombatWeapon/ShouldShowControlPanels.md
new file mode 100644
index 0000000000..c44010a80a
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/ShouldShowControlPanels.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: ShouldShowControlPanels
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: ShouldShowControlPanels
+ realm: shared
+ description: "Should show control panels."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the control panels should be shown."
+---
+
+
+CBaseCombatWeapon:ShouldShowControlPanels – Should show control panels.
+
diff --git a/docs/classes/CBaseCombatWeapon/StartSprinting.md b/docs/classes/CBaseCombatWeapon/StartSprinting.md
new file mode 100644
index 0000000000..3e64c82d84
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/StartSprinting.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: StartSprinting
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: StartSprinting
+ realm: shared
+ description: "Start sprinting."
+
+
+ returns:
+ - type: boolean
+ description: "Whether sprinting was started."
+---
+
+
+CBaseCombatWeapon:StartSprinting – Start sprinting.
+
diff --git a/docs/classes/CBaseCombatWeapon/StopSprinting.md b/docs/classes/CBaseCombatWeapon/StopSprinting.md
new file mode 100644
index 0000000000..3ea8c4d31a
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/StopSprinting.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: StopSprinting
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: StopSprinting
+ realm: shared
+ description: "Stop sprinting."
+
+
+ returns:
+ - type: boolean
+ description: "Whether sprinting was stopped."
+---
+
+
+CBaseCombatWeapon:StopSprinting – Stop sprinting.
+
diff --git a/docs/classes/CBaseCombatWeapon/StopWeaponSound.md b/docs/classes/CBaseCombatWeapon/StopWeaponSound.md
new file mode 100644
index 0000000000..dbcfddf4ee
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/StopWeaponSound.md
@@ -0,0 +1,25 @@
+---
+template: lua-class-function.html
+title: StopWeaponSound
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: StopWeaponSound
+ realm: shared
+ description: "Stop weapon sound."
+
+ arguments:
+ - name: "soundType"
+ type: number
+ returns:
+
+---
+
+
+CBaseCombatWeapon:StopWeaponSound – Stop weapon sound.
+
diff --git a/docs/classes/CBaseCombatWeapon/UsesClipsForAmmo1.md b/docs/classes/CBaseCombatWeapon/UsesClipsForAmmo1.md
new file mode 100644
index 0000000000..fd313f307c
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/UsesClipsForAmmo1.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: UsesClipsForAmmo1
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: UsesClipsForAmmo1
+ realm: shared
+ description: "Uses clips for ammo 1."
+
+
+ returns:
+ - type: boolean
+ description: "Whether clips are used for ammo 1."
+---
+
+
+CBaseCombatWeapon:UsesClipsForAmmo1 – Uses clips for ammo 1.
+
diff --git a/docs/classes/CBaseCombatWeapon/UsesClipsForAmmo2.md b/docs/classes/CBaseCombatWeapon/UsesClipsForAmmo2.md
new file mode 100644
index 0000000000..8cb440b928
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/UsesClipsForAmmo2.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: UsesClipsForAmmo2
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: UsesClipsForAmmo2
+ realm: shared
+ description: "Uses clips for ammo 2."
+
+
+ returns:
+ - type: boolean
+ description: "Whether clips are used for ammo 2."
+---
+
+
+CBaseCombatWeapon:UsesClipsForAmmo2 – Uses clips for ammo 2.
+
diff --git a/docs/classes/CBaseCombatWeapon/UsesPrimaryAmmo.md b/docs/classes/CBaseCombatWeapon/UsesPrimaryAmmo.md
new file mode 100644
index 0000000000..fb42b9b257
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/UsesPrimaryAmmo.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: UsesPrimaryAmmo
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: UsesPrimaryAmmo
+ realm: shared
+ description: "Uses primary ammo."
+
+
+ returns:
+ - type: boolean
+ description: "Whether primary ammo is used."
+---
+
+
+CBaseCombatWeapon:UsesPrimaryAmmo – Uses primary ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/UsesSecondaryAmmo.md b/docs/classes/CBaseCombatWeapon/UsesSecondaryAmmo.md
new file mode 100644
index 0000000000..c0557485e8
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/UsesSecondaryAmmo.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: UsesSecondaryAmmo
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: UsesSecondaryAmmo
+ realm: shared
+ description: "Uses secondary ammo."
+
+
+ returns:
+ - type: boolean
+ description: "Whether secondary ammo is used."
+---
+
+
+CBaseCombatWeapon:UsesSecondaryAmmo – Uses secondary ammo.
+
diff --git a/docs/classes/CBaseCombatWeapon/VisibleInWeaponSelection.md b/docs/classes/CBaseCombatWeapon/VisibleInWeaponSelection.md
new file mode 100644
index 0000000000..eca22399e5
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/VisibleInWeaponSelection.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: VisibleInWeaponSelection
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: VisibleInWeaponSelection
+ realm: shared
+ description: "Visible in weapon selection."
+
+
+ returns:
+ - type: boolean
+ description: "Whether the weapon is visible in weapon selection."
+---
+
+
+CBaseCombatWeapon:VisibleInWeaponSelection – Visible in weapon selection.
+
diff --git a/docs/classes/CBaseCombatWeapon/WeaponAutoAimScale.md b/docs/classes/CBaseCombatWeapon/WeaponAutoAimScale.md
new file mode 100644
index 0000000000..d20f920e56
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/WeaponAutoAimScale.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: WeaponAutoAimScale
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: WeaponAutoAimScale
+ realm: shared
+ description: "Weapon auto aim scale."
+
+
+ returns:
+ - type: number
+ description: "Weapon auto aim scale."
+---
+
+
+CBaseCombatWeapon:WeaponAutoAimScale – Weapon auto aim scale.
+
diff --git a/docs/classes/CBaseCombatWeapon/WeaponIdle.md b/docs/classes/CBaseCombatWeapon/WeaponIdle.md
new file mode 100644
index 0000000000..1a39ca204d
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/WeaponIdle.md
@@ -0,0 +1,23 @@
+---
+template: lua-class-function.html
+title: WeaponIdle
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: WeaponIdle
+ realm: shared
+ description: "Weapon idle."
+
+
+ returns:
+
+---
+
+
+CBaseCombatWeapon:WeaponIdle – Weapon idle.
+
diff --git a/docs/classes/CBaseCombatWeapon/WeaponSound.md b/docs/classes/CBaseCombatWeapon/WeaponSound.md
new file mode 100644
index 0000000000..74c9f3f92d
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/WeaponSound.md
@@ -0,0 +1,28 @@
+---
+template: lua-class-function.html
+title: WeaponSound
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: WeaponSound
+ realm: shared
+ description: "Weapon sound."
+
+ arguments:
+ - name: "soundType"
+ type: number
+ - name: "soundTime"
+ type: number
+ default: "0.0f"
+ returns:
+
+---
+
+
+CBaseCombatWeapon:WeaponSound – Weapon sound.
+
diff --git a/docs/classes/CBaseCombatWeapon/WeaponState.md b/docs/classes/CBaseCombatWeapon/WeaponState.md
new file mode 100644
index 0000000000..b0bdee3911
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/WeaponState.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: WeaponState
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: WeaponState
+ realm: shared
+ description: "Weapon state."
+
+
+ returns:
+ - type: number
+ description: "Weapon state."
+---
+
+
+CBaseCombatWeapon:WeaponState – Weapon state.
+
diff --git a/docs/classes/CBaseCombatWeapon/__eq.md b/docs/classes/CBaseCombatWeapon/__eq.md
new file mode 100644
index 0000000000..a4651015e6
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/__eq.md
@@ -0,0 +1,26 @@
+---
+template: lua-class-function.html
+title: __eq
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: __eq
+ realm: shared
+ description: "Equality comparison."
+
+ arguments:
+ - name: "otherEntity"
+ type: unknown
+ returns:
+ - type: boolean
+ description: "Whether the two entities are equal."
+---
+
+
+CBaseCombatWeapon:__eq – Equality comparison.
+
diff --git a/docs/classes/CBaseCombatWeapon/__tostring.md b/docs/classes/CBaseCombatWeapon/__tostring.md
new file mode 100644
index 0000000000..ed426879c6
--- /dev/null
+++ b/docs/classes/CBaseCombatWeapon/__tostring.md
@@ -0,0 +1,24 @@
+---
+template: lua-class-function.html
+title: __tostring
+icon: lua-shared
+tags:
+ - lua
+ - shared
+ - needs-verification
+ - needs-example
+lua:
+ library: CBaseCombatWeapon
+ function: __tostring
+ realm: shared
+ description: "String representation."
+
+
+ returns:
+ - type: string
+ description: "String representation."
+---
+
+
+CBaseCombatWeapon:__tostring – String representation.
+
diff --git a/game/experiment/addons/gmod_compatibility/scripts/lua/includes/modules/gmod_compatibility/sh_init.lua b/game/experiment/addons/gmod_compatibility/scripts/lua/includes/modules/gmod_compatibility/sh_init.lua
index 2920e7c0b7..71bcf4df07 100644
--- a/game/experiment/addons/gmod_compatibility/scripts/lua/includes/modules/gmod_compatibility/sh_init.lua
+++ b/game/experiment/addons/gmod_compatibility/scripts/lua/includes/modules/gmod_compatibility/sh_init.lua
@@ -358,7 +358,6 @@ ENTITY_META.EyePos = ENTITY_META.GetEyePosition
ENTITY_META.EyeAngles = ENTITY_META.GetEyeAngles
ENTITY_META.GetModel = ENTITY_META.GetModelName
ENTITY_META.GetTable = ENTITY_META.GetRefTable
-ENTITY_META.GetClass = ENTITY_META.GetClassName
ENTITY_META.NearestPoint = ENTITY_META.CalculateNearestPoint
ENTITY_META.OBBCenter = ENTITY_META.GetOBBCenter
ENTITY_META.OBBMaxs = ENTITY_META.GetOBBMaxs
diff --git a/game/experiment/gamemodes/deathmatch/gamemode/init.lua b/game/experiment/gamemodes/deathmatch/gamemode/init.lua
index 970a1dc1b7..ec12414830 100644
--- a/game/experiment/gamemodes/deathmatch/gamemode/init.lua
+++ b/game/experiment/gamemodes/deathmatch/gamemode/init.lua
@@ -13,7 +13,7 @@ local PLAYER_SOUNDS_METROPOLICE = 2
function GM:CanHavePlayerItem(client, item)
if (ConsoleVariables.FindVar("mp_weaponstay"):GetInt() > 0) then
- if (client:Weapon_OwnsThisType(item:GetClassname(), item:GetSubType())) then
+ if (client:Weapon_OwnsThisType(item:GetClass(), item:GetSubType())) then
return false
end
end
diff --git a/src/game/client/lc_baseanimating.cpp b/src/game/client/lc_baseanimating.cpp
index 3573f46a1d..ba25364bc2 100644
--- a/src/game/client/lc_baseanimating.cpp
+++ b/src/game/client/lc_baseanimating.cpp
@@ -811,7 +811,7 @@ LUA_BINDING_END( "boolean", "Whether the entity uses a power of two frame buffer
LUALIB_API int luaopen_CBaseAnimating( lua_State *L )
{
LUA_PUSH_METATABLE_TO_EXTEND( L, LUA_BASEANIMATINGLIBNAME );
- //luaL_register( L, NULL, CBaseAnimatingmeta );
+
//lua_pushstring( L, "Entity" );
//lua_setfield( L, -2, "__type" ); /* metatable.__type = "Entity" */ // moved to lbaseanimating_shared
LUA_REGISTRATION_COMMIT( CBaseAnimating );
diff --git a/src/game/server/lbaseanimating.cpp b/src/game/server/lbaseanimating.cpp
index c7b912fb13..a9ae6e67b9 100644
--- a/src/game/server/lbaseanimating.cpp
+++ b/src/game/server/lbaseanimating.cpp
@@ -45,7 +45,6 @@ LUALIB_API int luaopen_CBaseAnimating( lua_State *L )
{
LUA_PUSH_METATABLE_TO_EXTEND( L, LUA_BASEANIMATINGLIBNAME );
- // luaL_register( L, NULL, CBaseAnimatingmeta );
// lua_pushstring( L, "Entity" );
// lua_setfield( L, -2, "__type" ); /* metatable.__type = "Entity" */ // moved to lbaseanimating_shared
LUA_REGISTRATION_COMMIT( CBaseAnimating );
diff --git a/src/game/shared/lbasecombatweapon_shared.cpp b/src/game/shared/lbasecombatweapon_shared.cpp
index fce95d74a0..56fea71d80 100644
--- a/src/game/shared/lbasecombatweapon_shared.cpp
+++ b/src/game/shared/lbasecombatweapon_shared.cpp
@@ -41,406 +41,547 @@ LUALIB_API lua_CBaseCombatWeapon *luaL_checkweapon( lua_State *L, int narg )
return d;
}
-static int CBaseCombatWeapon_AbortReload( lua_State *L )
-{
- luaL_checkweapon( L, 1 )->AbortReload();
- return 0;
-}
+LUA_REGISTRATION_INIT( CBaseCombatWeapon )
-static int CBaseCombatWeapon_Activate( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, AbortReload, "class", "Abort reload." )
{
- luaL_checkweapon( L, 1 )->Activate();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->AbortReload();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_ActivityListCount( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ActivityListCount, "class", "Activity list count." )
{
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
int iCount = 0;
- luaL_checkweapon( L, 1 )->ActivityList( iCount );
+ pWeapon->ActivityList( iCount );
lua_pushinteger( L, iCount );
return 1;
}
+LUA_BINDING_END( "integer", "Number of activities in the list." )
-static int CBaseCombatWeapon_ActivityOverride( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ActivityOverride, "class", "Asks which Activity override the weapon wants." )
{
- bool *pRequired = ( bool * )luaL_checkboolean( L, 3 );
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->ActivityOverride( ( Activity )( int )luaL_checknumber( L, 2 ), pRequired ) );
- return 1;
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iActivity = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "activity" );
+ bool bRequired = false;
+ lua_pushinteger( L, pWeapon->ActivityOverride( ( Activity )iActivity, &bRequired ) );
+ lua_pushboolean( L, bRequired );
+ return 2;
}
+LUA_BINDING_END( "integer", "Override activity ID.", "boolean", "Whether the activity is required." )
-static int CBaseCombatWeapon_AddViewKick( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, AddViewKick, "class", "Add view kick." )
{
- luaL_checkweapon( L, 1 )->AddViewKick();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->AddViewKick();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_AllowsAutoSwitchFrom( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, AllowsAutoSwitchFrom, "class", "Allows auto switch from." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->AllowsAutoSwitchFrom() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->AllowsAutoSwitchFrom() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon allows auto switch from." )
-static int CBaseCombatWeapon_AllowsAutoSwitchTo( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, AllowsAutoSwitchTo, "class", "Allows auto switch to." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->AllowsAutoSwitchTo() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->AllowsAutoSwitchTo() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon allows auto switch to." )
-static int CBaseCombatWeapon_CalcViewmodelBob( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, CalcViewmodelBob, "class", "Calculate viewmodel bob." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->CalcViewmodelBob() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->CalcViewmodelBob() );
return 1;
}
+LUA_BINDING_END( "number", "Viewmodel bob." )
-static int CBaseCombatWeapon_CanBePickedUpByNPCs( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, CanBePickedUpByNPCs, "class", "Can be picked up by NPCs." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->CanBePickedUpByNPCs() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->CanBePickedUpByNPCs() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon can be picked up by NPCs." )
-static int CBaseCombatWeapon_CanBeSelected( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, CanBeSelected, "class", "Can be selected." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->CanBeSelected() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->CanBeSelected() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon can be selected." )
-static int CBaseCombatWeapon_CanDeploy( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, CanDeploy, "class", "Can deploy." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->CanDeploy() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->CanDeploy() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon can deploy." )
-static int CBaseCombatWeapon_CanHolster( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, CanHolster, "class", "Can holster." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->CanHolster() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->CanHolster() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon can holster." )
-static int CBaseCombatWeapon_CanLower( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, CanLower, "class", "Can lower." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->CanLower() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->CanLower() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon can lower." )
-static int CBaseCombatWeapon_CheckReload( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, CheckReload, "class", "Check reload." )
{
- luaL_checkweapon( L, 1 )->CheckReload();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->CheckReload();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_Clip1( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, Clip1, "class", "The amount of ammo in the primary clip." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->Clip1() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->Clip1() );
return 1;
}
+LUA_BINDING_END( "integer", "The amount of ammo in the primary clip." )
-static int CBaseCombatWeapon_Clip2( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, Clip2, "class", "The amount of ammo in the secondary clip." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->Clip2() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->Clip2() );
return 1;
}
+LUA_BINDING_END( "integer", "The amount of ammo in the secondary clip." )
-static int CBaseCombatWeapon_DefaultDeploy( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, DefaultDeploy, "class", "Default deploy." )
{
- lua_pushboolean(
- L, luaL_checkweapon( L, 1 )->DefaultDeploy( ( char * )luaL_checkstring( L, 2 ), ( char * )luaL_checkstring( L, 3 ), luaL_checknumber( L, 4 ), ( char * )luaL_checkstring( L, 5 ) ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ const char *pszViewModel = LUA_BINDING_ARGUMENT( luaL_checkstring, 2, "viewModel" );
+ const char *pszWorldModel = LUA_BINDING_ARGUMENT( luaL_checkstring, 3, "worldModel" );
+ int iActivity = LUA_BINDING_ARGUMENT( luaL_checknumber, 4, "activity" );
+ const char *pszAnimExtension = LUA_BINDING_ARGUMENT( luaL_checkstring, 5, "animationExtension" );
+ lua_pushboolean( L, pWeapon->DefaultDeploy( strdup( pszViewModel ), strdup( pszWorldModel ), iActivity, strdup( pszAnimExtension ) ) );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon was successfully deployed." )
-static int CBaseCombatWeapon_DefaultReload( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, DefaultReload, "class", "Default reload." )
{
- lua_pushboolean(
- L, luaL_checkweapon( L, 1 )->DefaultReload( luaL_checknumber( L, 2 ), luaL_checknumber( L, 3 ), luaL_checknumber( L, 4 ) ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iClipSize1 = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "clipSize1" );
+ int iClipSize2 = LUA_BINDING_ARGUMENT( luaL_checknumber, 3, "clipSize2" );
+ int iActivity = LUA_BINDING_ARGUMENT( luaL_checknumber, 4, "activity" );
+ lua_pushboolean( L, pWeapon->DefaultReload( iClipSize1, iClipSize2, iActivity ) );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon was successfully reloaded." )
-static int CBaseCombatWeapon_DefaultTouch( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, DefaultTouch, "class", "Default touch." )
{
- luaL_checkweapon( L, 1 )->DefaultTouch( luaL_checkentity( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_CBaseEntity *pOther = LUA_BINDING_ARGUMENT( luaL_checkentity, 2, "touchingEntity" );
+ pWeapon->DefaultTouch( pOther );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_Deploy( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, Deploy, "class", "Deploy." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->Deploy() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->Deploy() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon was successfully deployed." )
-static int CBaseCombatWeapon_DisplayAltFireHudHint( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, DisplayAltFireHudHint, "class", "Display alt fire HUD hint." )
{
- luaL_checkweapon( L, 1 )->DisplayAltFireHudHint();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->DisplayAltFireHudHint();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_DisplayReloadHudHint( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, DisplayReloadHudHint, "class", "Display reload HUD hint." )
{
- luaL_checkweapon( L, 1 )->DisplayReloadHudHint();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->DisplayReloadHudHint();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_Drop( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, Drop, "class", "Drop." )
{
- luaL_checkweapon( L, 1 )->Drop( luaL_checkvector( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ Vector vecThrowVelocity;
+
+ if ( lua_isvector( L, 2 ) )
+ vecThrowVelocity = LUA_BINDING_ARGUMENT_NILLABLE( luaL_checkvector, 2, "velocity" );
+ else
+ vecThrowVelocity = vec3_origin;
+
+ pWeapon->Drop( vecThrowVelocity );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_FinishReload( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, FinishReload, "class", "Finish reload." )
{
- luaL_checkweapon( L, 1 )->FinishReload();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->FinishReload();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_GetActivity( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetActivity, "class", "Get activity." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetActivity() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetActivity() );
return 1;
}
+LUA_BINDING_END( "integer", "Activity ID." )
-static int CBaseCombatWeapon_GetAnimPrefix( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetAnimPrefix, "class", "Get animation prefix." )
{
- lua_pushstring( L, luaL_checkweapon( L, 1 )->GetAnimPrefix() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushstring( L, pWeapon->GetAnimPrefix() );
return 1;
}
+LUA_BINDING_END( "string", "Animation prefix." )
-static int CBaseCombatWeapon_GetBulletType( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetBulletType, "class", "Get bullet type." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetBulletType() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetBulletType() );
return 1;
}
+LUA_BINDING_END( "integer", "Bullet type." )
-static int CBaseCombatWeapon_GetDamage( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetDamage, "class", "Get damage." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->GetDamage( luaL_checknumber( L, 2 ), luaL_checknumber( L, 3 ) ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ float flDamage = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "damage" );
+ int iLocation = LUA_BINDING_ARGUMENT( luaL_checknumber, 3, "location" );
+ lua_pushnumber( L, pWeapon->GetDamage( flDamage, iLocation ) );
return 1;
}
+LUA_BINDING_END( "number", "Damage." )
-static int CBaseCombatWeapon_GetDeathNoticeName( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetDeathNoticeName, "class", "Get death notice name." )
{
- lua_pushstring( L, luaL_checkweapon( L, 1 )->GetDeathNoticeName() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushstring( L, pWeapon->GetDeathNoticeName() );
return 1;
}
+LUA_BINDING_END( "string", "Death notice name." )
-static int CBaseCombatWeapon_GetDefaultAnimSpeed( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetDefaultAnimSpeed, "class", "Get default animation speed." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->GetDefaultAnimSpeed() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->GetDefaultAnimSpeed() );
return 1;
}
+LUA_BINDING_END( "number", "Default animation speed." )
-static int CBaseCombatWeapon_GetDefaultClip1( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetDefaultClip1, "class", "Get default clip 1." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetDefaultClip1() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetDefaultClip1() );
return 1;
}
+LUA_BINDING_END( "integer", "Default clip 1." )
-static int CBaseCombatWeapon_GetDefaultClip2( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetDefaultClip2, "class", "Get default clip 2." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetDefaultClip2() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetDefaultClip2() );
return 1;
}
+LUA_BINDING_END( "integer", "Default clip 2." )
-static int CBaseCombatWeapon_GetDrawActivity( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetDrawActivity, "class", "Get draw activity." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetDrawActivity() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetDrawActivity() );
return 1;
}
+LUA_BINDING_END( "integer", "Draw activity ID." )
-static int CBaseCombatWeapon_GetFireRate( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetFireRate, "class", "Get fire rate." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->GetFireRate() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->GetFireRate() );
return 1;
}
+LUA_BINDING_END( "number", "Fire rate." )
-static int CBaseCombatWeapon_GetIdealActivity( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetIdealActivity, "class", "Get ideal activity." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetIdealActivity() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetIdealActivity() );
return 1;
}
+LUA_BINDING_END( "integer", "Ideal activity ID." )
-static int CBaseCombatWeapon_GetIdealSequence( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetIdealSequence, "class", "Get ideal sequence." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetIdealSequence() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetIdealSequence() );
return 1;
}
+LUA_BINDING_END( "integer", "Ideal sequence ID." )
-static int CBaseCombatWeapon_GetMaxAutoAimDeflection( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetMaxAutoAimDeflection, "class", "Get max auto aim deflection." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->GetMaxAutoAimDeflection() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->GetMaxAutoAimDeflection() );
return 1;
}
+LUA_BINDING_END( "number", "Max auto aim deflection." )
-static int CBaseCombatWeapon_GetMaxBurst( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetMaxBurst, "class", "Get max burst." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetMaxBurst() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetMaxBurst() );
return 1;
}
+LUA_BINDING_END( "integer", "Max burst." )
-static int CBaseCombatWeapon_GetMaxClip1( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetMaxClip1, "class", "Get max clip 1." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetMaxClip1() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetMaxClip1() );
return 1;
}
+LUA_BINDING_END( "integer", "Max clip 1." )
-static int CBaseCombatWeapon_GetMaxClip2( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetMaxClip2, "class", "Get max clip 2." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetMaxClip2() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetMaxClip2() );
return 1;
}
+LUA_BINDING_END( "integer", "Max clip 2." )
-static int CBaseCombatWeapon_GetMaxRestTime( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetMaxRestTime, "class", "Get max rest time." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->GetMaxRestTime() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->GetMaxRestTime() );
return 1;
}
+LUA_BINDING_END( "number", "Max rest time." )
-static int CBaseCombatWeapon_GetMinBurst( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetMinBurst, "class", "Get min burst." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetMinBurst() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetMinBurst() );
return 1;
}
+LUA_BINDING_END( "integer", "Min burst." )
-static int CBaseCombatWeapon_GetMinRestTime( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetMinRestTime, "class", "Get min rest time." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->GetMinRestTime() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->GetMinRestTime() );
return 1;
}
+LUA_BINDING_END( "number", "Min rest time." )
-static int CBaseCombatWeapon_GetName( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetClassName, "class", "Get class name." )
{
- lua_pushstring( L, luaL_checkweapon( L, 1 )->GetName() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushstring( L, pWeapon->GetName() );
return 1;
}
+LUA_BINDING_END( "string", "Class name." )
-// FIXME: push CBaseCombatCharacter instead
-static int CBaseCombatWeapon_GetOwner( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetOwner, "class", "Get owner." )
{
- CBaseEntity::PushLuaInstanceSafe( L, ( CBasePlayer * )luaL_checkweapon( L, 1 )->GetOwner() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ CBaseEntity::PushLuaInstanceSafe( L, ( CBasePlayer * )pWeapon->GetOwner() );
return 1;
}
+LUA_BINDING_END( "entity", "Owner entity." )
-static int CBaseCombatWeapon_GetPosition( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetPosition, "class", "Get the weapon position in the selection screen." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetPosition() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetPosition() );
return 1;
}
+LUA_BINDING_END( "integer", "Position in the selection screen." )
-static int CBaseCombatWeapon_GetPrimaryAmmoCount( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetPrimaryAmmoCount, "class", "Get the amount of primary ammo." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetPrimaryAmmoCount() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetPrimaryAmmoCount() );
return 1;
}
+LUA_BINDING_END( "integer", "Amount of primary ammo." )
-static int CBaseCombatWeapon_GetPrimaryAmmoType( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetPrimaryAmmoType, "class", "Get the primary ammo type." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetPrimaryAmmoType() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetPrimaryAmmoType() );
return 1;
}
+LUA_BINDING_END( "integer", "Primary ammo type." )
-static int CBaseCombatWeapon_GetPrimaryAttackActivity( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetPrimaryAttackActivity, "class", "Get the primary attack activity." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetPrimaryAttackActivity() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetPrimaryAttackActivity() );
return 1;
}
+LUA_BINDING_END( "integer", "Primary attack activity ID." )
-static int CBaseCombatWeapon_GetPrintName( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetPrintName, "class", "Get the print name." )
{
- lua_pushstring( L, luaL_checkweapon( L, 1 )->GetPrintName() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushstring( L, pWeapon->GetPrintName() );
return 1;
}
+LUA_BINDING_END( "string", "Print name." )
-static int CBaseCombatWeapon_GetRandomBurst( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetRandomBurst, "class", "Get a random burst." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetRandomBurst() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetRandomBurst() );
return 1;
}
+LUA_BINDING_END( "integer", "Random burst." )
-static int CBaseCombatWeapon_GetRumbleEffect( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetRumbleEffect, "class", "Get the rumble effect." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetRumbleEffect() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetRumbleEffect() );
return 1;
}
+LUA_BINDING_END( "integer", "Rumble effect." )
-static int CBaseCombatWeapon_GetSecondaryAmmoCount( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetSecondaryAmmoCount, "class", "Get the amount of secondary ammo." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetSecondaryAmmoCount() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetSecondaryAmmoCount() );
return 1;
}
-
-static int CBaseCombatWeapon_GetSecondaryAmmoType( lua_State *L )
+LUA_BINDING_END( "integer", "Amount of secondary ammo." )
+//}
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetSecondaryAmmoType, "class", "Get the secondary ammo type." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetSecondaryAmmoType() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetSecondaryAmmoType() );
return 1;
}
+LUA_BINDING_END( "integer", "Secondary ammo type." )
-static int CBaseCombatWeapon_GetSecondaryAttackActivity( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetSecondaryAttackActivity, "class", "Get the secondary attack activity." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetSecondaryAttackActivity() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetSecondaryAttackActivity() );
return 1;
}
+LUA_BINDING_END( "integer", "Secondary attack activity ID." )
-static int CBaseCombatWeapon_GetShootSound( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetShootSound, "class", "Get the shoot sound." )
{
- lua_pushstring( L,
- luaL_checkweapon( L, 1 )->GetShootSound( luaL_checknumber( L, 2 ) ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iIndex = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "index" );
+ lua_pushstring( L, pWeapon->GetShootSound( iIndex ) );
return 1;
}
+LUA_BINDING_END( "string", "Shoot sound." )
-static int CBaseCombatWeapon_GetSlot( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetSlot, "class", "Get the slot." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetSlot() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetSlot() );
return 1;
}
+LUA_BINDING_END( "integer", "Slot." )
-static int CBaseCombatWeapon_GetSubType( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetSubType, "class", "Get the sub type." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetSubType() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetSubType() );
return 1;
}
+LUA_BINDING_END( "integer", "Sub type." )
-static int CBaseCombatWeapon_GetViewModel( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetViewModel, "class", "Get the view model." )
{
- lua_pushstring( L,
- luaL_checkweapon( L, 1 )->GetViewModel( ( int )luaL_optnumber( L, 2, 0 ) ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iViewModelIndex = LUA_BINDING_ARGUMENT_WITH_DEFAULT( luaL_optnumber, 2, 0, "index" );
+ lua_pushstring( L, pWeapon->GetViewModel( iViewModelIndex ) );
return 1;
}
+LUA_BINDING_END( "string", "View model." )
-static int CBaseCombatWeapon_GetViewModelSequenceDuration( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetViewModelSequenceDuration, "class", "Get the view model sequence duration." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->GetViewModelSequenceDuration() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->GetViewModelSequenceDuration() );
return 1;
}
+LUA_BINDING_END( "number", "View model sequence duration." )
-static int CBaseCombatWeapon_GetWeaponFlags( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetWeaponFlags, "class", "Get the weapon flags." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetWeaponFlags() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetWeaponFlags() );
return 1;
}
+LUA_BINDING_END( "integer", "Weapon flags." )
-static int CBaseCombatWeapon_GetWeaponIdleTime( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetWeaponIdleTime, "class", "Get the weapon idle time." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->GetWeaponIdleTime() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->GetWeaponIdleTime() );
return 1;
}
+LUA_BINDING_END( "number", "Weapon idle time." )
-static int CBaseCombatWeapon_GetWeight( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetWeight, "class", "Get the weight." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->GetWeight() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->GetWeight() );
return 1;
}
+LUA_BINDING_END( "integer", "Weight." )
-static int CBaseCombatWeapon_GetWorldModel( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetWorldModel, "class", "Get the world model." )
{
- lua_pushstring( L, luaL_checkweapon( L, 1 )->GetWorldModel() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushstring( L, pWeapon->GetWorldModel() );
return 1;
}
+LUA_BINDING_END( "string", "World model." )
extern const char *pWeaponSoundCategories[NUM_SHOOT_SOUND_TYPES];
-static int CBaseCombatWeapon_GetWpnData( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GetWeaponData, "class", "Get weapon data" )
{
- const FileWeaponInfo_t &weaponInfo = luaL_checkweapon( L, 1 )->GetWpnData();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ const FileWeaponInfo_t &weaponInfo = pWeapon->GetWpnData();
+
lua_newtable( L );
lua_pushstring( L, "aShootSounds" );
lua_newtable( L );
+
for ( int i = EMPTY; i < NUM_SHOOT_SOUND_TYPES; i++ )
{
lua_pushstring( L, pWeaponSoundCategories[i] );
@@ -455,6 +596,7 @@ static int CBaseCombatWeapon_GetWpnData( lua_State *L )
lua_pop( L, 1 );
}
}
+
lua_settable( L, -3 );
lua_pushstring( L, "bAutoSwitchFrom" );
lua_pushboolean( L, weaponInfo.bAutoSwitchFrom );
@@ -537,686 +679,664 @@ static int CBaseCombatWeapon_GetWpnData( lua_State *L )
lua_pushstring( L, "szWorldModel" );
lua_pushstring( L, weaponInfo.szWorldModel );
lua_settable( L, -3 );
+
return 1;
}
+LUA_BINDING_END( "table", "Weapon data." )
-static int CBaseCombatWeapon_GiveDefaultAmmo( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, GiveDefaultAmmo, "class", "Give default ammo." )
{
- luaL_checkweapon( L, 1 )->GiveDefaultAmmo();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->GiveDefaultAmmo();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_HandleFireOnEmpty( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, HandleFireOnEmpty, "class", "Handle fire on empty." )
{
- luaL_checkweapon( L, 1 )->HandleFireOnEmpty();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->HandleFireOnEmpty();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_HasAmmo( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, HasAmmo, "class", "Check if the weapon has ammo." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->HasAmmo() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->HasAmmo() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon has ammo." )
-static int CBaseCombatWeapon_HasAnyAmmo( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, HasAnyAmmo, "class", "Check if the weapon has any ammo." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->HasAnyAmmo() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->HasAnyAmmo() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon has any ammo." )
-static int CBaseCombatWeapon_HasPrimaryAmmo( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, HasPrimaryAmmo, "class", "Check if the weapon has primary ammo." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->HasPrimaryAmmo() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->HasPrimaryAmmo() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon has primary ammo." )
-static int CBaseCombatWeapon_HasSecondaryAmmo( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, HasSecondaryAmmo, "class", "Check if the weapon has secondary ammo." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->HasSecondaryAmmo() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->HasSecondaryAmmo() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon has secondary ammo." )
-static int CBaseCombatWeapon_HasWeaponIdleTimeElapsed( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, HasWeaponIdleTimeElapsed, "class", "Check if the weapon idle time has elapsed." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->HasWeaponIdleTimeElapsed() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->HasWeaponIdleTimeElapsed() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon idle time has elapsed." )
-static int CBaseCombatWeapon_HideThink( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, HideThink, "class", "Hide think." )
{
- luaL_checkweapon( L, 1 )->HideThink();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->HideThink();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_IsAllowedToSwitch( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, IsAllowedToSwitch, "class", "Check if the weapon is allowed to switch." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->IsAllowedToSwitch() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->IsAllowedToSwitch() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is allowed to switch." )
-static int CBaseCombatWeapon_IsLocked( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, IsLocked, "class", "Check if the weapon is locked." )
{
- lua_pushboolean( L,
- luaL_checkweapon( L, 1 )->IsLocked( luaL_checkentity( L, 2 ) ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_CBaseEntity *pEntity = LUA_BINDING_ARGUMENT( luaL_checkentity, 2, "asker" );
+ lua_pushboolean( L, pWeapon->IsLocked( pEntity ) );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is locked." )
-static int CBaseCombatWeapon_IsMeleeWeapon( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, IsMeleeWeapon, "class", "Check if the weapon is a melee weapon." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->IsMeleeWeapon() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->IsMeleeWeapon() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is a melee weapon." )
-static int CBaseCombatWeapon_IsPredicted( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, IsPredicted, "class", "Check if the weapon is predicted." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->IsPredicted() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->IsPredicted() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is predicted." )
-static int CBaseCombatWeapon_IsScripted( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, IsScripted, "class", "Check if the weapon is scripted." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->IsScripted() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->IsScripted() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is scripted." )
-static int CBaseCombatWeapon_IsViewModelSequenceFinished( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, IsViewModelSequenceFinished, "class", "Check if the view model sequence is finished." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->IsViewModelSequenceFinished() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->IsViewModelSequenceFinished() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the view model sequence is finished." )
-static int CBaseCombatWeapon_IsWeaponVisible( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, IsWeaponVisible, "class", "Check if the weapon is visible." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->IsWeaponVisible() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->IsWeaponVisible() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is visible." )
-static int CBaseCombatWeapon_IsWeaponZoomed( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, IsWeaponZoomed, "class", "Check if the weapon is zoomed." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->IsWeaponZoomed() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->IsWeaponZoomed() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is zoomed." )
-static int CBaseCombatWeapon_ItemBusyFrame( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ItemBusyFrame, "class", "Item busy frame." )
{
- luaL_checkweapon( L, 1 )->ItemBusyFrame();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->ItemBusyFrame();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_ItemHolsterFrame( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ItemHolsterFrame, "class", "Item holster frame." )
{
- luaL_checkweapon( L, 1 )->ItemHolsterFrame();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->ItemHolsterFrame();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_ItemPostFrame( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ItemPostFrame, "class", "Item post frame." )
{
- luaL_checkweapon( L, 1 )->ItemPostFrame();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->ItemPostFrame();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_ItemPreFrame( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ItemPreFrame, "class", "Item pre frame." )
{
- luaL_checkweapon( L, 1 )->ItemPreFrame();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->ItemPreFrame();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_Lock( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, Lock, "class", "Lock the weapon." )
{
- luaL_checkweapon( L, 1 )->Lock( luaL_checknumber( L, 2 ),
- luaL_checkentity( L, 3 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ float flTime = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "lockTime" );
+ lua_CBaseEntity *pEntity = LUA_BINDING_ARGUMENT( luaL_checkentity, 3, "locker" );
+ pWeapon->Lock( flTime, pEntity );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_Lower( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, Lower, "class", "Lower the weapon." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->Lower() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->Lower() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon was lowered." )
-static int CBaseCombatWeapon_MaintainIdealActivity( lua_State *L )
-{
- luaL_checkweapon( L, 1 )->MaintainIdealActivity();
- return 0;
-}
-
-static int CBaseCombatWeapon_OnActiveStateChanged( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, MaintainIdealActivity, "class", "Maintain ideal activity." )
{
- luaL_checkweapon( L, 1 )->OnActiveStateChanged( luaL_checknumber( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->MaintainIdealActivity();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_OnRestore( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, OnActiveStateChanged, "class", "On active state changed." )
{
- luaL_checkweapon( L, 1 )->OnRestore();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iOldState = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "oldState" );
+ pWeapon->OnActiveStateChanged( iOldState );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_Precache( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, PrimaryAttack, "class", "Primary attack." )
{
- luaL_checkweapon( L, 1 )->Precache();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->PrimaryAttack();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_PrimaryAttack( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, Ready, "class", "Ready." )
{
- luaL_checkweapon( L, 1 )->PrimaryAttack();
- return 0;
-}
-
-static int CBaseCombatWeapon_Ready( lua_State *L )
-{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->Ready() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->Ready() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is ready." )
-static int CBaseCombatWeapon_Reload( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, Reload, "class", "Reload." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->Reload() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->Reload() );
return 1;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_ReloadOrSwitchWeapons( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ReloadOrSwitchWeapons, "class", "Reload or switch weapons." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->ReloadOrSwitchWeapons() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->ReloadOrSwitchWeapons() );
return 1;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_RescindAltFireHudHint( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, RescindAltFireHudHint, "class", "Rescind alt fire HUD hint." )
{
- luaL_checkweapon( L, 1 )->RescindAltFireHudHint();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->RescindAltFireHudHint();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_RescindReloadHudHint( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, RescindReloadHudHint, "class", "Rescind reload HUD hint." )
{
- luaL_checkweapon( L, 1 )->RescindReloadHudHint();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->RescindReloadHudHint();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SecondaryAttack( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SecondaryAttack, "class", "Secondary attack." )
{
- luaL_checkweapon( L, 1 )->SecondaryAttack();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->SecondaryAttack();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SendViewModelAnim( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SendViewModelAnim, "class", "Send view model animation." )
{
- luaL_checkweapon( L, 1 )->SendViewModelAnim( luaL_checknumber( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iSequence = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "sequence" );
+ pWeapon->SendViewModelAnim( iSequence );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SendWeaponAnim( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SendWeaponAnim, "class", "Send weapon animation." )
{
- lua_pushboolean(
- L, luaL_checkweapon( L, 1 )->SendWeaponAnim( luaL_checknumber( L, 2 ) ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iActivity = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "activity" );
+ lua_pushboolean( L, pWeapon->SendWeaponAnim( iActivity ) );
return 1;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetActivity( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetActivity, "class", "Set activity." )
{
- luaL_checkweapon( L, 1 )->SetActivity( ( Activity )( int )luaL_checknumber( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iActivity = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "activity" );
+ pWeapon->SetActivity( ( Activity )iActivity );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetIdealActivity( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetIdealActivity, "class", "Set ideal activity." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->SetIdealActivity( ( Activity )( int )luaL_checknumber( L, 2 ) ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iActivity = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "activity" );
+ lua_pushboolean( L, pWeapon->SetIdealActivity( ( Activity )iActivity ) );
return 1;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetPickupTouch( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetPickupTouch, "class", "Set pickup touch." )
{
- luaL_checkweapon( L, 1 )->SetPickupTouch();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->SetPickupTouch();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetPrimaryAmmoCount( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetPrimaryAmmoCount, "class", "Set primary ammo count." )
{
- luaL_checkweapon( L, 1 )->SetPrimaryAmmoCount( luaL_checknumber( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iCount = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "count" );
+ pWeapon->SetPrimaryAmmoCount( iCount );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetSecondaryAmmoCount( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetSecondaryAmmoCount, "class", "Set secondary ammo count." )
{
- luaL_checkweapon( L, 1 )->SetSecondaryAmmoCount( luaL_checknumber( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iCount = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "count" );
+ pWeapon->SetSecondaryAmmoCount( iCount );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetSubType( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetSubType, "class", "Set sub type." )
{
- luaL_checkweapon( L, 1 )->SetSubType( luaL_checknumber( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iSubType = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "subType" );
+ pWeapon->SetSubType( iSubType );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetViewModel( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetViewModel, "class", "Set view model." )
{
- luaL_checkweapon( L, 1 )->SetViewModel();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->SetViewModel();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetViewModelIndex( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetViewModelIndex, "class", "Set view model index." )
{
- luaL_checkweapon( L, 1 )->SetViewModelIndex( ( int )luaL_optnumber( L, 2, 0 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iIndex = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "index" );
+ pWeapon->SetViewModelIndex( iIndex );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetWeaponIdleTime( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetWeaponIdleTime, "class", "Set weapon idle time." )
{
- luaL_checkweapon( L, 1 )->SetWeaponIdleTime( luaL_checknumber( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ float flTime = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "time" );
+ pWeapon->SetWeaponIdleTime( flTime );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_SetWeaponVisible( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, SetWeaponVisible, "class", "Set weapon visible." )
{
- luaL_checkweapon( L, 1 )->SetWeaponVisible( luaL_checkboolean( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ bool bVisible = LUA_BINDING_ARGUMENT( luaL_checkboolean, 2, "visible" );
+ pWeapon->SetWeaponVisible( bVisible );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_ShouldDisplayAltFireHUDHint( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ShouldDisplayAltFireHUDHint, "class", "Should display alt fire HUD hint." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->ShouldDisplayAltFireHUDHint() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->ShouldDisplayAltFireHUDHint() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the alt fire HUD hint should be displayed." )
-static int CBaseCombatWeapon_ShouldDisplayReloadHUDHint( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ShouldDisplayReloadHUDHint, "class", "Should display reload HUD hint." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->ShouldDisplayReloadHUDHint() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->ShouldDisplayReloadHUDHint() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the reload HUD hint should be displayed." )
-static int CBaseCombatWeapon_ShouldShowControlPanels( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, ShouldShowControlPanels, "class", "Should show control panels." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->ShouldShowControlPanels() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->ShouldShowControlPanels() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the control panels should be shown." )
-static int CBaseCombatWeapon_Spawn( lua_State *L )
-{
- luaL_checkweapon( L, 1 )->Spawn();
- return 0;
-}
-
-static int CBaseCombatWeapon_StartSprinting( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, StartSprinting, "class", "Start sprinting." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->StartSprinting() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->StartSprinting() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether sprinting was started." )
-static int CBaseCombatWeapon_StopSprinting( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, StopSprinting, "class", "Stop sprinting." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->StopSprinting() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->StopSprinting() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether sprinting was stopped." )
-static int CBaseCombatWeapon_StopWeaponSound( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, StopWeaponSound, "class", "Stop weapon sound." )
{
- luaL_checkweapon( L, 1 )->StopWeaponSound( ( WeaponSound_t )( int )luaL_checknumber( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iSound = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "soundType" );
+ pWeapon->StopWeaponSound( ( WeaponSound_t )iSound );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_UsesClipsForAmmo1( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, UsesClipsForAmmo1, "class", "Uses clips for ammo 1." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->UsesClipsForAmmo1() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->UsesClipsForAmmo1() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether clips are used for ammo 1." )
-static int CBaseCombatWeapon_UsesClipsForAmmo2( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, UsesClipsForAmmo2, "class", "Uses clips for ammo 2." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->UsesClipsForAmmo2() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->UsesClipsForAmmo2() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether clips are used for ammo 2." )
-static int CBaseCombatWeapon_UsesPrimaryAmmo( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, UsesPrimaryAmmo, "class", "Uses primary ammo." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->UsesPrimaryAmmo() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->UsesPrimaryAmmo() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether primary ammo is used." )
-static int CBaseCombatWeapon_UsesSecondaryAmmo( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, UsesSecondaryAmmo, "class", "Uses secondary ammo." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->UsesSecondaryAmmo() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->UsesSecondaryAmmo() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether secondary ammo is used." )
-static int CBaseCombatWeapon_VisibleInWeaponSelection( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, VisibleInWeaponSelection, "class", "Visible in weapon selection." )
{
- lua_pushboolean( L, luaL_checkweapon( L, 1 )->VisibleInWeaponSelection() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushboolean( L, pWeapon->VisibleInWeaponSelection() );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the weapon is visible in weapon selection." )
-static int CBaseCombatWeapon_WeaponAutoAimScale( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, WeaponAutoAimScale, "class", "Weapon auto aim scale." )
{
- lua_pushnumber( L, luaL_checkweapon( L, 1 )->WeaponAutoAimScale() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushnumber( L, pWeapon->WeaponAutoAimScale() );
return 1;
}
+LUA_BINDING_END( "number", "Weapon auto aim scale." )
-static int CBaseCombatWeapon_WeaponIdle( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, WeaponIdle, "class", "Weapon idle." )
{
- luaL_checkweapon( L, 1 )->WeaponIdle();
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ pWeapon->WeaponIdle();
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_WeaponSound( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, WeaponSound, "class", "Weapon sound." )
{
- luaL_checkweapon( L, 1 )->WeaponSound( ( WeaponSound_t )( int )luaL_checknumber( L, 2 ),
- luaL_optnumber( L, 2, 0.0f ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ int iSound = LUA_BINDING_ARGUMENT( luaL_checknumber, 2, "soundType" );
+ float flSoundTime = LUA_BINDING_ARGUMENT_WITH_DEFAULT( luaL_optnumber, 3, 0.0f, "soundTime" );
+ pWeapon->WeaponSound( ( WeaponSound_t )iSound, flSoundTime );
return 0;
}
+LUA_BINDING_END()
-static int CBaseCombatWeapon_WeaponState( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, WeaponState, "class", "Weapon state." )
{
- lua_pushinteger( L, luaL_checkweapon( L, 1 )->WeaponState() );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( luaL_checkweapon, 1, "entity" );
+ lua_pushinteger( L, pWeapon->WeaponState() );
return 1;
}
-//
-//static int CBaseCombatWeapon___index( lua_State *L )
+LUA_BINDING_END( "number", "Weapon state." )
+
+// static int CBaseCombatWeapon___index( lua_State *L )
//{
-// CBaseCombatWeapon *pWeapon = lua_toweapon( L, 1 );
+// CBaseCombatWeapon *pWeapon = lua_toweapon( L, 1 );
//
-// LUA_METATABLE_INDEX_CHECK_VALID( L, CBaseEntity_IsValid );
-// LUA_METATABLE_INDEX_CHECK( L, pWeapon );
+// LUA_METATABLE_INDEX_CHECK_VALID( L, CBaseEntity_IsValid );
+// LUA_METATABLE_INDEX_CHECK( L, pWeapon );
//
-// const char *field = luaL_checkstring( L, 2 );
-// if ( Q_strcmp( field, "m_bAltFiresUnderwater" ) == 0 )
-// lua_pushboolean( L, pWeapon->m_bAltFiresUnderwater );
-// else if ( Q_strcmp( field, "m_bFireOnEmpty" ) == 0 )
-// lua_pushboolean( L, pWeapon->m_bFireOnEmpty );
-// else if ( Q_strcmp( field, "m_bFiresUnderwater" ) == 0 )
-// lua_pushboolean( L, pWeapon->m_bFiresUnderwater );
-// else if ( Q_strcmp( field, "m_bInReload" ) == 0 )
-// lua_pushboolean( L, pWeapon->m_bInReload );
-// else if ( Q_strcmp( field, "m_bReloadsSingly" ) == 0 )
-// lua_pushboolean( L, pWeapon->m_bReloadsSingly );
-// else if ( Q_strcmp( field, "m_fFireDuration" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_fFireDuration );
-// else if ( Q_strcmp( field, "m_flNextEmptySoundTime" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_flNextEmptySoundTime );
-// else if ( Q_strcmp( field, "m_flNextPrimaryAttack" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_flNextPrimaryAttack );
-// else if ( Q_strcmp( field, "m_flNextSecondaryAttack" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_flNextSecondaryAttack );
-// else if ( Q_strcmp( field, "m_flTimeWeaponIdle" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_flTimeWeaponIdle );
-// else if ( Q_strcmp( field, "m_flUnlockTime" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_flUnlockTime );
-// else if ( Q_strcmp( field, "m_fMaxRange1" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_fMaxRange1 );
-// else if ( Q_strcmp( field, "m_fMaxRange2" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_fMaxRange2 );
-// else if ( Q_strcmp( field, "m_fMinRange1" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_fMinRange1 );
-// else if ( Q_strcmp( field, "m_fMinRange2" ) == 0 )
-// lua_pushnumber( L, pWeapon->m_fMinRange2 );
-// else if ( Q_strcmp( field, "m_iClip1" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_iClip1 );
-// else if ( Q_strcmp( field, "m_iClip2" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_iClip2 );
-// else if ( Q_strcmp( field, "m_iPrimaryAmmoType" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_iPrimaryAmmoType );
-// else if ( Q_strcmp( field, "m_iSecondaryAmmoType" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_iSecondaryAmmoType );
-// else if ( Q_strcmp( field, "m_iState" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_iState );
-// else if ( Q_strcmp( field, "m_iSubType" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_iSubType );
-// else if ( Q_strcmp( field, "m_iViewModelIndex" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_iViewModelIndex );
-// else if ( Q_strcmp( field, "m_iWorldModelIndex" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_iWorldModelIndex );
-// else if ( Q_strcmp( field, "m_nViewModelIndex" ) == 0 )
-// lua_pushinteger( L, pWeapon->m_nViewModelIndex );
-// else
-// {
-// LUA_METATABLE_INDEX_CHECK_REF_TABLE( L, pWeapon );
+// const char *field = luaL_checkstring( L, 2 );
+// if ( Q_strcmp( field, "m_bAltFiresUnderwater" ) == 0 )
+// lua_pushboolean( L, pWeapon->m_bAltFiresUnderwater );
+// else if ( Q_strcmp( field, "m_bFireOnEmpty" ) == 0 )
+// lua_pushboolean( L, pWeapon->m_bFireOnEmpty );
+// else if ( Q_strcmp( field, "m_bFiresUnderwater" ) == 0 )
+// lua_pushboolean( L, pWeapon->m_bFiresUnderwater );
+// else if ( Q_strcmp( field, "m_bInReload" ) == 0 )
+// lua_pushboolean( L, pWeapon->m_bInReload );
+// else if ( Q_strcmp( field, "m_bReloadsSingly" ) == 0 )
+// lua_pushboolean( L, pWeapon->m_bReloadsSingly );
+// else if ( Q_strcmp( field, "m_fFireDuration" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_fFireDuration );
+// else if ( Q_strcmp( field, "m_flNextEmptySoundTime" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_flNextEmptySoundTime );
+// else if ( Q_strcmp( field, "m_flNextPrimaryAttack" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_flNextPrimaryAttack );
+// else if ( Q_strcmp( field, "m_flNextSecondaryAttack" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_flNextSecondaryAttack );
+// else if ( Q_strcmp( field, "m_flTimeWeaponIdle" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_flTimeWeaponIdle );
+// else if ( Q_strcmp( field, "m_flUnlockTime" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_flUnlockTime );
+// else if ( Q_strcmp( field, "m_fMaxRange1" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_fMaxRange1 );
+// else if ( Q_strcmp( field, "m_fMaxRange2" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_fMaxRange2 );
+// else if ( Q_strcmp( field, "m_fMinRange1" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_fMinRange1 );
+// else if ( Q_strcmp( field, "m_fMinRange2" ) == 0 )
+// lua_pushnumber( L, pWeapon->m_fMinRange2 );
+// else if ( Q_strcmp( field, "m_iClip1" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_iClip1 );
+// else if ( Q_strcmp( field, "m_iClip2" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_iClip2 );
+// else if ( Q_strcmp( field, "m_iPrimaryAmmoType" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_iPrimaryAmmoType );
+// else if ( Q_strcmp( field, "m_iSecondaryAmmoType" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_iSecondaryAmmoType );
+// else if ( Q_strcmp( field, "m_iState" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_iState );
+// else if ( Q_strcmp( field, "m_iSubType" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_iSubType );
+// else if ( Q_strcmp( field, "m_iViewModelIndex" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_iViewModelIndex );
+// else if ( Q_strcmp( field, "m_iWorldModelIndex" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_iWorldModelIndex );
+// else if ( Q_strcmp( field, "m_nViewModelIndex" ) == 0 )
+// lua_pushinteger( L, pWeapon->m_nViewModelIndex );
+// else
+// {
+// LUA_METATABLE_INDEX_CHECK_REF_TABLE( L, pWeapon );
//
-// if ( lua_getmetatable( L, 1 ) )
-// {
-// LUA_METATABLE_INDEX_CHECK_TABLE( L );
-// }
+// if ( lua_getmetatable( L, 1 ) )
+// {
+// LUA_METATABLE_INDEX_CHECK_TABLE( L );
+// }
//
-// luaL_getmetatable( L, LUA_BASECOMBATWEAPONLIBNAME );
-// LUA_METATABLE_INDEX_CHECK_TABLE( L );
+// luaL_getmetatable( L, LUA_BASECOMBATWEAPONLIBNAME );
+// LUA_METATABLE_INDEX_CHECK_TABLE( L );
//
-// LUA_METATABLE_INDEX_DERIVE_INDEX( L, LUA_BASEANIMATINGLIBNAME );
+// LUA_METATABLE_INDEX_DERIVE_INDEX( L, LUA_BASEANIMATINGLIBNAME );
//
-// lua_pushnil( L );
-// }
+// lua_pushnil( L );
+// }
//
-// return 1;
-//}
+// return 1;
+// }
-//static int CBaseCombatWeapon___newindex( lua_State *L )
+// static int CBaseCombatWeapon___newindex( lua_State *L )
//{
-// CBaseCombatWeapon *pWeapon = lua_toweapon( L, 1 );
+// CBaseCombatWeapon *pWeapon = lua_toweapon( L, 1 );
//
-// if ( pWeapon == NULL )
-// { /* avoid extra test when d is not 0 */
-// lua_Debug ar1;
-// lua_getstack( L, 1, &ar1 );
-// lua_getinfo( L, "fl", &ar1 );
-// lua_Debug ar2;
-// lua_getinfo( L, ">S", &ar2 );
-// lua_pushfstring( L, "%s:%d: attempt to index a NULL entity", ar2.short_src, ar1.currentline );
-// return lua_error( L );
-// }
+// if ( pWeapon == NULL )
+// { /* avoid extra test when d is not 0 */
+// lua_Debug ar1;
+// lua_getstack( L, 1, &ar1 );
+// lua_getinfo( L, "fl", &ar1 );
+// lua_Debug ar2;
+// lua_getinfo( L, ">S", &ar2 );
+// lua_pushfstring( L, "%s:%d: attempt to index a NULL entity", ar2.short_src, ar1.currentline );
+// return lua_error( L );
+// }
//
-// const char *field = luaL_checkstring( L, 2 );
+// const char *field = luaL_checkstring( L, 2 );
//
-// if ( Q_strcmp( field, "m_bAltFiresUnderwater" ) == 0 )
-// pWeapon->m_bAltFiresUnderwater = luaL_checkboolean( L, 3 );
-// else if ( Q_strcmp( field, "m_bFireOnEmpty" ) == 0 )
-// pWeapon->m_bFireOnEmpty = luaL_checkboolean( L, 3 );
-// else if ( Q_strcmp( field, "m_bFiresUnderwater" ) == 0 )
-// pWeapon->m_bFiresUnderwater = luaL_checkboolean( L, 3 );
-// else if ( Q_strcmp( field, "m_bInReload" ) == 0 )
-// pWeapon->m_bInReload = luaL_checkboolean( L, 3 );
-// else if ( Q_strcmp( field, "m_bReloadsSingly" ) == 0 )
-// pWeapon->m_bReloadsSingly = luaL_checkboolean( L, 3 );
-// else if ( Q_strcmp( field, "m_fFireDuration" ) == 0 )
-// pWeapon->m_fFireDuration = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_flNextEmptySoundTime" ) == 0 )
-// pWeapon->m_flNextEmptySoundTime = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_flNextPrimaryAttack" ) == 0 )
-// pWeapon->m_flNextPrimaryAttack.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_flNextSecondaryAttack" ) == 0 )
-// pWeapon->m_flNextSecondaryAttack.GetForModify() =
-// luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_flTimeWeaponIdle" ) == 0 )
-// pWeapon->m_flTimeWeaponIdle.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_flUnlockTime" ) == 0 )
-// pWeapon->m_flUnlockTime = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_fMaxRange1" ) == 0 )
-// pWeapon->m_fMaxRange1 = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_fMaxRange2" ) == 0 )
-// pWeapon->m_fMaxRange2 = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_fMinRange1" ) == 0 )
-// pWeapon->m_fMinRange1 = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_fMinRange2" ) == 0 )
-// pWeapon->m_fMinRange2 = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_iClip1" ) == 0 )
-// pWeapon->m_iClip1.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_iClip2" ) == 0 )
-// pWeapon->m_iClip2.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_iPrimaryAmmoType" ) == 0 )
-// pWeapon->m_iPrimaryAmmoType.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_iSecondaryAmmoType" ) == 0 )
-// pWeapon->m_iSecondaryAmmoType.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_iState" ) == 0 )
-// pWeapon->m_iState.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_iSubType" ) == 0 )
-// pWeapon->m_iSubType = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_iViewModelIndex" ) == 0 )
-// pWeapon->m_iViewModelIndex.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_iWorldModelIndex" ) == 0 )
-// pWeapon->m_iWorldModelIndex.GetForModify() = luaL_checknumber( L, 3 );
-// else if ( Q_strcmp( field, "m_nViewModelIndex" ) == 0 )
-// pWeapon->m_nViewModelIndex.GetForModify() = luaL_checknumber( L, 3 );
-// else
-// {
-// LUA_GET_REF_TABLE( L, pWeapon );
-// lua_pushvalue( L, 3 );
-// lua_setfield( L, -2, field );
-// lua_pop( L, 1 );
-// }
+// if ( Q_strcmp( field, "m_bAltFiresUnderwater" ) == 0 )
+// pWeapon->m_bAltFiresUnderwater = luaL_checkboolean( L, 3 );
+// else if ( Q_strcmp( field, "m_bFireOnEmpty" ) == 0 )
+// pWeapon->m_bFireOnEmpty = luaL_checkboolean( L, 3 );
+// else if ( Q_strcmp( field, "m_bFiresUnderwater" ) == 0 )
+// pWeapon->m_bFiresUnderwater = luaL_checkboolean( L, 3 );
+// else if ( Q_strcmp( field, "m_bInReload" ) == 0 )
+// pWeapon->m_bInReload = luaL_checkboolean( L, 3 );
+// else if ( Q_strcmp( field, "m_bReloadsSingly" ) == 0 )
+// pWeapon->m_bReloadsSingly = luaL_checkboolean( L, 3 );
+// else if ( Q_strcmp( field, "m_fFireDuration" ) == 0 )
+// pWeapon->m_fFireDuration = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_flNextEmptySoundTime" ) == 0 )
+// pWeapon->m_flNextEmptySoundTime = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_flNextPrimaryAttack" ) == 0 )
+// pWeapon->m_flNextPrimaryAttack.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_flNextSecondaryAttack" ) == 0 )
+// pWeapon->m_flNextSecondaryAttack.GetForModify() =
+// luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_flTimeWeaponIdle" ) == 0 )
+// pWeapon->m_flTimeWeaponIdle.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_flUnlockTime" ) == 0 )
+// pWeapon->m_flUnlockTime = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_fMaxRange1" ) == 0 )
+// pWeapon->m_fMaxRange1 = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_fMaxRange2" ) == 0 )
+// pWeapon->m_fMaxRange2 = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_fMinRange1" ) == 0 )
+// pWeapon->m_fMinRange1 = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_fMinRange2" ) == 0 )
+// pWeapon->m_fMinRange2 = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_iClip1" ) == 0 )
+// pWeapon->m_iClip1.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_iClip2" ) == 0 )
+// pWeapon->m_iClip2.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_iPrimaryAmmoType" ) == 0 )
+// pWeapon->m_iPrimaryAmmoType.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_iSecondaryAmmoType" ) == 0 )
+// pWeapon->m_iSecondaryAmmoType.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_iState" ) == 0 )
+// pWeapon->m_iState.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_iSubType" ) == 0 )
+// pWeapon->m_iSubType = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_iViewModelIndex" ) == 0 )
+// pWeapon->m_iViewModelIndex.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_iWorldModelIndex" ) == 0 )
+// pWeapon->m_iWorldModelIndex.GetForModify() = luaL_checknumber( L, 3 );
+// else if ( Q_strcmp( field, "m_nViewModelIndex" ) == 0 )
+// pWeapon->m_nViewModelIndex.GetForModify() = luaL_checknumber( L, 3 );
+// else
+// {
+// LUA_GET_REF_TABLE( L, pWeapon );
+// lua_pushvalue( L, 3 );
+// lua_setfield( L, -2, field );
+// lua_pop( L, 1 );
+// }
//
-// return 0;
-//}
+// return 0;
+// }
-static int CBaseCombatWeapon___eq( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, __eq, "class", "Equality comparison." )
{
- lua_pushboolean( L, lua_toweapon( L, 1 ) == lua_toweapon( L, 2 ) );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( lua_toweapon, 1, "entity" );
+ lua_CBaseCombatWeapon *pOtherWeapon = LUA_BINDING_ARGUMENT( lua_toweapon, 2, "otherEntity" );
+ lua_pushboolean( L, pWeapon == pOtherWeapon );
return 1;
}
+LUA_BINDING_END( "boolean", "Whether the two entities are equal." )
-static int CBaseCombatWeapon___tostring( lua_State *L )
+LUA_BINDING_BEGIN( CBaseCombatWeapon, __tostring, "class", "String representation." )
{
- CBaseCombatWeapon *pWeapon = lua_toweapon( L, 1 );
+ lua_CBaseCombatWeapon *pWeapon = LUA_BINDING_ARGUMENT( lua_toweapon, 1, "entity" );
if ( pWeapon == NULL )
lua_pushstring( L, "NULL" );
else
lua_pushfstring( L, "CBaseCombatWeapon: %d %s", pWeapon->entindex(), pWeapon->GetClassname() );
return 1;
}
-
-static const luaL_Reg CBaseCombatWeaponmeta[] = {
- { "AbortReload", CBaseCombatWeapon_AbortReload },
- { "Activate", CBaseCombatWeapon_Activate },
- { "ActivityListCount", CBaseCombatWeapon_ActivityListCount },
- { "ActivityOverride", CBaseCombatWeapon_ActivityOverride },
- { "AddViewKick", CBaseCombatWeapon_AddViewKick },
- { "AllowsAutoSwitchFrom", CBaseCombatWeapon_AllowsAutoSwitchFrom },
- { "AllowsAutoSwitchTo", CBaseCombatWeapon_AllowsAutoSwitchTo },
- { "CalcViewmodelBob", CBaseCombatWeapon_CalcViewmodelBob },
- { "CanBePickedUpByNPCs", CBaseCombatWeapon_CanBePickedUpByNPCs },
- { "CanBeSelected", CBaseCombatWeapon_CanBeSelected },
- { "CanDeploy", CBaseCombatWeapon_CanDeploy },
- { "CanHolster", CBaseCombatWeapon_CanHolster },
- { "CanLower", CBaseCombatWeapon_CanLower },
- { "CheckReload", CBaseCombatWeapon_CheckReload },
- { "Clip1", CBaseCombatWeapon_Clip1 },
- { "Clip2", CBaseCombatWeapon_Clip2 },
- { "DefaultDeploy", CBaseCombatWeapon_DefaultDeploy },
- { "DefaultReload", CBaseCombatWeapon_DefaultReload },
- { "DefaultTouch", CBaseCombatWeapon_DefaultTouch },
- { "Deploy", CBaseCombatWeapon_Deploy },
- { "DisplayAltFireHudHint", CBaseCombatWeapon_DisplayAltFireHudHint },
- { "DisplayReloadHudHint", CBaseCombatWeapon_DisplayReloadHudHint },
- { "Drop", CBaseCombatWeapon_Drop },
- { "FinishReload", CBaseCombatWeapon_FinishReload },
- { "GetActivity", CBaseCombatWeapon_GetActivity },
- { "GetAnimPrefix", CBaseCombatWeapon_GetAnimPrefix },
- { "GetBulletType", CBaseCombatWeapon_GetBulletType },
- { "GetDamage", CBaseCombatWeapon_GetDamage },
- { "GetDeathNoticeName", CBaseCombatWeapon_GetDeathNoticeName },
- { "GetDefaultAnimSpeed", CBaseCombatWeapon_GetDefaultAnimSpeed },
- { "GetDefaultClip1", CBaseCombatWeapon_GetDefaultClip1 },
- { "GetDefaultClip2", CBaseCombatWeapon_GetDefaultClip2 },
- { "GetDrawActivity", CBaseCombatWeapon_GetDrawActivity },
- { "GetFireRate", CBaseCombatWeapon_GetFireRate },
- { "GetIdealActivity", CBaseCombatWeapon_GetIdealActivity },
- { "GetIdealSequence", CBaseCombatWeapon_GetIdealSequence },
- { "GetMaxAutoAimDeflection", CBaseCombatWeapon_GetMaxAutoAimDeflection },
- { "GetMaxBurst", CBaseCombatWeapon_GetMaxBurst },
- { "GetMaxClip1", CBaseCombatWeapon_GetMaxClip1 },
- { "GetMaxClip2", CBaseCombatWeapon_GetMaxClip2 },
- { "GetMaxRestTime", CBaseCombatWeapon_GetMaxRestTime },
- { "GetMinBurst", CBaseCombatWeapon_GetMinBurst },
- { "GetMinRestTime", CBaseCombatWeapon_GetMinRestTime },
- { "GetName", CBaseCombatWeapon_GetName },
- { "GetOwner", CBaseCombatWeapon_GetOwner },
- { "GetPosition", CBaseCombatWeapon_GetPosition },
- { "GetPrimaryAmmoCount", CBaseCombatWeapon_GetPrimaryAmmoCount },
- { "GetPrimaryAmmoType", CBaseCombatWeapon_GetPrimaryAmmoType },
- { "GetPrimaryAttackActivity", CBaseCombatWeapon_GetPrimaryAttackActivity },
- { "GetPrintName", CBaseCombatWeapon_GetPrintName },
- { "GetRandomBurst", CBaseCombatWeapon_GetRandomBurst },
- { "GetRumbleEffect", CBaseCombatWeapon_GetRumbleEffect },
- { "GetSecondaryAmmoCount", CBaseCombatWeapon_GetSecondaryAmmoCount },
- { "GetSecondaryAmmoType", CBaseCombatWeapon_GetSecondaryAmmoType },
- { "GetSecondaryAttackActivity",
- CBaseCombatWeapon_GetSecondaryAttackActivity },
- { "GetShootSound", CBaseCombatWeapon_GetShootSound },
- { "GetSlot", CBaseCombatWeapon_GetSlot },
- { "GetSubType", CBaseCombatWeapon_GetSubType },
- { "GetViewModel", CBaseCombatWeapon_GetViewModel },
- { "GetViewModelSequenceDuration",
- CBaseCombatWeapon_GetViewModelSequenceDuration },
- { "GetWeaponFlags", CBaseCombatWeapon_GetWeaponFlags },
- { "GetWeaponIdleTime", CBaseCombatWeapon_GetWeaponIdleTime },
- { "GetWeight", CBaseCombatWeapon_GetWeight },
- { "GetWorldModel", CBaseCombatWeapon_GetWorldModel },
- { "GetWpnData", CBaseCombatWeapon_GetWpnData },
- { "GiveDefaultAmmo", CBaseCombatWeapon_GiveDefaultAmmo },
- { "HandleFireOnEmpty", CBaseCombatWeapon_HandleFireOnEmpty },
- { "HasAmmo", CBaseCombatWeapon_HasAmmo },
- { "HasAmmo", CBaseCombatWeapon_HasAnyAmmo },
- { "HasPrimaryAmmo", CBaseCombatWeapon_HasPrimaryAmmo },
- { "HasSecondaryAmmo", CBaseCombatWeapon_HasSecondaryAmmo },
- { "HasWeaponIdleTimeElapsed", CBaseCombatWeapon_HasWeaponIdleTimeElapsed },
- { "HideThink", CBaseCombatWeapon_HideThink },
- { "IsAllowedToSwitch", CBaseCombatWeapon_IsAllowedToSwitch },
- { "IsLocked", CBaseCombatWeapon_IsLocked },
- { "IsMeleeWeapon", CBaseCombatWeapon_IsMeleeWeapon },
- { "IsPredicted", CBaseCombatWeapon_IsPredicted },
- { "IsScripted", CBaseCombatWeapon_IsScripted },
- { "IsViewModelSequenceFinished",
- CBaseCombatWeapon_IsViewModelSequenceFinished },
- { "IsWeaponVisible", CBaseCombatWeapon_IsWeaponVisible },
- { "IsWeaponZoomed", CBaseCombatWeapon_IsWeaponZoomed },
- { "ItemBusyFrame", CBaseCombatWeapon_ItemBusyFrame },
- { "ItemHolsterFrame", CBaseCombatWeapon_ItemHolsterFrame },
- { "ItemPostFrame", CBaseCombatWeapon_ItemPostFrame },
- { "ItemPreFrame", CBaseCombatWeapon_ItemPreFrame },
- { "Lock", CBaseCombatWeapon_Lock },
- { "Lower", CBaseCombatWeapon_Lower },
- { "MaintainIdealActivity", CBaseCombatWeapon_MaintainIdealActivity },
- { "OnActiveStateChanged", CBaseCombatWeapon_OnActiveStateChanged },
- { "OnRestore", CBaseCombatWeapon_OnRestore },
- { "Precache", CBaseCombatWeapon_Precache },
- { "PrimaryAttack", CBaseCombatWeapon_PrimaryAttack },
- { "Ready", CBaseCombatWeapon_Ready },
- { "Reload", CBaseCombatWeapon_Reload },
- { "ReloadOrSwitchWeapons", CBaseCombatWeapon_ReloadOrSwitchWeapons },
- { "RescindAltFireHudHint", CBaseCombatWeapon_RescindAltFireHudHint },
- { "RescindReloadHudHint", CBaseCombatWeapon_RescindReloadHudHint },
- { "SecondaryAttack", CBaseCombatWeapon_SecondaryAttack },
- { "SendViewModelAnim", CBaseCombatWeapon_SendViewModelAnim },
- { "SendWeaponAnim", CBaseCombatWeapon_SendWeaponAnim },
- { "SetActivity", CBaseCombatWeapon_SetActivity },
- { "SetIdealActivity", CBaseCombatWeapon_SetIdealActivity },
- { "SetPickupTouch", CBaseCombatWeapon_SetPickupTouch },
- { "SetPrimaryAmmoCount", CBaseCombatWeapon_SetPrimaryAmmoCount },
- { "SetSecondaryAmmoCount", CBaseCombatWeapon_SetSecondaryAmmoCount },
- { "SetSubType", CBaseCombatWeapon_SetSubType },
- { "SetViewModel", CBaseCombatWeapon_SetViewModel },
- { "SetViewModelIndex", CBaseCombatWeapon_SetViewModelIndex },
- { "SetWeaponIdleTime", CBaseCombatWeapon_SetWeaponIdleTime },
- { "SetWeaponVisible", CBaseCombatWeapon_SetWeaponVisible },
- { "ShouldDisplayAltFireHUDHint",
- CBaseCombatWeapon_ShouldDisplayAltFireHUDHint },
- { "ShouldDisplayReloadHUDHint",
- CBaseCombatWeapon_ShouldDisplayReloadHUDHint },
- { "ShouldShowControlPanels", CBaseCombatWeapon_ShouldShowControlPanels },
- { "Spawn", CBaseCombatWeapon_Spawn },
- { "StartSprinting", CBaseCombatWeapon_StartSprinting },
- { "StopSprinting", CBaseCombatWeapon_StopSprinting },
- { "StopWeaponSound", CBaseCombatWeapon_StopWeaponSound },
- { "UsesClipsForAmmo1", CBaseCombatWeapon_UsesClipsForAmmo1 },
- { "UsesClipsForAmmo2", CBaseCombatWeapon_UsesClipsForAmmo2 },
- { "UsesPrimaryAmmo", CBaseCombatWeapon_UsesPrimaryAmmo },
- { "UsesSecondaryAmmo", CBaseCombatWeapon_UsesSecondaryAmmo },
- { "VisibleInWeaponSelection", CBaseCombatWeapon_VisibleInWeaponSelection },
- { "WeaponAutoAimScale", CBaseCombatWeapon_WeaponAutoAimScale },
- { "WeaponIdle", CBaseCombatWeapon_WeaponIdle },
- { "WeaponSound", CBaseCombatWeapon_WeaponSound },
- { "WeaponState", CBaseCombatWeapon_WeaponState },
-
- // { "__index", CBaseCombatWeapon___index }, // In Lua now
- // { "__newindex", CBaseCombatWeapon___newindex }, // Conflicts when storing with CBaseEntity ref table
- { "__eq", CBaseCombatWeapon___eq },
- { "__tostring", CBaseCombatWeapon___tostring },
- { NULL, NULL } };
+LUA_BINDING_END( "string", "String representation." )
/*
** Open CBaseCombatWeapon object
@@ -1224,8 +1344,11 @@ static const luaL_Reg CBaseCombatWeaponmeta[] = {
LUALIB_API int luaopen_CBaseCombatWeapon( lua_State *L )
{
LUA_PUSH_NEW_METATABLE( L, LUA_BASECOMBATWEAPONLIBNAME );
- luaL_register( L, NULL, CBaseCombatWeaponmeta );
+
lua_pushstring( L, "Entity" );
lua_setfield( L, -2, "__type" ); /* metatable.__type = "Entity" */
+
+ LUA_REGISTRATION_COMMIT( CBaseCombatWeapon );
+
return 1;
}
diff --git a/src/game/shared/lbaseentity_shared.cpp b/src/game/shared/lbaseentity_shared.cpp
index e95ae70e09..72aac240f1 100644
--- a/src/game/shared/lbaseentity_shared.cpp
+++ b/src/game/shared/lbaseentity_shared.cpp
@@ -437,7 +437,7 @@ static int CBaseEntity_GetCheckUntouch( lua_State *L )
return 1;
}
-static int CBaseEntity_GetClassname( lua_State *L )
+static int CBaseEntity_GetClass( lua_State *L )
{
lua_pushstring( L, luaL_checkentity( L, 1 )->GetClassname() );
return 1;
@@ -2030,7 +2030,7 @@ static const luaL_Reg CBaseEntitymeta[] = {
{ "GetBaseEntity", CBaseEntity_GetBaseEntity },
{ "GetBaseVelocity", CBaseEntity_GetBaseVelocity },
{ "GetCheckUntouch", CBaseEntity_GetCheckUntouch },
- { "GetClassName", CBaseEntity_GetClassname },
+ { "GetClass", CBaseEntity_GetClass },
{ "GetCollisionGroup", CBaseEntity_GetCollisionGroup },
{ "GetDataObject", CBaseEntity_GetDataObject },
{ "GetDebugName", CBaseEntity_GetDebugName },
diff --git a/src/game/shared/lbaseplayer_shared.cpp b/src/game/shared/lbaseplayer_shared.cpp
index a499c05ca6..1007860261 100644
--- a/src/game/shared/lbaseplayer_shared.cpp
+++ b/src/game/shared/lbaseplayer_shared.cpp
@@ -582,12 +582,6 @@ static int CBasePlayer_MyCombatCharacterPointer( lua_State *L )
return 1;
}
-static int CBasePlayer_OnRestore( lua_State *L )
-{
- luaL_checkplayer( L, 1 )->OnRestore();
- return 0;
-}
-
static int CBasePlayer_PhysicsSimulate( lua_State *L )
{
luaL_checkplayer( L, 1 )->PhysicsSimulate();
@@ -1186,7 +1180,6 @@ static const luaL_Reg CBasePlayermeta[] = {
{ "LocalEyeAngles", CBasePlayer_LocalEyeAngles },
{ "MaxSpeed", CBasePlayer_MaxSpeed },
{ "MyCombatCharacterPointer", CBasePlayer_MyCombatCharacterPointer },
- { "OnRestore", CBasePlayer_OnRestore },
{ "PhysicsSimulate", CBasePlayer_PhysicsSimulate },
{ "PhysicsSolidMaskForEntity", CBasePlayer_PhysicsSolidMaskForEntity },
{ "PlayerUse", CBasePlayer_PlayerUse },
diff --git a/src/game/shared/lsrcinit.cpp b/src/game/shared/lsrcinit.cpp
index 786a3eed4b..dbf54627ea 100644
--- a/src/game/shared/lsrcinit.cpp
+++ b/src/game/shared/lsrcinit.cpp
@@ -35,7 +35,7 @@ static const luaL_RegForState luasrclibs[] = {
//
{ LUA_BASEANIMATINGLIBNAME, luaopen_CBaseAnimating_shared, REALM_SHARED }, // ✔ n/a n/a
{ LUA_BASEANIMATINGLIBNAME, luaopen_CBaseAnimating, REALM_SHARED }, // n/a ✔ ✔
- { LUA_BASECOMBATWEAPONLIBNAME, luaopen_CBaseCombatWeapon, REALM_SHARED },
+ { LUA_BASECOMBATWEAPONLIBNAME, luaopen_CBaseCombatWeapon, REALM_SHARED }, // ✔ n/a n/a
{ LUA_BASEENTITYLIBNAME, luaopen_CBaseEntity_shared, REALM_SHARED },
{ LUA_BASEENTITYLIBNAME, luaopen_CBaseEntity, REALM_SHARED },
{ LUA_BASEPLAYERLIBNAME, luaopen_CBasePlayer_shared, REALM_SHARED },