Remove g.monstermoves
It's redundant with g.moves, so there is no more need for it. Way, way back, it looks like g.moves and g.monstermoves can and did desync, where g.moves would track the amount of moves the player had gotten (and would therefore increase faster if the player were hasted) and g.monstermoves would track the amount of monster move cycles, aka turns. But this has not been the case for a long time, and they both increment together in the same location in allmain.c. There are no longer any cases where they will not be the same value. This is a save-breaking change because it changes struct instance_globals, but I have not updated the editlevel in this commit.
This commit is contained in:
@@ -2305,7 +2305,7 @@ in_container(struct obj *obj)
|
||||
}
|
||||
}
|
||||
if (Icebox && !age_is_relative(obj)) {
|
||||
obj->age = g.monstermoves - obj->age; /* actual age */
|
||||
obj->age = g.moves - obj->age; /* actual age */
|
||||
/* stop any corpse timeouts when frozen */
|
||||
if (obj->otyp == CORPSE) {
|
||||
if (obj->timed) {
|
||||
@@ -2445,7 +2445,7 @@ void
|
||||
removed_from_icebox(struct obj *obj)
|
||||
{
|
||||
if (!age_is_relative(obj)) {
|
||||
obj->age = g.monstermoves - obj->age; /* actual age */
|
||||
obj->age = g.moves - obj->age; /* actual age */
|
||||
if (obj->otyp == CORPSE) {
|
||||
struct monst *m = get_mtraits(obj, FALSE);
|
||||
boolean iceT = m ? (m->data == &mons[PM_ICE_TROLL])
|
||||
@@ -2531,7 +2531,7 @@ observe_quantum_cat(struct obj *box, boolean makecat, boolean givemsg)
|
||||
/* set_corpsenm() will start the rot timer that was removed
|
||||
when makemon() created SchroedingersBox; start it from
|
||||
now rather than from when this special corpse got created */
|
||||
deadcat->age = g.monstermoves;
|
||||
deadcat->age = g.moves;
|
||||
set_corpsenm(deadcat, PM_HOUSECAT);
|
||||
deadcat = oname(deadcat, sc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user