Login
User Name:

Password:



Register

Forgot your password?
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
SWRFUSS 1.4
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.4
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.3
Author: Various
Submitted by: Samson
Users Online
CommonCrawl, Bing, AhrefsBot

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
486
3,766
19,510
575
Zedethar

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SmaugFUSS » Bug in violence_update( )
Forum Rules | Mark all | Recent Posts

Bug in violence_update( )
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 14, 2017 7:43 pm   Last edited Jan 14, 2017 7:53 pm by GatewaySysop
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts405
JoinedMar 7, 2005

 
I'm not seeing options for tagging anymore, and emoticons still don't work, so not really able to post the bug here. Think you might have some more kinks yet to work out. If I can edit later, I will try that. Otherwise will start a new topic.

* #2 Jan 15, 2017 11:56 am   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts405
JoinedMar 7, 2005

 
Okay, giving this another shot after the forum fix. Thanks Samson! :smile:

In fight.c, violence_update( ), there is this bit regarding non-autonomous mobs potentially switching PC tanks:
            /*
             *   Group Fighting Styles Support:
             *   If ch is tanking
             *   If rch is using a more aggressive style than ch
             *   Then rch is the new tank   -h
             */
            if( ( !IS_NPC(ch) && !IS_NPC(rch) )
              &&( rch!=ch                     )
              &&( rch->fighting               )
              &&( who_fighting(rch->fighting->who) == ch    )
              &&( !xIS_SET( rch->fighting->who->act, ACT_AUTONOMOUS ) )
              &&( rch->style < ch->style      )
              )
            {
                 rch->fighting->who->fighting->who = rch; 

            }


Shouldn't that instead look like this, so we recalculate fight->xp, fight->align, fight->time_skilled and such, for the new tank? :huh:

            /*
             *   Group Fighting Styles Support:
             *   If ch is tanking
             *   If rch is using a more aggressive style than ch
             *   Then rch is the new tank   -h
             */
            if( ( !IS_NPC(ch) && !IS_NPC(rch) )
              &&( rch!=ch                     )
              &&( rch->fighting               )
              &&( who_fighting(rch->fighting->who) == ch    )
              &&( !xIS_SET( rch->fighting->who->act, ACT_AUTONOMOUS ) )
              &&( rch->style < ch->style      )
              &&( rch->num_fighting < max_fight(rch) )
              )
            {  
                    stop_fighting( rch->fighting->who, FALSE );
	            set_fighting( rch->fighting->who, rch );  
            }


Post is unread #3 Jan 18, 2017 4:43 pm   
Go to the top of the page
Go to the bottom of the page

Sadiq
Fledgling
GroupMembers
Posts24
JoinedJan 7, 2010

 
And another good catch! You are on a roll! :tongue:

Post is unread #4 Jan 18, 2017 11:20 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,668
JoinedJan 1, 2002

 
Have you guys thought about making sure these get submitted to GitHub?

Post is unread #5 Jan 20, 2017 7:34 am   
Go to the top of the page
Go to the bottom of the page

Sadiq
Fledgling
GroupMembers
Posts24
JoinedJan 7, 2010

 
Samson said:

Have you guys thought about making sure these get submitted to GitHub?


I'm not adverse to the idea, but I have never used GitHub. I will have to go and figure out how to submit changes. :redface:

Post is unread #6 Jan 20, 2017 3:50 pm   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts405
JoinedMar 7, 2005

 

Sadiq said:

Samson said:

Have you guys thought about making sure these get submitted to GitHub?


I'm not adverse to the idea, but I have never used GitHub. I will have to go and figure out how to submit changes. :redface:


Likewise here, to be honest. Will have to check it out when I get a chance!

Post is unread #7 Jan 28, 2017 9:04 am   
Go to the top of the page
Go to the bottom of the page

Sadiq
Fledgling
GroupMembers
Posts24
JoinedJan 7, 2010

 
Samson said:

Have you guys thought about making sure these get submitted to GitHub?


I made an account on GitHub (Username is Radamanthas - 'Sadiq' was taken :p ) and I *think* I got it worked out. I forked the repo into my account made the changes then sent a pull request. Someone please let me know if I did it all correctly, or if I need to do something else. Thanks!

Post is unread #8 Jan 28, 2017 4:41 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,668
JoinedJan 1, 2002

 
Looks like you got it right, but you forked from the main branch that only Kayle has access to rather than my fork, which is here: https://github.com/Arthmoor/SmaugFUSS

That's fine though, because eventually it would need to move up to his branch anyway.

Post is unread #9 Jan 28, 2017 5:54 pm   
Go to the top of the page
Go to the bottom of the page

Sadiq
Fledgling
GroupMembers
Posts24
JoinedJan 7, 2010

 
Samson said:

Looks like you got it right, but you forked from the main branch that only Kayle has access to rather than my fork, which is here: https://github.com/Arthmoor/SmaugFUSS

That's fine though, because eventually it would need to move up to his branch anyway.


Sorry, I'm rather green about these things :p

Sent a pull request to your fork, as well :)

Pages:<< prev 1 next >>