Compare commits

..

3 Commits

@ -41,8 +41,8 @@ OPTION(HUNTER_ENABLED "Enable Hunter package manager" OFF)
IF(HUNTER_ENABLED) IF(HUNTER_ENABLED)
INCLUDE("CMakeModules/HunterGate.cmake") INCLUDE("CMakeModules/HunterGate.cmake")
HunterGate( HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.321.tar.gz" URL "https://github.com/cpp-pm/hunter/archive/v0.23.317.tar.gz"
SHA1 "5e53cbb0429037ea8e2592bfd92704b8ff3ab492" SHA1 "fbdd94b1966d351384e27b02c8d134915b1131d6"
FILEPATH "${CMAKE_CURRENT_LIST_DIR}/CMakeModules/HunterConfig.cmake" FILEPATH "${CMAKE_CURRENT_LIST_DIR}/CMakeModules/HunterConfig.cmake"
) )

@ -380,7 +380,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
#define nlassume(exp) do { } while (0) #define nlassume(exp) do { } while (0)
#endif #endif
#ifdef NL_NO_ASSERT #ifdef NL_NO_DEBUG
# define nlassert(exp) nlassume(exp) # define nlassert(exp) nlassume(exp)
# define nlassertonce(exp) nlassume(exp) # define nlassertonce(exp) nlassume(exp)
# define nlassertex(exp, str) nlassume(exp) # define nlassertex(exp, str) nlassume(exp)

@ -274,7 +274,7 @@
//#define NL_NO_DEBUG //#define NL_NO_DEBUG
#undef NL_NO_DEBUG #undef NL_NO_DEBUG
#define NL_NO_ASSERT
// Standard types // Standard types

@ -6274,11 +6274,6 @@ void CCharacterCL::updateVisiblePostPos(const NLMISC::TTime &currentTimeInMs, CE
pos = (box().getMin() + box().getMax())/2; pos = (box().getMin() + box().getMax())/2;
pos.z = box().getMax().z; pos.z = box().getMax().z;
} }
CRaceStatsSheet *sheet = const_cast<CRaceStatsSheet*>(UserEntity->playerSheet());
float namePosZ = sheet->GenderInfos[UserEntity->getGender()].NamePosZNormal;
if (pos.z > box().getMin().z + namePosZ)
pos.z = box().getMin().z + namePosZ;
nlassert(isValidDouble(pos.x) && isValidDouble(pos.y) && isValidDouble(pos.z)); nlassert(isValidDouble(pos.x) && isValidDouble(pos.y) && isValidDouble(pos.z));
_CurrentBubble->Position = pos; _CurrentBubble->Position = pos;
} }

@ -1437,34 +1437,6 @@ void CInterface3DShape::setName (const std::string &ht)
} }
} }
std::string CInterface3DShape::getTextures() const
{
return _Textures;
}
void CInterface3DShape::setTextures(const std::string &textures)
{
if (textures.empty())
return;
_Textures = textures;
vector<string> texList;
splitString(textures, " ", texList);
for(uint j=0;j<_Instance.getNumMaterials();j++)
{
sint numStages = _Instance.getMaterial(j).getLastTextureStage() + 1;
for(sint l = 0; l < numStages; l++)
{
if (_Instance.getMaterial(j).isTextureFile((uint) l))
{
_Instance.getMaterial(j).setTextureFileName(texList[std::min((int)j, (int)texList.size()-1)], (uint) l);
}
}
}
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// CInterface3DCamera // CInterface3DCamera
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

@ -265,15 +265,11 @@ public:
std::string getName() const; std::string getName() const;
void setName (const std::string &ht); void setName (const std::string &ht);
std::string getTextures() const;
void setTextures (const std::string &textures);
float getBBoxSizeX () const; float getBBoxSizeX () const;
float getBBoxSizeY () const; float getBBoxSizeY () const;
float getBBoxSizeZ () const; float getBBoxSizeZ () const;
REFLECT_EXPORT_START(CInterface3DShape, CInterfaceElement) REFLECT_EXPORT_START(CInterface3DShape, CInterfaceElement)
REFLECT_FLOAT("getBBoxSizeX", getBBoxSizeX, setPosX); REFLECT_FLOAT("getBBoxSizeX", getBBoxSizeX, setPosX);
REFLECT_FLOAT("getBBoxSizeY", getBBoxSizeY, setPosX); REFLECT_FLOAT("getBBoxSizeY", getBBoxSizeY, setPosX);
@ -285,7 +281,6 @@ public:
REFLECT_FLOAT ("roty", getRotY, setRotY); REFLECT_FLOAT ("roty", getRotY, setRotY);
REFLECT_FLOAT ("rotz", getRotZ, setRotZ); REFLECT_FLOAT ("rotz", getRotZ, setRotZ);
REFLECT_STRING ("name", getName, setName); REFLECT_STRING ("name", getName, setName);
REFLECT_STRING("textures", getTextures, setTextures);
REFLECT_EXPORT_END REFLECT_EXPORT_END
protected: protected:
@ -294,7 +289,6 @@ protected:
NLMISC::CVector _Pos; NLMISC::CVector _Pos;
NLMISC::CVector _Rot; NLMISC::CVector _Rot;
std::string _Name; std::string _Name;
std::string _Textures;
}; };
/** /**
@ -403,15 +397,6 @@ public:
float getTgtY() const { return _Target.y; } float getTgtY() const { return _Target.y; }
float getTgtZ() const { return _Target.z; } float getTgtZ() const { return _Target.z; }
float getRotZ() const { return _Rot.z; }
void setRotZ(float f) { _Rot.z = f; }
float getRotY() const { return _Rot.y; }
void setRotY(float f) { _Rot.y = f; }
float getDist() const { return _Dist; }
void setDist(float f) { _Dist = f; }
REFLECT_EXPORT_START(CInterface3DCamera, CInterfaceElement) REFLECT_EXPORT_START(CInterface3DCamera, CInterfaceElement)
REFLECT_FLOAT ("posx", getPosX, setPosX); REFLECT_FLOAT ("posx", getPosX, setPosX);
REFLECT_FLOAT ("posy", getPosY, setPosY); REFLECT_FLOAT ("posy", getPosY, setPosY);
@ -419,13 +404,19 @@ public:
REFLECT_FLOAT ("tgtx", getTgtX, setTgtX); REFLECT_FLOAT ("tgtx", getTgtX, setTgtX);
REFLECT_FLOAT ("tgty", getTgtY, setTgtY); REFLECT_FLOAT ("tgty", getTgtY, setTgtY);
REFLECT_FLOAT ("tgtz", getTgtZ, setTgtZ); REFLECT_FLOAT ("tgtz", getTgtZ, setTgtZ);
REFLECT_FLOAT ("rotz", getRotZ, setRotZ);
REFLECT_FLOAT ("roty", getRotY, setRotY);
REFLECT_FLOAT ("dist", getDist, setDist);
REFLECT_FLOAT ("fov", getFOV, setFOV); REFLECT_FLOAT ("fov", getFOV, setFOV);
REFLECT_FLOAT ("roll", getRoll, setRoll); REFLECT_FLOAT ("roll", getRoll, setRoll);
REFLECT_EXPORT_END REFLECT_EXPORT_END
float getRotZ() const { return _Rot.z; }
void setRotZ(float f) { _Rot.z = f; }
float getRotY() const { return _Rot.y; }
void setRotY(float f) { _Rot.y = f; }
float getDist() const { return _Dist; }
void setDist(float f) { _Dist = f; }
void reset(); // Reset user interaction void reset(); // Reset user interaction
protected: protected:

@ -2420,13 +2420,15 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
texture = ""; texture = "";
} }
std::vector<string>texList;
if (!texture.empty())
splitString(texture, " ", texList);
for(uint j=0;j<instance.getNumMaterials();j++) for(uint j=0;j<instance.getNumMaterials();j++)
{ {
if (highlight) if (!highlight)
{
/*instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255));
instance.getMaterial(j).setEmissive(CRGBA(255,255,255,255));
instance.getMaterial(j).setShininess(10.0f);*/
}
else
{ {
instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255)); instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255));
instance.getMaterial(j).setEmissive(CRGBA(255,0,0,255)); instance.getMaterial(j).setEmissive(CRGBA(255,0,0,255));
@ -2439,7 +2441,9 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
for(sint l = 0; l < numStages; l++) for(sint l = 0; l < numStages; l++)
{ {
if (instance.getMaterial(j).isTextureFile((uint) l)) if (instance.getMaterial(j).isTextureFile((uint) l))
instance.getMaterial(j).setTextureFileName(texList[std::min((int)j, (int)texList.size()-1)], (uint) l); {
instance.getMaterial(j).setTextureFileName(texture, (uint) l);
}
} }
} }
} }

Loading…
Cancel
Save