Fix: Offset networking of .skins by 128 so we can send 'signed' bytes.

This commit is contained in:
Marco Cawthorne 2020-03-24 08:02:36 +01:00
parent 40852185c1
commit 73866574a2
2 changed files with 2 additions and 2 deletions

View file

@ -91,7 +91,7 @@ void CBaseEntity::ReadEntity(float flChanged)
frame = readbyte();
}
if (flChanged & BASEFL_CHANGED_SKIN) {
skin = readbyte();
skin = readbyte() - 128;
}
if (flChanged & BASEFL_CHANGED_ALPHA) {
alpha = readfloat();

View file

@ -116,7 +116,7 @@ float CBaseEntity::SendEntity(entity ePEnt, float fChanged)
WriteByte(MSG_ENTITY, frame);
}
if (fChanged & BASEFL_CHANGED_SKIN) {
WriteByte(MSG_ENTITY, skin);
WriteByte(MSG_ENTITY, skin + 128);
}
if (fChanged & BASEFL_CHANGED_ALPHA) {
WriteFloat(MSG_ENTITY, alpha);