De-syncing whilst having FLOAT_INFINATE as your vehicle health.
#1

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.
Reply
#2

Confirmed. I Was in the server when Lorenc_ was testing his gunship Killstreak. And that happend.
Reply
#3

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.
__________________
Reply
#4

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.
Reply
#5

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.
Reply
#6

Hm, I remember I also tried setting the vehicle's health to a big value, like 999999999999999999999999
and the same result came out.
Reply
#7

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
Reply
#8

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
Reply
#9

Quote:
Originally Posted by leong124
Посмотреть сообщение
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
Anyway 0x7F800000 is in decimal 2139095040 which is less than max int 2147483647 (0x7FFFFFFF).

2139095040 = 0x7F800000
2147483647 = 0x7FFFFFFF
Reply
#10

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 ?
Reply
#11

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.
Reply
#12

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
Reply
#13

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
Reply
#14

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.
Reply
#15

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.
Reply
#16

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..
Reply
#17

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.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)