De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Lorenc_ - 18.08.2011
Suggested by Karlip to gather more attention for this, so it can be confirmed
Hello, around 3 days ago I've discovered a sync problem. If you're inside a vehicle and have your vehicle's health set to FLOAT_INFINATE, value = " (Float:0x7F800000) " You'll exprience players seeing you fly with nothing but you yourself can see what you're flying [ EXAMPLE IS A HUNTER ], this problem turns out to look like you're airbreaking/fly hacking.
Basicially, players will see you piloting nothing, on your own screen you can actually see what you're piloting.
Just to warn people around about this, don't try it. If you wanna use GOD car or something, you might have to set a >= 750 MS timer for repairing.
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Gforcez - 18.08.2011
Confirmed. I Was in the server when Lorenc_ was testing his gunship Killstreak. And that happend.
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Basicz - 18.08.2011
Yeah.
Quote:
Originally Posted by Basicz
Confirmed, the Lorenc_ one.
So Zed was flying a Hunter as a gunship on SA-MP CoD: BO Server.
Lorenc_ set it's health to FLOAT_INFINITE.
After I got killed by it's missile, I respawned.
Zed was flying without a Hunter and he looks like an airbreaker.
__________________
|
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
maddinat0r - 26.08.2011
When you set the vehicle's health to infinite, other players will see your vehicle exploding while you are
in it or don't see any vehicle, like you said.
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
leong124 - 26.08.2011
Is that possible that vehicle health in SA-MP do not have special values like FLOAT_INFINITE?
If so, then probably it will be recognised as a negative value, which will call OnVehicleDeath.
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
maddinat0r - 26.08.2011
Hm, I remember I also tried setting the vehicle's health to a big value, like 999999999999999999999999
and the same result came out.
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Lorenc_ - 26.08.2011
Quote:
Originally Posted by leong124
Is that possible that vehicle health in SA-MP do not have special values like FLOAT_INFINITE?
If so, then probably it will be recognised as a negative value, which will call OnVehicleDeath.
|
It's a bug lol, enough said and yeah. I agree with that, how stupid am I :S Still a good find though
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
leong124 - 26.08.2011
Quote:
Originally Posted by Pain123
Hm, I remember I also tried setting the vehicle's health to a big value, like 999999999999999999999999
and the same result came out.
|
This may prove my explanation. since the value is overflown, probably it is a negative value, since the maximum integral value in PAWN is 2147483647.
http://en.wikipedia.org/wiki/Arithmetic_overflow
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Luk_Ass - 26.08.2011
Quote:
Originally Posted by leong124
|
Anyway 0x7F800000 is in decimal 2139095040 which is less than max int 2147483647 (0x7FFFFFFF).
2139095040 = 0x7F800000
2147483647 = 0x7FFFFFFF
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Lorenc_ - 26.08.2011
Quote:
Originally Posted by Luk_Ass
Anyway 0x7F800000 is in decimal 2139095040 which is less than max int 2147483647 (0x7FFFFFFF).
2139095040 = 0x7F800000
2147483647 = 0x7FFFFFFF
|
Smart :O
--
Will this be confirmed as a scripting bug ?
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
leong124 - 27.08.2011
Quote:
Originally Posted by Luk_Ass
Anyway 0x7F800000 is in decimal 2139095040 which is less than max int 2147483647 (0x7FFFFFFF).
2139095040 = 0x7F800000
2147483647 = 0x7FFFFFFF
|
You may be right, but is that possible that the vehicle health is not 32-bit like player health?
I'm not sure, because I've tried to set a vehicle's health to 100000, which is larger than the maximum value in 16-bit.
I'll try that if I have time.
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
AceFlyer - 10.09.2011
i tried making one of those god mode scripts but i encountered another bug the car looks like it explodes for other players but to me its fine when i move arround to other players it looks like the exploded car is moving?
Ill send an example of it later
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Sasino97 - 10.09.2011
Thanks !!! LOL In one of my GMs I gave infinite health to cars and I Din't understand WTF was that desync bug!! Thankyou very much! Rep+1
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
leong124 - 10.09.2011
I finally tested it with my friend.
It is the problem of the float size.
I find that when the vehicle health reaches 65536, the others will see the vehicle explode and got desynced (but the vehicle doesn't disappear).
However, the vehicle health is not overflown that you can see them in 32-bit integer by using GetVehicleHealth.
Why I thought a health of 100000 still works is because I can't see the bug on my own.
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Reynolds - 27.09.2011
Now what causes the problem? We could use a developer's answer. Based on one people said SA:MP would return a correct value on GetVehicleHealth, we'd (or I'd) assume GTA:SA is bugged, and it stores the its vehicles' health in a 16-bit float. But I don't think that SA:MP would have an own array which stores all of the vehicles' health which are loaded. Maybe it's just a wild goose chase, but I'd be happy if I could use the standardized infinity values, because I'm used to it.
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
leong124 - 28.09.2011
I guess it could be SA-MP's problem.
If it is GTA:SA's problem, you should also see your vehicle explode, since the vehicle health system in all clients should be the same.
Anyway, it is quite weird, but you have to be used not to use FLOAT_INFINATE in some cases that are related to game data like health, armour, etc..
Re: De-syncing whilst having FLOAT_INFINATE as your vehicle health. -
Y_Less - 28.09.2011
Quote:
Originally Posted by Luk_Ass
Anyway 0x7F800000 is in decimal 2139095040 which is less than max int 2147483647 (0x7FFFFFFF).
2139095040 = 0x7F800000
2147483647 = 0x7FFFFFFF
|
Vehicle health is a float, not an integer. I can't be bothered to explain the IEEE-754 floating point format, but "0x7F800000" is a special bit pattern for positive infinity. It depends on how the code works internally though, which may be the problem.