mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	Add explanatory comment.
The 0-indexed month value may be confusing.
This commit is contained in:
		
							
								
								
									
										3
									
								
								orbs.cpp
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								orbs.cpp
									
									
									
									
									
								
							| @@ -1607,6 +1607,9 @@ EX eItem targetRangedOrb(cell *c, orbAction a) { | |||||||
| bool isValentines() { | bool isValentines() { | ||||||
|   const time_t now = time(NULL); |   const time_t now = time(NULL); | ||||||
|   const struct tm *datetime = localtime(&now); |   const struct tm *datetime = localtime(&now); | ||||||
|  |  | ||||||
|  |   // 0-indexed tm_mon, 1-index tm_mday | ||||||
|  |   // So this is February (2nd month), and the 14th day. | ||||||
|   return datetime->tm_mon == 1 && datetime->tm_mday == 14; |   return datetime->tm_mon == 1 && datetime->tm_mday == 14; | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ammon Smith
					Ammon Smith