mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	fixed a weird crash in guided tour
This commit is contained in:
		| @@ -36,6 +36,18 @@ struct gamedata { | ||||
|       } | ||||
|     index += ssize; | ||||
|     } | ||||
|   template<class T> void store_ptr(T& x) { | ||||
|     T* copy; | ||||
|     if(mode == 0) { | ||||
|       copy = new T; | ||||
|       *copy = move(x); | ||||
|       } | ||||
|     store(copy); | ||||
|     if(mode != 0) { | ||||
|       x = move(*copy); | ||||
|       delete copy; | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
| #endif | ||||
|  | ||||
| @@ -49,7 +61,7 @@ void gamedata_all(gamedata& gd) { | ||||
|   gd.store(chaosmode); | ||||
|   gd.store(*current_display); | ||||
|   gd.store(cgip); | ||||
|   gd.store(vid); | ||||
|   gd.store_ptr(vid); | ||||
|   gd.store(sightrange_bonus); | ||||
|   gd.store(genrange_bonus); | ||||
|   gd.store(gamerange_bonus); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue