From 011697b6da16f1d95db88065ab99f38d5828cfd8 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 12 Jun 2016 03:19:56 +1000 Subject: [PATCH] Fix a crash with nades --- qcsrc/common/mutators/mutator/nades/nades.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index d643d8790..8faebab0b 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -958,9 +958,12 @@ void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, strin { entity n = new(nade), fn = new(fake_nade); - n.nade_type = bound(1, ntype, Nades_COUNT); + n.nade_type = max(1, ntype); n.pokenade_type = pntype; + if(Nades_from(n.nade_type) == NADE_TYPE_Null) + n.nade_type = NADE_TYPE_NORMAL.m_id; + setmodel(n, MDL_PROJECTILE_NADE); //setattachment(n, player, "bip01 l hand"); n.exteriormodeltoclient = player; -- 2.39.2