Heading
Moderator: Team Members
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Heading
We do not currently have a way of changing a players location or heading do we?
Resident Dirty Hippy
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Heading
SetPosition() will work on a player for location, there currently is no way to change heading though. I will modify both SetPosition() and SetHeading() to allow changing of the players heading though.
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Heading
Thank you!!
I will move on to other spells and just notate these are not done.
I will move on to other spells and just notate these are not done.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Heading
I merged the official source with my changes today and noticed the SetPosition is actually putting you at 180 no matter what value you feed it. Could this be the cause?
This check is further down the LuaFunctions.cpp
Code: Select all
if(client){
EQ2Packet* packet = client->GetPlayer()->Move(x, y, z, client->GetVersion());
client->QueuePacket(packet);
}Resident Dirty Hippy
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Heading
That code should actually be
BTW no clue why but just putting in the normal heading and sending the packet it was always off by 180, so if you passed a heading of 190 it would end up putting you at 10, that is why there is the +180.0f in there, just another random weird behavior SoE/Daybreak coded...
Code: Select all
if(client){
EQ2Packet* packet = client->GetPlayer()->Move(x, y, z, client->GetVersion(), (heading == 0 ? -1.0f : (heading + 180.0f)));
client->QueuePacket(packet);
}
Who is online
Users browsing this forum: No registered users and 0 guests