Skip to content

Commit

Permalink
Merge branch 'dreamstalker:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeperezz16 authored Mar 13, 2024
2 parents 34e0788 + 05f4a27 commit f6053ca
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ You can try playing on one of many servers that are using ReHLDS: [Game Tracker]
</ul>

## How can use it?
ReHLDS is fully compatible with latest official HLDS downloaded by steamcmd. All you have to do is to download rehlds binaries and replace original swds.dll/engine_i486.so. For windows you can also copy a swds.pdb file with a debug information.
<br /><b>Warning!</b> ReHLDS is not compatible with an old 5xxx or below platforms downloaded by hldsupdatetool.
ReHLDS is fully compatible with the official pre-anniversary edition of HLDS (engine version <= 8684) downloaded by steamcmd. All you have to do is to download rehlds binaries and replace original swds.dll/engine_i486.so. For windows you can also copy a swds.pdb file with a debug information.

<b>Warning!</b> ReHLDS is not compatible with an old 5xxx or below platforms downloaded by hldsupdatetool.

#### Downloading HLDS via steamcmd

```
app_set_config 90 mod cstrike
app_update 90 -beta steam_legacy validate
```

## Downloads
* [Release builds](https://github.com/dreamstalker/rehlds/releases)
Expand Down
24 changes: 15 additions & 9 deletions rehlds/engine/sv_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4903,26 +4903,32 @@ void SV_WriteEntitiesToClient(client_t *client, sizebuf_t *msg)
auto &entityState = curPack->entities[i];
if (entityState.number > MAX_CLIENTS)
{
if (entityState.movetype == MOVETYPE_FOLLOW && entityState.aiment > 0)
if (entityState.movetype == MOVETYPE_FOLLOW)
{
if (sv_rehlds_attachedentities_playeranimationspeed_fix.string[0] == '1' &&
entityState.aiment <= MAX_CLIENTS)
if (entityState.aiment > 0 && entityState.aiment < g_psv.num_edicts)
{
attachedEntCount[entityState.aiment]++;
}
if (sv_rehlds_attachedentities_playeranimationspeed_fix.string[0] == '1' &&
entityState.aiment <= MAX_CLIENTS)
{
attachedEntCount[entityState.aiment]++;
}

// Prevent crash "Cache_UnlinkLRU: NULL link" on client-side
// if aiment with sprite model will be to render as a studio model
if (entityState.aiment < g_psv.num_edicts)
{
// Prevent crash "Cache_UnlinkLRU: NULL link" on client-side
// if aiment with sprite model will be to render as a studio model
edict_t *ent = &g_psv.edicts[entityState.aiment];
if (ent->v.modelindex >= 0 && ent->v.modelindex < MAX_MODELS
&& (!g_psv.models[ent->v.modelindex]
|| g_psv.models[ent->v.modelindex]->type != mod_studio))
{
entityState.aiment = 0;
entityState.movetype = MOVETYPE_NONE;
}
}
else
{
entityState.aiment = 0;
entityState.movetype = MOVETYPE_NONE;
}
}

// Prevent spam "Non-sprite set to glow!" in console on client-side
Expand Down

0 comments on commit f6053ca

Please sign in to comment.