Sitting

General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!

Moderator: Team Members

Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
Post Reply
User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Sitting

Post by Gangrenous » Fri Sep 30, 2016 1:11 pm

Any way to tell if a client is sitting or standing ? Searched the source and not finding much, my search skills are failing me. I am seeing an opcode, OP_SitMsg and OP_StandMsg, not sure if those have anything to actually do with the client sitting or not.
Resident Dirty Hippy

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Sitting

Post by Jabantiz » Fri Sep 30, 2016 1:14 pm

There is no flag to check, you might be able to check the visual state of the player and see if it is the sitting animation though.

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Sitting

Post by Gangrenous » Fri Sep 30, 2016 1:25 pm

Yep, that was a last resort.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Sitting

Post by Gangrenous » Thu Dec 28, 2017 12:42 pm

I figured I would follow up on how to check on this.

Code: Select all

if(IsPlayer() && GetTempVisualState() == 540)
Resident Dirty Hippy

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: Sitting

Post by tyrbo » Thu Dec 28, 2017 1:41 pm

You could try using

Code: Select all

client->GetPlayer()->get_character_flag(CF_IS_SITTING);

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Sitting

Post by Gangrenous » Sat Apr 13, 2019 6:40 pm

Old post but I lost this code and was adding it back in. I did try that Tyrbo, just because it was more natural when coding, but alas it did not seem to work.
Resident Dirty Hippy

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: Sitting

Post by Ememjr » Sun Apr 14, 2019 3:19 am

Well i think we should have a flag for it,
IMO - the client sends meesage to sit, server then sends the code to have the player sit at that time we should set a flag that he is sitting

same with crouch, if we dont have it already we should have a flag for crouchingg since there are spells that say must be crouching

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Sitting

Post by Gangrenous » Sun Apr 14, 2019 3:50 am

Ememjr wrote: Sun Apr 14, 2019 3:19 am Well i think we should have a flag for it,
IMO - the client sends meesage to sit, server then sends the code to have the player sit at that time we should set a flag that he is sitting

same with crouch, if we dont have it already we should have a flag for crouchingg since there are spells that say must be crouching
Well if you know some kind of hook, let me know. I ended up going into the player loop and checking if the person was sitting or not and flipping a boolean private variable player_sitting. I hated to have to put anything into the player loop, I want to keep that as lean as possible.
Resident Dirty Hippy

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: Sitting

Post by Ememjr » Sun Apr 14, 2019 4:45 am

ill take a look
curious if on live if you are sitting when you exit game, are you sitting or standing up when you come back

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: Sitting

Post by Cynnar » Sun Apr 14, 2019 10:47 am

Standing when you log back in
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: Sitting

Post by Ememjr » Sun Apr 14, 2019 1:35 pm

ok it would be easy enough to add a flag called isSitting to the player, it will defualt to false on login then when i sit command comes from the client to server it will saet that flag to isSitting() = true.

sound good, let me know and ill add it in

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: Sitting

Post by Cynnar » Sun Apr 14, 2019 1:45 pm

Yeah I think we will need it for some things.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: Sitting

Post by tyrbo » Sun Apr 14, 2019 8:54 pm

You can tell whether or not a player is sitting by checking the activity status of the last movement packet.
It's another bitmask, 64 being the sitting value, at least on AoM.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests