View Issue Details

IDProjectCategoryView StatusLast Update
0006508Multi Theft Auto : San AndreasScriptingpublic2012-09-17 08:27
ReporterslothmanAssigned Toccw 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformanyOSanyOS Versionany
Product Version1.1 
Target Version1.3.2Fixed in Version1.3.2 
Summary0006508: ped rotation while in air goes opposite direction.
Description

rotating a player while on the ground goes the proper direction that you set with a script either using setPedRotation or setElementRotation.

But when the player is in the air, neither function rotated the ped serverside, and clientside only setElementRotation works, but the rotation goes the opposite direction that the script tells it.

once the player touched ground, the rotation of the player is corrected to match what the script set it to, but while in the air, the ped does not appear to face the right direction.

This can cause the appearance of bad sync, as well as problems with hw various scripts appear to function.

Steps To Reproduce

CLIENTSIDE:

function rotationtest2()
local rot = getPedRotation(getLocalPlayer())
setElementRotation ( getLocalPlayer(), 0, 0, rot-20 )
end
bindKey("l", "down", rotationtest2)

function rotationtest()
setElementVelocity(getLocalPlayer(),0,0,4)
end
bindKey("k", "down", rotationtest)

use this script and press l to rotate the player clockwise. then press k to launch your player in the air and now suddenly while in the air you start spinning counterclockwise.

SERVERSIDE:

function rotationtest2(playersource)
local rot = getPedRotation(playersource)
setPedRotation ( playersource, rot-20 )
end

function goround(playersource)
setTimer(rotationtest2, 800, 0, playersource)
end
addCommandHandler ( "spinny", goround )

function goup(playersource, command, theme)
setElementVelocity(playersource,0,0,4)
end
addCommandHandler ( "uppy", goup )

type "spinny" in console to start spinning, then "uppy" to go into the air. you will not appear to spin while you are not touching ground

TagsNo tags attached.

Activities

ccw

2012-09-12 04:21

administrator   ~~0017543

Fixed in http://code.google.com/p/mtasa-blue/source/detail?r=4649

ccw

2012-09-17 08:27

administrator   ~~0017591

Refixed in http://code.google.com/p/mtasa-blue/source/detail?r=4680

Requires an extra argument to be used with setPedRotation and setElementRotation:
http://wiki.multitheftauto.com/wiki/SetPedRotation
http://wiki.multitheftauto.com/wiki/SetElementRotation

Issue History

Date Modified Username Field Change