🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Ken Arnold%CGL Sun, 23 Jun 1985 00:53
Inventory Fix in mkobj.c
#810
Author: Ken Arnold%CGL
Date: Sun, 23 Jun 1985 00:53
31 lines
1547 bytes
The following is a minor fix to hack.  I finally got tired of having
multiple groups of the same kind of food, which makes keeping track
of things difficult.  The problem was that certain fields were not getting
initialized, so the "spe" field, especially, was different for different
pieces of food, even though the field isn't used for food.  The following
is the fix, as a context diff (as all hack updates should come).

----- CUT HERE -----
*** /tmp/,RCSt1006751	Sat Jun 22 17:49:55 1985
--- hack.mkobj.c	Sat Jun 22 17:40:41 1985
***************
*** 56,61
  	otmp->age = moves;
  	otmp->o_id = flags.ident++;
  	otmp->quan = 1;
  	otmp->olet = let;
  	otmp->otyp = otyp;
  	otmp->dknown = index("/=!?*", let) ? 0 : 1;

--- 56,65 -----
  	otmp->age = moves;
  	otmp->o_id = flags.ident++;
  	otmp->quan = 1;
+ 	otmp->spe = 0;
+ 	otmp->known = 0;
+ 	otmp->dknown = 0;
+ 	otmp->cursed = 0;
  	otmp->olet = let;
  	otmp->otyp = otyp;
  	otmp->dknown = index("/=!?*", let) ? 0 : 1;
Re: Inventory Fix in mkobj.c
#834
Author: Andries Brouwer
Date: Tue, 25 Jun 1985 21:51
14 lines
1393 bytes
In article <553@ucsfcgl.UUCP> arnold@ucsfcgl.UUCP () writes:
>
>The following is a minor fix to hack.  I finally got tired of having
>multiple groups of the same kind of food, which makes keeping track
>of things difficult.  The problem was that certain fields were not getting
>initialized, so the "spe" field, especially, was different for different
>pieces of food, even though the field isn't used for food.  The following
>is the fix, as a context diff (as all hack updates should come).

I see no harm in this fix, but no advantage either. Just before
the lines quoted in the context diff is the line (mkobj.c line 55 in V1.0.2)
	*otmp = zeroobj;
that initializes all fields to zero; so the behaviour with and without
the fix will be completely identical.
Re: Inventory Fix in mkobj.c
#848
Author: Ken Arnold%CGL
Date: Wed, 03 Jul 1985 01:16
20 lines
1723 bytes
In article <718@mcvax.UUCP> aeb@mcvax.UUCP (Andries Brouwer) writes:
>In article <553@ucsfcgl.UUCP> arnold@ucsfcgl.UUCP () writes:
>>The following is a minor fix to hack.  I finally got tired of having
>>multiple groups of the same kind of food, which makes keeping track
>>of things difficult.  The problem was that certain fields were not getting
>>initialized, so the "spe" field, especially, was different for different
>>pieces of food, even though the field isn't used for food.
>I see no harm in this fix, but no advantage either. Just before
>the lines quoted in the context diff is the line (mkobj.c line 55 in V1.0.2)
>	*otmp = zeroobj;
>that initializes all fields to zero; so the behaviour with and without
>the fix will be completely identical.

Well, slap ME with a wet herring!  I basically installed my fix, and
then things seemed to work better, so I posted it.  Andries is quite
right, it seems, that my fix is no fix at all.  Sigh.  Sorry about that.
If anyone DOES figure out why this proble occurs, I, for one, would
appreciate a real fix.

		Ken Arnold
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads