Compare commits

..

3 Commits

@ -41,8 +41,8 @@ OPTION(HUNTER_ENABLED "Enable Hunter package manager" OFF)
IF(HUNTER_ENABLED)
INCLUDE("CMakeModules/HunterGate.cmake")
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.321.tar.gz"
SHA1 "5e53cbb0429037ea8e2592bfd92704b8ff3ab492"
URL "https://github.com/cpp-pm/hunter/archive/v0.23.317.tar.gz"
SHA1 "fbdd94b1966d351384e27b02c8d134915b1131d6"
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)
#endif
#ifdef NL_NO_ASSERT
#ifdef NL_NO_DEBUG
# define nlassert(exp) nlassume(exp)
# define nlassertonce(exp) nlassume(exp)
# define nlassertex(exp, str) nlassume(exp)

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

@ -6274,11 +6274,6 @@ void CCharacterCL::updateVisiblePostPos(const NLMISC::TTime &currentTimeInMs, CE
pos = (box().getMin() + box().getMax())/2;
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));
_CurrentBubble->Position = pos;
}
@ -6684,7 +6679,7 @@ ADD_METHOD(void CCharacterCL::updatePos(const TTime &currentTimeInMs, CEntityCL
updatePosCombatFloat(frameTimeRemaining, target);
}
// Compute the average speed to the destination.
// double spd =
// double spd =
computeSpeed();
@ -8238,14 +8233,14 @@ float CCharacterCL::getSheetScale() const // virtual
// getColRadius :
// Return the entity collision radius. (return 0.5 if there is any problem).
//---------------------------------------------------
float CCharacterCL::getSheetColRadius() const
float CCharacterCL::getSheetColRadius() const
{
if(!_Sheet)
if(!_Sheet)
return 0.5f;
else
return _Sheet->ColRadius;
}
//---------------------------------------------------
// getScale :
@ -8364,7 +8359,7 @@ std::string CCharacterCL::shapeFromItem(const CItemSheet &itemSheet) const
sheet = itemSheet.getShape();
return sheet;
}// shapeFromItem //
@ -9152,7 +9147,7 @@ void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
bi.DelayBeforeStart = 11.5f;
_AttachedFXListToStart.push_front(bi);
}
else
else
{
CAttachedFX::TSmartPtr fx = new CAttachedFX;
fx->create(*this, bi, CAttachedFX::CTargeterInfo());

@ -713,7 +713,7 @@ int CInterface3DScene::luaGetElement(CLuaState &ls)
}
return 1;
}
// ----------------------------------------------------------------------------
string CInterface3DScene::getCurrentCamera() const
{
@ -1288,7 +1288,7 @@ float CInterface3DShape::getBBoxSizeX () const
{
CAABBox bbox;
_Instance.getShapeAABBox(bbox);
if (bbox.getCenter() == CVector::Null)
return -0.5f;
@ -1299,7 +1299,7 @@ float CInterface3DShape::getBBoxSizeY () const
{
CAABBox bbox;
_Instance.getShapeAABBox(bbox);
if (bbox.getCenter() == CVector::Null)
return -0.5f;
@ -1310,7 +1310,7 @@ float CInterface3DShape::getBBoxSizeZ () const
{
CAABBox bbox;
_Instance.getShapeAABBox(bbox);
if (bbox.getCenter() == CVector::Null)
return -0.5f;
@ -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
// ----------------------------------------------------------------------------

@ -87,7 +87,7 @@ public:
void setDistLimitMax(float limitMax) { _DistLimitMax = limitMax;}
int luaGetElement(CLuaState &ls);
REFLECT_EXPORT_START(CInterface3DScene, CInterfaceGroup)
REFLECT_LUA_METHOD ("getElement", luaGetElement);
REFLECT_STRING ("curcam", getCurrentCamera, setCurrentCamera);
@ -265,15 +265,11 @@ public:
std::string getName() const;
void setName (const std::string &ht);
std::string getTextures() const;
void setTextures (const std::string &textures);
float getBBoxSizeX () const;
float getBBoxSizeY () const;
float getBBoxSizeZ () const;
REFLECT_EXPORT_START(CInterface3DShape, CInterfaceElement)
REFLECT_FLOAT("getBBoxSizeX", getBBoxSizeX, setPosX);
REFLECT_FLOAT("getBBoxSizeY", getBBoxSizeY, setPosX);
@ -285,7 +281,6 @@ public:
REFLECT_FLOAT ("roty", getRotY, setRotY);
REFLECT_FLOAT ("rotz", getRotZ, setRotZ);
REFLECT_STRING ("name", getName, setName);
REFLECT_STRING("textures", getTextures, setTextures);
REFLECT_EXPORT_END
protected:
@ -294,7 +289,6 @@ protected:
NLMISC::CVector _Pos;
NLMISC::CVector _Rot;
std::string _Name;
std::string _Textures;
};
/**
@ -403,15 +397,6 @@ public:
float getTgtY() const { return _Target.y; }
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_FLOAT ("posx", getPosX, setPosX);
REFLECT_FLOAT ("posy", getPosY, setPosY);
@ -419,13 +404,19 @@ public:
REFLECT_FLOAT ("tgtx", getTgtX, setTgtX);
REFLECT_FLOAT ("tgty", getTgtY, setTgtY);
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 ("roll", getRoll, setRoll);
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
protected:

@ -2420,13 +2420,15 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
texture = "";
}
std::vector<string>texList;
if (!texture.empty())
splitString(texture, " ", texList);
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).setEmissive(CRGBA(255,0,0,255));
@ -2439,7 +2441,9 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
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);
{
instance.getMaterial(j).setTextureFileName(texture, (uint) l);
}
}
}
}

Loading…
Cancel
Save