observed objects
This has been laying around for a few weeks. I meant to do more but have forgotten what the rest would have been. Don't mark generic objects as dknown.
This commit is contained in:
+11
-6
@@ -440,16 +440,21 @@ restnames(NHFILE *nhfp)
|
|||||||
void
|
void
|
||||||
observe_object(struct obj *obj)
|
observe_object(struct obj *obj)
|
||||||
{
|
{
|
||||||
obj->dknown = 1;
|
int oindx = obj->otyp;
|
||||||
discover_object(obj->otyp, FALSE, TRUE, FALSE);
|
|
||||||
|
/* skip for generic objects and for STRANGE_OBJECT */
|
||||||
|
if (oindx >= FIRST_OBJECT && !Hallucination) {
|
||||||
|
obj->dknown = 1;
|
||||||
|
discover_object(oindx, FALSE, TRUE, FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
discover_object(
|
discover_object(
|
||||||
int oindx,
|
int oindx, /* type of object */
|
||||||
boolean mark_as_known,
|
boolean mark_as_known, /* discover the type */
|
||||||
boolean mark_as_encountered,
|
boolean mark_as_encountered, /* mark the type as having been seen/felt */
|
||||||
boolean credit_hero)
|
boolean credit_hero) /* exercise wisdom */
|
||||||
{
|
{
|
||||||
if (oindx < FIRST_OBJECT) /* don't discover generic objects */
|
if (oindx < FIRST_OBJECT) /* don't discover generic objects */
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user