Fixed RifleBug preliminarily

This commit is contained in:
CharonInferar
2014-08-09 17:52:54 +02:00
parent 03a5b13749
commit 4af373b44e
2 changed files with 15 additions and 12 deletions
+7 -4
View File
@@ -94,11 +94,14 @@ public class CommandService implements INetworkDispatch {
return false;
}
TangibleObject weapon = (TangibleObject) core.objectService.getObject(actor.getWeaponId());
// Causes this service method to return with false after equipping a rifle, not allowing to unequip it anymore
// because the client seems to consider rifles invalidweapons for an unkown reason
if (weapon != null && weapon instanceof WeaponObject && ((WeaponObject) weapon).getWeaponType() == command.getInvalidWeapon()) {
return false;
}
// TangibleObject weapon = (TangibleObject) core.objectService.getObject(actor.getWeaponId());
//
// if (weapon != null && weapon instanceof WeaponObject && ((WeaponObject) weapon).getWeaponType() == command.getInvalidWeapon()) {
// return false;
// }
for (long state : command.getInvalidStates()) {
if ((actor.getStateBitmask() & state) == state) {