From 7fc8282c231132809967a53db63d30b2ec17c438 Mon Sep 17 00:00:00 2001 From: Resxt <55228336+Resxt@users.noreply.github.com> Date: Mon, 28 Mar 2022 12:32:13 +0200 Subject: [PATCH] automatic_weapons_rewards 1.0.2 Undefined warnings fix --- custom_killstreaks_rewards/automatic_weapons_rewards.gsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_killstreaks_rewards/automatic_weapons_rewards.gsc b/custom_killstreaks_rewards/automatic_weapons_rewards.gsc index 9df27b4..031cca8 100644 --- a/custom_killstreaks_rewards/automatic_weapons_rewards.gsc +++ b/custom_killstreaks_rewards/automatic_weapons_rewards.gsc @@ -109,7 +109,7 @@ SetLimits(kills_limit, time_limit) SetDvar("scr_" + level.gameType + "_scorelimit", kills_limit * score_multiplier); SetDvar("scorelimit", kills_limit * score_multiplier); - if (time_limit != undefined) + if (IsDefined(time_limit)) { SetDvar("scr_" + level.gameType + "_timelimit", time_limit); SetDvar("timelimit", time_limit); @@ -120,7 +120,7 @@ SetLimits(kills_limit, time_limit) InitWeaponRewards(kills_limit, weapon_switch_kills, last_weapon) { condition = kills_limit; - if (last_weapon != undefined) + if (IsDefined(last_weapon)) { condition = kills_limit - weapon_switch_kills; } @@ -162,7 +162,7 @@ InitWeaponRewards(kills_limit, weapon_switch_kills, last_weapon) } } - if (last_weapon != undefined) + if (IsDefined(last_weapon)) { level.weapon_rewards[level.weapon_rewards.size] = [kills_limit - weapon_switch_kills, last_weapon];