mirror of
https://gitlab.com/xonotic/xonotic
synced 2025-04-22 06:55:32 +00:00
fix some weapon names
This commit is contained in:
parent
1b2c9a2d1c
commit
465dee005e
@ -28,7 +28,7 @@ sub load($)
|
|||||||
/^#/ and next;
|
/^#/ and next;
|
||||||
/^\/\// and next;
|
/^\/\// and next;
|
||||||
my ($addr, $map, $attackerweapon, $targweapon, $value);
|
my ($addr, $map, $attackerweapon, $targweapon, $value);
|
||||||
if(/^(\S+)\t(\S+)\t(\d+) (\d+)\t(\d+) (\d+)\t(\d+) (\d+) (\S+)$/)
|
if(/^([^\t]+)\t(\S+)\t(\d+) (\d+)\t(\d+) (\d+)\t(\d+) (\d+) (\S+)$/)
|
||||||
{
|
{
|
||||||
# new format (Xonotic)
|
# new format (Xonotic)
|
||||||
($addr, $map, $attackerweapon, $targweapon) = ($1, $2, $3, $5);
|
($addr, $map, $attackerweapon, $targweapon) = ($1, $2, $3, $5);
|
||||||
@ -39,13 +39,14 @@ sub load($)
|
|||||||
$ENV{WEAPONPROFILER_HITS} ? $8 :
|
$ENV{WEAPONPROFILER_HITS} ? $8 :
|
||||||
$7;
|
$7;
|
||||||
}
|
}
|
||||||
elsif(/^(\S+)\t(\S+)\t(\d+)\t(\d+)\t(\S+)$/)
|
elsif(/^([^\t]+)\t(\S+)\t(\d+)\t(\d+)\t(\S+)$/)
|
||||||
{
|
{
|
||||||
# legacy format (Nexuiz)
|
# legacy format (Nexuiz)
|
||||||
($addr, $map, $attackerweapon, $targweapon, $value) = ($1, $2, $3, $4, $5);
|
($addr, $map, $attackerweapon, $targweapon, $value) = ($1, $2, $3, $4, $5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
print STDERR "UNRECOGNIZED: $_\n";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$targweapon = int $self->weaponid_from_name($targweapon)
|
$targweapon = int $self->weaponid_from_name($targweapon)
|
||||||
@ -132,8 +133,8 @@ our %WeaponMap = (
|
|||||||
12 => ["MinstaNex", "minstanex"],
|
12 => ["MinstaNex", "minstanex"],
|
||||||
13 => ["Grappling Hook", "hookgun"],
|
13 => ["Grappling Hook", "hookgun"],
|
||||||
14 => ["Heavy Laser Assault Cannon", "hlac"],
|
14 => ["Heavy Laser Assault Cannon", "hlac"],
|
||||||
15 => ["Tuba", "tuba"],
|
15 => ["@!#%'n Tuba", "tuba"],
|
||||||
16 => ["Camping Rifle", "campingrifle"],
|
16 => ["Sniper Rifle", "sniperrifle"],
|
||||||
17 => ["Fireball", "fireball"],
|
17 => ["Fireball", "fireball"],
|
||||||
18 => ["Seeker", "seeker"],
|
18 => ["Seeker", "seeker"],
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user