Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9031 in orxonox.OLD for branches/single_player_map/src/lib


Ignore:
Timestamp:
Jul 3, 2006, 1:35:40 PM (18 years ago)
Author:
snellen
Message:

added some methods to generic npcs scriptable

Location:
branches/single_player_map/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/lib/collision_reaction/cr_object_damage.cc

    r9008 r9031  
    5656  float damage = 0.0f;
    5757
    58   PRINTF(0)("Dealing damage - Handling collision: %s vs %s\n",
    59             collision->getEntityA()->getClassName(),
    60             collision->getEntityB()->getClassName());
     58 // PRINTF(0)("Dealing damage - Handling collision: %s vs %s\n",
     59        //    collision->getEntityA()->getClassName(),
     60        //    collision->getEntityB()->getClassName());
    6161
    6262  // the collision damage been dealed by the entity
     
    6565    collision->getEntityA()->hit(damage, collision->getEntityB());
    6666  }
    67   PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName());
     67 // PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName());
    6868
    6969  if( collision->isEntityBCollide()) {
     
    7171    collision->getEntityB()->hit(damage, collision->getEntityA());
    7272  }
    73   PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName());
     73 // PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName());
    7474
    7575  collision->flushCollisionEvents();
  • branches/single_player_map/src/lib/script_engine/script.cc

    r9020 r9031  
    2626CREATE_SCRIPTABLE_CLASS(Script, CL_SCRIPT,
    2727                    addMethod("addObject", ExecutorLua2<Script,const std::string&, const std::string& >(&Script::addObject))
    28                     //->addMethod("selectFunction", ExecutorLua2ret<Script, bool, const std::string&, int >(&Script::selectFunction))
     28                   // ->addMethod("selectFunction", ExecutorLua2ret<Script, bool, const std::string&, int >(&Script::selectFunction))
    2929                    ->addMethod("executeFunction", ExecutorLua0ret<Script,bool >(&Script::executeFunction))
    3030                     );
     
    8282   filedest += "scripts/" + filename;
    8383   
     84   this->addThisScript();
     85   this->registerStandartClasses();
     86   
    8487   if(currentFile.length() != 0)
    8588   {
     
    98101     {
    99102      currentFile = filename;
    100       this->addThisScript();
    101       this->registerStandartClasses();
    102103      return true;
    103104     }
     
    121122 void Script::addObject(const std::string& className, const std::string& objectName)
    122123 {
    123   // printf("Script %p: I am about to add %s of class %s\n",this,objectName.c_str(),className.c_str());
     124   //printf("Script %s: I am about to add %s of class %s\n",this->getName(),objectName.c_str(),className.c_str());
    124125
    125126   BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
     
    359360   //success = this->registerClass(std::string("Vector"));
    360361    success = this->registerClass("ScriptTrigger");
    361     success = this->registerClass("Script");
    362    
     362
    363363   return success;
    364364 }
Note: See TracChangeset for help on using the changeset viewer.