mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-29 08:05:50 +03:00
HLTV-Core: Fixed wrong size of lightstyles
HLTV-Console: Added macros LAUNCHER_FIXES
This commit is contained in:
parent
aac529d2e4
commit
e5d26bc4d2
@ -24,7 +24,7 @@ void setupToolchain(NativeBinarySpec b) {
|
|||||||
boolean useGcc = project.hasProperty("useGcc")
|
boolean useGcc = project.hasProperty("useGcc")
|
||||||
def cfg = rootProject.createToolchainConfig(b);
|
def cfg = rootProject.createToolchainConfig(b);
|
||||||
cfg.projectInclude(project, '/..', '/../..', '/src', '/../../common', '/../../engine', '/../../public', '/../../public/rehlds');
|
cfg.projectInclude(project, '/..', '/../..', '/src', '/../../common', '/../../engine', '/../../public', '/../../public/rehlds');
|
||||||
cfg.singleDefines 'USE_BREAKPAD_HANDLER', 'HLTV', '_CONSOLE'
|
cfg.singleDefines 'USE_BREAKPAD_HANDLER', 'HLTV', 'LAUNCHER_FIXES', '_CONSOLE'
|
||||||
|
|
||||||
if (cfg instanceof MsvcToolchainConfig) {
|
if (cfg instanceof MsvcToolchainConfig) {
|
||||||
cfg.compilerOptions.pchConfig = new MsvcToolchainConfig.PrecompiledHeadersConfig(
|
cfg.compilerOptions.pchConfig = new MsvcToolchainConfig.PrecompiledHeadersConfig(
|
||||||
|
@ -353,13 +353,6 @@ void World::AddLightStyle(int index, char *style)
|
|||||||
m_System->Printf("WARNING! World::SetLightStyle: style too long (%i).\n", length);
|
m_System->Printf("WARNING! World::SetLightStyle: style too long (%i).\n", length);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: code mismatch
|
|
||||||
// Original code:
|
|
||||||
// Q_strncopy(..., 64);
|
|
||||||
// ...[63] = '\0';
|
|
||||||
// Current code:
|
|
||||||
// Q_strncopy(..., 64);
|
|
||||||
// ...[64] = '\0';
|
|
||||||
Q_strlcpy(m_Lightstyles[index], style);
|
Q_strlcpy(m_Lightstyles[index], style);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,8 +251,12 @@ protected:
|
|||||||
entity_state_t m_Instanced_BaseLines[MAX_INSTANCED_BASELINES];
|
entity_state_t m_Instanced_BaseLines[MAX_INSTANCED_BASELINES];
|
||||||
|
|
||||||
int m_MaxInstanced_BaseLine;
|
int m_MaxInstanced_BaseLine;
|
||||||
// TODO: wtf, why 65? here should be 64
|
|
||||||
|
#ifdef HOOK_HLTV
|
||||||
char m_Lightstyles[MAX_LIGHTSTYLES][65];
|
char m_Lightstyles[MAX_LIGHTSTYLES][65];
|
||||||
|
#else
|
||||||
|
char m_Lightstyles[MAX_LIGHTSTYLES][64];
|
||||||
|
#endif // HOOK_HLTV
|
||||||
|
|
||||||
movevars_t m_MoveVars;
|
movevars_t m_MoveVars;
|
||||||
BSPModel m_WorldModel;
|
BSPModel m_WorldModel;
|
||||||
|
@ -27,6 +27,7 @@ struct delta_test_struct_t {
|
|||||||
uint8 b_61; // 20
|
uint8 b_61; // 20
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
typedef delta_test_struct_t dts_t;
|
typedef delta_test_struct_t dts_t;
|
||||||
|
|
||||||
struct delta_res_t
|
struct delta_res_t
|
||||||
@ -65,7 +66,6 @@ NOINLINE qboolean _DoMarkFields(void* src, void* dst, delta_t* delta, bool useJi
|
|||||||
qboolean sendfields;
|
qboolean sendfields;
|
||||||
#ifdef REHLDS_JIT
|
#ifdef REHLDS_JIT
|
||||||
if (useJit) {
|
if (useJit) {
|
||||||
DELTA_ClearFlags(delta);
|
|
||||||
return DELTAJit_Fields_Clear_Mark_Check((unsigned char*)src, (unsigned char*)dst, delta, NULL);
|
return DELTAJit_Fields_Clear_Mark_Check((unsigned char*)src, (unsigned char*)dst, delta, NULL);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@ -163,7 +163,6 @@ NOINLINE void _MarkAndEnsureCorrectResults(const char* action, delta_t* delta, v
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NOINLINE void _GetBitmaskAndBytecount(delta_t* delta, int* bits, int* bytecount, int usejit) {
|
NOINLINE void _GetBitmaskAndBytecount(delta_t* delta, int* bits, int* bytecount, int usejit) {
|
||||||
#ifdef REHLDS_JIT
|
#ifdef REHLDS_JIT
|
||||||
if (usejit) {
|
if (usejit) {
|
||||||
@ -248,7 +247,6 @@ void _DeltaSimpleTests(delta_t* delta, delta_simpletest_data_t* tests, int tests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(MarkFieldsTest_Simple_Primitives, Delta, 1000) {
|
TEST(MarkFieldsTest_Simple_Primitives, Delta, 1000) {
|
||||||
EngineInitializer engInitGuard;
|
EngineInitializer engInitGuard;
|
||||||
|
|
||||||
@ -368,8 +366,6 @@ TEST(TestDelta_Test, Delta, 1000) {
|
|||||||
for (size_t i = 0; i < 4; i++)
|
for (size_t i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
int tested = DELTA_TestDelta((uint8 *)&from, (uint8 *)&testdata[i], delta);
|
int tested = DELTA_TestDelta((uint8 *)&from, (uint8 *)&testdata[i], delta);
|
||||||
|
CHECK(va("TestDelta_Test: returned bitcount %i is not equal to true value %i on iter %i", tested, result[i], i), tested == result[i]);
|
||||||
if (tested != result[i])
|
|
||||||
rehlds_syserror("TestDelta_Test: returned bitcount %i is not equal to true value %i", tested, result[i]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user