1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-20 19:57:12 +01:00

Remove unnecessary collision checks when converting a weapon name to an identifier.

This commit is contained in:
Sandu Liviu Catalin 2016-07-28 16:50:24 +03:00
parent c9184727f0
commit 0c324557f6

View File

@ -198,8 +198,8 @@ Int32 GetWeaponID(CCStr name)
case 'r':
// [Re]mote Detonation Grenade
if (b == 'e') return SQMOD_WEAPON_REMOTE;
// [Ro]cket [L]aunche[r]
else if (b == 'o' && (d == 'r' || d == 'l' || (len > 6 && str[6] == 'l'))) return SQMOD_WEAPON_ROCKETLAUNCHER;
// [Ro]cket Launcher
else if (b == 'o') return SQMOD_WEAPON_ROCKETLAUNCHER;
// [Ru]ger
else if (b == 'u') return SQMOD_WEAPON_RUGER;
// Default to unknwon