Adding in the stuck command

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Adding in the stuck command

Postby Hiatus » Mon May 16, 2011 10:59 pm

http://www.dolserver.net/storm/tracker/?issue=14861


The title says it all, the stuck command currently implemented does nothing. My patch will locate the last saved location and port them there. Since the Client updates faster than the DB it pulls saved locs from the DB and moves them back in their last saved walking path.


Edit : Tested also by the way, and it works. @Etaew if you read this, you said I could use the tracker (edit etc) I couldn't figure out how. Maybe I'm blind but I couldn't see how to change status' etc.
Attachments
stuckcommand.patch
(4.34 KiB) Downloaded 31 times
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Adding in the stuck command

Postby Etaew » Tue May 17, 2011 11:02 am

Thank you for yet another patch Hiatus.

Are you running any server at the moment that we should be crediting?

It appears I haven't allowed Contributors the ability to access the Tracker. I now have. :-) Give it a go.
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England

Re: Adding in the stuck command

Postby Hiatus » Tue May 17, 2011 11:03 am

Currently in the making :D I haven't quite picked out a name yet. So I used my DOL forums name. I plan to possibly change that soon.
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Adding in the stuck command

Postby Hiatus » Tue May 17, 2011 1:11 pm

I have edited all of the patches that I currently am working on...it works :D
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Adding in the stuck command

Postby Etaew » Tue May 17, 2011 1:13 pm

That should make things easier :-) Keep up the good work.

Of course, any suggestions as to tracker improvements are welcome.
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England

Re: Adding in the stuck command

Postby geshi » Tue May 17, 2011 1:14 pm

/stuck afaik was working about a year ago :shock:
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Adding in the stuck command

Postby Hiatus » Tue May 17, 2011 1:18 pm

/stuck afaik was working about a year ago :shock:


It currently does not even work on storm, I was playing my hunter and I used a portal(it was next to a tree) and then I was stuck in the tree. All it did was log me out just like the quit command. And that tracker patch was made a year ago :D
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Adding in the stuck command

Postby geshi » Tue May 17, 2011 1:30 pm

ah, I probably got live confused with shards then.

good job :)
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Adding in the stuck command

Postby Dunnerholl » Tue May 17, 2011 1:51 pm

actually...after reviewing code :

remove the property "Stuck" from GamePlayer, as it became useless by your fix


i think some time ago the plan was:

to set stuck flag on gameplayer
logging him out
in loginhandler stuck flag should be then handled
(last step is missing)

i prefer your way of handling it all in the stuck handler
if someone thinks "why log out at all?" the logout is required anyway because of abuse if you effectively make this a jump command :)
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Adding in the stuck command

Postby Dunnerholl » Tue May 17, 2011 2:02 pm

actually...after reviewing code :

remove the property "Stuck" from GamePlayer, as it became useless by your fix


i think some time ago the plan was:

to set stuck flag on gameplayer
logging him out
in loginhandler stuck flag should be then handled
(last step is missing)

i prefer your way of handling it all in the stuck handler
if someone thinks "why log out at all?" the logout is required anyway because of abuse if you effectively make this a jump command :)
i was wrong:
(in public override void SaveIntoDatabase()/GamePlayer)
Code: Select all
if (m_stuckFlag)
{
lock (m_lastUniqueLocations)
{
GameLocation loc = m_lastUniqueLocations[m_lastUniqueLocations.Length - 1];
m_dbCharacter.Xpos = loc.X;
m_dbCharacter.Ypos = loc.Y;
m_dbCharacter.Zpos = loc.Z;
m_dbCharacter.Region = loc.RegionID;
m_dbCharacter.Direction = loc.Heading;
}
}
this has to be removed/handled/cared about too then

question is, why didnt it work? how is it different from your approach?
Last edited by Dunnerholl on Tue May 17, 2011 2:09 pm, edited 1 time in total.
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Adding in the stuck command

Postby Tolakram » Tue May 17, 2011 2:05 pm

Are we positive stuck did not work? I know there are instances where it might not work, like if lastuniquelocation is bad, but it seems like this should work most of the time.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Adding in the stuck command

Postby Hiatus » Tue May 17, 2011 3:48 pm

I tested the command several times, surprisingly I did do find all references on the code but I did not find that code. So my bad on my part for not seeing that. Wouldn't it be better handled in the script itself rather than GamePlayer?
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Adding in the stuck command

Postby Graveen » Tue May 17, 2011 5:30 pm

At first sight, this could be better in a separate command, except if the access level of m_lastuniquelocation is somehow restricted in purpose.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Adding in the stuck command

Postby Hiatus » Tue May 17, 2011 7:12 pm

So, would you like me to add to the patch to remove the stuck flags etc?
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Adding in the stuck command

Postby Graveen » Tue May 17, 2011 7:40 pm

Thank you for your work, i'll carefully look at it, no decisions atm
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest