misc: refactored weapon type recognition.

fix: reverted body offsets from 2.7 version.
fix: do not destroy breakable around if closer than 100 units. (#156 possible can be fixed).
fix: minimum supported hl & cs version display.
fix: csdm respawn outside of waypointed area causing pathfinder errors.
This commit is contained in:
ds 2020-09-13 02:21:15 +03:00
commit a675c40927
10 changed files with 205 additions and 174 deletions

View file

@ -185,6 +185,16 @@ public:
return m_weaponProps[id];
}
// get's weapons type by id
int32 getWeaponType (int id) const {
for (const auto &weapon : m_weapons) {
if (weapon.id == id) {
return weapon.type;
}
}
return WeaponType::None;
}
// get's weapon preferences for personality
int32 *getWeaponPrefs (int personality) const {
switch (personality) {