To swim, or not to swim...
Moderator: Team Members
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
To swim, or not to swim...
Zcoretri (or anyone who knows),
When a player leaves solid ground and goes into water, the animation changes to swimming. Same is true for climbing ladders, and probably a few other non-Land animations.
My question is, is there any kind of packet that is set from client->server to tell the World your character is now swimming? Ie., you are drowning... it knows to track this only if you are underwater, not breathing.
What I am getting at is how to keep fish from coming on land. If we know when a player hits water, do you think we can know when a fish hits land, and to stop them?
Found this old thread: http://eq2emulator.net/phpBB3/viewtopic.php?f=3&t=434
When a player leaves solid ground and goes into water, the animation changes to swimming. Same is true for climbing ladders, and probably a few other non-Land animations.
My question is, is there any kind of packet that is set from client->server to tell the World your character is now swimming? Ie., you are drowning... it knows to track this only if you are underwater, not breathing.
What I am getting at is how to keep fish from coming on land. If we know when a player hits water, do you think we can know when a fish hits land, and to stop them?
Found this old thread: http://eq2emulator.net/phpBB3/viewtopic.php?f=3&t=434
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: To swim, or not to swim...
Yes, it's actually the client who tells the server when they've reached water and is drowning, reached water and is not drowning, or left the water. In Player::ProcessMovementData it is processed. That function is called from Client::HandlePacket in case OP_UpdatePositionMsg at player->PrepareIncomingMovementPacket.
Since this is the client (eg. not a computer spawn), this code won't get hit for NPCs.
Since this is the client (eg. not a computer spawn), this code won't get hit for NPCs.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: To swim, or not to swim...
Thanks Scatto. Yeah I knew about ProcessMovement and the drowning, but the client doesn't start "drowning" the toon til air has expired, right? I mean, I can swim around all day and the server has no idea I am on land, in the air, or under water... til my breath bar runs out. Correct? Soon as I am out of breath, the opcode for Drowning gets sent and the server starts whittling away my HPs til I'm dead?
I haven't thrown myself into a lake of fire lately, but I'll try that tonight, see if I get Breath, or Burning - client-side.
So, if we wanted to process NPCs movements, we'd have to write that still, huh?
I haven't thrown myself into a lake of fire lately, but I'll try that tonight, see if I get Breath, or Burning - client-side.
So, if we wanted to process NPCs movements, we'd have to write that still, huh?
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: To swim, or not to swim...
Not exactly. A character flag gets sent from the client to tell a status of whether you're in the water or not too, just not for drowning. Some #defines:
UPDATE_ACTIVITY_RUNNING
UPDATE_ACTIVITY_IN_WATER_ABOVE
UPDATE_ACTIVITY_DROWNING
UPDATE_ACTIVITY_DROWNING2
UPDATE_ACTIVITY_RUNNING
UPDATE_ACTIVITY_IN_WATER_ABOVE
UPDATE_ACTIVITY_DROWNING
UPDATE_ACTIVITY_DROWNING2
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: To swim, or not to swim...
Hmm, I don't think I've ever seen those getting sent when I was obsessing over why DoV clients drowned almost instantly.
But this really is about Bladefin, chasing me out of the lagoon onto the solid ground. He needs to stay in the damn water!
But this really is about Bladefin, chasing me out of the lagoon onto the solid ground. He needs to stay in the damn water!
- xinux
- Team Member
- Posts: 680
- Joined: Wed Mar 10, 2010 11:10 am
- Location: Destroyer of Servers
Re: To swim, or not to swim...

EQ II - Build=1360 (Orig) - Build=1360 (DoF) - Build=2654 (KoS) - Build=3375 (Classic) - Build=3554 (EoF)
EQ II - Build=4412 (RoK) - Build=5122 (TSO) - Build=6118 (SF) - Build=7628 (DoV) - Build=8295 (Aod)
EQ II - Build=4412 (RoK) - Build=5122 (TSO) - Build=6118 (SF) - Build=7628 (DoV) - Build=8295 (Aod)
- TILT
- Posts: 114
- Joined: Thu Oct 13, 2011 12:03 am
- Location: > /dev/null
Re: To swim, or not to swim...
That's funny lol
"Hell, there are no rules here - we're trying to accomplish something." Thomas A. Edison
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: To swim, or not to swim...
FYI, I got ahold of Andrew (from the original HIT post) and luckily, his email was still hooked up. He sent me back a link to where his latest work is stored, on GoogleCode.
http://code.google.com/p/openzone2/
Check it out, see if this helps make sense of our terrain mapping issues.
Thank you, Andrew!
http://code.google.com/p/openzone2/
Check it out, see if this helps make sense of our terrain mapping issues.
Thank you, Andrew!
Who is online
Users browsing this forum: No registered users and 0 guests