question


(dutchmeat) #1

Hello guys,

Can someone tell me how the vectors are set in the engine?
I mean I know how it’s done in the actual game code, but how does the communication work between the game and engine?

Because I want to make a QMM (Q3 Multimod) Plugin which can change variables like the speed and others.


(Elite) #2

This is a bit offtopic, but I was just going over your site, and noticed this topic about producing the local server time:
http://z4.invisionfree.com/ProgrammingAnDstuff/index.php?showtopic=249

Anyhow, here is another way to do it also:


//convert a duration of time in seconds into a human readable string
void G_Tools_TimeToString(time_t *seconds, char *buffer, int bufferSize) {
	//declare variables
	struct tm	*t;
	char		am_pm[] = "AM";

	//convert to local time
	t = localtime(seconds);

	//make sure we have the right extension
	if(t->tm_hour >= 12) {
		strcpy( am_pm, "PM" );
	}

	//convert time from 24hour to 12hour
	if(t->tm_hour > 12) {
		t->tm_hour -= 12;
	}

	//set to 12 if it's midnight
	if(t->tm_hour == 0) {
		t->tm_hour = 12;
	}

	//copy the result to the output buffer
	Com_sprintf(buffer, bufferSize, "%.19s %s
", asctime(t), am_pm);
}