Compare commits

..

10 Commits

Author SHA1 Message Date
Nuno Gonçalves (Ulukyn) 7df9b2f255 Merge branch '58-add-rotz-roty-and-dist-reflect-lua-to-3dcamera-of-a-scene' into 'main/gingo-test'
Resolve "Add rotz roty and dist reflect lua to 3DCamera of a scene"

See merge request ryzom/ryzom-core!48
3 years ago
Nuno Gonçalves (Ulukyn) 8697553956 Resolve "Add rotz roty and dist reflect lua to 3DCamera of a scene" 3 years ago
nimetu d2508c8b15 Update hunter to 0.23.321 3 years ago
Nuno Gonçalves (Ulukyn) d385dedabc Merge branch '56-message-bubble-is-very-high-on-fh-alarm-plants' into 'main/gingo-test'
Resolve "Message bubble is very high on FH alarm plants"

See merge request ryzom/ryzom-core!45
3 years ago
Nuno Gonçalves (Ulukyn) ae33eb99bf Resolve "Message bubble is very high on FH alarm plants" 3 years ago
Nuno Gonçalves (Ulukyn) 2b88fd66ba Merge branch '46-rework-item-buff-icon-placement' into 'main/gingo-test'
Hide 1x quantity for equipable items, dynamic buff icon placement

See merge request ryzom/ryzom-core!43
3 years ago
Ben Saine be5bfd992c Hide 1x quantity for equipable items, dynamic buff icon placement 3 years ago
Nuno Gonçalves (Ulukyn) 9a24e7557f Merge branch '54-improve-the-way-to-reskin-ryzhome-items-and-preview' into 'main/gingo-test'
Resolve "Improve the way to reskin ryzhome items and preview"

See merge request ryzom/ryzom-core!44
3 years ago
Nuno Gonçalves (Ulukyn) 8708fd74c6 Resolve "Improve the way to reskin ryzhome items and preview" 3 years ago
Nuno db86219eab Added NL_NO_ASSERT to remove asserts in server 3 years ago

@ -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.317.tar.gz"
SHA1 "fbdd94b1966d351384e27b02c8d134915b1131d6"
URL "https://github.com/cpp-pm/hunter/archive/v0.23.321.tar.gz"
SHA1 "5e53cbb0429037ea8e2592bfd92704b8ff3ab492"
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_DEBUG
#ifdef NL_NO_ASSERT
# 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,6 +6274,11 @@ 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;
}
@ -6679,7 +6684,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();
@ -8233,14 +8238,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 :
@ -8359,7 +8364,7 @@ std::string CCharacterCL::shapeFromItem(const CItemSheet &itemSheet) const
sheet = itemSheet.getShape();
return sheet;
}// shapeFromItem //
@ -9147,7 +9152,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,6 +1437,34 @@ 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,11 +265,15 @@ 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);
@ -281,6 +285,7 @@ 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:
@ -289,6 +294,7 @@ protected:
NLMISC::CVector _Pos;
NLMISC::CVector _Rot;
std::string _Name;
std::string _Textures;
};
/**
@ -397,6 +403,15 @@ 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);
@ -404,19 +419,13 @@ 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,15 +2420,13 @@ 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)
{
/*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
if (highlight)
{
instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255));
instance.getMaterial(j).setEmissive(CRGBA(255,0,0,255));
@ -2441,9 +2439,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
for(sint l = 0; l < numStages; l++)
{
if (instance.getMaterial(j).isTextureFile((uint) l))
{
instance.getMaterial(j).setTextureFileName(texture, (uint) l);
}
instance.getMaterial(j).setTextureFileName(texList[std::min((int)j, (int)texList.size()-1)], (uint) l);
}
}
}

Loading…
Cancel
Save