Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-25 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 10:56:42 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Update W3IsDamageFromMelee  (Read 236 times)
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 413


⠠⠵


View Profile
« on: November 11, 2010, 06:05:16 PM »

Added some new TF melee items.

Code:
stock bool:W3IsDamageFromMelee(const String:weapon[])
{
switch (War3_GetGame())
{
case Game_CS:
{
return StrEqual(weapon,"weapon_knife");
}
case Game_DOD:
{
return (StrEqual(weapon,"amerknife") ||
StrEqual(weapon,"spade") ||
StrEqual(weapon,"punch"));
}
case Game_TF:
{
return (
StrEqual(weapon,"shovel") ||
StrEqual(weapon,"wrench") ||
StrEqual(weapon,"bat") ||
StrEqual(weapon,"bonesaw") ||
StrEqual(weapon,"bottle") ||
StrEqual(weapon,"club") ||
StrEqual(weapon,"fireaxe") ||
StrEqual(weapon,"axtinguisher") ||
StrEqual(weapon,"fists") ||
StrEqual(weapon,"sandman") ||
StrEqual(weapon,"pickaxe") ||
StrEqual(weapon,"sword") ||
StrEqual(weapon,"demoshield") ||
StrEqual(weapon,"taunt_scout") ||
StrEqual(weapon,"taunt_sniper") ||
StrEqual(weapon,"taunt_pyro") ||
StrEqual(weapon,"taunt_demoman") ||
StrEqual(weapon,"taunt_heavy") ||
StrEqual(weapon,"taunt_spy") ||
StrEqual(weapon,"taunt_soldier")||

StrEqual(weapon,"tf_weapon_knife") ||
StrEqual(weapon,"tf_weapon_shovel") ||
StrEqual(weapon,"tf_weapon_wrench") ||
StrEqual(weapon,"tf_weapon_bat") ||
StrEqual(weapon,"tf_weapon_bat_wood") ||
StrEqual(weapon,"tf_weapon_bonesaw") ||
StrEqual(weapon,"tf_weapon_bottle") ||
StrEqual(weapon,"tf_weapon_club") ||
StrEqual(weapon,"tf_weapon_fireaxe") ||
StrEqual(weapon,"tf_weapon_fists") ||
StrEqual(weapon,"tf_weapon_sword") ||
StrEqual(weapon,"tf_weapon_bat_fish") ||
StrEqual(weapon,"tf_weapon_robot_arm")



);
}
}
return false;
}
« Last Edit: November 11, 2010, 06:14:03 PM by Foolishfox » Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2046



View Profile WWW Email
« Reply #1 on: November 11, 2010, 08:10:00 PM »

um.. give me the file with the changes
Logged

DarkEnergy
[Oddity]TeacherCreature
Sr. Member
****
Posts: 463


View Profile
« Reply #2 on: November 11, 2010, 08:11:17 PM »

In my opinion a really cool addition would be a parameter of dmg that included weapon
Logged

Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 413


⠠⠵


View Profile
« Reply #3 on: November 12, 2010, 10:42:10 AM »

stop being a lazy bum Ownz. If you really need to do a compare just copy out the function from your Interface and compare it to mine... Alternative just add the folloing to the end:

Code:
StrEqual(weapon,"tf_weapon_bat_fish") ||
StrEqual(weapon,"tf_weapon_robot_arm")
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2046



View Profile WWW Email
« Reply #4 on: November 12, 2010, 04:52:01 PM »

thats why u give me the whole file, and i do compare lol
Logged

DarkEnergy
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!