Merge branch 'master' of https://github.com/DigitalPulseSoftware/NazaraEngine
This commit is contained in:
commit
f2487bbcba
|
|
@ -125,6 +125,7 @@ Nazara Engine:
|
|||
- ⚠️ Removed Vector[2|3]::Distancef method and made Distance method templated
|
||||
- Added Vector2::Distance static method
|
||||
- ⚠️ Fixed compilation errors on MSVC with flag /permissive- on CullingList class
|
||||
- Added LuaImplQueryArg & LuaImplReplyVal functions for Vector[2|3]<int>
|
||||
- Fixed bug in ENet implementation causing legit reliable packets to be dropped on sequence number overflow
|
||||
|
||||
Nazara Development Kit:
|
||||
|
|
|
|||
|
|
@ -269,6 +269,15 @@ namespace Nz
|
|||
return ret;
|
||||
}
|
||||
|
||||
inline unsigned int LuaImplQueryArg(const LuaState& state, int index, Vector2i* vec, TypeTag<Vector2i>)
|
||||
{
|
||||
Vector2d vecDouble;
|
||||
unsigned int ret = LuaImplQueryArg(state, index, &vecDouble, TypeTag<Vector2d>());
|
||||
|
||||
vec->Set(vecDouble);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline unsigned int LuaImplQueryArg(const LuaState& state, int index, Vector3d* vec, TypeTag<Vector3d>)
|
||||
{
|
||||
switch (state.GetType(index))
|
||||
|
|
@ -308,6 +317,15 @@ namespace Nz
|
|||
return ret;
|
||||
}
|
||||
|
||||
inline unsigned int LuaImplQueryArg(const LuaState& state, int index, Vector3i* vec, TypeTag<Vector3i>)
|
||||
{
|
||||
Vector3d vecDouble;
|
||||
unsigned int ret = LuaImplQueryArg(state, index, &vecDouble, TypeTag<Vector3d>());
|
||||
|
||||
vec->Set(vecDouble);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline unsigned int LuaImplQueryArg(const LuaState& state, int index, Ndk::Entity** handle, TypeTag<Ndk::Entity*>)
|
||||
{
|
||||
if (!state.IsOfType(index, LuaType_Nil))
|
||||
|
|
@ -538,6 +556,12 @@ namespace Nz
|
|||
return 1;
|
||||
}
|
||||
|
||||
inline int LuaImplReplyVal(const LuaState& state, Vector2i&& val, TypeTag<Vector2i>)
|
||||
{
|
||||
state.PushInstance<Vector2d>("Vector2", val);
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline int LuaImplReplyVal(const LuaState& state, Vector3d&& val, TypeTag<Vector3d>)
|
||||
{
|
||||
state.PushInstance<Vector3d>("Vector3", val);
|
||||
|
|
@ -556,6 +580,12 @@ namespace Nz
|
|||
return 1;
|
||||
}
|
||||
|
||||
inline int LuaImplReplyVal(const LuaState& state, Vector3i&& val, TypeTag<Vector3i>)
|
||||
{
|
||||
state.PushInstance<Vector3d>("Vector3", val);
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline int LuaImplReplyVal(const LuaState& state, Ndk::Entity* ptr, TypeTag<Ndk::Entity*>)
|
||||
{
|
||||
state.PushInstance<Ndk::EntityHandle>("Entity", ptr);
|
||||
|
|
|
|||
|
|
@ -280,8 +280,10 @@ namespace Nz
|
|||
else
|
||||
{
|
||||
material->SetDiffuseMap(std::move(texture));
|
||||
if (resizeSprite && texture && texture->IsValid())
|
||||
SetSize(Vector2f(Vector2ui(texture->GetSize())));
|
||||
const TextureRef& newTexture = material->GetDiffuseMap();
|
||||
|
||||
if (resizeSprite && newTexture && newTexture->IsValid())
|
||||
SetSize(Vector2f(Vector2ui(newTexture->GetSize())));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue