- bugfix for team switching validation should be skipped
- commented printf for tween debugging
This commit is contained in:
parent
d52924f214
commit
7e16873efd
|
@ -489,10 +489,13 @@ CommandResult Commander::computeResult(const CommandResultContainer &results) co
|
|||
|
||||
CommandResult Commander::pushNetworkCommand(const NetworkCommand* networkCommand) const {
|
||||
GameNetworkInterface *gameNetworkInterface= NetworkManager::getInstance().getGameNetworkInterface();
|
||||
const Unit* unit= world->findUnitById(networkCommand->getUnitId());
|
||||
CommandResult cr= crSuccess;
|
||||
|
||||
//validate unit
|
||||
const Unit* unit = NULL;
|
||||
if( networkCommand->getNetworkCommandType() != nctSwitchTeam &&
|
||||
networkCommand->getNetworkCommandType() != nctSwitchTeamVote) {
|
||||
unit= world->findUnitById(networkCommand->getUnitId());
|
||||
if(unit == NULL) {
|
||||
char szBuf[1024]="";
|
||||
sprintf(szBuf,"In [%s::%s - %d] Command refers to non existent unit id = %d. Game out of synch.",__FILE__,__FUNCTION__,__LINE__,networkCommand->getUnitId());
|
||||
|
@ -504,6 +507,7 @@ CommandResult Commander::pushNetworkCommand(const NetworkCommand* networkCommand
|
|||
}
|
||||
throw runtime_error(szBuf);
|
||||
}
|
||||
}
|
||||
|
||||
//add the command to the interface
|
||||
gameNetworkInterface->requestCommand(networkCommand);
|
||||
|
|
|
@ -508,7 +508,7 @@ void GameParticleSystem::setTween(float relative,float absolute) {
|
|||
|
||||
truncateDecimal<float>(tween);
|
||||
if(tween < 0.0f || tween > 1.0f) {
|
||||
printf("In [%s::%s Line: %d] WARNING setting tween to [%f] clamping tween, modelCycle [%f] absolute [%f] relative [%f]\n",__FILE__,__FUNCTION__,__LINE__,tween,modelCycle,absolute,relative);
|
||||
//printf("In [%s::%s Line: %d] WARNING setting tween to [%f] clamping tween, modelCycle [%f] absolute [%f] relative [%f]\n",__FILE__,__FUNCTION__,__LINE__,tween,modelCycle,absolute,relative);
|
||||
//assert(tween >= 0.0f && tween <= 1.0f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue