fix: add check,
if(unitType != NULL && ct->getClass() == ccBuild)
This commit is contained in:
parent
22a2abd3f4
commit
d2fbc3f857
|
@ -1057,7 +1057,7 @@ Command* Commander::buildCommand(const NetworkCommand* networkCommand) const {
|
||||||
//create command
|
//create command
|
||||||
Command *command= NULL;
|
Command *command= NULL;
|
||||||
if(isCancelPreMorphCommand == false) {
|
if(isCancelPreMorphCommand == false) {
|
||||||
if(unitType != NULL) {
|
if(unitType != NULL && ct->getClass() == ccBuild) {
|
||||||
command= new Command(ct, networkCommand->getPosition(), unitType, facing);
|
command= new Command(ct, networkCommand->getPosition(), unitType, facing);
|
||||||
}
|
}
|
||||||
else if(target == NULL) {
|
else if(target == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue