Just got home a bit ago, got a chance to try to fix some opcodes. Looks like they messed with the x,y,z coordinates again. Hopefully it's not as bad as last time. Will try to post the opcodes I found in a while.
Printable View
Just got home a bit ago, got a chance to try to fix some opcodes. Looks like they messed with the x,y,z coordinates again. Hopefully it's not as bad as last time. Will try to post the opcodes I found in a while.
first time i've played with seq in years, got it mostly working:
opcode id="5772" name="OP_PlayerProfile"
opcode id="60a8" name="OP_ZoneEntry"
opcode id="18cd" name="OP_NewZone"
opcode id="4788" name="OP_NpcMoveUpdate"
opcode id="2c22" name="OP_Death"
opcode id="4234" name="OP_DeleteSpawn"
opcode id="781f" name="OP_RemoveSpawn"
undo these previous changes to spawnshell.cpp and spawn.cpp:
- int16_t y = pupdate->y >> 3;
+ int16_t y = (pupdate->y + pupdate->y) >> 3;
- setPos(s->x >> 3, s->y >> 3, s->z >> 3);
+ setPos(s->x >> 3, (s->y + s->y) >> 3, s->z >> 3);
x/y/z are correct, not sure about the rest:
signed deltaZ:13; // change in z
unsigned heading:12; // heading
signed padding0020:7;
signed deltaHeading:10;// change in heading
signed x:19; // x coord
signed padding0004:3;
signed animation:10; // animation
signed deltaX:13; // change in x
signed padding0008:9;
signed deltaY:13; // change in y
signed y:19; // y coord
signed padding0001:10;
signed z:19; // z coord
signed padding0016:3;
Thanks!
I've applied the changes but I don't know if I've applied them correctly. Are you saying to change the x/y/z coordinates in every location that they show up in everquest.h? I've changed them all I think and things are mostly working. The two most obvious things I see now are that I don't see my own character and the heading, and NPCs (mobs, pets, mercs) move ok but PCs don't seem to. Is that what you expect or have I applied something incorrectly?
Again, much appreciation. I'm ok with the opcodes but those other changes really get me. Why do they change them so much from patch to patch? Isn't that a reflection of how they are passing/storing the information between the server and the client?
Any changes in the way the client decodes information have to be changed in ShowEQ too. In the previous patch, it was adding the 'y' coordinate to itself at the start of the function where it unpacks physics data -- for some reason they reverted that and only they (Sony) can say for sure why.
Heh, thought so. I think they're doing it to screw with us...
OP_GroundSpawn is now 56b2
Yup, I ran out of time to work on it so posted what I had.
I'm thinking just to screw with us, I can't think of any practical purpose for randomly reordering those things.Quote:
Again, much appreciation. I'm ok with the opcodes but those other changes really get me. Why do they change them so much from patch to patch? Isn't that a reflection of how they are passing/storing the information between the server and the client?
Ok, I have other PCs moving now but they aren't in the right location. I must have messed up one of the changes above regarding player x/y/z.
I reverted the playerselfpos structure back to what it was pre-code and with the opcode changes I've made the player shows up on the map but not in the right spot. The structure appears to have changed for players but maybe not in the same way it did for npcs?
Oh, the other big spawn change I found is 0be5 for OP_ClientUpdate
No matter what I do, I get what looks like Missile Command on crack. What structs need to be changed in everquest.h? Do I change the pos structs in spawnshell.cpp?
Thanks!!
got deltaX/deltaY in the right places now so movement vector lines are correct.
do heading/deltaHeading/deltaZ/animation do anything useful for seq?
signed deltaZ:13; // change in z
unsigned heading:12; // heading
signed padding0020:7;
signed deltaHeading:10;// change in heading
signed x:19; // x coord
signed padding0004:3;
signed padding0008:12;
signed deltaY:13; // change in y
signed padding0001:7;
signed deltaX:13; // change in x
signed y:19; // y coord
signed animation:10; // animation
signed z:19; // z coord
signed padding0016:3;
OP_Consider = 1184
OP_TargetMouse = 0a2d
This is what I have so far
almost got playerSelfPosStruct doneCode:Index: conf/zoneopcodes.xml
===================================================================
--- conf/zoneopcodes.xml (revision 781)
+++ conf/zoneopcodes.xml (working copy)
@@ -3,111 +3,111 @@
<seqopcodes>
<!-- Critical opcodes used directly by ShowEQ -->
- <opcode id="46bb" name="OP_PlayerProfile" updated="12/12/12">
+ <opcode id="5772" name="OP_PlayerProfile" updated="01/16/13">
<comment>CharProfileCode</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="1665" name="OP_ZoneEntry" updated="12/12/12">
+ <opcode id="60A8" name="OP_ZoneEntry" updated="01/16/13">
<comment>ZoneEntryCode</comment>
<payload dir="client" typename="ClientZoneEntryStruct" sizechecktype="match"/>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="3be2" name="OP_TimeOfDay" updated="12/12/12">
+ <opcode id="5824" name="OP_TimeOfDay" updated="01/16/13">
<comment>TimeOfDayCode</comment>
<payload dir="server" typename="timeOfDayStruct" sizechecktype="match"/>
</opcode>
- <opcode id="7fff" name="OP_NewZone" updated="12/12/12">
+ <opcode id="18CD" name="OP_NewZone" updated="01/16/13">
<comment>NewZoneCode</comment>
<payload dir="server" typename="newZoneStruct" sizechecktype="match"/>
</opcode>
- <opcode id="7b6c" name="OP_SpawnDoor" updated="12/12/12">
+ <opcode id="31ED" name="OP_SpawnDoor" updated="01/16/13">
<comment>DoorSpawnsCode</comment>
<payload dir="server" typename="doorStruct" sizechecktype="modulus"/>
</opcode>
- <opcode id="4286" name="OP_GroundSpawn" updated="12/12/12">
+ <opcode id="56B2" name="OP_GroundSpawn" updated="01/16/13">
<comment>MakeDropCode</comment>
<payload dir="server" typename="makeDropStruct" sizechecktype="none"/>
<payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="7922" name="OP_SendZonePoints" updated="12/12/12">
+ <opcode id="0D72" name="OP_SendZonePoints" updated="01/16/13">
<comment>Coords in a zone that will port you to another zone</comment>
<payload dir="server" typename="zonePointsStruct" sizechecktype="none"/>
</opcode>
- <opcode id="25C5" name="OP_AAExpUpdate" updated="12/12/12">
+ <opcode id="4212" name="OP_AAExpUpdate" updated="01/16/13">
<comment>Receiving AA experience. Also when percent to AA changes.</comment>
<payload dir="server" typename="altExpUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="47E3" name="OP_ExpUpdate" updated="12/12/12">
+ <opcode id="4ECC" name="OP_ExpUpdate" updated="01/16/13">
<comment>ExpUpdateCode</comment>
<payload dir="server" typename="expUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0561" name="OP_GuildMOTD" updated="12/12/12">
+ <opcode id="5531" name="OP_GuildMOTD" updated="01/16/13">
<comment>GuildMOTD</comment>
<payload dir="server" typename="guildMOTDStruct" sizechecktype="none"/>
</opcode>
- <opcode id="455d" name="OP_ClientUpdate" updated="12/12/12">
+ <opcode id="0BE5" name="OP_ClientUpdate" updated="01/16/13">
<comment>Position updates - looks to be 455d and 42 bytes as of 12/12/12</comment>
<payload dir="server" typename="playerSpawnPosStruct" sizechecktype="match"/>
<payload dir="both" typename="playerSelfPosStruct" sizechecktype="match"/>
</opcode>
- <opcode id="5BD9" name="OP_NpcMoveUpdate" updated="12/12/12">
+ <opcode id="4788" name="OP_NpcMoveUpdate" updated="01/16/13">
<comment>Position updates</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="6b5a" name="OP_MobUpdate" updated="12/12/12">
+ <opcode id="142C" name="OP_MobUpdate" updated="01/16/13">
<comment>MobUpdateCode</comment>
<payload dir="both" typename="spawnPositionUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="3c8e" name="OP_DeleteSpawn" updated="12/12/12">
+ <opcode id="4234" name="OP_DeleteSpawn" updated="01/16/13">
<comment>DeleteSpawnCode</comment>
<payload dir="both" typename="deleteSpawnStruct" sizechecktype="match"/>
</opcode>
- <opcode id="3B06" name="OP_RemoveSpawn" updated="12/12/12">
+ <opcode id="781F" name="OP_RemoveSpawn" updated="01/16/13">
<comment>Remove spawn from zone</comment>
<payload dir="both" typename="removeSpawnStruct" sizechecktype="none"/>
</opcode>
- <opcode id="3a65" name="OP_Death" updated="12/12/12">
+ <opcode id="2C22" name="OP_Death" updated="01/16/13">
<comment>old NewCorpseCode</comment>
<payload dir="server" typename="newCorpseStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1ad3" name="OP_WearChange" updated="12/12/12">
+ <opcode id="32FB" name="OP_WearChange" updated="01/16/13">
<comment>SpawnUpdateCode</comment>
<payload dir="both" typename="SpawnUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="7360" name="OP_SpawnAppearance" updated="12/12/12">
+ <opcode id="201A" name="OP_SpawnAppearance" updated="01/16/13">
<comment>SpawnAppearanceCode</comment>
<payload dir="both" typename="spawnAppearanceStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1949" name="OP_Stamina" updated="12/12/12">
+ <opcode id="4932" name="OP_Stamina" updated="01/16/13">
<comment>Server updating on hunger/thirst</comment>
<payload dir="server" typename="staminaStruct" sizechecktype="match"/>
</opcode>
- <opcode id="07b8" name="OP_HPUpdate" updated="12/12/12">
+ <opcode id="65E7" name="OP_HPUpdate" updated="01/16/13">
<comment>NpcHpUpdateCode Update HP % of a PC or NPC</comment>
<payload dir="both" typename="hpNpcUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0048" name="OP_GuildMemberUpdate" updated="12/12/12">
+ <opcode id="24DA" name="OP_GuildMemberUpdate" updated="01/16/13">
<comment>Info regarding guild members</comment>
<payload dir="server" typename="GuildMemberUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="7992" name="OP_ClickObject" updated="12/12/12">
+ <opcode id="607D" name="OP_ClickObject" updated="01/16/13">
<comment>Items dropped on the ground</comment>
<payload dir="both" typename="remDropStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0ea7" name="OP_Action" updated="12/12/12">
+ <opcode id="31B6" name="OP_Action" updated="01/16/13">
<comment>Spells cast etc</comment>
<payload dir="both" typename="actionStruct" sizechecktype="match"/>
<payload dir="both" typename="actionAltStruct" sizechecktype="match"/>
</opcode>
- <opcode id="5428" name="OP_Action2" updated="12/12/12">
+ <opcode id="4598" name="OP_Action2" updated="01/16/13">
<comment>Combat actions i.e. bash, kick etc</comment>
<payload dir="both" typename="action2Struct" sizechecktype="match"/>
</opcode>
- <opcode id="4d8d" name="OP_Consider" updated="12/12/12">
+ <opcode id="1184" name="OP_Consider" updated="01/16/13">
<comment>ConsiderCode</comment>
<payload dir="both" typename="considerStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0e25" name="OP_TargetMouse" updated="12/12/12">
+ <opcode id="1740" name="OP_TargetMouse" updated="01/16/13">
<comment>Targeting a person - old ClientTargetCode</comment>
<payload dir="both" typename="clientTargetStruct" sizechecktype="match"/>
</opcode>
Index: src/everquest.h
===================================================================
--- src/everquest.h (revision 782)
+++ src/everquest.h (working copy)
@@ -1076,23 +1076,24 @@
{
struct
{
- signed padding0004:13;
- signed y:19; // y coord
-
- signed deltaX:13; // change in x
- signed deltaHeading:10;// change in heading
- signed padding0008:9;
-
- signed deltaY:13; // change in y
- signed z:19; // z coord
-
- signed x:19; // x coord
- signed animation:10; // animation
- signed padding0016:3;
-
- unsigned heading:12; // heading
- signed deltaZ:13; // change in z
- signed padding0020:7;
+ signed padding0004:12;
+ signed deltaZ:13; // change in z
+ signed padding00042:7;
+
+ signed deltaHeading:10;// change in heading
+ signed x:19; // x coord
+ signed padding0008:3;
+
+ unsigned heading:12; // heading
+ signed deltaY:13; // change in y
+ signed padding0012:7;
+
+ signed deltaX:13; // change in x
+ signed y:19; // y coord
+
+ signed animation:10; // animation
+ signed z:19; // z coord
+ signed padding0020:3;
};
int32_t posData[5];
};
@@ -2339,19 +2340,20 @@
{
/*0000*/ uint16_t spawnId;
/*0002*/ uint16_t spawnId2;
-/*0004*/ signed padding0004:13;
- signed y:19; // y coord
-/*0008*/ signed deltaX:13; // change in x
- signed deltaHeading:10;// change in heading
- signed padding0008:9;
-/*0012*/ signed deltaY:13; // change in y
+/*0004*/ signed padding0004:12;
+ signed deltaZ:13; // change in z
+ signed padding00042:7;
+/*0008*/ signed deltaHeading:10;// change in heading
+ signed x:19; // x coord
+ signed padding0008:3;
+/*0012*/ unsigned heading:12; // heading
+ signed deltaY:13; // change in y
+ signed padding0012:7;
+/*0016*/ signed deltaX:13; // change in x
+ signed y:19; // y coord
+/*0020*/ signed animation:10; // animation
signed z:19; // z coord
-/*0016*/ signed x:19; // x coord
- signed animation:10; // animation
- signed padding0016:3;
-/*0020*/ unsigned heading:12; // heading
- signed deltaZ:13; // change in z
- signed padding0020:7;
+ signed padding0020:3;
/*0024*/
};
Index: src/spawnshell.cpp
===================================================================
--- src/spawnshell.cpp (revision 782)
+++ src/spawnshell.cpp (working copy)
@@ -882,7 +882,7 @@
if (dir != DIR_Client)
{
- int16_t y = (pupdate->y + pupdate->y) >> 3;
+ int16_t y = pupdate->y >> 3;
int16_t x = pupdate->x >> 3;
int16_t z = pupdate->z >> 3;
Index: src/spawn.cpp
===================================================================
--- src/spawn.cpp (revision 782)
+++ src/spawn.cpp (working copy)
@@ -418,7 +418,7 @@
{
setName(s->name);
setLastName(s->lastName);
- setPos(s->x >> 3, (s->y + s->y) >> 3, s->z >> 3);
+ setPos(s->x >> 3, s->y >> 3, s->z >> 3);
setPetOwnerID(s->petOwnerId);
setLight(s->light);
setGender(s->gender);
dunno if animation/deltaHeading are correct or if seq even uses them. the rest are good.
Code:struct playerSelfPosStruct
{
/*0000*/ uint8_t unknown0000[2]; // ***Placeholder (update time counter?)
/*0002*/ uint16_t spawnId; // Player's spawn id
/*0004*/ uint8_t unknown0004[2]; // ***Placeholder -- BSH 13 Apr 2011
/*0006*/ unsigned padding0001:12; // ***Placeholder
unsigned heading:12; // Directional heading
unsigned padding0002:8; // ***Placeholder
/*0010*/ float y; // y coord (2nd loc value)
/*0014*/ float deltaZ; // Change in z
/*0018*/ float z; // z coord (3rd loc value)
/*0022*/ signed deltaHeading:10; // change in heading
unsigned padding0003:10; // ***Placeholder
unsigned padding0004:12; // ***Placeholder
/*0026*/ float x; // x coord (1st loc value)
/*0030*/ float deltaX; // Change in y
/*0034*/ float deltaY; // Change in x
/*0038*/ unsigned padding0005:12; // ***Placeholder
unsigned padding0006:10; // ***Placeholder
unsigned animation:10; // animation
/*0042*/
};
Looks pretty good, at least from a couple minutes of use. Will give more feedback later. Really wish I could help with these struct changes.
Everything checked out pretty well save random crashes after a few kills:
Code:#0 0x0445c794 in QString::deref() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#1 0x0445c86e in QString::operator=(QString const&) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#2 0x080f575f in Player::setLastKill (this=0x8481490, name=..., level=90) at player.cpp:800
#3 0x08074346 in SpawnShell::killSpawn (this=0x82ec458, data=0x8a37e57 "\233_") at spawnshell.cpp:1475
#4 0x08074c87 in SpawnShell::qt_invoke (this=0x82ec458, _id=25, _o=0xbfffc390) at spawnshell.moc:412
#5 0x041855aa in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#6 0x080905ff in EQPacketDispatch::signal (this=0x842e5d8, t0=0x8a37e57 "\233_", t1=32, t2=2 '\002') at packetinfo.moc:99
#7 0x08089eb9 in EQPacketStream::dispatchPacket (this=0x83410b0, data=0x8a37e57 "\233_", len=32, opCode=11298, opcodeEntry=0x82cf0d0)
at packetstream.cpp:435
#8 0x0808c20a in EQPacketStream::processPacket (this=0x83410b0, packet=..., isSubpacket=true) at packetstream.cpp:719
#9 0x0808c4ea in EQPacketStream::processPacket (this=0x83410b0, packet=..., isSubpacket=false) at packetstream.cpp:807
#10 0x0808cc30 in EQPacketStream::handlePacket (this=0x83410b0, packet=...) at packetstream.cpp:572
#11 0x08093252 in EQPacket::dispatchPacket (this=0x8482e18, packet=...) at packet.cpp:659
#12 0x08095b25 in dispatchPacket (this=0x8482e18) at packet.cpp:583
#13 EQPacket::processPackets (this=0x8482e18) at packet.cpp:400
#14 0x08095e00 in EQPacket::qt_invoke (this=0x8482e18, _id=2, _o=0xbfffe768) at packet.moc:577
#15 0x04185642 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#16 0x04185724 in QObject::activate_signal(int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#17 0x044ccc5a in QTimer::timeout() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#18 0x041a5e3e in QTimer::event(QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#19 0x04123ffd in QApplication::internalNotify(QObject*, QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#20 0x0412418b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#21 0x0411823c in QEventLoop::activateTimers() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#22 0x040d3182 in QEventLoop::processEvents(unsigned int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#23 0x04139b50 in QEventLoop::enterLoop() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x04139ad7 in QEventLoop::exec() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0x04124d20 in QApplication::exec() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#26 0x08067a8b in main (argc=1, argv=0xbffff3f4) at main.cpp:737
Which version is thiss off? x.10?
Thanks fran... will give it a go.
Update: tried a normal 'patch' and it failed. what's the proper patch options / command?
Update tp the update.. nevermind ;) 'patch -p0 < file' seems to work. I had -p1 and it didn't.
A bit more experimentation, and I am no closer to understanding why this happens... hits my main most of the time. if I have SEQ follow an alt in group it happens far less but still eventually will seg out with pretty much the same backtrace above. I messed around with just ignoring the lastkill code but that created downstream issues elsewhere. Any thoughts on what's happening with that code and why it's important?
Found another consistent segfault. I seem much better at finding issues than solving them lately.
Happens when I zone into bazaar:Code:#0 0x006a6d80 in strcpy () from /lib/libc.so.6
#1 0x0806f868 in SpawnShell::fillSpawnStruct (this=0x8363b00, spawn=0x87d4da8, data=0x854d93c "", len=469, checkLen=true) at spawnshell.cpp:709
#2 0x08073298 in SpawnShell::zoneEntry (this=0x8363b00, data=0x854d93c "", len=469) at spawnshell.cpp:740
#3 0x08075238 in SpawnShell::qt_invoke (this=0x8363b00, _id=8, _o=0xbfffc390) at spawnshell.moc:395
#4 0x04185642 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#5 0x080905ff in EQPacketDispatch::signal (this=0x8471ba0, t0=0x854d93c "", t1=469, t2=2 '\002') at packetinfo.moc:99
#6 0x08089eb9 in EQPacketStream::dispatchPacket (this=0x83410a8, data=0x854d93c "", len=469, opCode=24744, opcodeEntry=0x83c37a8)
at packetstream.cpp:435
#7 0x0808c29b in EQPacketStream::processPacket (this=0x83410a8, packet=..., isSubpacket=true) at packetstream.cpp:754
#8 0x0808c5ad in EQPacketStream::processPacket (this=0x83410a8, packet=..., isSubpacket=false) at packetstream.cpp:892
#9 0x0808cc30 in EQPacketStream::handlePacket (this=0x83410a8, packet=...) at packetstream.cpp:572
#10 0x08093252 in EQPacket::dispatchPacket (this=0x8482e30, packet=...) at packet.cpp:659
#11 0x08095b25 in dispatchPacket (this=0x8482e30) at packet.cpp:583
#12 EQPacket::processPackets (this=0x8482e30) at packet.cpp:400
#13 0x08095e00 in EQPacket::qt_invoke (this=0x8482e30, _id=2, _o=0xbfffe768) at packet.moc:577
#14 0x04185642 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#15 0x04185724 in QObject::activate_signal(int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#16 0x044ccc5a in QTimer::timeout() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#17 0x041a5e3e in QTimer::event(QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#18 0x04123ffd in QApplication::internalNotify(QObject*, QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#19 0x0412418b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#20 0x0411823c in QEventLoop::activateTimers() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#21 0x040d3182 in QEventLoop::processEvents(unsigned int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#22 0x04139b50 in QEventLoop::enterLoop() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#23 0x04139ad7 in QEventLoop::exec() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x04124d20 in QApplication::exec() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0x08067a8b in main (argc=1, argv=0xbffff3f4) at main.cpp:737
I'm not crashing zoning into the bazaar but I did notice that I only picked up PCs within about 50 feet from my char. I do seem to pick up new chars anywhere in zone when they zone in. For some strange reason I have noticed this problem in other zones. Some effect of them being in trader mode, perhaps?
I haven't had any time to play this weekend, I'll try to get on alter and see if I'm running into the other crash you're talking about.
commenting out line 800 of player.cpp will keep it from crashing until a proper fix is figured out.
updated playerSelfPosStruct, only thing that was in the wrong place was "animation", which is the player's velocity (signed, walking backwards makes it negative).
I can't find anywhere in the code animation is actually used, or why it's called animation. Maybe it used to be something else.
padding2 was always 0x17, rest were 0, during my testing
Code:struct playerSelfPosStruct
{
/*0000*/ uint16_t unknown0000; // ***Placeholder (update time counter?)
/*0002*/ uint16_t spawnId; // Player's spawn id
/*0004*/ uint16_t unknown0004; // ***Placeholder
/*0006*/ unsigned pitch:12; // pitch (up/down heading)
unsigned heading:12; // Directional heading
unsigned padding1:8; // ***Placeholder
/*0010*/ float y; // y coord (2nd loc value)
/*0014*/ float deltaZ; // Change in z
/*0018*/ float z; // z coord (3rd loc value)
/*0022*/ signed deltaHeading:10; // change in heading
unsigned padding2:10; // ***Placeholder
unsigned padding3:12; // ***Placeholder
/*0026*/ float x; // x coord (1st loc value)
/*0030*/ float deltaX; // Change in y
/*0034*/ float deltaY; // Change in x
/*0038*/ signed animation:10; // velocity
unsigned padding4:10; // ***Placeholder
unsigned padding5:12; // ***Placeholder
/*0042*/
};
I got everything in the right spot in playerSpawnPosStruct, and also found where pitch is and labeled it. For players this is the direction they are looking up/down.
Code:struct playerSpawnPosStruct
{
/*0000*/ uint16_t spawnId;
/*0002*/ uint16_t spawnId2;
/*0004*/ unsigned pitch:12;
signed deltaZ:13; // change in z
unsigned padding01:7;
/*0008*/ signed deltaHeading:10;// change in heading
signed x:19; // x coord
unsigned padding02:3;
/*0012*/ unsigned heading:12; // heading
signed deltaY:13; // change in y
unsigned padding03:7;
/*0016*/ signed deltaX:13; // change in x
signed y:19; // y coord
/*0020*/ signed animation:10; // velocity
signed z:19; // z coord
unsigned padding04:3;
/*0024*/
};
Thanks, it's looking pretty good. I'm not sure if the changes from the last couple bugs fixed something I had wrong but now I get crashes in the baz too. Not a bit deal to me, just thought I'd mention it.
Even without the updates I didn't crash last night during a raid.
I believe I understand 'Animation'. Remember, the server does not send an update for every *single* position update for every character on the screen. It provides basically a point and a velocity vector, and the client-side code computes a new positions for every frame based on this. This is what causes the so-called 'rubber-band' effect. The server is delayed, and the client machine continues to project motion along the previous vector, and then discovers, when it finally gets an update, that the actual position is different than the projected position, and instantly corrects it. Animation is, then, used to 'fill in' the character / mob motion between server updates.
... and I crashed tonight. Line 800 in player.cpp was commented out.
Yea, we really need to figure out the segfaults. I cant run for more than ten minutes without dieing -- makes ShowEQ useless cause you have to zone to refresh the display.
Time to put more money in the ieatacid machine :)
I get the same crash when I kill a mob
Code:#0 0x000000000042e3c0 in QShared::deref (this=0xffffff0044495254)
at /usr/lib64/qt-3.3/include/qshared.h:53
53 bool deref() { return !--count; }
#1 0x00007ffff7ab98fa in QString::deref (this=0xc08580)
at tools/qstring.cpp:1552
1552 if ( d && d->deref() ) {
#2 0x00007ffff7ab99ab in QString::operator= (this=0xc08580, s=...)
at tools/qstring.cpp:1597
1597 deref();
#3 0x00000000004c3795 in Player::setLastKill (this=0xc072f0, name=...,
level=1) at player.cpp:800
800 m_lastSpawnKilledName = name;
#4 0x0000000000437c85 in SpawnShell::killSpawn (this=0xa8d2c0,
data=0xc02437 "[]") at spawnshell.cpp:1485
1485 m_player->setLastKill(spawn->name(), spawn->level());
Okay, now I'm pissed. Where is the showeq error log located?
I know there was a crash whith high level toons that did not happen on lower toons. Could there be a crashe due to the level of NPC?
4 0x0000000000437c85 in SpawnShell::killSpawn (this=0xa8d2c0,
data=0xc02437 "[]") at spawnshell.cpp:1485
1485 m_player->setLastKill(spawn->name(), spawn->level());
That is why I was thinking it might be problem with the level.
I think I found the problem:
line 24 of player.h:
const int maxSpawnLevel = 100;
I bumped it up to 127 and it stopped crashing. Also buggyness with spawn con colors was fixed.
This was corrupting data and causing weird crashes when player level was > 93 and maxSpawnLevel was 100:
Code:player.h:
QColor m_conTable[maxSpawnLevel];
player.cpp:
for (; spawnLevel < level() + 8; spawnLevel++)
{
m_conTable[spawnLevel] = QColor(redColor,
Applied the max level patch but still getting seg faults zoning into specific zones. So far it's only 2: Field of Scale & DragonScale Hills. These are guaranteed seg faults on every zone in. I see the map open but then seg fault before the spawns start showing.
Bristlebane - The Tribunal
i see level is uint8_t in some places, so in the event there is ever some high level mob somewhere:
const int maxSpawnLevel = 255;
in player.h
and a couple more opcodes i found:
opcode id="7aba" name="OP_CommonMessage"
opcode id="7ec6" name="OP_BeginCast"
Not familiar enough yet with debugging the packets, but maybe there was an increase in max length for Title and Suffix. Current limit from everquest.h is 32:
struct spawnStruct
{
.....
/*0000*/ char title[32];
/*0000*/ char suffix[32];
**Update
I doubled these to both be 64 and that seems to have fixed the crash when zoning into Field of Scale.