Steve_Yorkshire Posted May 6, 2019 Posted May 6, 2019 ShowTrueHealth does not work in GuiHealthTextHud for clients joining the server (works in local conditions).That "1" should be 100.maxDamage has been left out of networking ... for whatever reasons ... so let's just add that back in.in ShapeBase.cpp ~273 and 286 struct ShapeBaseDataProto { //... F32 maxEnergy; F32 maxDamage;//yorks F32 cameraMaxDist; //... ShapeBaseDataProto() { //... maxEnergy = 0; maxDamage = 0;//yorks cameraMaxDist = 0; //... } }; ~792 network the info void ShapeBaseData::packData(BitStream* stream) { Parent::packData(stream); //... if(stream->writeFlag(maxEnergy != gShapeBaseDataProto.maxEnergy)) stream->write(maxEnergy); if (stream->writeFlag(maxDamage != gShapeBaseDataProto.maxDamage))//yorks stream->write(maxDamage);//yorks if(stream->writeFlag(cameraMaxDist != gShapeBaseDataProto.cameraMaxDist)) stream->write(cameraMaxDist); //... And read it ~881 void ShapeBaseData::unpackData(BitStream* stream) { Parent::unpackData(stream); //... if(stream->readFlag()) stream->read(&maxEnergy); else maxEnergy = gShapeBaseDataProto.maxEnergy; if (stream->readFlag())//yorks stream->read(&maxDamage); else maxDamage = gShapeBaseDataProto.maxDamage;//yorks if(stream->readFlag()) stream->read(&cameraMaxDist); else cameraMaxDist = gShapeBaseDataProto.cameraMaxDist; //... Et voila.Local/server on top, client seen behind with correct damage display.Thanks to @Azaezel for the confirmation and fix tip. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.