mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-17 05:18:27 +00:00
allow some lines to fail from weapon data file
This commit is contained in:
parent
fed4e987f9
commit
6692eaec18
1 changed files with 12 additions and 8 deletions
|
@ -152,14 +152,18 @@ namespace SanAndreasUnity.Importing.Weapons
|
|||
continue;
|
||||
if (line.StartsWith ("#"))
|
||||
continue;
|
||||
|
||||
if (line.StartsWith ("$")) {
|
||||
// weapon
|
||||
m_loadedWeaponData.Add (new WeaponData (line));
|
||||
} else if (line.StartsWith ("%")) {
|
||||
// gun aiming offset
|
||||
m_loadedGunAimingOffsets.Add (new GunAimingOffset (line));
|
||||
}
|
||||
|
||||
// allow some lines to fail
|
||||
F.RunExceptionSafe(() =>
|
||||
{
|
||||
if (line.StartsWith ("$")) {
|
||||
// weapon
|
||||
m_loadedWeaponData.Add (new WeaponData (line));
|
||||
} else if (line.StartsWith ("%")) {
|
||||
// gun aiming offset
|
||||
m_loadedGunAimingOffsets.Add (new GunAimingOffset (line));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue