From c067b9357402e3a7a0819ded8800a7b176f0ea6c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 21 Feb 2023 17:10:00 +0800 Subject: [PATCH] Fix bad FINAL_VERSION checks --- nel/include/nel/net/transport_class.h | 2 +- ryzom/common/src/game_share/simlag.cpp | 4 ++-- .../mission_manager/ai_alias_translator.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nel/include/nel/net/transport_class.h b/nel/include/nel/net/transport_class.h index 60172c4f5b..f35e896d49 100644 --- a/nel/include/nel/net/transport_class.h +++ b/nel/include/nel/net/transport_class.h @@ -510,7 +510,7 @@ inline NLNET::CMessage &CTransportClass::write () nlassert (Init); nlassert (Mode == 0); -#ifndef FINAL_VERSION +#if !FINAL_VERSION // Did the programmer forget to register the transport class? Forbid sending then. nlassert( LocalRegisteredClass.find( className() ) != LocalRegisteredClass.end() ); #endif diff --git a/ryzom/common/src/game_share/simlag.cpp b/ryzom/common/src/game_share/simlag.cpp index 85b8510d6f..12da542993 100644 --- a/ryzom/common/src/game_share/simlag.cpp +++ b/ryzom/common/src/game_share/simlag.cpp @@ -154,7 +154,7 @@ void sendUDP (CUdpSock *client, const uint8 *packet, uint32 packetSize, const CI nlassert (packet != NULL); nlassert (packetSize > 0); -#ifdef FINAL_VERSION +#if !FINAL_VERSION if ((float)rand()/(float)(RAND_MAX)*100.0f >= PacketLoss) { sint32 lag = Lag /*+ (rand()%40) - 20*/;// void disordering @@ -201,7 +201,7 @@ void sendUDP (CUdpSock *client, const uint8 *packet, uint32 packetSize, const CI { sendUDPNow (client, packet, packetSize, addr); } -#ifdef FINAL_VERSION +#if !FINAL_VERSION } } #endif diff --git a/ryzom/server/src/entities_game_service/mission_manager/ai_alias_translator.h b/ryzom/server/src/entities_game_service/mission_manager/ai_alias_translator.h index 62b8d9883e..656f4f0a7a 100644 --- a/ryzom/server/src/entities_game_service/mission_manager/ai_alias_translator.h +++ b/ryzom/server/src/entities_game_service/mission_manager/ai_alias_translator.h @@ -299,7 +299,7 @@ inline const NLMISC::CEntityId& CAIAliasTranslator::getEntityId(TAIAlias aiid) c CHashMap< uint, NLMISC::CEntityId >::const_iterator it = _HashTableAiId.find(aiid); if( it != _HashTableAiId.end() ) return (*it).second; -#ifndef FINAL_VERSION +#if !FINAL_VERSION nlerror( "Illegal call to getEntityId on entity with no alias" ); // see #endif return NLMISC::CEntityId::Unknown;