01 Aug, 2011, arholly wrote in the 1st comment:
Votes: 0
Hello:
I'm looking through the code and trying to change some things and revise a bunch of other stuff. I noticed the following:
struct	con_app_type
{
sh_int hitp;
sh_int shock;
};

But I've looked and looked and don't see where shock is used at all in the code.

Since it does not appear to be used, does that mean I can remove it from struct and then remove the values assigned to it in const.c and not hose things up tremendously?

Thanks,
Arholly
01 Aug, 2011, David Haley wrote in the 2nd comment:
Votes: 0
If you've used reasonable search tools and can find no reference, then yes, it's probably safe to remove.

On the other hand, if you have no need to remove it, and are not sure of what you're doing, why remove it?
01 Aug, 2011, arholly wrote in the 3rd comment:
Votes: 0
I guess I just don't see a need to have extraneous information in a table when it does absolutely nothing other than leaving it in there just because it was in there.
01 Aug, 2011, David Haley wrote in the 4th comment:
Votes: 0
Sure. So if you're sure it's not referenced, take it out. If you're not sure, don't fix things that aren't broken. :smile:
01 Aug, 2011, arholly wrote in the 5th comment:
Votes: 0
Now that is good advice (not fixing things that are not broken). But I used three different search tools on all the files and couldn't find anything referencing it. I think it's one of those legacy things that got left in the code and never got used.
01 Aug, 2011, Kayle wrote in the 6th comment:
Votes: 0
shock was only ever partially implemented. It was intended to be a value based on con where taking abnormally large hits would put your body into a sort of shock state and slow your responses by a little bit. The shock score was how resistant you were going to be in resisting it. But, it was only ever partially implemented.
01 Aug, 2011, arholly wrote in the 7th comment:
Votes: 0
I figured it was a reference to the old system shock score from earlier versions of D&D.
01 Aug, 2011, Rarva.Riendf wrote in the 8th comment:
Votes: 0
hmmm this structure is used there
const struct con_app_type con_app[51] ={…}
as an example.

So I wonder how come you do not use it at all (I would have to check but shock it is used in hand to hand fighting in mine)
A easy step is to delete it, and see if it still compiles anyway (or use a proper IDE that will tell you where it is used)
01 Aug, 2011, arholly wrote in the 9th comment:
Votes: 0
It did compile fine when I took it out, so I'm guessing it is not used in stock.
01 Aug, 2011, Kline wrote in the 10th comment:
Votes: 0
Comment, not delete. It's a lot easier to test something and rollback by removing the characters on a single block comment then to have to revert a large chunk of a file. Glad it worked out for you though :)
02 Aug, 2011, oenone wrote in the 11th comment:
Votes: 0
delete, not comment. use a VCS. if you keep commenting stuff out, and add new stuff, comment out parts of that again, your files get bigger and bigger, and you have to scroll a lot, possibly overlooking code between commented blocks. using a VCS makes it easy to get old stuff back in.
02 Aug, 2011, Rarva.Riendf wrote in the 12th comment:
Votes: 0
oenone said:
delete, not comment. use a VCS. if you keep commenting stuff out, and add new stuff, comment out parts of that again, your files get bigger and bigger, and you have to scroll a lot, possibly overlooking code between commented blocks. using a VCS makes it easy to get old stuff back in.

Delete AND comment the commit in the VCS ;p
05 Aug, 2011, triskaledia wrote in the 13th comment:
Votes: 0
I kept that shock value in and used the value to code bonus hp per level while worshiping a certain deity.
I'm sure you could use it for something else rather than completely remove it - unless you have to need for it.
0.0/13