dreamstalker / rehlds Goto Github PK
View Code? Open in Web Editor NEWReverse-engineered HLDS
License: GNU General Public License v3.0
Reverse-engineered HLDS
License: GNU General Public License v3.0
Hello,
We have problem rehlds-0.2-20150707.203020-55 bugfixed version.
I was try to using CSDM mod with reHLDS server will crash on remove func_buyzone entities.
no problem func_hostage_rescue or info_hostage_rescue just func_buyzone
CSDM mod works perfect rehlds-0.2-20150705.202431-54 bugfixed version
if ((g_MapStripFlags & MAPSTRIP_HOSTAGE) /* && (containi(mapname, "cs_") != -1) */)
{
RemoveEntityAll("func_hostage_rescue")
RemoveEntityAll("info_hostage_rescue")
}
if (g_MapStripFlags & MAPSTRIP_BUY)
{
RemoveEntityAll("func_buyzone")
}
...
stock RemoveEntityAll(name[])
{
new ent = engfunc(EngFunc_FindEntityByString, 0, "classname", name)
new temp
while (ent)
{
temp = engfunc(EngFunc_FindEntityByString, ent, "classname", name)
engfunc(EngFunc_RemoveEntity, ent) //crashed here
ent = temp
}
}
and i have got a problem csdm_remove_weaponbox function.
run_drop_wbox(id, ent, shield)
{
new ret
new model[32]
ExecuteForward(g_drop_fwd, ret, id, ent, 0)
if (ret == CSDM_DROP_REMOVE)
{
if (shield)
csdm_remove_weaponbox(id, ent, 0, 1, 1)
else
csdm_remove_weaponbox(id, ent, 0, 1, 0)
return 1
}
else if (ret == CSDM_DROP_IGNORE)
{
return 0
}
if (g_StayTime > 20 || g_StayTime < 0)
{
return 0
}
if (ent)
{
pev(ent, pev_model, model, 31)
if (((equali(model,"models/w_usp.mdl")) || (equali(model,"models/w_glock18.mdl")))
&& (g_StripWeapons))
csdm_remove_weaponbox(id, ent, 0, 0, 0) //boom crash when player drop usp or glock
else if ((equali(model,"models/w_backpack.mdl")) && (g_RemoveBomb))
csdm_remove_weaponbox(id, ent, 0, 0, 0)
else if (shield)
csdm_remove_weaponbox(id, ent, g_StayTime, 1, 1)
else
csdm_remove_weaponbox(id, ent, g_StayTime, 1, 0)
return 1
}
return 0
}
static cell AMX_NATIVE_CALL csdm_remove_weaponbox(AMX *amx, cell *params)
{
// Check index.
unsigned int owner = params[1];
unsigned int ent = params[2];
const unsigned char m_rgpPlayerItems_wpnbx[] = { 34, 35, 36, 37, 38, 39 };
if (owner < 1 || owner > (unsigned int)gpGlobals->maxClients)
{
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", owner);
return 0;
} else if (!MF_IsPlayerIngame(owner)) {
MF_LogError(amx, AMX_ERR_NATIVE, "Player %d is not in game", owner);
return 0;
}
unsigned int weapon_shield = params[5];
edict_t *searchEnt = INDEXENT(ent);
if (FNullEnt(searchEnt))
{
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weaponbox %d", ent);
return 0;
} else if ((weapon_shield != 1) && (strcmp(STRING(searchEnt->v.classname),"weaponbox") != 0)) {
MF_LogError(amx, AMX_ERR_NATIVE, "Not a weaponbox %d", ent);
return 0;
} else if ((weapon_shield == 1) && (strcmp(STRING(searchEnt->v.classname),"weapon_shield") != 0)) {
MF_LogError(amx, AMX_ERR_NATIVE, "Not a shield %d", ent);
return 0;
}
edict_t *pEdict = MF_GetPlayerEdict(owner);
if (weapon_shield == 1)
{
if (searchEnt->v.owner == pEdict)
{
if (!params[3])
{
if (NotifyForRemove(owner, searchEnt, NULL))
{
REMOVE_ENTITY(searchEnt);
}
} else {
RemoveWeapon::SchedRemoval(params[3], pEdict, NULL, searchEnt);
}
return 1;
}
MF_LogError(amx, AMX_ERR_NATIVE, "Shield %d not found", ent);
return 0;
}
edict_t *pWeapEdict;
unsigned char i;
for( i = 0; i < sizeof (m_rgpPlayerItems_wpnbx); i++ )
{
pWeapEdict = get_pdata_cbase( searchEnt, m_rgpPlayerItems_wpnbx[ i ] + EXTRAOFFSET_WEAPONS );
if (pWeapEdict == NULL)
continue;
if (FNullEnt(pWeapEdict))
continue;
if (pWeapEdict->free)
continue;
if ((pWeapEdict->v.flags & FL_FAKECLIENT) || (pWeapEdict->v.flags & FL_CLIENT))
continue;
if (pWeapEdict->v.owner == searchEnt)
{
// ALERT(at_logged, "CSDM - found weapon edict in private data of weaponbox in slot %d.\n", i);
if (!params[3] || !params[4])
{
if (NotifyForRemove(owner, pWeapEdict, searchEnt))
{
REMOVE_ENTITY(pWeapEdict);
REMOVE_ENTITY(searchEnt);
}
}
else
{
FindWeapon *p = FindWeapon::NewFindWeapon(pEdict, STRING(pWeapEdict->v.classname), params[3]);
g_Timer.AddTask(p, 0.1);
return 1;
// RemoveWeapon::SchedRemoval(params[3], pEdict, searchEnt, pWeapEdict);
}
return 1;
}
}
ALERT(at_logged, "CSDM - weapon edict not found in private data of weaponbox!!!.\n");
return 0;
}
Hi. I tried to install rehlds on several servers on fastcup.net, but servers are banned some players with reason "Banned for move commands flooding (burst)"
Current settings:
sv_maxupdaterate 102
sv_minupdaterate 102
sv_maxrate 100000
sv_minrate 100000
sys_ticrate 1060
Rehlds build: 563
Bits writing MSG_ functions (MSG_WriteBits, MSG_WriteOneBit) are designed in a way that the byte being currently written lays outside of cursize of sizebuf on which bits writing is performed.
This could be clearly seen in MSG_StartBitWriting's code
bfwrite.nCurOutputBit = 0; bfwrite.pbuf = buf; bfwrite.pOutByte = &buf->data[buf->cursize]; // <<<<=========
Here we set the bfwrite.pOutByte to a pointer in the buf->data buffer that lays outside buf->curside, and, possibly, may even lay outside allocated buf->data buffer (when cursize == maxsize). Notice that SZ_GetSpace() is not called here, so SIZEBUF_OVERFLOWED flag will not be set.
If we then call MSG_WriteOneBit(), data will be written into bfwrite.pOutByte pointer, without calling SZ_GetSpace(). In that case 1 byte after the allocated buf->data buffer will be corrupted.
Another piece of crappy code is hiding inside MSG_WriteBits:
int surplusBytes = 0; if ((uint32)bfwrite.nCurOutputBit >= 8) { surplusBytes = 1; //surplusBytes could be either 0 or 1 .... } .... SZ_GetSpace(bfwrite.pbuf, surplusBytes + 4); //allocate 4 or 5 bytes if (!(bfwrite.pbuf->flags & SIZEBUF_OVERFLOWED)) { // write 4 bytes (it's ok) *(uint32 *)bfwrite.pOutByte = (data << bfwrite.nCurOutputBit) | *(uint32 *)bfwrite.pOutByte & ROWBITTABLE[bfwrite.nCurOutputBit]; int leftBits = 32 - bfwrite.nCurOutputBit; bfwrite.nCurOutputBit = bits & 7; bfwrite.pOutByte += 4; *(uint32 *)bfwrite.pOutByte = data >> leftBits; //then write another 4 bytes! wtf? }
Here (in some rare cases) we allocate 4 or 5 bytes are from sizebuf and then write 8 bytes there. If sizebuf's data is the last variable allocated on stack and -fomit-frame-pointers is used, the whole return address will be rewritten and hlds will experience a (not) funny trip into nowhere when it executes the ret instruction, he-he.
Hi
It seems that rehlds looks for decals.wad in DEFAULTGAME instead of GAME folder.
In other words it ignores MOD settings (-game modname).
How to replicate:
rehlds/rehlds/engine/decals.cpp
Line 538 in 101a5f3
Plz fix mod detection.
It's just a question/request.. so
Can we have a simple code implemented to break current cheats? something like to stop sending unwanted data to clients (non-visible enemies position for e.g). This feature will get you some real popular usage besides stability and improvement.
anyway, thank you guys.
Hello.
These errors appear after replacing the file swds.dll folder "bugfixed" and "pure".
An error occurred when the server starts:
"The procedure entry point K32GetModuleInformation not be located in the dynamic link library KERNEL32.dll"
Configuration OS:
Windows XP SP 3
Current implementation of hookchains assumes that interceptor function must call chain->callNext() zero or one time. Multiple calls are not allowed.
The task is to rewrite hookchains code responsible for interceptors chaining and make it possible to call chain->callNext() several times.
Autobuy doesn't buy primary weapon in TE team.
And rebuy doesn't buy ammo too.
There is such a plugin Accuracy Fix.
https://forums.alliedmods.net/showthread.php?t=166648
which celebrates fire in the engine, if the sense to put it, or all the corrections is or will be?
http://prntscr.com/aaygy2
проблема носит массовый характер, так что я думаю разработчикам стоит обратить на это внимание. Игроки жалуются каждый день, что тупо виснет все и кикает по таймауту.
Why rehlds not supports server fps > 1000?
When i set sys_ticrate to 1060 (for example), in stats fps still < 1000 (unstable, 850-990)
Intel Xeon E5-1620 v2, Ubuntu 14.04 with kernel 4.1.0-rt10 (realtime, 1000hz).
This bug was discovered by hzqst https://forums.alliedmods.net/member.php?u=39607
When gamedll returns false in pfnShouldCollide (entities shouldn't collide), engine ignores collisions with all subsequent entities. This can lead to bugs in physics. The bug occurs because of a premature return from SV_ClipToLinks https://github.com/dreamstalker/rehlds/blob/master/rehlds/engine/world.cpp#L1196
if (gNewDLLFunctions.pfnShouldCollide && !gNewDLLFunctions.pfnShouldCollide(touch, clip->passedict))
return;
It would be correct to continue the loop instead of return.
Hello,
if server crashed create dir in hlds folder like this
http://i.imgur.com/YQC6Is6.png
X�j�X�j�(u5�(u5�
X�m�X�m�(�� (��
And if i use amxmodx with rehlds server crashed when player connecting
For example:
echo Привет мир
shows empty string
But this works perfect:
echo "Привет мир"
I got a few erros
[root@localhost
rehlds]# ./gradlew --max-workers=1 clean buildRelease
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
:buildSrc:testClasses UP-TO-DATE
:buildSrc:test UP-TO-DATE
:buildSrc:check UP-TO-DATE
:buildSrc:build UP-TO-DATE
:dep/bzip2:clean
:dep/cppunitlite:clean UP-TO-DATE
:flightrec/decoder:clean UP-TO-DATE
:flightrec/decoder_api:clean UP-TO-DATE
:rehlds:clean
:dep/bzip2:compileReleaseBzip2StaticLibraryBzip2Bz2_main
:dep/bzip2:compileReleaseBzip2StaticLibraryBzip2Bz2_pch
:dep/bzip2:createReleaseBzip2StaticLibrary
:dep/bzip2:releaseBzip2StaticLibrary
:rehlds:generateAppVersion
:rehlds:compileReleaseRehldsFixesRehlds_swds_engineSharedLibraryRehlds_swds_engineRehlds_pch
In file included from /home/genki/rehlds/rehlds/rehlds/public/rehlds/osconfig.h(92),
from /home/genki/rehlds/rehlds/rehlds/rehlds/precompiled.h(5),
from /home/genki/rehlds/rehlds/rehlds/rehlds/precompiled.cpp(1):
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/smmintrin.h(32): error: #error directive: "SSE4.1 instruction set not enabled"error "SSE4.1 instruction set not enabled"
^
compilation aborted for /home/genki/rehlds/rehlds/rehlds/rehlds/precompiled.cpp (code 2)
:rehlds:compileReleaseRehldsFixesRehlds_swds_engineSharedLibraryRehlds_swds_engineRehlds_pch FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':rehlds:compileReleaseRehldsFixesRehlds_swds_engineSharedLibraryRehlds_swds_engineRehlds_pch'.
A build operation failed.
C++ compiler failed while compiling precompiled.cpp.
See the complete log at: file:///home/genki/rehlds/rehlds/rehlds/build/tmp/compileReleaseRehldsFixesRehlds_swds_engineSharedLibraryRehlds_swds_engineRehlds_pch/output.txt- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 18.264 secs
[root@localhost rehlds]# cat /etc/release
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)[root@localhost rehlds]# uname -a
Linux localhost.localdomain 2.6.32.71 #2 SMP Wed Mar 23 01:01:07 EET 2016 x86_64 x86_64 x86_64 GNU/Linux[root@localhost rehlds]# uname -r
2.6.32.71
smmintrin.h 31-33 lines
ifndef SSE4_1
#error "SSE4.1 instruction set not enabled"
else
Cpu information
[root@localhost rehlds]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU X5660 @ 2.80GHz
stepping : 2
cpu MHz : 2792.990
cache size : 12288 KB
physical id : 1
siblings : 12
core id : 0
cpu cores : 6
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
bogomips : 5585.98
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
During reverse engineering some changes were made in SDK that now break compatibility with original hlsdk. These changes include:
The task is to refactor both sdk and rehlds to make rehlds sdk compatible with original hlsdk.
Definition of done: Amxmodx is successfully compiled with rehlds sdk
Hi
I've been testing rehlds thoroughly on Opposing Force. There are basically two options how to get long jump - by grabbing the well known item_longjump or by taking powerup item_ctflongjump (it can be dropped)
I noticed that long jump works correctly for the default item_longjump, but is bugged for item_ctflongjump (your jump stops midair like if you hit invisible wall).
Maybe it's related to the following bool value:
Line 169 in 101a5f3
Plz fix it guys.
I'm running a password protected server with bugfixed version (rehlds-0.2-20160128.133207-120).
Run the following commands in opfor console to connect the server (will turn it off in a week)
password rehlds
connect 31.31.73.85
test map
longjumptest.zip
Thanks
A screenshot for illustrating the problem:
Delta encoder, when using some entity as a baseline to encode changes of another entity, doesn't take into account that some fields could be 'switched off' by the gamedll for baseline entity when it was delta-encoded.
Now let's see what's going on.
OS Windows XP SP3 32 bit
ReHLDS 624 bugfixed
Server sometimes kicks one or more clients with "server failed to transmit file 'AY&SY..." message in client's console.
It happens because of invalid 'reuse compressed buffer' optimization in SV_UpdateToReliableMessages():
for (i = 0; i < g_psvs.maxclients; i++) {
client = &g_psvs.clients[i];
if (g_psv.reliable_datagram.cursize + client->netchan.message.cursize < client->netchan.message.maxsize) {
SZ_Write(&client->netchan.message, g_psv.reliable_datagram.data, g_psv.reliable_datagram.cursize);
} else {
Netchan_CreateFragments(TRUE, &client->netchan, &g_psv.reliable_datagram);
}
}
This code writes server's reliable message into reliable message buffer of each connected client. If there is enough space in client's reliable buffer, server reliable message is written 'as is' via SZ_Write function. Otherwise fragments are created via Netchan_CreateFragments function. The key part here is that Netchan_CreateFragments overwrites contents of g_psv.reliable_datagram with compressed version of this buffer.
Consider the following scenario:
Info_* functions use Q_strcpy (which is alias for strcpy) for operations on info buffer. Since copying is done on same info buffer, src and dst buffers may overlap each other, which is forbidden by C/C++ specification.
On Windows strcpy() appears to work fine with overlapped buffers while icc's optimized version of strcpy() on linux corrupts info buffer if dst and src are close to each other.
HLDS with swds.dll from rehlds package crashes on windows if it is not started in console mode
Reason: GameServerData001 interface used in AdminServer.dll is not exposed by swds.dll
Hi
While I admire your work, especially the performance boost, the Re-HLDS is so good in mimicking HLDS 6153 behavior - as it keeps rejecting older clients (probably sending incorrect CRC).
I'm getting following error on client "Your .dll cl_dlls/client.dll differs from the server's". And then client disconnects.
Client and server's client.dll do match and I still get an error.
This error can be circumvented if you change few bytes in client-side hw.dll to skip the received CRC check for client.dll.
I also managed to circumvent this by replacing swds.dll with the one from build 5758 and having client.dll matching on client/server.
I tried to disassemble swds.dll and find and remove these checks but I failed.
I did couple of tests and debugging.
swds 6153 + serverside client.dll new --> error
swds 6153 + serverside client.dll old (same as clientside) --> error
swds 5758 + serverside client.dll new --> error
swds 5758 + serverside client.dll old (same as clientside) --> client can connect now, all is working
swds 5758 + serverside client.dll old + any (new/old) clientside client.dll always works.
I'm willing to be long-term tester, I'm having private server with public IP, running Opposing Force.
My goal is to make server accept all p48 clients (even those non-steam older ones, by using revemu)
All I'm asking you is to fix the infamous "your .dll(cl_dlls/client.dll) differs from the server's" error.
Could please have a look into the issue?
Let me know if you need more info, affected hl version or temporary RDP access to my server.
Thx!
Examine what the hell is going on with linux binaries - they are 2+ times larger than windows binaries
You can fix this bug?
I want to put your engine on all servers fastcup.net
В исходнике engine/cvar.cpp функции
qboolean Cvar_Command(void)
{
cvar_t *v;
const char *arg0 = Cmd_Argv(0);
const char *firstToken = Cvar_IsMultipleTokens(arg0);
if (firstToken)
{
v = Cvar_FindVar(firstToken);
if (v)
{
Con_Printf("\"%s\" is \"%s\"\n", v->name, v->string);
return TRUE;
}
}
else
{
v = Cvar_FindVar(arg0);
if (v)
{
if (Cmd_Argc() == 1)
{
Con_Printf("\"%s\" is \"%s\"\n", v->name, v->string);
}
else
{
if (v->flags & FCVAR_SPONLY && g_pcls.state >= ca_connecting && g_pcl.maxclients > 1)
{
Con_Printf("Can't set %s in multiplayer\n", v->name);
}
else
{
Cvar_Set(v->name, Cmd_Argv(1));
}
}
return TRUE;
}
}
return FALSE;
}
внести 2 раза код
else
{
Con_Printf("unknown command "%s"\n", arg0);
}
qboolean Cvar_Command(void)
{
cvar_t *v;
const char *arg0 = Cmd_Argv(0);
const char *firstToken = Cvar_IsMultipleTokens(arg0);
if (firstToken)
{
v = Cvar_FindVar(firstToken);
if (v)
{
Con_Printf("\"%s\" is \"%s\"\n", v->name, v->string);
return TRUE;
}
else
{
Con_Printf("unknown command \"%s\"\n", arg0);
}
}
else
{
v = Cvar_FindVar(arg0);
if (v)
{
if (Cmd_Argc() == 1)
{
Con_Printf("\"%s\" is \"%s\"\n", v->name, v->string);
}
else
{
if (v->flags & FCVAR_SPONLY && g_pcls.state >= ca_connecting && g_pcl.maxclients > 1)
{
Con_Printf("Can't set %s in multiplayer\n", v->name);
}
else
{
Cvar_Set(v->name, Cmd_Argv(1));
}
}
return TRUE;
}
else
{
Con_Printf("unknown command \"%s\"\n", arg0);
}
}
return FALSE;
}
Результат этому делу.
Вводим не известную команду hg
и получаем сообщение.
unknown command "hg"
Так будет удобнее :)
Хотелось бы это видеть в релизе.
С уважением индус кодерь ;)
In sv_phys.cpp:124 edict must be cleared by FL_KILLME flag. But here must be FL_SPECTATOR flag.
Let's look into HLSDK:
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dlls/util.cpp#L1558
UTIL_Remove delete entity from server by setting FL_KILLME flag, and engine cleares it. When FL_SPECTATOR is only set for spectators.
Client starts upload spray while he is connecting, but when client is connecting CL_GetFragmentSize always return 128. (it returns cl_dlmax only if client state is ca_active)
What about to move upload request code into SV_SendEnts_f function?
How to get information like server name, players, max players, players list, map, os and etc.. ?
On the web there are bunch of working variants for HLDS, but now for reHLDS i cannot get properly information about the server.
The mainserverinfo is \xFF\xFF\xFF\xFFTSource Engine Query\x00 or something new ?
Can someone give me working variant for php ?
Many (All?) custom sprays are not working.
Steps to reproduce:
1)Set the following example tempdecal.wad (https://www.sendspace.com/file/lfwbds) in your client cstrike directory.
2)Try to connect to ReHLDS server (make sure sv_allowuploads 1).
Client will get stuck in "Precaching resources..."
Same steps on regular HLDS result in client connecting properly and spray showing properly.
If sv_allowuploads is set to 0, then client will be able to connect (sprays won't show of course).
Also, related to this are segfault crashes after changelevel.
This line
rehlds/rehlds/engine/hashpak.cpp
Line 366 in fef6405
Will result in segfault at random after changelevel (most likely related to what the clients' sprays are).
This gets called from
void HPAK_FlushHostQueue(void)
which gets called from
void EXT_FUNC SV_ActivateServer_internal(int runPhysics)
(Github isn't accepting my zip file)
https://www.sendspace.com/file/lfwbds
Случайно наткнулся.
"botomcolor" -> ""bottomcolor"
Metamod Plugins: DProto & VoiceTranscoder Not Working ( HLDS Downloaded From SteamCMD )
DProto Not Working Ver 0.9.548 & 0.9.356
Do you plan to rewrite VTC for ReHLDS support?
Hi there, is there any chance to change this?
I want something like this:
kick #1 \nUpdate anti-cheat, you can download it here:\nhttp://github.com/
will show:
You have been disconnected from the server.
Reason: Kicked :
Update anti-cheat, you can download it here:
http://github.com/
Could you raise the precache limit? 512 is not enough for fun servers such as zombie plague and jailbreak...
The server will change player names seemingly at random for about 5 minutes after start then it will be fine after.
Also is there some way to increase the string ban limit. Some players are getting banned for using buyscripts.
NonSteam client don't connect from favorites.
Query port changed to 0???
Here is the video of it.
https://www.youtube.com/watch?v=7VVgiZXk7mU
If string has non-ASCII chars (code >= 0x80) then MSG_WriteBitString will write 0xFF but not char code. There is a problem with conversion from int8 to uint32 (http://en.cppreference.com/w/cpp/language/implicit_cast#Integral_conversions):
If the destination type is unsigned, the resulting value is the smallest unsigned value equal to the source value modulo 2^n where n is the number of bits used to represent the destination type.
That is, depending on whether the destination type is wider or narrower, signed integers are sign-extended or truncated and unsigned integers are zero-extended or truncated respectively.
How it works:
You can test it here: http://cpp.sh/4a6i
#include <cstdio>
#include <cstdint>
using namespace std;
int main() {
signed char a;
scanf("%hhd", &a);
uint32_t b = a;
printf("%.8X\n", b);
unsigned char c;
scanf("%hhu", &c);
uint32_t d = c;
printf("%.8X\n", d);
}
i don't know how should i prove it. i think it's not necessary. everyone can test it. may i'm not the only one who tried to figure out what's wrong. i compared the ReHLDS latest stable and some recent snapshots with the original HLDS. the result is that pingboost
does not affects on ReHLDS. no matter what value i use and what version i try it does not set any priorities.
One day I noticed that something was wrong with this function and I decided to check the correctness of its work.
I test it with this code:
for (size_t nReceiver = 1; nReceiver <= 32; nReceiver++) {
for (size_t nSender = 1; nSender <= 32; nSender++) {
g_engfuncs.pfnVoice_SetClientListening(nReceiver, nSender, true);
ALERT(at_console, "IsListening? %u %u %s\n", nReceiver, nSender, g_engfuncs.pfnVoice_GetClientListening(nReceiver, nSender) ? "true" : "false");
}
}
And the results were unexpected:
IsListening? 1 1 true
...
IsListening? 1 32 true
IsListening? 2 1 false
...
IsListening? 32 32 false
This function works properly only for receiver with index 1.
When i run my server same map for few hours it stars to lag when walking up ramp
I found thread with same problem, but they have no resolution
http://forums.steampowered.com/forums/showthread.php?t=142350
Hi guys,
just want to ask you if you can implement a solution to avoid this issue?
I've seen this as a request and I encountered the issue myself.
ValveSoftware/halflife#1345
Thx!
https://github.com/dreamstalker/rehlds/blob/master/rehlds/testsuite/player.cpp#L530
The null pointer is passed into 'memcpy' function.
Probably, there should be memcpy(&m_CurrentTm, t, sizeof(m_CurrentTm)); ?
After I moved to reHLDS, (on my top server) Gametracker isn't track it.
And after I search for it, i found this post:
https://www.gametracker.com/forums/forum.php?site=1&post=390815
my question is clear.
Which metamod version should we use for the best performance ?
metamod 1.21.1-am or what ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.