1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Add missing weapon identifier for Heli-blade. Should close #23

This commit is contained in:
Sandu Liviu Catalin 2016-07-27 23:59:43 +03:00
parent 93e6e9f77a
commit ed6bb9802f
3 changed files with 7 additions and 2 deletions

View File

@ -418,6 +418,7 @@ static const EnumElement g_WeaponEnum[] = {
{_SC("Drowned"), SQMOD_WEAPON_DROWNED},
{_SC("Fall"), SQMOD_WEAPON_FALL},
{_SC("Explosion2"), SQMOD_WEAPON_EXPLOSION2},
{_SC("HeliBlades"), SQMOD_WEAPON_HELIBLADES},
{_SC("Suicide"), SQMOD_WEAPON_SUICIDE},
{_SC("Launcher"), SQMOD_WEAPON_ROCKETLAUNCHER},
{_SC("Max"), SQMOD_WEAPON_MAX}

View File

@ -130,12 +130,15 @@ Int32 GetWeaponID(CCStr name)
// Default to unknwon
else return SQMOD_UNKNOWN;
// [H]ammer
// [H]eliblades
// [H]elicannon
case 'h':
// [Ha]mmer
if (b == 'a') return SQMOD_WEAPON_HAMMER;
// [He]licannon
else if (b == 'e') return SQMOD_WEAPON_HELICANNON;
// [He]li[b]lade[s]
else if (b == 'e' && (d == 's' || d == 'b' || (len > 4 && str[4] == 'b'))) return SQMOD_WEAPON_HELIBLADES;
// [He]li[c]anno[n]
else if (b == 'e' && (d == 'c' || d == 'n' || (len > 4 && str[4] == 'c'))) return SQMOD_WEAPON_HELICANNON;
// Default to unknwon
else return SQMOD_UNKNOWN;
// [K]atana

View File

@ -700,6 +700,7 @@ enum EntityType
#define SQMOD_WEAPON_DROWNED 43
#define SQMOD_WEAPON_FALL 44
#define SQMOD_WEAPON_EXPLOSION2 51
#define SQMOD_WEAPON_HELIBLADES 60
#define SQMOD_WEAPON_SUICIDE 70
#define SQMOD_WEAPON_MAX 71