Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2008, 5:30:11 AM (16 years ago)
Author:
landauf
Message:

merged console branch into network branch

after several heavy troubles it compiles, but there is still a bug I couldn't fix: orxonox crashes as soon as one presses a key after opening the console… maybe someone else sees the problem?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/core/KeyBinder.cc

    r1444 r1446  
    4242#include "CoreIncludes.h"
    4343#include "CommandExecutor.h"
     44#include "ConsoleCommand.h"
    4445#include "Executor.h"
    4546// TODO: only needed by the CalibratorCallback class; move to new file
     
    6667      cmd.nValuesAdded_ = 0;
    6768      cmd.value_ = 0;
    68       return CommandExecutor::execute(cmd.evaluation_);
     69      return cmd.evaluation_.execute();
    6970    }
    7071    else
     
    8283  bool SimpleCommand::execute(float abs, float rel)
    8384  {
    84     return CommandExecutor::execute(evaluation_);
     85    return evaluation_.execute();
    8586  }
    8687
     
    183184        SubString tokens(commandStrings[iCommand], " ", SubString::WhiteSpaces, false,
    184185            '\\', false, '"', false, '(', ')', false, '\0');
    185        
     186
    186187        unsigned int iToken = 0;
    187188
     
    238239
    239240        // check for param command
    240         int paramIndex = eval.getEvaluatedExecutor()->getAxisParamIndex();
     241        int paramIndex = eval.getConsoleCommand()->getAxisParamIndex();
    241242        if (paramIndex >= 0)
    242243        {
     
    244245          ParamCommand* cmd = new ParamCommand();
    245246          cmd->paramModifier_ = paramModifier;
    246           cmd->bRelative_ = eval.getEvaluatedExecutor()->getIsAxisRelative();
     247          cmd->bRelative_ = eval.getConsoleCommand()->getIsAxisRelative();
    247248
    248249          // add command to the buffer if not yet existing
    249250          for (unsigned int iParamCmd = 0; iParamCmd < paramCommandBuffer.size(); iParamCmd++)
    250251          {
    251             if (getLowercase(paramCommandBuffer[iParamCmd]->evaluation_.getCommandString())
     252            if (getLowercase(paramCommandBuffer[iParamCmd]->evaluation_.getOriginalCommand())
    252253                == getLowercase(commandStr))
    253254            {
     
    271272            if (!addParamCommand(cmd))
    272273            {
    273               mode = eval.getEvaluatedExecutor()->getKeybindMode();
     274              mode = eval.getConsoleCommand()->getKeybindMode();
    274275              commands[mode].push_back(cmd);
    275276            }
     
    282283
    283284          if (mode == KeybindMode::None)
    284             mode = eval.getEvaluatedExecutor()->getKeybindMode();
     285            mode = eval.getConsoleCommand()->getKeybindMode();
    285286
    286287          commands[mode].push_back(cmd);
     
    331332    }
    332333  }
    333  
     334
    334335  bool HalfAxis::addParamCommand(ParamCommand* command)
    335336  {
Note: See TracChangeset for help on using the changeset viewer.