Skip to content

Commit

Permalink
Remove two unused members of class monster (#34265)
Browse files Browse the repository at this point in the history
* Remove unused member monster::last_baby

It's actually never read.

* Remove unused member monster::last_biosig

It's actually never read.
  • Loading branch information
BevapDin authored and ZhilkinSerg committed Sep 27, 2019
1 parent a718f4c commit 449bf4f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4675,10 +4675,6 @@ bool game::add_zombie( monster &critter, bool pin_upgrade )
}

critter.last_updated = calendar::turn;
// @todo change last_baby to time_point
critter.last_baby = to_turn<int>( calendar::turn );
// @todo change last_biosig to time_point
critter.last_biosig = to_turn<int>( calendar::turn );
return critter_tracker->add( critter );
}

Expand Down
2 changes: 0 additions & 2 deletions src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ monster::monster()
upgrades = false;
upgrade_time = -1;
last_updated = 0;
last_baby = 0;
biosig_timer = -1;
last_biosig = 0;
}

monster::monster( const mtype_id &id ) : monster()
Expand Down
2 changes: 0 additions & 2 deletions src/monster.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,6 @@ class monster : public Creature
void init_from_item( const item &itm );

time_point last_updated = calendar::turn_zero;
int last_baby;
int last_biosig;
/**
* Do some cleanup and caching as monster is being unloaded from map.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/savegame_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1832,8 +1832,6 @@ void monster::load( JsonObject &data )
if( !data.read( "last_updated", last_updated ) ) {
last_updated = calendar::turn;
}
last_baby = data.get_int( "last_baby", to_turn<int>( calendar::turn ) );
last_biosig = data.get_int( "last_biosig", to_turn<int>( calendar::turn ) );
data.read( "mounted_player_id", mounted_player_id );
data.read( "path", path );
}
Expand Down Expand Up @@ -1885,10 +1883,8 @@ void monster::store( JsonOut &json ) const
json.member( "last_updated", last_updated );
json.member( "reproduces", reproduces );
json.member( "baby_timer", baby_timer );
json.member( "last_baby", last_baby );
json.member( "biosignatures", biosignatures );
json.member( "biosig_timer", biosig_timer );
json.member( "last_biosig", last_biosig );

json.member( "summon_time_limit", summon_time_limit );

Expand Down

0 comments on commit 449bf4f

Please sign in to comment.