• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

how to change the day duration?

Capaverde

New Member
Joined
Sep 30, 2007
Messages
107
Reaction score
4
I changed this line in game.cpp
Code:
daycycle = 3600;
to
Code:
daycycle = 120;

but it doesnt seem to alter anything, I've already waited 120 seconds and its still day

- - - Updated - - -

okay I figure out something

I changed
Code:
		case LIGHT_STATE_SUNRISE:
		{
			newlightlevel += (LIGHT_LEVEL_DAY - LIGHT_LEVEL_NIGHT) / 30;
			lightChange = true;
			break;
		}
		case LIGHT_STATE_SUNSET:
		{
			newlightlevel -= (LIGHT_LEVEL_DAY - LIGHT_LEVEL_NIGHT)/30;
			lightChange = true;
			break;
		}
to
Code:
		case LIGHT_STATE_SUNRISE:
		{
			newlightlevel += (LIGHT_LEVEL_DAY - LIGHT_LEVEL_NIGHT) *light_hour_delta / 120;
			lightChange = true;
			break;
		}
		case LIGHT_STATE_SUNSET:
		{
			newlightlevel -= (LIGHT_LEVEL_DAY - LIGHT_LEVEL_NIGHT) *light_hour_delta / 120;
			lightChange = true;
			break;
		}

but its weird, I only see the changes if I logout and login again
and when I print getWorldLight() it keeps giving 215 no matter if its day or night
 
Back
Top