Posts: 3,793
Threads: 196
Joined: Jan 2010
Reputation:
0
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.
Posts: 777
Threads: 25
Joined: Jul 2010
Reputation:
0
18.08.2011, 09:05
(
Последний раз редактировалось Gforcez; 18.08.2011 в 10:51.
)
Confirmed. I Was in the server when Lorenc_ was testing his gunship Killstreak. And that happend.
Posts: 845
Threads: 3
Joined: Jun 2010
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.
Posts: 1,496
Threads: 78
Joined: Jun 2008
Reputation:
0
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.
Posts: 845
Threads: 3
Joined: Jun 2010
Hm, I remember I also tried setting the vehicle's health to a big value, like 999999999999999999999999
and the same result came out.
Posts: 66
Threads: 5
Joined: Sep 2011
Reputation:
0
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
Posts: 1,418
Threads: 63
Joined: Dec 2010
Reputation:
0
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
Posts: 1,496
Threads: 78
Joined: Jun 2008
Reputation:
0
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.
Posts: 92
Threads: 15
Joined: Jul 2010
Reputation:
0
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.
Posts: 1,496
Threads: 78
Joined: Jun 2008
Reputation:
0
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..
Posts: 15,941
Threads: 0
Joined: Jun 2008
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.