Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
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
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, DotBot, Yahoo!, Bing

Members: 0
Guests: 22
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Switch is just... Really fuba...
Forum Rules | Mark all | Recent Posts

Switch is just... Really fubar. XD
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 21, 2006, 7:52 pm
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

Okay, so... I'm playing around on an SWR MUD that I'm an Admin on, and start to screw around with switching. First, I switched into an Imm I had frozen... Couldn't actually do anything, including, but not limited to, "return." Continue to screw around... Well, I had to disconnect the Imm I froze before I switched, and when he reconnected, there were two of him... The one I was switched into, and the one his descriptor was occupying. Proceeded to do all sorts of goofy stuff... Talking to "myself," engaging with myself in "MORTAL KOMBAT," and the like. Finally, I pulled a really goofy one... I "destroyed" myself. Well, the other myself. Anyway, at this point, he logs back in, and has to remake... And that really made a mess. Apparently, when he got in, all of his text was green, he couldn't use commands designed to reject mobs, and for some weird reason, he ended up with the lead Immortal's rank. XD

The first thing I'm noticing is that "do_save" is causing the character that switched, not the character that was switched into, to save. Obviously, when the character switched into is an NPC, this is how it should be... But why is it that if a player is being switched into, it's not saving them, but the player that was switched from?

Did that make sense? :P

Anyway... So, lol, yeah, all kinds of stuff that I'm fairly certain was never intended to happen, well, did. :P Nothing ever crashed, but I'm sure it wouldn't have taken a terrible lot more to make it do so. This is probably a non-issue just because nobody else would be stupid enough to do what I did, but... Rofl, who knows. XD
       
Post is unread #2 Mar 21, 2006, 8:16 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Switch is terrible. I think I brought this up a while ago. For example, force a player linkdead. Switch into their body. Then have them sign on. You'll have two of the same characters on the MUD.

Or in my MUD, switching to a mob will crash anytime color is sent to the switched person.
       
Post is unread #3 Mar 21, 2006, 8:24 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Smaug has the same issues lol.
It's possible to fix it all though :) so feel free to work on that lol :)
       
Post is unread #4 Mar 21, 2006, 9:07 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

You mean it's when colors are sent to the character/mob you're switched into that causes it to crash? I've encountered this quite a few times and never quite connected the concept... perhaps to avoid the problem I should modify switch on my mud to also switch the possessor to ascii instead of ansi... of course, when they return they'd have to set themselves back to ansi instead of ascii in case they'd already been in ascii mode...
       
Post is unread #5 Mar 21, 2006, 9:08 pm
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

I think I found a suitable fix to the character duplication issue. Played around with it a little, didn't catch any funny business. If somebody would like to run it through the wringer themselves, be my guest, maybe you can come up with a scenario I didn't. Rather than redirect a character trying to log into a character that's switched into to that char, which would totally piss off an Immortal that has a purpose for being switched into it, I'm just going to tell them they're SOL.

In comm.c, in function check_playing, find:

   DESCRIPTOR_DATA *dold;
   int cstate;

   for( dold = first_descriptor; dold; dold = dold->next )
   {


Directly after that, add the following:
		if( dold->original && dold->original->switched
			&& !IS_NPC( dold->original->switched )
			&& !str_cmp( dold->original->switched->name, name ) )
		{
			write_to_buffer( d, "Someone is currently switched into your character - try again.\r\n", 0 );
			return BERR;
		}


If it works... That's one down. :smile:
       
Post is unread #6 Mar 21, 2006, 9:12 pm
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

By the way, the color thing... Can you give an example? I switched into a mob and did "say &RHrm." but no crashy-crashy. I'm not sure I ever encountered that issue, and if I did, it was probably back when I had no idea what the hell I was doing, and wouldn't have known what caused anything.
       
Post is unread #7 Mar 22, 2006, 4:59 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Yes, switch is pure evil. Personally I'd eliminate the ability to switch into any PC character. As far as I see it there is no legitimate reason to need this ability when you have access to the force command and can make the linkdead person do anything you want anyway. It avoids this entire class of problems that way.

If for some reason you find you can't do something you expect with a linkdead person, code immortal commands to bypass whatever is blocking you from doing it. That's generally how I solve these kinds of problems.
       
Post is unread #8 Mar 22, 2006, 12:19 pm
Go to the top of the page
Go to the bottom of the page

Daiimus
Fledgling
GroupMembers
Posts13
JoinedFeb 26, 2006

I actually think the switch command could be very usefull in "puppeting" MOBS in a RP-intensive M**. Albeit, my coding skills are not up to par...just tossing my two cents out there.
       
Post is unread #9 Mar 22, 2006, 4:23 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Not sure why you can't use force, Daiimus.

Halcyon, it would crash when an Imm goto'd me (switched) and the goto had color in it. I'll probably make a new topic with details in it when I get a chance.
       
Post is unread #10 Mar 22, 2006, 6:06 pm   Last edited Mar 22, 2006, 6:11 pm by Halcyon
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

As far as removing switch goes, there are some certain situations in which I'd like to be able to use switch, rather than just force, such as seeing the output as a player would see it (When they're not actually there, as you can only snoop if there's a descriptor), and other such things. As far as this color thing is concerned, I haven't had any issues with that. I can have Imms goto and from and all that jazz. Do ya'll have the older color code still in? Maybe that's the issue? I have no idea.

This is one of those things where I'd probably prefer to just fix it rather than get rid of it, because fixing it is doable, and there's gotta be at least a few good uses for it.

Edit: Yeah, I just tried to replicate an Imm goto'ing me while switched, on the offchance I remembered incorrectly, and no, there was no crash. My only guess would be outdated color code, or a fix missing somewhere, because I can't replicate a color-related crash.
       
Post is unread #11 Mar 23, 2006, 12:46 am
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

Yeah, So I'm the other Imm that was involved in the original Incident. just thought I'd throw that out there. Only thing I wanna point out though is after the destroy thing, i didn't have to remake, I just logged in like normal.. only.. level 1, and I was effectively a mob. it was really wierd to say the least. :alien:
       
Post is unread #12 Mar 23, 2006, 5:37 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

I wasn't advocating the complete removal of switch. Only the ability to switch into player characters. It seems that most of the problems with switch come from doing this when there should be no legitimate reason to do so.

Using switch to possess a mob is precisely what I always thought it was intended for.
       
Post is unread #13 Mar 23, 2006, 12:53 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

So the solution, then is to make snoop and the other related commands work without a descriptor so that you don't need to ever switch into a PC?
       
Post is unread #14 Mar 25, 2006, 11:14 pm
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

That'd be hard to do, seeing how snoop works based on adding the snooper to a victim descriptor, i.e., a snoop is stored in d->snooped_by. That's why I'd just as soon keep the switch functionality the way it is rather than remove the ability to switch into PCs. It works, it just works poorly... But it could be fixed.
       
Post is unread #15 Mar 26, 2006, 12:27 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Samson: The "legitimate" reasons I've encountered for using switch with a PC are for things like finding which channels a PC is set to listen to, or tracking down bugs that the player has reported about their character, and so forth none of which can easily be done without snoop and having the character online, so if you loadup the character diagnostically you can only switch into them to see the things they see that you don't have any other way of checking since you can't snoop a loadup'd character. Which reminds me, I need to make a command to allow immortals to see what channels a given character is listening to...

Halcyon: Wouldn't there be more to fix than just what you've posted about check_playing though?
       
Post is unread #16 Mar 26, 2006, 4:03 pm
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

I haven't really found that many other problems with it. That keeps the game from loading up two of the same char, and since I can't replicate this color issue to save my life, I don't know what else could use some fixing off the top of my head, except the weird issue with "save" not working properly. Have I missed anything?
       
Post is unread #17 Mar 27, 2006, 8:38 pm   Last edited Mar 27, 2006, 8:38 pm by Conner
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

I know I've had crashes when I use it to switch in PCs before.. I'll have to see if I can find out why and get back to you on it though. :(
       
Post is unread #18 Apr 2, 2006, 11:42 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Conner said:

Samson: The "legitimate" reasons I've encountered for using switch with a PC are for things like finding which channels a PC is set to listen to, or tracking down bugs that the player has reported about their character, and so forth none of which can easily be done without snoop and having the character online, so if you loadup the character diagnostically you can only switch into them to see the things they see that you don't have any other way of checking since you can't snoop a loadup'd character. Which reminds me, I need to make a command to allow immortals to see what channels a given character is listening to...


Well as you point out, all you need to do is code a way for imms to see what channels another person is listening to. Bugs in pfiles should throw log messages regardless of whether the person is online or not, so loadup should be sufficient for that. If it's not, then there's probably something you can add to mset to report that otherwise wouldn't. In those rare events where the user is needed to be online and can't for some reason, this is why we have password changing functions :)
       
Post is unread #19 Apr 3, 2006, 11:33 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

*nod* I suppose that's true enough, I guess I need a way for immortals to see (& set?) what channels a lower level character is listening to.. and I need to make sure that everything a character could have is included in mset somehow... though the former is more pertinent to me at this point, because the latter is just a matter of adding all the extras that I could usually live without. :)
       
Pages:<< prev 1 next >>