HaodongMo / ArcCW

57 stars 35 forks source link

[BUG] TTT2 Pre-Round Grenade Throwing #111

Closed dhkatz closed 2 years ago

dhkatz commented 2 years ago

Currently there's a bug with ArcCW weapons in TTT2 due to a difference in ConVar naming.

L 04/12/2022 - 17:47:15: Lua Error:
[[ArcCW] Arctic's Customizable Weapons (Base Only)] lua/weapons/arccw_base/sh_grenade.lua:14: attempt to index a nil value
  1. PreThrow - lua/weapons/arccw_base/sh_grenade.lua:14
   2. CanPrimaryAttack - lua/weapons/arccw_base/sh_firing.lua:45
    3. unknown - lua/weapons/arccw_base/sh_firing.lua:104

https://github.com/HaodongMo/ArcCW/blob/c3a3d17749c5f9237d3a298892b9665b464b642f/lua/weapons/arccw_base/sh_grenade.lua#L14

In TTT the ConVar is ttt_no_nade_throw_during_prep but in TTT2 they inverted it and renamed it to ttt_nade_throw_during_prep for some reason.

TheOnly8Z commented 2 years ago

Fixed.