Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Google, Sogou, Yandex

Members: 0
Guests: 23
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » weaponspell bug
Forum Rules | Mark all | Recent Posts

weaponspell bug
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 29, 2008, 3:36 am   Last edited Aug 29, 2008, 4:07 am by Samsa
Go to the top of the page
Go to the bottom of the page

Samsa
Fledgling
GroupMembers
Posts15
JoinedAug 29, 2008

Hi,

I think I've discovered a new bug in swrfuss1.2. As I haven't found anything about it, I'm posting it here.

The bug occurs when creating a weapon with a sleep weaponspell. When using the weapon the mud crashes. You can test this bug by typing the following commands:

ocreate 800 escopeta
oset escopeta type weapon
oset escopeta weapontype blaster
oset escopeta numdamdie 5
oset escopeta sizedamdie 2
oset escopeta charges 1000
oset escopeta maxcharges 1000
oset escopeta wear take wield
slookup sleep (here, we can see that sleep is sn 64)
oset escopeta affect weaponspell 64
wear escopeta
minv student
k student

and the result is a segmentation fault.
The problem seems to be in not initializing target_name variable at magic.c and call get_char_room( ch, target_name ) in spell_sleep. This is called from one_hit (fight.c), at the end:
retcode = (*skill_table[aff->modifier]->spell_fun) ( aff->modifier, (wield->level+3)/3, ch, victim );

To solve it, in spell_sleep, type
CHAR_DATA *victim = (CHAR_DATA *) vo;
instead of
CHAR_DATA *victim;

and comment out the lines:
if ( ( victim = get_char_room( ch, target_name ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return rSPELL_FAILED;
}

Now, the weapon works but the fight continues even when the victim is affected by the sleep. Maybe a stop_fight should be added before victim->position = POS_SLEEPING; ? This doesn't work with snipe, though...

Thank you for your attention!

Samsa
       
Post is unread #2 Dec 9, 2008, 7:39 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Can someone confirm this for me?
       
Pages:<< prev 1 next >>