From 7142a710d849f6b0ad566c691278d524578b3a6a Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 12 Jun 2008 06:55:11 +0000 Subject: Improve performance by only checking whether there are lava or deep water grids nearby if the player recently moved (or restarted a game) and if a non-adjacent monster tries to reach the player. Remove now unneeded lua code (was used for the old pickup.lua) and make monsters switch away from ranged weapons when engaging you in melee. If a monster will still insist on hitting you with a sling it's a sure sign said sling is cursed (doesn't autoID, though). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5755 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tags.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/tags.cc') diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index dc0932e8d5..d9e574c477 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -997,7 +997,7 @@ static void tag_construct_you(writer &th) marshallByte(th, you.entering_level); // lava_in_sight and water_in_sight don't need to be saved as they can - // be recalculated on game start + // be recalculated on game start. // List of currently beholding monsters (usually empty). marshallByte(th, you.beheld_by.size()); @@ -1386,9 +1386,10 @@ static void tag_read_you(reader &th, char minorVersion) you.transit_stair = static_cast(unmarshallShort(th)); you.entering_level = unmarshallByte(th); + // These two need not be saved. - you.lava_in_sight = false; - you.water_in_sight = false; + you.lava_in_sight = -1; + you.water_in_sight = -1; // List of currently beholding monsters (usually empty). count_c = unmarshallByte(th); -- cgit v1.2.3-54-g00ecf