HelpFSOD Lava Dmg

Posts 1–8 of 8 · Page 1 of 1
FSOD Lava Dmg
 
Beiber


How do I do?

But seriously, I have no idea where to start on fixing this




The hp on Admin is not lowering on that client because the vit is at 1billion but it does take damage
Code:
if CheckArea.IsThisLava(player.X, player.Y);       //Checking if the player location is Lava or not
       (##Calculate Damage of Lava/Speed/Time##)    //Calculating the Damage of the Lava over Speed to ensure that it gets the correct damage over time
       if player.hp != CalculatedHP                       //This will run every time they stand on lava and take damage
           player.Disconnect();                              //Disconnect
That's the basis of it, and in the Calculate Damage make sure you account for pause, invincibly and everything else that nulls damage, or you could just add this after the damage is calculated and imputed instead of creating something new such as :

Code:
(##Calculate Damage of Lava/Speed/Time##)
(Inputs Damage)
if player.hp != CalculatedHP                                 //This will run if it is suppose to damage them and this will not run if player damage error exception runs
    player.Disconnect();

https://github.com/ossimc82/fabiano-...mageHandler.cs

GroundDamageHandler, just insert the check and balance there

Code:
{
if (client.Player.Owner == null) return;
WmapTile tile = client.Player.Owner.Map[(int)packet.Position.X, (int)packet.Position.Y];
ObjectDesc objDesc = tile.ObjType == 0 ? null : client.Manager.GameData.ObjectDescs[tile.ObjType];
TileDesc tileDesc = client.Manager.GameData.Tiles[tile.TileId];
if (tileDesc.Damaging && (objDesc == null || !objDesc.ProtectFromGroundDamage))
{
int dmg = (int)client.Player.StatsManager.Random.obf6((uint)tileDesc.MinDamage, (uint)tileDesc.MaxDamage);
dmg = (int) client.Player.StatsManager.GetDefenseDamage(dmg, true);
int calcdmg = client.Player.HP -= dmg; client.Player.HP -= dmg;
client.Player.UpdateCount++;
if (client.Player.HP <= 0)
client.Player.Death(tileDesc.ObjectId); else if (client.Player.HP != calcdmg) client.DIsconnect(); //either client.Disconnect or client.Player.Disconnect(sorry I am not infront of the source rn)
}
}
there is nothing wrong, its not a glitch @The First Sin @Desire ... your vit is just so high it immediately regenerates to full health within a .1 millisecond after you take damage..
Quote Originally Posted by Riigged View Post
there is nothing wrong, its not a glitch @
Quote Originally Posted by Riigged View Post
The First Sin @Bear ... your vit is just so high it immediately regenerates to full health within a .1 millisecond after you take damage..


The left picture has the player taking damage but they have million VIt and the right picture has the glitch or hacked client

I think you misunderstood so I hope that cleared some stuff.
Quote Originally Posted by The First Sin View Post


The left picture has the player taking damage but they have million VIt and the right picture has the glitch or hacked client
They are both same clients im pretty sure.. one is just screenshotted while logged into the account "Admin" and one is screenshotted from another accounts PoV looking at the account "Admin" in lava.
They are taking damage, but the health immediately goes back to full health before you can even spot that it went down, because the vit is way too high.
Quote Originally Posted by Riigged View Post
They are both same clients im pretty sure.. one is just screenshotted while logged into the account "Admin" and one is screenshotted from another accounts PoV looking at the account "Admin" in lava.
They are taking damage, but the health immediately goes back to full health before you can even spot that it went down, because the vit is way too high.
Well, whatever, it doesn't matter who is right there is a lava god mode patch up there (untested) and hopefully it works.
ground damage does have clientside prediction, so other clients immediately process the lava damage before getting the networked state

you can "fix" the bug by removing clientside lava damage prediction, but there are other issues to consider aside from just other players seeing your damage

edit:

that "godmode" fix you have does nothing

you can't securely check any variable on the client from the server simply because the client networking travels through untrusted systems

maybe this server has a "clientStat" packet but that can easily be routed around.

besides, the server has full authority over HP, and any packets that allow the player to indirectly control HP usually have specific properties that make it hard to spam/abuse.
@Royx Lalonde

meh, i don't really care it was just a guess,
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us