Fixed KBT #65, 182 and AI-related commandService bug

This commit is contained in:
CharonInferar
2014-08-16 21:39:26 +02:00
parent a62a56c868
commit 1c676d8ddd
6 changed files with 325 additions and 31 deletions
+7 -5
View File
@@ -80,8 +80,9 @@ public class CommandService implements INetworkDispatch {
if (actor == null)
return false;
if (actor.getClient() == null)
return false;
// if (actor.getClient() == null)
// return false;
// Please consider that AI is calling callCommand too. Thank you.
if (command == null)
return false;
@@ -95,6 +96,7 @@ public class CommandService implements INetworkDispatch {
if (actor.hasCooldown(command.getCooldownGroup()) || actor.hasCooldown(command.getCommandName()))
return false;
// 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
@@ -115,7 +117,7 @@ public class CommandService implements INetworkDispatch {
return false;
}
}
switch (command.getTargetType()) {
case 0: // Target Not Used For This Command
break;
@@ -251,7 +253,7 @@ public class CommandService implements INetworkDispatch {
default:
break;
}
switch (command.getTarget()) {
case 0: // Ally Only
if (target == null) {
@@ -318,7 +320,7 @@ public class CommandService implements INetworkDispatch {
e.printStackTrace();
}
}
if(command instanceof CombatCommand) {
try {
processCommand(actor, target, (BaseSWGCommand) command.clone(), actionCounter, commandArgs);