Changeset 9003 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Jul 2, 2006, 1:36:13 PM (18 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_reaction/cr_physics_ground_walk.cc
r8894 r9003 23 23 #include "world_entity.h" 24 24 #include "cr_physics_ground_walk.h" 25 #include "collision_reaction.h" 25 26 26 27 #include <vector> … … 58 59 void CRPhysicsGroundWalk::reactToCollision(Collision* collision) 59 60 { 60 CollisionEvent* ce = collision->getCollisionEvents().front(); 61 Vector normal = ce->getGroundNormal(); 62 // normal.normalize(); 63 64 // put it back 65 // PRINTF(0)("putting it back to lastPos: \n"); 66 // this->lastPositions[0].debug(); 67 // PRINTF(0)("current pos:\n"); 68 // collision->getEntityB()->getAbsCoor().debug(); 69 70 float height; 61 71 62 AABB* box = collision->getEntityB()->getModelAABB(); 72 63 WorldEntity* entity = collision->getEntityB(); 73 74 // collision position maths75 Vector collPos = collision->getEntityB()->getAbsCoor() + box->center - ce->getCollisionPosition();76 77 float CR_MAX_WALK_HEIGHT = 2.0f;78 float CR_THRESHOLD = 0.2f;79 64 80 65 if( box == NULL) … … 85 70 86 71 87 switch( ce->getType()) 72 float CR_MAX_WALK_HEIGHT = 2.0f; 73 float CR_THRESHOLD = 0.2f; 74 75 float height = 0; 76 float front = 0; 77 float side = 0; 78 79 //PRINTF(0)("collision raction======================================\n"); 80 81 const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents()); 82 std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin(); 83 for(; it != collisionEvents->end(); it++) 88 84 { 89 case COLLISION_TYPE_AXIS_Y: 90 91 height = collPos.y - box->halfLength[1]; 92 // PRINTF(0)("height: %f , model height: %f\n", height, box->halfLength[1]); 93 // PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z); 94 95 // object is beneath the plane (ground) 96 if( height <= 0.0f ) 97 { 98 entity->shiftCoor(Vector(0, -height, 0)); 99 } 100 // object is already in the wall 101 else if( ce->isInWall()) 102 { 103 entity->setAbsCoor(entity->getLastAbsCoor()); 104 } 105 break; 106 107 108 case COLLISION_TYPE_AXIS_X: 109 case COLLISION_TYPE_AXIS_Z: 110 break; 111 112 } 113 114 85 86 CollisionEvent* ce = (*it); 87 Vector normal = ce->getGroundNormal(); 88 89 // calculate the collision position 90 Vector collPos = collision->getEntityB()->getAbsCoor() + box->center - ce->getCollisionPosition(); 91 92 // test the 3 axis differently 93 switch( ce->getType()) 94 { 95 // collision in the x-axis 96 case COLLISION_TYPE_AXIS_X: 97 front = collPos.x - box->halfLength[0]; // should be [0] 98 99 // object is beneath the plane (ground) 100 if( front <= 0.0f ) 101 { 102 Vector backoff = entity->getAbsDirX() * front; 103 // entity->shiftCoor(backoff); 104 } 105 // object is already in the wall 106 else if( ce->isInWall()) 107 { 108 // entity->setAbsCoor(entity->getLastAbsCoor()); 109 } 110 break; 111 112 113 // collision in the y-axis 114 case COLLISION_TYPE_AXIS_Y: 115 // calulate the height above ground 116 height = collPos.y - box->halfLength[1]; 117 118 119 // object is beneath the plane (ground) 120 if( height <= 0.0f ) 121 { 122 entity->shiftCoor(Vector(0.0f, -height, 0.0f)); 123 entity->setOnGround(true); 124 } 125 // object is already in the wall 126 else if( ce->isInWall()) 127 { 128 entity->setAbsCoor(entity->getLastAbsCoor()); 129 } 130 else 131 { 132 // entity is not on ground 133 entity->setOnGround(false); 134 } 135 break; 136 137 138 // collision in the z-axis 139 case COLLISION_TYPE_AXIS_Z: 140 141 side = collPos.z - box->halfLength[2]; // should be [2] 142 143 // object is beneath the plane (ground) 144 if( side <= 0.0f ) 145 { 146 Vector backoff = entity->getAbsDirX() * side; 147 // entity->shiftCoor(backoff); 148 } 149 // object is already in the wall 150 else if( ce->isInWall()) 151 { 152 // entity->setAbsCoor(entity->getLastAbsCoor()); 153 } 154 break; 155 } 156 } 157 //PRINTF(0)("collision distances: x: %f, y: %f, z: %f\n", front, height, side); 115 158 116 159 … … 126 169 127 170 128 if( box != NULL) { 129 130 131 if(ce->getCollisionPosition().x <= 0.9 && ce->getGroundNormal().len() <= 1.4f) { 171 if( box != NULL) 172 { 173 174 175 if(ce->getCollisionPosition().x <= 0.9 && ce->getGroundNormal().len() <= 1.4f) 176 { 132 177 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getLastAbsCoor()); 133 178 return; 134 179 } 135 if(ce->getCollisionPosition().z <= 0.9 && ce->getGroundNormal().len() <= 1.4f) { 180 if(ce->getCollisionPosition().z <= 0.9 && ce->getGroundNormal().len() <= 1.4f) 181 { 136 182 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getLastAbsCoor()); 137 183 return; 138 184 } 139 185 140 if(ce->getGroundNormal().len() <= 0.1f) { 186 if(ce->getGroundNormal().len() <= 0.1f) 187 { 141 188 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getLastAbsCoor()); 142 189 return; … … 144 191 145 192 146 if(ce->getGroundNormal().len() >= 1.4f) { 193 if(ce->getGroundNormal().len() >= 1.4f) 194 { 147 195 downspeed++; 148 196 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0,-0.08*downspeed,0.0)); … … 164 212 165 213 } 166 else { 214 else 215 { 167 216 if(height.y < box->halfLength[1] + 0.0f /* && height.y > - 55.0f*/) // below ground 168 217 { … … 194 243 */ 195 244 void CRPhysicsGroundWalk::update(WorldEntity* owner) 196 { 197 198 } 199 200 245 {} 246 247 -
trunk/src/lib/graphics/importer/bsp_file.cc
r8894 r9003 46 46 BspFile::BspFile() 47 47 {} 48 49 BspFile::~ BspFile() 50 { 51 delete [] nodes; 52 delete [] leaves; 53 delete [] planes; 54 delete [] bspModels; 55 delete [] leafFaces; 56 delete [] faces; 57 delete [] leafBrushes; 58 delete [] brushes; 59 delete [] brushSides; 60 delete [] vertice; 61 delete [] meshverts; 62 delete [] visData; 63 delete [] textures; 64 delete [] patchVertice; 65 delete [] patchIndexes; 66 // delete [] patchTrianglesPerRow; 67 delete [] lightMaps; 68 69 for(int i = 0; i < this->numPatches; ++i) delete this->VertexArrayModels[i]; 70 // delete [] VertexArrayModels; 71 72 for(int i = 0; i < this->numTextures; ++i) 73 { 74 delete this->Materials[i].mat; 75 //delete this->Materials[i].aviMat; 76 } 77 delete [] this->Materials; 78 //delete [] testSurf; 79 80 81 82 } 48 83 49 84 /** … … 294 329 this->patchVertice = new char[8*8*44*(this->numPatches+10)]; 295 330 this->patchIndexes = new char[7*8*2*4*(this->numPatches+10)]; 296 this->patchRowIndexes = new int*[7*4*this->numPatches];331 // this->patchRowIndexes = new int*[7*4*this->numPatches]; Not needed? 297 332 this->patchTrianglesPerRow = new char[7*4*this->numPatches]; 298 333 this->VertexArrayModels = new VertexArrayModel*[this->numPatches]; … … 464 499 465 500 if(File(absFileName).exists()) { 466 PRINTF( 0)("BSP FILE: gefunden . \n");501 PRINTF(4)("BSP FILE: gefunden . \n"); 467 502 this->Materials[i] = this->loadAVI(fileName); 468 503 continue; … … 553 588 } 554 589 555 PRINTF(0)("BSP FILE: Textur %s nicht gefunden . \n", &this->textures[8+72*i]);590 PRINTF(0)("BSP FILE: Texture %s not found.",&this->textures[8+ 72*i] ); 556 591 // Default Material 557 592 this->Materials[i].mat = new Material(); … … 1012 1047 Face->meshvert = patchOffset -sz; //3*(patchOffset-sz)*level1*level1; 1013 1048 Face->n_meshverts = sz; 1014 PRINTF( 4)("BSP FILE: sz: %i. \n", sz);1015 PRINTF( 4)("BSP FILE: Face->meshvert %i . \n", Face->meshvert);1049 PRINTF(0)("BSP FILE: sz: %i. \n", sz); 1050 PRINTF(0)("BSP FILE: Face->meshvert %i . \n", Face->meshvert); 1016 1051 1017 1052 //Face->n_meshverts = sz; -
trunk/src/lib/graphics/importer/bsp_file.h
r8490 r9003 151 151 public: 152 152 BspFile(); 153 ~BspFile(); 153 154 int read(const char* name ); 154 155 void build_tree(); … … 183 184 184 185 int** patchRowIndexes; 185 VertexArrayModel** VertexArrayModels; 186 VertexArrayModel** VertexArrayModels; 186 187 int patchOffset; 187 188 -
trunk/src/lib/graphics/importer/bsp_manager.cc
r8894 r9003 1 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 4 4 Copyright (C) 2006 orx 5 5 6 6 This program is free software; you can redistribute it and/or modify 7 7 it under the terms of the GNU General Public License as published by 8 8 the Free Software Foundation; either version 2, or (at your option) 9 9 any later version. 10 10 11 11 ### File Specific: 12 12 main-programmer: bottac@ee.ethz.ch 13 13 14 14 Inspired by: 15 15 Rendering Q3 Maps by Morgan McGuire http://graphics.cs.brown.edu/games/quake/quake3.html 16 16 Unofficial Quake 3 Map Specs by Kekoa Proudfoot http://graphics.stanford.edu/~kekoa/q3/ 17 17 18 18 Collision detection adapted from: 19 19 Quake 3 Collision Detection by Nathan Ostgard http://www.devmaster.net/articles/quake3collision/ … … 69 69 BspManager::BspManager(const TiXmlElement* root) 70 70 { 71 72 71 72 73 73 if( root != NULL) 74 74 this->loadParams(root); 75 75 76 76 CDEngine::getInstance()->setBSPModel(this); 77 77 } */ 78 78 79 void BspManager::load(const char* fileName, float scale) 79 BspManager::~BspManager() 80 { 81 if(this->bspFile) 82 delete this->bspFile; 83 } 84 85 int BspManager::load(const char* fileName, float scale) 80 86 { 81 87 // open a BSP file 88 89 82 90 this->bspFile = new BspFile(); 83 91 this->bspFile->scale = scale; 84 this->bspFile->read(ResourceManager::getFullName(fileName).c_str()); 92 if(this->bspFile->read(ResourceManager::getFullName(fileName).c_str()) == -1) 93 return -1; 94 85 95 this->bspFile->build_tree(); 86 96 this->root = this->bspFile->get_root(); … … 88 98 89 99 this->outputFraction = 1.0f; 100 101 return 0; 90 102 } 91 103 /* … … 99 111 this->root = this->bspFile->get_root(); 100 112 this->alreadyVisible = new bool [this->bspFile->numFaces]; 101 113 102 114 CDEngine::getInstance()->setBSPModel(this); 103 115 } … … 962 974 Vector dest = worldEntity->getAbsCoor() - upDir*40.0f; // 963 975 Vector dest1 = position + forwardDir*4.0f; 964 Vector dest2 = position2 + forwardDir ;976 Vector dest2 = position2 + forwardDir*4.0; 965 977 dest = position - Vector(0.0, 40.0,0.0); 966 978 Vector out = dest; … … 974 986 975 987 if( box != NULL) { 976 position = worldEntity->getAbsCoor() + box->center; // + box->axis[1] * box->halfLength[1]; 977 dest = worldEntity->getAbsCoor() + box->center - box->axis[1] * box->halfLength[1] * 40.0; 978 979 position1 = worldEntity->getAbsCoor() + box->center + box->axis[0] * box->halfLength[0] * 2.0f; 980 dest1 = worldEntity->getAbsCoor() + box->center - box->axis[0] * box->halfLength[0] *2.0f; 981 982 983 position2 = worldEntity->getAbsCoor() + box->center + box->axis[2] * box->halfLength[2] * 2.0f; 984 dest2 = worldEntity->getAbsCoor() + box->center - box->axis[2] * box->halfLength[2] * 2.0f; 988 position = worldEntity->getAbsCoor() + box->center + Vector(0.0, 1.0, 0.0) * box->halfLength[1]; 989 dest = worldEntity->getAbsCoor() + box->center - Vector(0.0, 1.0, 0.0) * (box->halfLength[1] + BSP_Y_OFFSET); 990 991 position1 = worldEntity->getAbsCoor() + box->center - worldEntity->getAbsDirX() * (box->halfLength[0] + BSP_X_OFFSET); 992 dest1 = worldEntity->getAbsCoor() + box->center + worldEntity->getAbsDirX() * (box->halfLength[0] + BSP_X_OFFSET); 993 994 position2 = worldEntity->getAbsCoor() + box->center - worldEntity->getAbsDirZ() * (box->halfLength[2] + BSP_Z_OFFSET); 995 dest2 = worldEntity->getAbsCoor() + box->center + worldEntity->getAbsDirZ() * (box->halfLength[2] + BSP_Z_OFFSET); 985 996 986 997 } else { … … 989 1000 } 990 1001 1002 1003 // PRINTF(0)("x and v\n"); 1004 // worldEntity->getAbsDirX().debug(); 1005 // worldEntity->getAbsDirV().debug(); 991 1006 992 1007 … … 1035 1050 plane* testPlane = this->collPlane; 1036 1051 1037 1038 1052 bool xCollision = false; 1039 1053 bool zCollision = false; 1040 if(!SolidFlag) { 1054 1041 1055 1042 1056 // 2nd Collision Detection … … 1048 1062 this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 ); 1049 1063 1050 if( !this->outputAllSolid !=1.0f) {1064 if(this->outputFraction < 1.0f) { 1051 1065 out.x = dest1.x + (dest1.x -position1.x) * this->outputFraction; 1066 dest1 = position1 + (dest1 -position1) * this->outputFraction; 1052 1067 xCollision = true; 1053 1068 testPlane = this->collPlane; 1054 1069 } 1055 if(this->outputAllSolid) { 1070 if(this->outputAllSolid ) { 1071 1072 this->collPlane = new plane; 1073 this->collPlane->x = 0.0f; 1074 this->collPlane->y = 0.0f; 1075 this->collPlane->z = 0.0f; 1076 testPlane = this->collPlane; 1056 1077 SolidFlag = true; 1057 xCollision = true; 1078 xCollision = true; 1058 1079 } 1059 1080 //out.z = this->outputFraction; 1060 1081 1061 if(!SolidFlag) { 1082 1062 1083 1063 1084 // 3rd Collision Detection … … 1067 1088 this->inputStart = position2; 1068 1089 this->inputEnd = dest2; 1090 1069 1091 this->checkCollisionRayN(this->root,0.0f,1.0f, &position2, &dest2 ); 1070 1092 //out.x = this->outputFraction; 1071 1093 1072 if(this->outputFraction !=1.0f ) {1094 if(this->outputFraction < 1.0f ) { 1073 1095 out.z = out.z = dest2.z + (dest2.z -position2.z) * this->outputFraction; 1096 dest2 = position2 + (dest2 -position2) * this->outputFraction; 1074 1097 zCollision = true; 1075 1098 testPlane = this->collPlane; 1076 1099 1077 1100 } 1078 if(this->outputAllSolid) { 1079 SolidFlag = true; 1080 zCollision = true; 1101 if(this->outputAllSolid ) { 1102 this->collPlane = new plane; 1103 this->collPlane->x = 0.0f; 1104 this->collPlane->y = 0.0f; 1105 this->collPlane->z = 0.0f; 1106 testPlane = this->collPlane; 1107 1108 SolidFlag = true; 1109 zCollision = true; 1081 1110 } 1082 } 1083 }//end if1111 1112 //end if 1084 1113 /* 1085 1114 This is how you would calculate the Coordinates where worldEntity Collided with the BSP world. … … 1091 1120 // Return the normal here: Normal's stored in this->collPlane; 1092 1121 if( collision) { 1093 PRINTF(5)("We got a collision!! Are you sure: outputFraction = %f\n", this->outputFraction); 1094 worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y || (xCollision ? COLLISION_TYPE_AXIS_X :0) | (zCollision ? COLLISION_TYPE_AXIS_Z :0), this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag); 1095 } else { 1096 if(xCollision || zCollision) { 1097 1098 worldEntity->registerCollision((xCollision ? COLLISION_TYPE_AXIS_X :0) | (zCollision ? COLLISION_TYPE_AXIS_Z :0) , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag); 1099 } 1100 1101 } 1122 worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag); 1123 } 1124 if(xCollision) { 1125 worldEntity->registerCollision(COLLISION_TYPE_AXIS_X , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z),dest1 , SolidFlag); 1126 } 1127 if(zCollision) { 1128 worldEntity->registerCollision(COLLISION_TYPE_AXIS_Z , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), dest2 , SolidFlag); 1129 } 1130 1131 1102 1132 //else worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y, this->parent, worldEntity, Vector(0.0, 2.0, 0.0), dest, false); 1103 1133 -
trunk/src/lib/graphics/importer/bsp_manager.h
r8724 r9003 28 28 29 29 30 #define BSP_X_OFFSET 20.0f 31 #define BSP_Y_OFFSET 40.0f 32 #define BSP_Z_OFFSET 20.0f 33 30 34 31 35 // FORWARD DECLARATIONS … … 41 45 class WorldEntity; 42 46 47 48 // Obsolete 43 49 struct BspCollisionEvent 44 50 { … … 54 60 55 61 BspManager(const char* fileName, float scale = 0.4f); 56 void load(const char* fileName, float scale); 62 63 // Deconstructor 64 ~BspManager(); 65 66 57 67 58 68 // Functions 69 int load(const char* fileName, float scale); 59 70 const void draw(); 60 71 const void tick(float time); … … 99 110 Vector inputStart; 100 111 Vector inputEnd; 101 112 102 113 Vector traceMins; //!< Mins of current bbox 103 114 Vector traceMaxs; //!< Maxs of current bbox … … 112 123 ::std::deque<int> opal; //!< the others here. 113 124 114 Vector out; //!< For debugging only125 Vector out; //!< Stores collision coordinates 115 126 Vector out1; //!< For debugging only 116 127 Vector out2; //!< For debugging only 117 128 118 129 int tgl; 119 130 }; -
trunk/src/lib/graphics/importer/interactive_model.h
r8894 r9003 40 40 virtual int getAnimation() = 0; 41 41 42 virtual bool isAnimationFinished() { return false; } 43 42 44 virtual void setAnimationSpeed(float speed) {} 43 45 }; -
trunk/src/lib/graphics/importer/md2/md2Model.cc
r8894 r9003 85 85 86 86 this->scaleFactor = scale; 87 this->animationSpeed = 1.0f; 87 88 88 89 shadeDots = MD2Model::anormsDots[0]; … … 103 104 this->pModelInfo.pTexCoor = (float*)this->data->pTexCoor; 104 105 105 this->animationSpeed = 1.0f;106 106 107 107 // triangle conversion -
trunk/src/lib/graphics/importer/md2/md2Model.h
r8894 r9003 161 161 inline int MD2Model::getAnimation() { return this->animationState.type; } 162 162 virtual void setAnimationSpeed(float speed) { this->animationSpeed = speed; } 163 virtual bool isAnimationFinished() { return (this->animationState.currentFrame == this->animationState.endFrame )?true:false; } 163 164 /** scales the current model @param scaleFactor: the factor [0..1] to use for scaling */ 164 165 void scaleModel(float scaleFactor) { this->scaleFactor = scaleFactor;} -
trunk/src/lib/script_engine/script.cc
r8783 r9003 24 24 25 25 #include "class_list.h" 26 // uncommet this when the std:string and the const bug is fixed 27 //CREATE_SCRIPTABLE_CLASS(Script, CL_SCRIPT, 28 // addMethod("addObject", ExecutorLua2<Script,std::string,std::string>(&Script::addObject)) 29 // ): 26 30 27 31 Script::Script(const TiXmlElement* root) … … 73 77 bool Script::loadFile(const std::string& filename) 74 78 { 75 79 this->setName(filename); 76 80 std::string filedest(ResourceManager::getInstance()->getDataDir()); 77 81 filedest += "scripts/" + filename; … … 93 97 { 94 98 currentFile = filename; 99 //this->addThisScript(); 95 100 return true; 96 101 } … … 323 328 } 324 329 330 331 void Script::addThisScript() 332 { 333 BaseObject* scriptClass = ClassList::getObject("Script", CL_SCRIPT_CLASS); 334 if (scriptClass != NULL) 335 { 336 static_cast<ScriptClass*>(scriptClass)->registerClass(this); 337 static_cast<ScriptClass*>(scriptClass)->insertObject(this, this,"thisscript", false); 338 } 339 } 340 325 341 int Script::reportError(int error) 326 342 { -
trunk/src/lib/script_engine/script.h
r8711 r9003 31 31 void loadFileNoRet(const std::string& filename) { loadFile(filename); }; 32 32 bool loadFile(const std::string& filename); 33 void addObject( const std::string& className,const std::string& objectName);33 void addObject( const std::string& className,const std::string& objectName); 34 34 35 35 /// QUERRYING … … 61 61 62 62 private: 63 63 void addThisScript(); 64 64 int reportError(int error); //!< Get errormessage from the lua stack and print it. 65 65 bool registerStandartClasses(); //!< Register all the classes that the script might need -
trunk/src/lib/script_engine/script_class.h
r8408 r9003 34 34 virtual void registerClass(Script* script) = 0; 35 35 virtual int insertObject(Script* L, BaseObject* obj, bool gc=false) = 0; 36 virtual int insertObject(Script* L, BaseObject* obj, const std::string& name, bool gc=false) = 0; 36 37 37 38 const ScriptMethod* scriptMethods() const { return this->_scriptMethods; } … … 64 65 return Lunar<T>::insertObject(L, dynamic_cast<T*>(obj), obj->getName(), gc); 65 66 } 67 68 virtual int insertObject(Script* L, BaseObject* obj,const std::string& name, bool gc=false) 69 { 70 return Lunar<T>::insertObject(L, dynamic_cast<T*>(obj), name, gc); 71 } 66 72 }; 67 73 -
trunk/src/lib/script_engine/script_manager.cc
r8711 r9003 74 74 while(!scripts->empty()) 75 75 delete scripts->front(); 76 //Delete all triggers 77 if(this->getTriggers()) 78 while(!triggers->empty()) 79 delete triggers->front(); 80 76 81 } 77 82 -
trunk/src/lib/util/executor/executor_lua.cc
r8894 r9003 37 37 template<> void toLua<float>(lua_State* state, float value) { lua_pushnumber(state, (lua_Number) value); }; 38 38 template<> void toLua<char>(lua_State* state, char value) { lua_pushnumber(state, (lua_Number) value); }; 39 template<> void toLua<const std::string&>(lua_State* state, const std::string& value) { lua_pushstring (state, value.c_str()); }39 template<> void toLua<const std::string&>(lua_State* state, const std::string& value) { lua_pushstring (state, value.c_str()); }
Note: See TracChangeset
for help on using the changeset viewer.