PDA

View Full Version : Zoning heading...


Cripp
12-14-2006, 12:25 PM
Im not sure if the heading position works with zoning or not but this is a little fix ive had on my server for a while.. just thought id share it.

--- zoning.cpp 2006/06/20 02:03:51 1.1
+++ zoning.cpp 2006/06/21 06:07:41 1.2
@@ -295,10 +295,11 @@
x_pos = dest_x; //these coordinates will now be saved when ~client is called
y_pos = dest_y;
z_pos = dest_z;
+ heading = dest_h; // Cripp: fix for zone heading
m_pp.heading = dest_h;
m_pp.zone_id = zone_id;

//Force a save so its waiting for them when they zone
Save();

if (zone_id == zone->GetZoneID()) {

i also usually add a SendPosUpdate(2); right before the Save(); as well but im not really sure if thats necessary.. maybe FNW or someone can insight me.

John Adams
12-15-2006, 07:27 AM
Cripp, this might not have anything to do with headings in general, but what is the scope? 0-360? 0-255? (other)? I have hella trouble aiming objects I place sometimes. I wasn't sure where to start looking through the code, but I guess I can stop being lazy and do to this weekend.

Cripp
12-15-2006, 07:47 AM
its 0-255

0 = north
64 = west
128 = south
192 = east

John Adams
12-15-2006, 08:24 AM
Sorry to pester about this, but is that just for PC zoning coordinates, or object placement? Cuz I'll tell you why. When I was building the facades and Gunthak portal objects in PoK, I had one helluva time placing the Bazaar facade. Started at 0 degrees, of course. Way off. And went in 64-degree increments to get my bearings - none of them seemed to do what I expected. So I went in 20-degree increments. I surpassed 255, 360, and wound up somewhere around 430 before I got the right heading for the building.

What the hell am I doing wrong? ;)
TIA for your patience.