63 Commits
Author SHA1 Message Date
smallmodel f4a21b73a4 fix(fgame): fix unused holster attach offset (#852) 2025-11-29 13:30:26 +01:00
smallmodel c2519c86e6 Fix weapon falling angle adjustment (#796) 2025-09-07 01:01:56 +02:00
smallmodel a3f520de8c Format most source files 2025-07-19 23:30:20 +02:00
smallmodel f59f1df9b6 Prevent spamming the no ammo sound and max movement sound
This caused some full-auto weapons (like the thompson) to not play the reloading sound after emptying the clip
2025-07-05 22:13:25 +02:00
smallmodel 5108c800b6 Use an AI broadcast radius for weapon firing, based on the world radius
This is so bots don't get notified about shots at the other end of the map. This allows to bots to divide the map into smaller arenas for fighting.
2025-06-27 23:46:15 +02:00
smallmodel 9c81b4d475 Add a method to return the current fire spread multiplier 2025-06-25 21:39:58 +02:00
smallmodel 01f08958f0 Capitalize the first letter of ammo type (#761)
This fixes an issue where the ammo pickup message would not get
localized.
2025-06-21 21:20:52 +02:00
smallmodel c59be4be1e Don't use random for next time values 2025-06-16 21:46:39 +02:00
smallmodel 5f236d4d42 Fix projectiles having an unassigned weapon owner
This fixes weapons that shoot projectiles not being taken into account for being the preferred weapon
2025-01-05 23:57:08 +01:00
smallmodel 6b2160c876 Add putaway getter for Weapon 2025-01-02 14:27:39 +01:00
smallmodel 95466b810f Prevent an infinite loop in ProcessPendingEvents() when an entity is being deleted in thinks 2024-12-11 21:55:31 +01:00
smallmodel 8843a8ee15 Remove owner assert
The owner can be NULL so there is no reason to assert on this
2024-11-26 00:36:47 +01:00
smallmodel 10b7651eff Use getters for max fire movement and zoom movement 2024-11-25 22:12:29 +01:00
smallmodel e2f4d8cd6b Use explicit constants when checking g_gametype 2024-11-22 19:44:53 +01:00
smallmodel 50eda4156a Don't remove the weapon if it has no start ammo
Instead, prevent sentients from picking up weapons if they get no ammo from it and they already have that weapon. Instead, just let the weapon be picked up as a new weapon
2024-11-19 22:44:04 +01:00
smallmodel 1e609a4b2f Ignore bullet tracers in 1.11 and below
Before 2.0, the tracer frequency is set on almost all weapons. This has some artifacts on multiplayer, the tracer doesn't look adjusted in first-person view
2024-11-19 22:24:50 +01:00
smallmodel 735832829d Don't drop the weapon if it has no ammo 2024-11-16 00:29:44 +01:00
smallmodel 5703161166 Fix grenade dropping no ammo
This makes the weapon drop at least 1 ammo clip
2024-11-16 00:29:13 +01:00
smallmodel 00dbc74269 Use MAX_WEAPON_ANIM_SLOTS instead of a constant 2024-11-03 15:36:55 +01:00
smallmodel 4da099d15c Add GetChargeFraction() 2024-10-20 22:41:21 +02:00
smallmodel e2f5c80afc Stop charging the weapon when using turret 2024-10-20 18:46:23 +02:00
smallmodel 5b3ce85695 Add a method to get the spread factor 2024-10-18 19:52:49 +02:00
smallmodel d9166478e5 Set the weapon animation back to idle when finished animating
This fixes an issue that also occur in OG, where some weapons would constantly replay the same sounds (often reload/rechamber) when the weapon entity is removed then added to the client snapshot
2024-10-17 17:50:33 +02:00
smallmodel 34c44ab2cf Add a method to get the max fire movement 2024-10-08 21:52:43 +02:00
smallmodel c0dd08f6e0 Set an higher firing sound in MP 2024-10-05 21:24:45 +02:00
smallmodel 7c57c4b131 Fix wrong secondary ammo type being picked up 2024-09-08 20:20:58 +02:00
smallmodel fe35e02ed4 Fixed weapon pickup logic, like player picking up the weapon indefinitely when reaching max ammo 2024-03-03 18:09:19 +01:00
smallmodel 76c9e4e048 Fixed pickup message appearing twice 2024-02-28 23:33:10 +01:00
smallmodel 07c840a4a9 Don't assert for NULL owner 2024-02-28 22:10:18 +01:00
smallmodel 35a8c4edfa g_droppeditemlife: make sure the value is non-null 2024-02-28 22:10:07 +01:00
smallmodel 2d6ac6f0be Fixed weapon melee AI broadcast 2024-02-25 19:15:41 +01:00
smallmodel 434a48af7d Initialize m_iNumShotsFired 2024-02-06 22:57:37 +01:00
smallmodel d5908bd75c Fixed frag grenade spelling in SP 2024-02-04 16:30:31 +01:00
smallmodel 2e10a96d11 Crosshair must always be shown in 1.11 and below regardless of the property 2024-01-08 23:05:21 +01:00
smallmodel 3be17376e4 Fixed wrong landmine defuse direction 2023-12-28 18:55:43 +01:00
smallmodel e50a041c12 SimpleEntity subclass flags name now starts with ECF_ prefix 2023-11-16 23:17:06 +01:00
smallmodel c399f45841 Weapon::SetItemSlot() fixed missing bitwise negate 2023-11-15 19:36:09 +01:00
smallmodel 77eb7a5259 Added position and forward parameters to Sentient::GunTarget() 2023-10-17 19:45:22 +02:00
smallmodel 4368035da4 Remove the weapon from owner when being destroyed 2023-10-09 19:32:08 +02:00
smallmodel 334314a137 Fixed crash when the owner is NULL 2023-10-02 01:45:19 +02:00
smallmodel 98b7e01069 Implemented Weapon::SetItemSlot 2023-09-19 20:18:13 +02:00
smallmodel 6c7542ec0c Fixed weapon muzzle position 2023-09-18 23:45:17 +02:00
smallmodel e1093d0c0c Using vec3_t instead of Vector for Weapon::GetMuzzlePosition() 2023-09-18 21:19:08 +02:00
smallmodel acc9c241a3 Added const specifier for Weapon::IsCarryableTurret() 2023-09-17 16:27:58 +02:00
smallmodel f4ec3939a5 Weapon::Shoot(): process default value in switch/case for firemode 2023-09-12 21:47:51 +02:00
smallmodel c5a46be23e Optimized calls to Event() (avoid allocating a new Event when it can be reused) 2023-09-07 18:22:07 +02:00
smallmodel c2e24da9bd Initialize tracerspeed to 1 (this fixes turret bullets on mohaas/mohaab) 2023-08-24 23:19:49 +02:00
smallmodel 03c5864034 Fixed secondarycharge animation 2023-08-17 22:37:09 +02:00
smallmodel 07b7f10912 Fixed UnlimitedAmmo() behavior (use the behavior from mohaas/mohaab) 2023-08-17 21:31:22 +02:00
smallmodel c4738966fe Using g_utils.cpp from fakk 2023-08-15 01:27:35 +02:00