SetVehicleZAngle Returning Backwards Coords (Possible to flip?)
#1

Alright this seems like a fairly common issue so I don't think I need to spatter out ALL my coding for it.

I'm storing GetVehicleZAngle in the database, then calling it for SetVehicleZAngle
Upon using SetVehicleZAngle I'm almost 100% certain it's just flipping the stored coordinates in the exact opposite direction. I guess a way to work around this would be to flip the coords into the opposite direction upon executing it with SetVehicleZAngle, or saving the SetVehicleZAngle so how exactly would I go about doing that?

If anyone else has another working option, please supply.
Reply
#2

Well if you add 180 degrees that should be a U-Turn.

EDIT: Still it would be better if you find out whats making it store backwards angles and fix it proper.
Reply
#3

It's weird though, when I get and set the ZAngle, it flips to the correct way. Make sure that you do not have anything else which cause it from being set to a different way.
Reply
#4

Unfortunately after adding (Coords+180) the result is a constant south-aimed spawn.
I've dug up and read all over the forum about retrieving Z angles causing backwards spawning.
It's all receiving and storing properly, just ass backwards.


edit: I've even gone as far as to PutPlayerInVehicle and then set the Z Angle, still nothing.
Reply
#5

185.527786 is the coordinate getting saved in the database
Because the angle is being set to face north by default, I'm assuming it's breaking at SetVehicleZAngle, even though I'm forcing the database to recover the 185 directly before using, it's getting stuck on 0 or something when actually being executed.

Edit:
I'm working on some further patching and troubleshooting to see if it persists, so far no luck.
(I'm not a newb scripter, just stuck in a rut, may solve myself, will keep posted)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)