Bug in violence_update( )
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Jan 14, 2017 7:43 pm
Last edited Jan 14, 2017 7:53 pm by GatewaySysop
Conjurer
GroupMembers
Posts413
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
Conjurer
GroupMembers
Posts413
JoinedMar 7, 2005
Okay, giving this another shot after the forum fix. Thanks Samson!
In fight.c, violence_update( ), there is this bit regarding non-autonomous mobs potentially switching PC tanks:
Shouldn't that instead look like this, so we recalculate fight->xp, fight->align, fight->time_skilled and such, for the new tank?
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?
/*
* 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 );
}
#3 Jan 18, 2017 4:43 pm
Fledgling
GroupMembers
Posts24
JoinedJan 7, 2010
And another good catch! You are on a roll!
#4 Jan 18, 2017 11:20 pm
Black Hand
GroupAdministrators
Posts3,685
JoinedJan 1, 2002
Have you guys thought about making sure these get submitted to GitHub?
#5 Jan 20, 2017 7:34 am
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.
#6 Jan 20, 2017 3:50 pm
Conjurer
GroupMembers
Posts413
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.
Likewise here, to be honest. Will have to check it out when I get a chance!
#7 Jan 28, 2017 9:04 am
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!
#8 Jan 28, 2017 4:41 pm
Black Hand
GroupAdministrators
Posts3,685
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.
That's fine though, because eventually it would need to move up to his branch anyway.
#9 Jan 28, 2017 5:54 pm
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 >>