Merge remote-tracking branch 'origin/NDK' into NDK-ShadowMapping
Former-commit-id: 0c302477d672346eb50c12f8fa7e2b6a19d60779
This commit is contained in:
commit
b7b5458c79
|
|
@ -34,7 +34,7 @@ namespace Ndk
|
|||
|
||||
inline float BaseSystem::GetUpdateRate() const
|
||||
{
|
||||
return 1.f / m_updateRate;
|
||||
return (m_updateRate > 0.f) ? 1.f / m_updateRate : 0.f;
|
||||
}
|
||||
|
||||
inline World& BaseSystem::GetWorld() const
|
||||
|
|
@ -58,12 +58,16 @@ namespace Ndk
|
|||
|
||||
inline void BaseSystem::Update(float elapsedTime)
|
||||
{
|
||||
m_updateCounter -= elapsedTime;
|
||||
if (m_updateCounter < 0.f)
|
||||
if (m_updateRate > 0.f)
|
||||
{
|
||||
m_updateCounter -= elapsedTime;
|
||||
if (m_updateCounter >= 0.f)
|
||||
return;
|
||||
|
||||
m_updateCounter += m_updateRate;
|
||||
OnUpdate(elapsedTime);
|
||||
}
|
||||
|
||||
OnUpdate(elapsedTime);
|
||||
}
|
||||
|
||||
template<typename ComponentType>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ namespace Ndk
|
|||
{
|
||||
RenderSystem::RenderSystem()
|
||||
{
|
||||
SetUpdateRate(0.f);
|
||||
}
|
||||
|
||||
void RenderSystem::OnEntityRemoved(Entity* entity)
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@ unsigned int NzBitset<Block, Allocator>::FindNext(unsigned int bit) const
|
|||
{
|
||||
NazaraAssert(bit < m_bitCount, "Bit index out of range");
|
||||
|
||||
bit++;
|
||||
if (++bit >= m_bitCount)
|
||||
return npos;
|
||||
|
||||
// Le bloc du bit, l'indice du bit
|
||||
unsigned int blockIndex = GetBlockIndex(bit);
|
||||
|
|
|
|||
Loading…
Reference in New Issue